Subversion Repositories SmartDukaan

Rev

Rev 21844 | 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
    /**
21847 amit.gupta 105
     * Returns all the valid suppliers with GST Codes
4754 mandeep.dh 106
     */
107
    public List<Supplier> getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException;
108
 
109
    /**
21847 amit.gupta 110
     * Returns all the valid suppliers
111
     */
112
    public List<Supplier> getAllSuppliers() throws PurchaseServiceException, org.apache.thrift.TException;
113
 
114
    /**
4754 mandeep.dh 115
     * Fulfills a given purchase order with an item.
116
     * 
117
     * @param purchaseOrderId
118
     * @param itemId
119
     * @param quantity
120
     */
121
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException;
122
 
123
    /**
124
     * Amends a PO as per the new lineitems passed
125
     * 
126
     * @param purchaseOrder
127
     */
128
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException;
129
 
5185 mandeep.dh 130
    /**
131
     * Fulfills a given purchase id with an item and its quantity.
132
     * 
133
     * @param purchaseId
134
     * @param itemId
135
     * @param quantity
136
     */
137
    public void unFulfillPO(long purchaseId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException;
138
 
5443 mandeep.dh 139
    /**
5530 mandeep.dh 140
     * Fetches all invoices after a given date
5443 mandeep.dh 141
     * 
142
     * @param date
143
     */
144
    public List<Invoice> getInvoices(long date) throws org.apache.thrift.TException;
145
 
146
    /**
7410 amar.kumar 147
     * Fetches all invoices after a given date
148
     * 
149
     * @param warehouseId
150
     * @param supplierId
151
     * @param date
152
     */
153
    public List<Invoice> getInvoicesForWarehouse(long warehouseId, long supplierId, long date) throws org.apache.thrift.TException;
154
 
155
    /**
5443 mandeep.dh 156
     * Creates an invoice object
157
     * 
158
     * @param invoice
159
     */
160
    public void createInvoice(Invoice invoice) throws PurchaseServiceException, org.apache.thrift.TException;
161
 
5591 mandeep.dh 162
    /**
163
     * Creates a supplier
164
     * 
165
     * @param supplier
166
     */
167
    public Supplier addSupplier(Supplier supplier) throws org.apache.thrift.TException;
168
 
169
    /**
170
     * Updates a supplier
171
     * 
172
     * @param supplier
173
     */
174
    public void updateSupplier(Supplier supplier) throws org.apache.thrift.TException;
175
 
6467 amar.kumar 176
    /**
177
     * Create a new Purchase Return
178
     * 
179
     * @param purchaseReturn
180
     */
181
    public long createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException;
182
 
183
    /**
184
     * Create a new Purchase Return
185
     * 
186
     * @param id
187
     */
188
    public void settlePurchaseReturn(long id) throws org.apache.thrift.TException;
189
 
190
    /**
191
     * Create a new Purchase Return
192
     */
193
    public List<PurchaseReturn> getUnsettledPurchaseReturns() throws org.apache.thrift.TException;
194
 
6630 amar.kumar 195
    /**
196
     * Get invoice with given supplierId and invoiceNumber
197
     * 
198
     * @param invoiceNumber
199
     * @param supplierId
200
     */
201
    public List<PurchaseReturn> getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException;
202
 
6762 amar.kumar 203
    /**
204
     *  * Inserts new Invoice/LineItem/Purchase Entries for Billed Product done through Our External Billing
205
     * *
206
     * 
207
     * @param invoiceNumber
208
     * @param unitPrice
7672 rajveer 209
     * @param nlc
6762 amar.kumar 210
     * @param itemId
211
     */
7672 rajveer 212
    public long createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId) throws org.apache.thrift.TException;
6762 amar.kumar 213
 
214
    public void fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException;
215
 
7410 amar.kumar 216
    /**
217
     * Marks a purchase order as closedcomplete and updates the receivedOn time.
218
     * 
219
     * @param poId
220
     */
221
    public void closePO(long poId) throws PurchaseServiceException, org.apache.thrift.TException;
222
 
223
    /**
224
     * Check if invoice is already received with given supplierId and invoiceNumber
225
     * 
226
     * @param invoiceNumber
227
     * @param supplierId
228
     */
229
    public boolean isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException;
230
 
9829 amar.kumar 231
    /**
232
     * Change warehouseId of PO if no items have been received yet for the PO
233
     * 
234
     * @param id
235
     * @param warehouseId
236
     */
237
    public void changeWarehouseForPO(long id, long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException;
238
 
9925 amar.kumar 239
    /**
240
     * Change status of PO
241
     * 
242
     * @param id
243
     * @param poStatus
244
     */
245
    public void changePOStatus(long id, POStatus poStatus) throws PurchaseServiceException, org.apache.thrift.TException;
246
 
11751 manish.sha 247
    /**
248
     * Get Purchase Return from Id
249
     * 
250
     * @param id
251
     */
252
    public PurchaseReturn getPurchaseReturn(long id) throws PurchaseServiceException, org.apache.thrift.TException;
253
 
13600 manish.sha 254
    public boolean markPurchasereturnSettled(long id, SettlementType settlementType, String documentNumber, String settlementBy, long settledAmount) throws PurchaseServiceException, org.apache.thrift.TException;
255
 
256
    public List<PurchaseReturnSettlement> getPrSettlementsForPurchaseReturn(long purchaseReturnId) throws PurchaseServiceException, org.apache.thrift.TException;
257
 
258
    public void updatePurchaseReturn(PurchaseReturn purchaseReturn) throws PurchaseServiceException, org.apache.thrift.TException;
259
 
4496 mandeep.dh 260
  }
261
 
262
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
263
 
264
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
265
 
266
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
267
 
268
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
269
 
270
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSupplier_call> resultHandler) throws org.apache.thrift.TException;
271
 
11801 manish.sha 272
    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 273
 
274
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePurchase_call> resultHandler) throws org.apache.thrift.TException;
275
 
276
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchases_call> resultHandler) throws org.apache.thrift.TException;
277
 
6385 amar.kumar 278
    public void getPurchasesForPO(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchasesForPO_call> resultHandler) throws org.apache.thrift.TException;
279
 
4555 mandeep.dh 280
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException;
4496 mandeep.dh 281
 
4754 mandeep.dh 282
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
283
 
284
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuppliers_call> resultHandler) throws org.apache.thrift.TException;
285
 
21847 amit.gupta 286
    public void getAllSuppliers(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllSuppliers_call> resultHandler) throws org.apache.thrift.TException;
287
 
4754 mandeep.dh 288
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fulfillPO_call> resultHandler) throws org.apache.thrift.TException;
289
 
290
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
291
 
5185 mandeep.dh 292
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.unFulfillPO_call> resultHandler) throws org.apache.thrift.TException;
293
 
5443 mandeep.dh 294
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoices_call> resultHandler) throws org.apache.thrift.TException;
295
 
7410 amar.kumar 296
    public void getInvoicesForWarehouse(long warehouseId, long supplierId, long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoicesForWarehouse_call> resultHandler) throws org.apache.thrift.TException;
297
 
5443 mandeep.dh 298
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createInvoice_call> resultHandler) throws org.apache.thrift.TException;
299
 
5591 mandeep.dh 300
    public void addSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addSupplier_call> resultHandler) throws org.apache.thrift.TException;
301
 
302
    public void updateSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateSupplier_call> resultHandler) throws org.apache.thrift.TException;
303
 
6467 amar.kumar 304
    public void createPurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
305
 
306
    public void settlePurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.settlePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
307
 
308
    public void getUnsettledPurchaseReturns(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUnsettledPurchaseReturns_call> resultHandler) throws org.apache.thrift.TException;
309
 
6630 amar.kumar 310
    public void getInvoice(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoice_call> resultHandler) throws org.apache.thrift.TException;
311
 
7672 rajveer 312
    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 313
 
314
    public void fulfillPOForExtBilling(long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fulfillPOForExtBilling_call> resultHandler) throws org.apache.thrift.TException;
315
 
7410 amar.kumar 316
    public void closePO(long poId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePO_call> resultHandler) throws org.apache.thrift.TException;
317
 
318
    public void isInvoiceReceived(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.isInvoiceReceived_call> resultHandler) throws org.apache.thrift.TException;
319
 
9829 amar.kumar 320
    public void changeWarehouseForPO(long id, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.changeWarehouseForPO_call> resultHandler) throws org.apache.thrift.TException;
321
 
9925 amar.kumar 322
    public void changePOStatus(long id, POStatus poStatus, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.changePOStatus_call> resultHandler) throws org.apache.thrift.TException;
323
 
11751 manish.sha 324
    public void getPurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
325
 
13600 manish.sha 326
    public void markPurchasereturnSettled(long id, SettlementType settlementType, String documentNumber, String settlementBy, long settledAmount, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.markPurchasereturnSettled_call> resultHandler) throws org.apache.thrift.TException;
327
 
328
    public void getPrSettlementsForPurchaseReturn(long purchaseReturnId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPrSettlementsForPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
329
 
330
    public void updatePurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updatePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
331
 
4496 mandeep.dh 332
  }
333
 
334
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
335
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
336
      public Factory() {}
337
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
338
        return new Client(prot);
339
      }
340
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
341
        return new Client(iprot, oprot);
342
      }
343
    }
344
 
345
    public Client(org.apache.thrift.protocol.TProtocol prot)
346
    {
347
      super(prot, prot);
348
    }
349
 
350
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
351
      super(iprot, oprot);
352
    }
353
 
354
    public long createPurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
355
    {
356
      send_createPurchaseOrder(purchaseOrder);
357
      return recv_createPurchaseOrder();
358
    }
359
 
360
    public void send_createPurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
361
    {
362
      createPurchaseOrder_args args = new createPurchaseOrder_args();
363
      args.setPurchaseOrder(purchaseOrder);
364
      sendBase("createPurchaseOrder", args);
365
    }
366
 
367
    public long recv_createPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
368
    {
369
      createPurchaseOrder_result result = new createPurchaseOrder_result();
370
      receiveBase(result, "createPurchaseOrder");
371
      if (result.isSetSuccess()) {
372
        return result.success;
373
      }
374
      if (result.e != null) {
375
        throw result.e;
376
      }
377
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseOrder failed: unknown result");
378
    }
379
 
380
    public PurchaseOrder getPurchaseOrder(long id) throws PurchaseServiceException, org.apache.thrift.TException
381
    {
382
      send_getPurchaseOrder(id);
383
      return recv_getPurchaseOrder();
384
    }
385
 
386
    public void send_getPurchaseOrder(long id) throws org.apache.thrift.TException
387
    {
388
      getPurchaseOrder_args args = new getPurchaseOrder_args();
389
      args.setId(id);
390
      sendBase("getPurchaseOrder", args);
391
    }
392
 
393
    public PurchaseOrder recv_getPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
394
    {
395
      getPurchaseOrder_result result = new getPurchaseOrder_result();
396
      receiveBase(result, "getPurchaseOrder");
397
      if (result.isSetSuccess()) {
398
        return result.success;
399
      }
400
      if (result.e != null) {
401
        throw result.e;
402
      }
403
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrder failed: unknown result");
404
    }
405
 
406
    public List<PurchaseOrder> getAllPurchaseOrders(POStatus status) throws PurchaseServiceException, org.apache.thrift.TException
407
    {
408
      send_getAllPurchaseOrders(status);
409
      return recv_getAllPurchaseOrders();
410
    }
411
 
412
    public void send_getAllPurchaseOrders(POStatus status) throws org.apache.thrift.TException
413
    {
414
      getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
415
      args.setStatus(status);
416
      sendBase("getAllPurchaseOrders", args);
417
    }
418
 
419
    public List<PurchaseOrder> recv_getAllPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
420
    {
421
      getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
422
      receiveBase(result, "getAllPurchaseOrders");
423
      if (result.isSetSuccess()) {
424
        return result.success;
425
      }
426
      if (result.e != null) {
427
        throw result.e;
428
      }
429
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchaseOrders failed: unknown result");
430
    }
431
 
432
    public Supplier getSupplier(long id) throws PurchaseServiceException, org.apache.thrift.TException
433
    {
434
      send_getSupplier(id);
435
      return recv_getSupplier();
436
    }
437
 
438
    public void send_getSupplier(long id) throws org.apache.thrift.TException
439
    {
440
      getSupplier_args args = new getSupplier_args();
441
      args.setId(id);
442
      sendBase("getSupplier", args);
443
    }
444
 
445
    public Supplier recv_getSupplier() throws PurchaseServiceException, org.apache.thrift.TException
446
    {
447
      getSupplier_result result = new getSupplier_result();
448
      receiveBase(result, "getSupplier");
449
      if (result.isSetSuccess()) {
450
        return result.success;
451
      }
452
      if (result.e != null) {
453
        throw result.e;
454
      }
455
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSupplier failed: unknown result");
456
    }
457
 
11801 manish.sha 458
    public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments) throws PurchaseServiceException, org.apache.thrift.TException
4496 mandeep.dh 459
    {
11801 manish.sha 460
      send_startPurchase(purchaseOrderId, invoiceNumber, freightCharges, purchaseComments);
4496 mandeep.dh 461
      return recv_startPurchase();
462
    }
463
 
11801 manish.sha 464
    public void send_startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments) throws org.apache.thrift.TException
4496 mandeep.dh 465
    {
466
      startPurchase_args args = new startPurchase_args();
467
      args.setPurchaseOrderId(purchaseOrderId);
468
      args.setInvoiceNumber(invoiceNumber);
469
      args.setFreightCharges(freightCharges);
11801 manish.sha 470
      args.setPurchaseComments(purchaseComments);
4496 mandeep.dh 471
      sendBase("startPurchase", args);
472
    }
473
 
474
    public long recv_startPurchase() throws PurchaseServiceException, org.apache.thrift.TException
475
    {
476
      startPurchase_result result = new startPurchase_result();
477
      receiveBase(result, "startPurchase");
478
      if (result.isSetSuccess()) {
479
        return result.success;
480
      }
481
      if (result.e != null) {
482
        throw result.e;
483
      }
484
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startPurchase failed: unknown result");
485
    }
486
 
487
    public long closePurchase(long purchaseId) throws PurchaseServiceException, org.apache.thrift.TException
488
    {
489
      send_closePurchase(purchaseId);
490
      return recv_closePurchase();
491
    }
492
 
493
    public void send_closePurchase(long purchaseId) throws org.apache.thrift.TException
494
    {
495
      closePurchase_args args = new closePurchase_args();
496
      args.setPurchaseId(purchaseId);
497
      sendBase("closePurchase", args);
498
    }
499
 
500
    public long recv_closePurchase() throws PurchaseServiceException, org.apache.thrift.TException
501
    {
502
      closePurchase_result result = new closePurchase_result();
503
      receiveBase(result, "closePurchase");
504
      if (result.isSetSuccess()) {
505
        return result.success;
506
      }
507
      if (result.e != null) {
508
        throw result.e;
509
      }
510
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "closePurchase failed: unknown result");
511
    }
512
 
513
    public List<Purchase> getAllPurchases(long purchaseOrderId, boolean open) throws PurchaseServiceException, org.apache.thrift.TException
514
    {
515
      send_getAllPurchases(purchaseOrderId, open);
516
      return recv_getAllPurchases();
517
    }
518
 
519
    public void send_getAllPurchases(long purchaseOrderId, boolean open) throws org.apache.thrift.TException
520
    {
521
      getAllPurchases_args args = new getAllPurchases_args();
522
      args.setPurchaseOrderId(purchaseOrderId);
523
      args.setOpen(open);
524
      sendBase("getAllPurchases", args);
525
    }
526
 
527
    public List<Purchase> recv_getAllPurchases() throws PurchaseServiceException, org.apache.thrift.TException
528
    {
529
      getAllPurchases_result result = new getAllPurchases_result();
530
      receiveBase(result, "getAllPurchases");
531
      if (result.isSetSuccess()) {
532
        return result.success;
533
      }
534
      if (result.e != null) {
535
        throw result.e;
536
      }
537
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchases failed: unknown result");
538
    }
539
 
6385 amar.kumar 540
    public List<Purchase> getPurchasesForPO(long purchaseOrderId) throws PurchaseServiceException, org.apache.thrift.TException
541
    {
542
      send_getPurchasesForPO(purchaseOrderId);
543
      return recv_getPurchasesForPO();
544
    }
545
 
546
    public void send_getPurchasesForPO(long purchaseOrderId) throws org.apache.thrift.TException
547
    {
548
      getPurchasesForPO_args args = new getPurchasesForPO_args();
549
      args.setPurchaseOrderId(purchaseOrderId);
550
      sendBase("getPurchasesForPO", args);
551
    }
552
 
553
    public List<Purchase> recv_getPurchasesForPO() throws PurchaseServiceException, org.apache.thrift.TException
554
    {
555
      getPurchasesForPO_result result = new getPurchasesForPO_result();
556
      receiveBase(result, "getPurchasesForPO");
557
      if (result.isSetSuccess()) {
558
        return result.success;
559
      }
560
      if (result.e != null) {
561
        throw result.e;
562
      }
563
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchasesForPO failed: unknown result");
564
    }
565
 
4555 mandeep.dh 566
    public PurchaseOrder getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 567
    {
4555 mandeep.dh 568
      send_getPurchaseOrderForPurchase(purchaseId);
569
      return recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 570
    }
571
 
4555 mandeep.dh 572
    public void send_getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 573
    {
4555 mandeep.dh 574
      getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 575
      args.setPurchaseId(purchaseId);
4555 mandeep.dh 576
      sendBase("getPurchaseOrderForPurchase", args);
4496 mandeep.dh 577
    }
578
 
4555 mandeep.dh 579
    public PurchaseOrder recv_getPurchaseOrderForPurchase() throws org.apache.thrift.TException
4496 mandeep.dh 580
    {
4555 mandeep.dh 581
      getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
582
      receiveBase(result, "getPurchaseOrderForPurchase");
4496 mandeep.dh 583
      if (result.isSetSuccess()) {
584
        return result.success;
585
      }
4555 mandeep.dh 586
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrderForPurchase failed: unknown result");
4496 mandeep.dh 587
    }
588
 
4754 mandeep.dh 589
    public List<PurchaseOrder> getPendingPurchaseOrders(long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException
590
    {
591
      send_getPendingPurchaseOrders(warehouseId);
592
      return recv_getPendingPurchaseOrders();
593
    }
594
 
595
    public void send_getPendingPurchaseOrders(long warehouseId) throws org.apache.thrift.TException
596
    {
597
      getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
598
      args.setWarehouseId(warehouseId);
599
      sendBase("getPendingPurchaseOrders", args);
600
    }
601
 
602
    public List<PurchaseOrder> recv_getPendingPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
603
    {
604
      getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
605
      receiveBase(result, "getPendingPurchaseOrders");
606
      if (result.isSetSuccess()) {
607
        return result.success;
608
      }
609
      if (result.e != null) {
610
        throw result.e;
611
      }
612
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPendingPurchaseOrders failed: unknown result");
613
    }
614
 
615
    public List<Supplier> getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
616
    {
617
      send_getSuppliers();
618
      return recv_getSuppliers();
619
    }
620
 
621
    public void send_getSuppliers() throws org.apache.thrift.TException
622
    {
623
      getSuppliers_args args = new getSuppliers_args();
624
      sendBase("getSuppliers", args);
625
    }
626
 
627
    public List<Supplier> recv_getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
628
    {
629
      getSuppliers_result result = new getSuppliers_result();
630
      receiveBase(result, "getSuppliers");
631
      if (result.isSetSuccess()) {
632
        return result.success;
633
      }
634
      if (result.e != null) {
635
        throw result.e;
636
      }
637
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSuppliers failed: unknown result");
638
    }
639
 
21847 amit.gupta 640
    public List<Supplier> getAllSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
641
    {
642
      send_getAllSuppliers();
643
      return recv_getAllSuppliers();
644
    }
645
 
646
    public void send_getAllSuppliers() throws org.apache.thrift.TException
647
    {
648
      getAllSuppliers_args args = new getAllSuppliers_args();
649
      sendBase("getAllSuppliers", args);
650
    }
651
 
652
    public List<Supplier> recv_getAllSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
653
    {
654
      getAllSuppliers_result result = new getAllSuppliers_result();
655
      receiveBase(result, "getAllSuppliers");
656
      if (result.isSetSuccess()) {
657
        return result.success;
658
      }
659
      if (result.e != null) {
660
        throw result.e;
661
      }
662
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllSuppliers failed: unknown result");
663
    }
664
 
4754 mandeep.dh 665
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
666
    {
667
      send_fulfillPO(purchaseOrderId, itemId, quantity);
668
      recv_fulfillPO();
669
    }
670
 
671
    public void send_fulfillPO(long purchaseOrderId, long itemId, long quantity) throws org.apache.thrift.TException
672
    {
673
      fulfillPO_args args = new fulfillPO_args();
674
      args.setPurchaseOrderId(purchaseOrderId);
675
      args.setItemId(itemId);
676
      args.setQuantity(quantity);
677
      sendBase("fulfillPO", args);
678
    }
679
 
680
    public void recv_fulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
681
    {
682
      fulfillPO_result result = new fulfillPO_result();
683
      receiveBase(result, "fulfillPO");
684
      if (result.e != null) {
685
        throw result.e;
686
      }
687
      return;
688
    }
689
 
690
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
691
    {
692
      send_updatePurchaseOrder(purchaseOrder);
693
      recv_updatePurchaseOrder();
694
    }
695
 
696
    public void send_updatePurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
697
    {
698
      updatePurchaseOrder_args args = new updatePurchaseOrder_args();
699
      args.setPurchaseOrder(purchaseOrder);
700
      sendBase("updatePurchaseOrder", args);
701
    }
702
 
703
    public void recv_updatePurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
704
    {
705
      updatePurchaseOrder_result result = new updatePurchaseOrder_result();
706
      receiveBase(result, "updatePurchaseOrder");
707
      if (result.e != null) {
708
        throw result.e;
709
      }
710
      return;
711
    }
712
 
5185 mandeep.dh 713
    public void unFulfillPO(long purchaseId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
714
    {
715
      send_unFulfillPO(purchaseId, itemId, quantity);
716
      recv_unFulfillPO();
717
    }
718
 
719
    public void send_unFulfillPO(long purchaseId, long itemId, long quantity) throws org.apache.thrift.TException
720
    {
721
      unFulfillPO_args args = new unFulfillPO_args();
722
      args.setPurchaseId(purchaseId);
723
      args.setItemId(itemId);
724
      args.setQuantity(quantity);
725
      sendBase("unFulfillPO", args);
726
    }
727
 
728
    public void recv_unFulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
729
    {
730
      unFulfillPO_result result = new unFulfillPO_result();
731
      receiveBase(result, "unFulfillPO");
732
      if (result.e != null) {
733
        throw result.e;
734
      }
735
      return;
736
    }
737
 
5443 mandeep.dh 738
    public List<Invoice> getInvoices(long date) throws org.apache.thrift.TException
739
    {
740
      send_getInvoices(date);
741
      return recv_getInvoices();
742
    }
743
 
744
    public void send_getInvoices(long date) throws org.apache.thrift.TException
745
    {
746
      getInvoices_args args = new getInvoices_args();
747
      args.setDate(date);
748
      sendBase("getInvoices", args);
749
    }
750
 
751
    public List<Invoice> recv_getInvoices() throws org.apache.thrift.TException
752
    {
753
      getInvoices_result result = new getInvoices_result();
754
      receiveBase(result, "getInvoices");
755
      if (result.isSetSuccess()) {
756
        return result.success;
757
      }
758
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoices failed: unknown result");
759
    }
760
 
7410 amar.kumar 761
    public List<Invoice> getInvoicesForWarehouse(long warehouseId, long supplierId, long date) throws org.apache.thrift.TException
762
    {
763
      send_getInvoicesForWarehouse(warehouseId, supplierId, date);
764
      return recv_getInvoicesForWarehouse();
765
    }
766
 
767
    public void send_getInvoicesForWarehouse(long warehouseId, long supplierId, long date) throws org.apache.thrift.TException
768
    {
769
      getInvoicesForWarehouse_args args = new getInvoicesForWarehouse_args();
770
      args.setWarehouseId(warehouseId);
771
      args.setSupplierId(supplierId);
772
      args.setDate(date);
773
      sendBase("getInvoicesForWarehouse", args);
774
    }
775
 
776
    public List<Invoice> recv_getInvoicesForWarehouse() throws org.apache.thrift.TException
777
    {
778
      getInvoicesForWarehouse_result result = new getInvoicesForWarehouse_result();
779
      receiveBase(result, "getInvoicesForWarehouse");
780
      if (result.isSetSuccess()) {
781
        return result.success;
782
      }
783
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoicesForWarehouse failed: unknown result");
784
    }
785
 
5443 mandeep.dh 786
    public void createInvoice(Invoice invoice) throws PurchaseServiceException, org.apache.thrift.TException
787
    {
788
      send_createInvoice(invoice);
789
      recv_createInvoice();
790
    }
791
 
792
    public void send_createInvoice(Invoice invoice) throws org.apache.thrift.TException
793
    {
794
      createInvoice_args args = new createInvoice_args();
795
      args.setInvoice(invoice);
796
      sendBase("createInvoice", args);
797
    }
798
 
799
    public void recv_createInvoice() throws PurchaseServiceException, org.apache.thrift.TException
800
    {
801
      createInvoice_result result = new createInvoice_result();
802
      receiveBase(result, "createInvoice");
803
      if (result.e != null) {
804
        throw result.e;
805
      }
806
      return;
807
    }
808
 
5591 mandeep.dh 809
    public Supplier addSupplier(Supplier supplier) throws org.apache.thrift.TException
810
    {
811
      send_addSupplier(supplier);
812
      return recv_addSupplier();
813
    }
814
 
815
    public void send_addSupplier(Supplier supplier) throws org.apache.thrift.TException
816
    {
817
      addSupplier_args args = new addSupplier_args();
818
      args.setSupplier(supplier);
819
      sendBase("addSupplier", args);
820
    }
821
 
822
    public Supplier recv_addSupplier() throws org.apache.thrift.TException
823
    {
824
      addSupplier_result result = new addSupplier_result();
825
      receiveBase(result, "addSupplier");
826
      if (result.isSetSuccess()) {
827
        return result.success;
828
      }
829
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addSupplier failed: unknown result");
830
    }
831
 
832
    public void updateSupplier(Supplier supplier) throws org.apache.thrift.TException
833
    {
834
      send_updateSupplier(supplier);
835
      recv_updateSupplier();
836
    }
837
 
838
    public void send_updateSupplier(Supplier supplier) throws org.apache.thrift.TException
839
    {
840
      updateSupplier_args args = new updateSupplier_args();
841
      args.setSupplier(supplier);
842
      sendBase("updateSupplier", args);
843
    }
844
 
845
    public void recv_updateSupplier() throws org.apache.thrift.TException
846
    {
847
      updateSupplier_result result = new updateSupplier_result();
848
      receiveBase(result, "updateSupplier");
849
      return;
850
    }
851
 
6467 amar.kumar 852
    public long createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
853
    {
854
      send_createPurchaseReturn(purchaseReturn);
855
      return recv_createPurchaseReturn();
856
    }
857
 
858
    public void send_createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
859
    {
860
      createPurchaseReturn_args args = new createPurchaseReturn_args();
861
      args.setPurchaseReturn(purchaseReturn);
862
      sendBase("createPurchaseReturn", args);
863
    }
864
 
865
    public long recv_createPurchaseReturn() throws org.apache.thrift.TException
866
    {
867
      createPurchaseReturn_result result = new createPurchaseReturn_result();
868
      receiveBase(result, "createPurchaseReturn");
869
      if (result.isSetSuccess()) {
870
        return result.success;
871
      }
872
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseReturn failed: unknown result");
873
    }
874
 
875
    public void settlePurchaseReturn(long id) throws org.apache.thrift.TException
876
    {
877
      send_settlePurchaseReturn(id);
878
      recv_settlePurchaseReturn();
879
    }
880
 
881
    public void send_settlePurchaseReturn(long id) throws org.apache.thrift.TException
882
    {
883
      settlePurchaseReturn_args args = new settlePurchaseReturn_args();
884
      args.setId(id);
885
      sendBase("settlePurchaseReturn", args);
886
    }
887
 
888
    public void recv_settlePurchaseReturn() throws org.apache.thrift.TException
889
    {
890
      settlePurchaseReturn_result result = new settlePurchaseReturn_result();
891
      receiveBase(result, "settlePurchaseReturn");
892
      return;
893
    }
894
 
895
    public List<PurchaseReturn> getUnsettledPurchaseReturns() throws org.apache.thrift.TException
896
    {
897
      send_getUnsettledPurchaseReturns();
898
      return recv_getUnsettledPurchaseReturns();
899
    }
900
 
901
    public void send_getUnsettledPurchaseReturns() throws org.apache.thrift.TException
902
    {
903
      getUnsettledPurchaseReturns_args args = new getUnsettledPurchaseReturns_args();
904
      sendBase("getUnsettledPurchaseReturns", args);
905
    }
906
 
907
    public List<PurchaseReturn> recv_getUnsettledPurchaseReturns() throws org.apache.thrift.TException
908
    {
909
      getUnsettledPurchaseReturns_result result = new getUnsettledPurchaseReturns_result();
910
      receiveBase(result, "getUnsettledPurchaseReturns");
911
      if (result.isSetSuccess()) {
912
        return result.success;
913
      }
914
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUnsettledPurchaseReturns failed: unknown result");
915
    }
916
 
6630 amar.kumar 917
    public List<PurchaseReturn> getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
918
    {
919
      send_getInvoice(invoiceNumber, supplierId);
920
      return recv_getInvoice();
921
    }
922
 
923
    public void send_getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
924
    {
925
      getInvoice_args args = new getInvoice_args();
926
      args.setInvoiceNumber(invoiceNumber);
927
      args.setSupplierId(supplierId);
928
      sendBase("getInvoice", args);
929
    }
930
 
931
    public List<PurchaseReturn> recv_getInvoice() throws org.apache.thrift.TException
932
    {
933
      getInvoice_result result = new getInvoice_result();
934
      receiveBase(result, "getInvoice");
935
      if (result.isSetSuccess()) {
936
        return result.success;
937
      }
938
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoice failed: unknown result");
939
    }
940
 
7672 rajveer 941
    public long createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId) throws org.apache.thrift.TException
6762 amar.kumar 942
    {
7672 rajveer 943
      send_createPurchaseForOurExtBilling(invoiceNumber, unitPrice, nlc, itemId);
6762 amar.kumar 944
      return recv_createPurchaseForOurExtBilling();
945
    }
946
 
7672 rajveer 947
    public void send_createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId) throws org.apache.thrift.TException
6762 amar.kumar 948
    {
949
      createPurchaseForOurExtBilling_args args = new createPurchaseForOurExtBilling_args();
950
      args.setInvoiceNumber(invoiceNumber);
951
      args.setUnitPrice(unitPrice);
7672 rajveer 952
      args.setNlc(nlc);
6762 amar.kumar 953
      args.setItemId(itemId);
954
      sendBase("createPurchaseForOurExtBilling", args);
955
    }
956
 
957
    public long recv_createPurchaseForOurExtBilling() throws org.apache.thrift.TException
958
    {
959
      createPurchaseForOurExtBilling_result result = new createPurchaseForOurExtBilling_result();
960
      receiveBase(result, "createPurchaseForOurExtBilling");
961
      if (result.isSetSuccess()) {
962
        return result.success;
963
      }
964
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseForOurExtBilling failed: unknown result");
965
    }
966
 
967
    public void fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException
968
    {
969
      send_fulfillPOForExtBilling(itemId, quantity);
970
      recv_fulfillPOForExtBilling();
971
    }
972
 
973
    public void send_fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException
974
    {
975
      fulfillPOForExtBilling_args args = new fulfillPOForExtBilling_args();
976
      args.setItemId(itemId);
977
      args.setQuantity(quantity);
978
      sendBase("fulfillPOForExtBilling", args);
979
    }
980
 
981
    public void recv_fulfillPOForExtBilling() throws org.apache.thrift.TException
982
    {
983
      fulfillPOForExtBilling_result result = new fulfillPOForExtBilling_result();
984
      receiveBase(result, "fulfillPOForExtBilling");
985
      return;
986
    }
987
 
7410 amar.kumar 988
    public void closePO(long poId) throws PurchaseServiceException, org.apache.thrift.TException
989
    {
990
      send_closePO(poId);
991
      recv_closePO();
992
    }
993
 
994
    public void send_closePO(long poId) throws org.apache.thrift.TException
995
    {
996
      closePO_args args = new closePO_args();
997
      args.setPoId(poId);
998
      sendBase("closePO", args);
999
    }
1000
 
1001
    public void recv_closePO() throws PurchaseServiceException, org.apache.thrift.TException
1002
    {
1003
      closePO_result result = new closePO_result();
1004
      receiveBase(result, "closePO");
1005
      if (result.e != null) {
1006
        throw result.e;
1007
      }
1008
      return;
1009
    }
1010
 
1011
    public boolean isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
1012
    {
1013
      send_isInvoiceReceived(invoiceNumber, supplierId);
1014
      return recv_isInvoiceReceived();
1015
    }
1016
 
1017
    public void send_isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
1018
    {
1019
      isInvoiceReceived_args args = new isInvoiceReceived_args();
1020
      args.setInvoiceNumber(invoiceNumber);
1021
      args.setSupplierId(supplierId);
1022
      sendBase("isInvoiceReceived", args);
1023
    }
1024
 
1025
    public boolean recv_isInvoiceReceived() throws org.apache.thrift.TException
1026
    {
1027
      isInvoiceReceived_result result = new isInvoiceReceived_result();
1028
      receiveBase(result, "isInvoiceReceived");
1029
      if (result.isSetSuccess()) {
1030
        return result.success;
1031
      }
1032
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isInvoiceReceived failed: unknown result");
1033
    }
1034
 
9829 amar.kumar 1035
    public void changeWarehouseForPO(long id, long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException
1036
    {
1037
      send_changeWarehouseForPO(id, warehouseId);
1038
      recv_changeWarehouseForPO();
1039
    }
1040
 
1041
    public void send_changeWarehouseForPO(long id, long warehouseId) throws org.apache.thrift.TException
1042
    {
1043
      changeWarehouseForPO_args args = new changeWarehouseForPO_args();
1044
      args.setId(id);
1045
      args.setWarehouseId(warehouseId);
1046
      sendBase("changeWarehouseForPO", args);
1047
    }
1048
 
1049
    public void recv_changeWarehouseForPO() throws PurchaseServiceException, org.apache.thrift.TException
1050
    {
1051
      changeWarehouseForPO_result result = new changeWarehouseForPO_result();
1052
      receiveBase(result, "changeWarehouseForPO");
1053
      if (result.e != null) {
1054
        throw result.e;
1055
      }
1056
      return;
1057
    }
1058
 
9925 amar.kumar 1059
    public void changePOStatus(long id, POStatus poStatus) throws PurchaseServiceException, org.apache.thrift.TException
1060
    {
1061
      send_changePOStatus(id, poStatus);
1062
      recv_changePOStatus();
1063
    }
1064
 
1065
    public void send_changePOStatus(long id, POStatus poStatus) throws org.apache.thrift.TException
1066
    {
1067
      changePOStatus_args args = new changePOStatus_args();
1068
      args.setId(id);
1069
      args.setPoStatus(poStatus);
1070
      sendBase("changePOStatus", args);
1071
    }
1072
 
1073
    public void recv_changePOStatus() throws PurchaseServiceException, org.apache.thrift.TException
1074
    {
1075
      changePOStatus_result result = new changePOStatus_result();
1076
      receiveBase(result, "changePOStatus");
1077
      if (result.e != null) {
1078
        throw result.e;
1079
      }
1080
      return;
1081
    }
1082
 
11751 manish.sha 1083
    public PurchaseReturn getPurchaseReturn(long id) throws PurchaseServiceException, org.apache.thrift.TException
1084
    {
1085
      send_getPurchaseReturn(id);
1086
      return recv_getPurchaseReturn();
1087
    }
1088
 
1089
    public void send_getPurchaseReturn(long id) throws org.apache.thrift.TException
1090
    {
1091
      getPurchaseReturn_args args = new getPurchaseReturn_args();
1092
      args.setId(id);
1093
      sendBase("getPurchaseReturn", args);
1094
    }
1095
 
1096
    public PurchaseReturn recv_getPurchaseReturn() throws PurchaseServiceException, org.apache.thrift.TException
1097
    {
1098
      getPurchaseReturn_result result = new getPurchaseReturn_result();
1099
      receiveBase(result, "getPurchaseReturn");
1100
      if (result.isSetSuccess()) {
1101
        return result.success;
1102
      }
1103
      if (result.e != null) {
1104
        throw result.e;
1105
      }
1106
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseReturn failed: unknown result");
1107
    }
1108
 
13600 manish.sha 1109
    public boolean markPurchasereturnSettled(long id, SettlementType settlementType, String documentNumber, String settlementBy, long settledAmount) throws PurchaseServiceException, org.apache.thrift.TException
1110
    {
1111
      send_markPurchasereturnSettled(id, settlementType, documentNumber, settlementBy, settledAmount);
1112
      return recv_markPurchasereturnSettled();
1113
    }
1114
 
1115
    public void send_markPurchasereturnSettled(long id, SettlementType settlementType, String documentNumber, String settlementBy, long settledAmount) throws org.apache.thrift.TException
1116
    {
1117
      markPurchasereturnSettled_args args = new markPurchasereturnSettled_args();
1118
      args.setId(id);
1119
      args.setSettlementType(settlementType);
1120
      args.setDocumentNumber(documentNumber);
1121
      args.setSettlementBy(settlementBy);
1122
      args.setSettledAmount(settledAmount);
1123
      sendBase("markPurchasereturnSettled", args);
1124
    }
1125
 
1126
    public boolean recv_markPurchasereturnSettled() throws PurchaseServiceException, org.apache.thrift.TException
1127
    {
1128
      markPurchasereturnSettled_result result = new markPurchasereturnSettled_result();
1129
      receiveBase(result, "markPurchasereturnSettled");
1130
      if (result.isSetSuccess()) {
1131
        return result.success;
1132
      }
1133
      if (result.e != null) {
1134
        throw result.e;
1135
      }
1136
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "markPurchasereturnSettled failed: unknown result");
1137
    }
1138
 
1139
    public List<PurchaseReturnSettlement> getPrSettlementsForPurchaseReturn(long purchaseReturnId) throws PurchaseServiceException, org.apache.thrift.TException
1140
    {
1141
      send_getPrSettlementsForPurchaseReturn(purchaseReturnId);
1142
      return recv_getPrSettlementsForPurchaseReturn();
1143
    }
1144
 
1145
    public void send_getPrSettlementsForPurchaseReturn(long purchaseReturnId) throws org.apache.thrift.TException
1146
    {
1147
      getPrSettlementsForPurchaseReturn_args args = new getPrSettlementsForPurchaseReturn_args();
1148
      args.setPurchaseReturnId(purchaseReturnId);
1149
      sendBase("getPrSettlementsForPurchaseReturn", args);
1150
    }
1151
 
1152
    public List<PurchaseReturnSettlement> recv_getPrSettlementsForPurchaseReturn() throws PurchaseServiceException, org.apache.thrift.TException
1153
    {
1154
      getPrSettlementsForPurchaseReturn_result result = new getPrSettlementsForPurchaseReturn_result();
1155
      receiveBase(result, "getPrSettlementsForPurchaseReturn");
1156
      if (result.isSetSuccess()) {
1157
        return result.success;
1158
      }
1159
      if (result.e != null) {
1160
        throw result.e;
1161
      }
1162
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPrSettlementsForPurchaseReturn failed: unknown result");
1163
    }
1164
 
1165
    public void updatePurchaseReturn(PurchaseReturn purchaseReturn) throws PurchaseServiceException, org.apache.thrift.TException
1166
    {
1167
      send_updatePurchaseReturn(purchaseReturn);
1168
      recv_updatePurchaseReturn();
1169
    }
1170
 
1171
    public void send_updatePurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
1172
    {
1173
      updatePurchaseReturn_args args = new updatePurchaseReturn_args();
1174
      args.setPurchaseReturn(purchaseReturn);
1175
      sendBase("updatePurchaseReturn", args);
1176
    }
1177
 
1178
    public void recv_updatePurchaseReturn() throws PurchaseServiceException, org.apache.thrift.TException
1179
    {
1180
      updatePurchaseReturn_result result = new updatePurchaseReturn_result();
1181
      receiveBase(result, "updatePurchaseReturn");
1182
      if (result.e != null) {
1183
        throw result.e;
1184
      }
1185
      return;
1186
    }
1187
 
4496 mandeep.dh 1188
  }
1189
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
1190
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
1191
      private org.apache.thrift.async.TAsyncClientManager clientManager;
1192
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
1193
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
1194
        this.clientManager = clientManager;
1195
        this.protocolFactory = protocolFactory;
1196
      }
1197
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
1198
        return new AsyncClient(protocolFactory, clientManager, transport);
1199
      }
1200
    }
1201
 
1202
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
1203
      super(protocolFactory, clientManager, transport);
1204
    }
1205
 
1206
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1207
      checkReady();
1208
      createPurchaseOrder_call method_call = new createPurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
1209
      this.___currentMethod = method_call;
1210
      ___manager.call(method_call);
1211
    }
1212
 
1213
    public static class createPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1214
      private PurchaseOrder purchaseOrder;
1215
      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 {
1216
        super(client, protocolFactory, transport, resultHandler, false);
1217
        this.purchaseOrder = purchaseOrder;
1218
      }
1219
 
1220
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1221
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1222
        createPurchaseOrder_args args = new createPurchaseOrder_args();
1223
        args.setPurchaseOrder(purchaseOrder);
1224
        args.write(prot);
1225
        prot.writeMessageEnd();
1226
      }
1227
 
1228
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1229
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1230
          throw new IllegalStateException("Method call not finished!");
1231
        }
1232
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1233
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1234
        return (new Client(prot)).recv_createPurchaseOrder();
1235
      }
1236
    }
1237
 
1238
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1239
      checkReady();
1240
      getPurchaseOrder_call method_call = new getPurchaseOrder_call(id, resultHandler, this, ___protocolFactory, ___transport);
1241
      this.___currentMethod = method_call;
1242
      ___manager.call(method_call);
1243
    }
1244
 
1245
    public static class getPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1246
      private long id;
1247
      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 {
1248
        super(client, protocolFactory, transport, resultHandler, false);
1249
        this.id = id;
1250
      }
1251
 
1252
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1253
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1254
        getPurchaseOrder_args args = new getPurchaseOrder_args();
1255
        args.setId(id);
1256
        args.write(prot);
1257
        prot.writeMessageEnd();
1258
      }
1259
 
1260
      public PurchaseOrder getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1261
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1262
          throw new IllegalStateException("Method call not finished!");
1263
        }
1264
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1265
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1266
        return (new Client(prot)).recv_getPurchaseOrder();
1267
      }
1268
    }
1269
 
1270
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
1271
      checkReady();
1272
      getAllPurchaseOrders_call method_call = new getAllPurchaseOrders_call(status, resultHandler, this, ___protocolFactory, ___transport);
1273
      this.___currentMethod = method_call;
1274
      ___manager.call(method_call);
1275
    }
1276
 
1277
    public static class getAllPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
1278
      private POStatus status;
1279
      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 {
1280
        super(client, protocolFactory, transport, resultHandler, false);
1281
        this.status = status;
1282
      }
1283
 
1284
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1285
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
1286
        getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
1287
        args.setStatus(status);
1288
        args.write(prot);
1289
        prot.writeMessageEnd();
1290
      }
1291
 
1292
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1293
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1294
          throw new IllegalStateException("Method call not finished!");
1295
        }
1296
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1297
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1298
        return (new Client(prot)).recv_getAllPurchaseOrders();
1299
      }
1300
    }
1301
 
1302
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<getSupplier_call> resultHandler) throws org.apache.thrift.TException {
1303
      checkReady();
1304
      getSupplier_call method_call = new getSupplier_call(id, resultHandler, this, ___protocolFactory, ___transport);
1305
      this.___currentMethod = method_call;
1306
      ___manager.call(method_call);
1307
    }
1308
 
1309
    public static class getSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1310
      private long id;
1311
      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 {
1312
        super(client, protocolFactory, transport, resultHandler, false);
1313
        this.id = id;
1314
      }
1315
 
1316
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1317
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1318
        getSupplier_args args = new getSupplier_args();
1319
        args.setId(id);
1320
        args.write(prot);
1321
        prot.writeMessageEnd();
1322
      }
1323
 
1324
      public Supplier getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1325
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1326
          throw new IllegalStateException("Method call not finished!");
1327
        }
1328
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1329
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1330
        return (new Client(prot)).recv_getSupplier();
1331
      }
1332
    }
1333
 
11801 manish.sha 1334
    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 1335
      checkReady();
11801 manish.sha 1336
      startPurchase_call method_call = new startPurchase_call(purchaseOrderId, invoiceNumber, freightCharges, purchaseComments, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 1337
      this.___currentMethod = method_call;
1338
      ___manager.call(method_call);
1339
    }
1340
 
1341
    public static class startPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
1342
      private long purchaseOrderId;
1343
      private String invoiceNumber;
1344
      private double freightCharges;
11801 manish.sha 1345
      private String purchaseComments;
1346
      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 1347
        super(client, protocolFactory, transport, resultHandler, false);
1348
        this.purchaseOrderId = purchaseOrderId;
1349
        this.invoiceNumber = invoiceNumber;
1350
        this.freightCharges = freightCharges;
11801 manish.sha 1351
        this.purchaseComments = purchaseComments;
4496 mandeep.dh 1352
      }
1353
 
1354
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1355
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1356
        startPurchase_args args = new startPurchase_args();
1357
        args.setPurchaseOrderId(purchaseOrderId);
1358
        args.setInvoiceNumber(invoiceNumber);
1359
        args.setFreightCharges(freightCharges);
11801 manish.sha 1360
        args.setPurchaseComments(purchaseComments);
4496 mandeep.dh 1361
        args.write(prot);
1362
        prot.writeMessageEnd();
1363
      }
1364
 
1365
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1366
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1367
          throw new IllegalStateException("Method call not finished!");
1368
        }
1369
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1370
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1371
        return (new Client(prot)).recv_startPurchase();
1372
      }
1373
    }
1374
 
1375
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<closePurchase_call> resultHandler) throws org.apache.thrift.TException {
1376
      checkReady();
1377
      closePurchase_call method_call = new closePurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
1378
      this.___currentMethod = method_call;
1379
      ___manager.call(method_call);
1380
    }
1381
 
1382
    public static class closePurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
1383
      private long purchaseId;
1384
      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 {
1385
        super(client, protocolFactory, transport, resultHandler, false);
1386
        this.purchaseId = purchaseId;
1387
      }
1388
 
1389
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1390
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closePurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1391
        closePurchase_args args = new closePurchase_args();
1392
        args.setPurchaseId(purchaseId);
1393
        args.write(prot);
1394
        prot.writeMessageEnd();
1395
      }
1396
 
1397
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1398
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1399
          throw new IllegalStateException("Method call not finished!");
1400
        }
1401
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1402
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1403
        return (new Client(prot)).recv_closePurchase();
1404
      }
1405
    }
1406
 
1407
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<getAllPurchases_call> resultHandler) throws org.apache.thrift.TException {
1408
      checkReady();
1409
      getAllPurchases_call method_call = new getAllPurchases_call(purchaseOrderId, open, resultHandler, this, ___protocolFactory, ___transport);
1410
      this.___currentMethod = method_call;
1411
      ___manager.call(method_call);
1412
    }
1413
 
1414
    public static class getAllPurchases_call extends org.apache.thrift.async.TAsyncMethodCall {
1415
      private long purchaseOrderId;
1416
      private boolean open;
1417
      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 {
1418
        super(client, protocolFactory, transport, resultHandler, false);
1419
        this.purchaseOrderId = purchaseOrderId;
1420
        this.open = open;
1421
      }
1422
 
1423
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1424
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPurchases", org.apache.thrift.protocol.TMessageType.CALL, 0));
1425
        getAllPurchases_args args = new getAllPurchases_args();
1426
        args.setPurchaseOrderId(purchaseOrderId);
1427
        args.setOpen(open);
1428
        args.write(prot);
1429
        prot.writeMessageEnd();
1430
      }
1431
 
1432
      public List<Purchase> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1433
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1434
          throw new IllegalStateException("Method call not finished!");
1435
        }
1436
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1437
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1438
        return (new Client(prot)).recv_getAllPurchases();
1439
      }
1440
    }
1441
 
6385 amar.kumar 1442
    public void getPurchasesForPO(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<getPurchasesForPO_call> resultHandler) throws org.apache.thrift.TException {
1443
      checkReady();
1444
      getPurchasesForPO_call method_call = new getPurchasesForPO_call(purchaseOrderId, resultHandler, this, ___protocolFactory, ___transport);
1445
      this.___currentMethod = method_call;
1446
      ___manager.call(method_call);
1447
    }
1448
 
1449
    public static class getPurchasesForPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1450
      private long purchaseOrderId;
1451
      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 {
1452
        super(client, protocolFactory, transport, resultHandler, false);
1453
        this.purchaseOrderId = purchaseOrderId;
1454
      }
1455
 
1456
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1457
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchasesForPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1458
        getPurchasesForPO_args args = new getPurchasesForPO_args();
1459
        args.setPurchaseOrderId(purchaseOrderId);
1460
        args.write(prot);
1461
        prot.writeMessageEnd();
1462
      }
1463
 
1464
      public List<Purchase> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1465
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1466
          throw new IllegalStateException("Method call not finished!");
1467
        }
1468
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1469
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1470
        return (new Client(prot)).recv_getPurchasesForPO();
1471
      }
1472
    }
1473
 
4555 mandeep.dh 1474
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException {
4496 mandeep.dh 1475
      checkReady();
4555 mandeep.dh 1476
      getPurchaseOrderForPurchase_call method_call = new getPurchaseOrderForPurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 1477
      this.___currentMethod = method_call;
1478
      ___manager.call(method_call);
1479
    }
1480
 
4555 mandeep.dh 1481
    public static class getPurchaseOrderForPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
4496 mandeep.dh 1482
      private long purchaseId;
4555 mandeep.dh 1483
      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 1484
        super(client, protocolFactory, transport, resultHandler, false);
1485
        this.purchaseId = purchaseId;
1486
      }
1487
 
1488
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4555 mandeep.dh 1489
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrderForPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1490
        getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 1491
        args.setPurchaseId(purchaseId);
1492
        args.write(prot);
1493
        prot.writeMessageEnd();
1494
      }
1495
 
4555 mandeep.dh 1496
      public PurchaseOrder getResult() throws org.apache.thrift.TException {
4496 mandeep.dh 1497
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1498
          throw new IllegalStateException("Method call not finished!");
1499
        }
1500
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1501
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4555 mandeep.dh 1502
        return (new Client(prot)).recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 1503
      }
1504
    }
1505
 
4754 mandeep.dh 1506
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
1507
      checkReady();
1508
      getPendingPurchaseOrders_call method_call = new getPendingPurchaseOrders_call(warehouseId, resultHandler, this, ___protocolFactory, ___transport);
1509
      this.___currentMethod = method_call;
1510
      ___manager.call(method_call);
1511
    }
1512
 
1513
    public static class getPendingPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
1514
      private long warehouseId;
1515
      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 {
1516
        super(client, protocolFactory, transport, resultHandler, false);
1517
        this.warehouseId = warehouseId;
1518
      }
1519
 
1520
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1521
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPendingPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
1522
        getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
1523
        args.setWarehouseId(warehouseId);
1524
        args.write(prot);
1525
        prot.writeMessageEnd();
1526
      }
1527
 
1528
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1529
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1530
          throw new IllegalStateException("Method call not finished!");
1531
        }
1532
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1533
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1534
        return (new Client(prot)).recv_getPendingPurchaseOrders();
1535
      }
1536
    }
1537
 
1538
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<getSuppliers_call> resultHandler) throws org.apache.thrift.TException {
1539
      checkReady();
1540
      getSuppliers_call method_call = new getSuppliers_call(resultHandler, this, ___protocolFactory, ___transport);
1541
      this.___currentMethod = method_call;
1542
      ___manager.call(method_call);
1543
    }
1544
 
1545
    public static class getSuppliers_call extends org.apache.thrift.async.TAsyncMethodCall {
1546
      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 {
1547
        super(client, protocolFactory, transport, resultHandler, false);
1548
      }
1549
 
1550
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1551
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSuppliers", org.apache.thrift.protocol.TMessageType.CALL, 0));
1552
        getSuppliers_args args = new getSuppliers_args();
1553
        args.write(prot);
1554
        prot.writeMessageEnd();
1555
      }
1556
 
1557
      public List<Supplier> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1558
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1559
          throw new IllegalStateException("Method call not finished!");
1560
        }
1561
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1562
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1563
        return (new Client(prot)).recv_getSuppliers();
1564
      }
1565
    }
1566
 
21847 amit.gupta 1567
    public void getAllSuppliers(org.apache.thrift.async.AsyncMethodCallback<getAllSuppliers_call> resultHandler) throws org.apache.thrift.TException {
1568
      checkReady();
1569
      getAllSuppliers_call method_call = new getAllSuppliers_call(resultHandler, this, ___protocolFactory, ___transport);
1570
      this.___currentMethod = method_call;
1571
      ___manager.call(method_call);
1572
    }
1573
 
1574
    public static class getAllSuppliers_call extends org.apache.thrift.async.TAsyncMethodCall {
1575
      public getAllSuppliers_call(org.apache.thrift.async.AsyncMethodCallback<getAllSuppliers_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 {
1576
        super(client, protocolFactory, transport, resultHandler, false);
1577
      }
1578
 
1579
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1580
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllSuppliers", org.apache.thrift.protocol.TMessageType.CALL, 0));
1581
        getAllSuppliers_args args = new getAllSuppliers_args();
1582
        args.write(prot);
1583
        prot.writeMessageEnd();
1584
      }
1585
 
1586
      public List<Supplier> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1587
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1588
          throw new IllegalStateException("Method call not finished!");
1589
        }
1590
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1591
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1592
        return (new Client(prot)).recv_getAllSuppliers();
1593
      }
1594
    }
1595
 
4754 mandeep.dh 1596
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPO_call> resultHandler) throws org.apache.thrift.TException {
1597
      checkReady();
1598
      fulfillPO_call method_call = new fulfillPO_call(purchaseOrderId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1599
      this.___currentMethod = method_call;
1600
      ___manager.call(method_call);
1601
    }
1602
 
1603
    public static class fulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1604
      private long purchaseOrderId;
1605
      private long itemId;
1606
      private long quantity;
1607
      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 {
1608
        super(client, protocolFactory, transport, resultHandler, false);
1609
        this.purchaseOrderId = purchaseOrderId;
1610
        this.itemId = itemId;
1611
        this.quantity = quantity;
1612
      }
1613
 
1614
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1615
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1616
        fulfillPO_args args = new fulfillPO_args();
1617
        args.setPurchaseOrderId(purchaseOrderId);
1618
        args.setItemId(itemId);
1619
        args.setQuantity(quantity);
1620
        args.write(prot);
1621
        prot.writeMessageEnd();
1622
      }
1623
 
1624
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1625
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1626
          throw new IllegalStateException("Method call not finished!");
1627
        }
1628
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1629
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1630
        (new Client(prot)).recv_fulfillPO();
1631
      }
1632
    }
1633
 
1634
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1635
      checkReady();
1636
      updatePurchaseOrder_call method_call = new updatePurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
1637
      this.___currentMethod = method_call;
1638
      ___manager.call(method_call);
1639
    }
1640
 
1641
    public static class updatePurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1642
      private PurchaseOrder purchaseOrder;
1643
      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 {
1644
        super(client, protocolFactory, transport, resultHandler, false);
1645
        this.purchaseOrder = purchaseOrder;
1646
      }
1647
 
1648
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1649
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updatePurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1650
        updatePurchaseOrder_args args = new updatePurchaseOrder_args();
1651
        args.setPurchaseOrder(purchaseOrder);
1652
        args.write(prot);
1653
        prot.writeMessageEnd();
1654
      }
1655
 
1656
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1657
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1658
          throw new IllegalStateException("Method call not finished!");
1659
        }
1660
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1661
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1662
        (new Client(prot)).recv_updatePurchaseOrder();
1663
      }
1664
    }
1665
 
5185 mandeep.dh 1666
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<unFulfillPO_call> resultHandler) throws org.apache.thrift.TException {
1667
      checkReady();
1668
      unFulfillPO_call method_call = new unFulfillPO_call(purchaseId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1669
      this.___currentMethod = method_call;
1670
      ___manager.call(method_call);
1671
    }
1672
 
1673
    public static class unFulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1674
      private long purchaseId;
1675
      private long itemId;
1676
      private long quantity;
1677
      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 {
1678
        super(client, protocolFactory, transport, resultHandler, false);
1679
        this.purchaseId = purchaseId;
1680
        this.itemId = itemId;
1681
        this.quantity = quantity;
1682
      }
1683
 
1684
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1685
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unFulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1686
        unFulfillPO_args args = new unFulfillPO_args();
1687
        args.setPurchaseId(purchaseId);
1688
        args.setItemId(itemId);
1689
        args.setQuantity(quantity);
1690
        args.write(prot);
1691
        prot.writeMessageEnd();
1692
      }
1693
 
1694
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1695
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1696
          throw new IllegalStateException("Method call not finished!");
1697
        }
1698
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1699
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1700
        (new Client(prot)).recv_unFulfillPO();
1701
      }
1702
    }
1703
 
5443 mandeep.dh 1704
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<getInvoices_call> resultHandler) throws org.apache.thrift.TException {
1705
      checkReady();
1706
      getInvoices_call method_call = new getInvoices_call(date, resultHandler, this, ___protocolFactory, ___transport);
1707
      this.___currentMethod = method_call;
1708
      ___manager.call(method_call);
1709
    }
1710
 
1711
    public static class getInvoices_call extends org.apache.thrift.async.TAsyncMethodCall {
1712
      private long date;
1713
      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 {
1714
        super(client, protocolFactory, transport, resultHandler, false);
1715
        this.date = date;
1716
      }
1717
 
1718
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1719
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoices", org.apache.thrift.protocol.TMessageType.CALL, 0));
1720
        getInvoices_args args = new getInvoices_args();
1721
        args.setDate(date);
1722
        args.write(prot);
1723
        prot.writeMessageEnd();
1724
      }
1725
 
1726
      public List<Invoice> getResult() throws org.apache.thrift.TException {
1727
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1728
          throw new IllegalStateException("Method call not finished!");
1729
        }
1730
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1731
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1732
        return (new Client(prot)).recv_getInvoices();
1733
      }
1734
    }
1735
 
7410 amar.kumar 1736
    public void getInvoicesForWarehouse(long warehouseId, long supplierId, long date, org.apache.thrift.async.AsyncMethodCallback<getInvoicesForWarehouse_call> resultHandler) throws org.apache.thrift.TException {
1737
      checkReady();
1738
      getInvoicesForWarehouse_call method_call = new getInvoicesForWarehouse_call(warehouseId, supplierId, date, resultHandler, this, ___protocolFactory, ___transport);
1739
      this.___currentMethod = method_call;
1740
      ___manager.call(method_call);
1741
    }
1742
 
1743
    public static class getInvoicesForWarehouse_call extends org.apache.thrift.async.TAsyncMethodCall {
1744
      private long warehouseId;
1745
      private long supplierId;
1746
      private long date;
1747
      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 {
1748
        super(client, protocolFactory, transport, resultHandler, false);
1749
        this.warehouseId = warehouseId;
1750
        this.supplierId = supplierId;
1751
        this.date = date;
1752
      }
1753
 
1754
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1755
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoicesForWarehouse", org.apache.thrift.protocol.TMessageType.CALL, 0));
1756
        getInvoicesForWarehouse_args args = new getInvoicesForWarehouse_args();
1757
        args.setWarehouseId(warehouseId);
1758
        args.setSupplierId(supplierId);
1759
        args.setDate(date);
1760
        args.write(prot);
1761
        prot.writeMessageEnd();
1762
      }
1763
 
1764
      public List<Invoice> getResult() throws org.apache.thrift.TException {
1765
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1766
          throw new IllegalStateException("Method call not finished!");
1767
        }
1768
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1769
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1770
        return (new Client(prot)).recv_getInvoicesForWarehouse();
1771
      }
1772
    }
1773
 
5443 mandeep.dh 1774
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<createInvoice_call> resultHandler) throws org.apache.thrift.TException {
1775
      checkReady();
1776
      createInvoice_call method_call = new createInvoice_call(invoice, resultHandler, this, ___protocolFactory, ___transport);
1777
      this.___currentMethod = method_call;
1778
      ___manager.call(method_call);
1779
    }
1780
 
1781
    public static class createInvoice_call extends org.apache.thrift.async.TAsyncMethodCall {
1782
      private Invoice invoice;
1783
      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 {
1784
        super(client, protocolFactory, transport, resultHandler, false);
1785
        this.invoice = invoice;
1786
      }
1787
 
1788
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1789
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createInvoice", org.apache.thrift.protocol.TMessageType.CALL, 0));
1790
        createInvoice_args args = new createInvoice_args();
1791
        args.setInvoice(invoice);
1792
        args.write(prot);
1793
        prot.writeMessageEnd();
1794
      }
1795
 
1796
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1797
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1798
          throw new IllegalStateException("Method call not finished!");
1799
        }
1800
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1801
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1802
        (new Client(prot)).recv_createInvoice();
1803
      }
1804
    }
1805
 
5591 mandeep.dh 1806
    public void addSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<addSupplier_call> resultHandler) throws org.apache.thrift.TException {
1807
      checkReady();
1808
      addSupplier_call method_call = new addSupplier_call(supplier, resultHandler, this, ___protocolFactory, ___transport);
1809
      this.___currentMethod = method_call;
1810
      ___manager.call(method_call);
1811
    }
1812
 
1813
    public static class addSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1814
      private Supplier supplier;
1815
      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 {
1816
        super(client, protocolFactory, transport, resultHandler, false);
1817
        this.supplier = supplier;
1818
      }
1819
 
1820
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1821
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1822
        addSupplier_args args = new addSupplier_args();
1823
        args.setSupplier(supplier);
1824
        args.write(prot);
1825
        prot.writeMessageEnd();
1826
      }
1827
 
1828
      public Supplier getResult() throws org.apache.thrift.TException {
1829
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1830
          throw new IllegalStateException("Method call not finished!");
1831
        }
1832
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1833
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1834
        return (new Client(prot)).recv_addSupplier();
1835
      }
1836
    }
1837
 
1838
    public void updateSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<updateSupplier_call> resultHandler) throws org.apache.thrift.TException {
1839
      checkReady();
1840
      updateSupplier_call method_call = new updateSupplier_call(supplier, resultHandler, this, ___protocolFactory, ___transport);
1841
      this.___currentMethod = method_call;
1842
      ___manager.call(method_call);
1843
    }
1844
 
1845
    public static class updateSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1846
      private Supplier supplier;
1847
      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 {
1848
        super(client, protocolFactory, transport, resultHandler, false);
1849
        this.supplier = supplier;
1850
      }
1851
 
1852
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1853
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1854
        updateSupplier_args args = new updateSupplier_args();
1855
        args.setSupplier(supplier);
1856
        args.write(prot);
1857
        prot.writeMessageEnd();
1858
      }
1859
 
1860
      public void getResult() throws org.apache.thrift.TException {
1861
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1862
          throw new IllegalStateException("Method call not finished!");
1863
        }
1864
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1865
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1866
        (new Client(prot)).recv_updateSupplier();
1867
      }
1868
    }
1869
 
6467 amar.kumar 1870
    public void createPurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<createPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1871
      checkReady();
1872
      createPurchaseReturn_call method_call = new createPurchaseReturn_call(purchaseReturn, resultHandler, this, ___protocolFactory, ___transport);
1873
      this.___currentMethod = method_call;
1874
      ___manager.call(method_call);
1875
    }
1876
 
1877
    public static class createPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1878
      private PurchaseReturn purchaseReturn;
1879
      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 {
1880
        super(client, protocolFactory, transport, resultHandler, false);
1881
        this.purchaseReturn = purchaseReturn;
1882
      }
1883
 
1884
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1885
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1886
        createPurchaseReturn_args args = new createPurchaseReturn_args();
1887
        args.setPurchaseReturn(purchaseReturn);
1888
        args.write(prot);
1889
        prot.writeMessageEnd();
1890
      }
1891
 
1892
      public long getResult() throws org.apache.thrift.TException {
1893
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1894
          throw new IllegalStateException("Method call not finished!");
1895
        }
1896
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1897
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1898
        return (new Client(prot)).recv_createPurchaseReturn();
1899
      }
1900
    }
1901
 
1902
    public void settlePurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<settlePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1903
      checkReady();
1904
      settlePurchaseReturn_call method_call = new settlePurchaseReturn_call(id, resultHandler, this, ___protocolFactory, ___transport);
1905
      this.___currentMethod = method_call;
1906
      ___manager.call(method_call);
1907
    }
1908
 
1909
    public static class settlePurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1910
      private long id;
1911
      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 {
1912
        super(client, protocolFactory, transport, resultHandler, false);
1913
        this.id = id;
1914
      }
1915
 
1916
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1917
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("settlePurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1918
        settlePurchaseReturn_args args = new settlePurchaseReturn_args();
1919
        args.setId(id);
1920
        args.write(prot);
1921
        prot.writeMessageEnd();
1922
      }
1923
 
1924
      public void getResult() throws org.apache.thrift.TException {
1925
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1926
          throw new IllegalStateException("Method call not finished!");
1927
        }
1928
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1929
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1930
        (new Client(prot)).recv_settlePurchaseReturn();
1931
      }
1932
    }
1933
 
1934
    public void getUnsettledPurchaseReturns(org.apache.thrift.async.AsyncMethodCallback<getUnsettledPurchaseReturns_call> resultHandler) throws org.apache.thrift.TException {
1935
      checkReady();
1936
      getUnsettledPurchaseReturns_call method_call = new getUnsettledPurchaseReturns_call(resultHandler, this, ___protocolFactory, ___transport);
1937
      this.___currentMethod = method_call;
1938
      ___manager.call(method_call);
1939
    }
1940
 
1941
    public static class getUnsettledPurchaseReturns_call extends org.apache.thrift.async.TAsyncMethodCall {
1942
      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 {
1943
        super(client, protocolFactory, transport, resultHandler, false);
1944
      }
1945
 
1946
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1947
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUnsettledPurchaseReturns", org.apache.thrift.protocol.TMessageType.CALL, 0));
1948
        getUnsettledPurchaseReturns_args args = new getUnsettledPurchaseReturns_args();
1949
        args.write(prot);
1950
        prot.writeMessageEnd();
1951
      }
1952
 
1953
      public List<PurchaseReturn> getResult() throws org.apache.thrift.TException {
1954
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1955
          throw new IllegalStateException("Method call not finished!");
1956
        }
1957
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1958
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1959
        return (new Client(prot)).recv_getUnsettledPurchaseReturns();
1960
      }
1961
    }
1962
 
6630 amar.kumar 1963
    public void getInvoice(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<getInvoice_call> resultHandler) throws org.apache.thrift.TException {
1964
      checkReady();
1965
      getInvoice_call method_call = new getInvoice_call(invoiceNumber, supplierId, resultHandler, this, ___protocolFactory, ___transport);
1966
      this.___currentMethod = method_call;
1967
      ___manager.call(method_call);
1968
    }
1969
 
1970
    public static class getInvoice_call extends org.apache.thrift.async.TAsyncMethodCall {
1971
      private String invoiceNumber;
1972
      private long supplierId;
1973
      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 {
1974
        super(client, protocolFactory, transport, resultHandler, false);
1975
        this.invoiceNumber = invoiceNumber;
1976
        this.supplierId = supplierId;
1977
      }
1978
 
1979
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1980
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoice", org.apache.thrift.protocol.TMessageType.CALL, 0));
1981
        getInvoice_args args = new getInvoice_args();
1982
        args.setInvoiceNumber(invoiceNumber);
1983
        args.setSupplierId(supplierId);
1984
        args.write(prot);
1985
        prot.writeMessageEnd();
1986
      }
1987
 
1988
      public List<PurchaseReturn> getResult() throws org.apache.thrift.TException {
1989
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1990
          throw new IllegalStateException("Method call not finished!");
1991
        }
1992
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1993
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1994
        return (new Client(prot)).recv_getInvoice();
1995
      }
1996
    }
1997
 
7672 rajveer 1998
    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 1999
      checkReady();
7672 rajveer 2000
      createPurchaseForOurExtBilling_call method_call = new createPurchaseForOurExtBilling_call(invoiceNumber, unitPrice, nlc, itemId, resultHandler, this, ___protocolFactory, ___transport);
6762 amar.kumar 2001
      this.___currentMethod = method_call;
2002
      ___manager.call(method_call);
2003
    }
2004
 
2005
    public static class createPurchaseForOurExtBilling_call extends org.apache.thrift.async.TAsyncMethodCall {
2006
      private String invoiceNumber;
2007
      private double unitPrice;
7672 rajveer 2008
      private double nlc;
6762 amar.kumar 2009
      private long itemId;
7672 rajveer 2010
      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 2011
        super(client, protocolFactory, transport, resultHandler, false);
2012
        this.invoiceNumber = invoiceNumber;
2013
        this.unitPrice = unitPrice;
7672 rajveer 2014
        this.nlc = nlc;
6762 amar.kumar 2015
        this.itemId = itemId;
2016
      }
2017
 
2018
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2019
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseForOurExtBilling", org.apache.thrift.protocol.TMessageType.CALL, 0));
2020
        createPurchaseForOurExtBilling_args args = new createPurchaseForOurExtBilling_args();
2021
        args.setInvoiceNumber(invoiceNumber);
2022
        args.setUnitPrice(unitPrice);
7672 rajveer 2023
        args.setNlc(nlc);
6762 amar.kumar 2024
        args.setItemId(itemId);
2025
        args.write(prot);
2026
        prot.writeMessageEnd();
2027
      }
2028
 
2029
      public long getResult() throws org.apache.thrift.TException {
2030
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2031
          throw new IllegalStateException("Method call not finished!");
2032
        }
2033
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2034
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2035
        return (new Client(prot)).recv_createPurchaseForOurExtBilling();
2036
      }
2037
    }
2038
 
2039
    public void fulfillPOForExtBilling(long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPOForExtBilling_call> resultHandler) throws org.apache.thrift.TException {
2040
      checkReady();
2041
      fulfillPOForExtBilling_call method_call = new fulfillPOForExtBilling_call(itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
2042
      this.___currentMethod = method_call;
2043
      ___manager.call(method_call);
2044
    }
2045
 
2046
    public static class fulfillPOForExtBilling_call extends org.apache.thrift.async.TAsyncMethodCall {
2047
      private long itemId;
2048
      private long quantity;
2049
      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 {
2050
        super(client, protocolFactory, transport, resultHandler, false);
2051
        this.itemId = itemId;
2052
        this.quantity = quantity;
2053
      }
2054
 
2055
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2056
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fulfillPOForExtBilling", org.apache.thrift.protocol.TMessageType.CALL, 0));
2057
        fulfillPOForExtBilling_args args = new fulfillPOForExtBilling_args();
2058
        args.setItemId(itemId);
2059
        args.setQuantity(quantity);
2060
        args.write(prot);
2061
        prot.writeMessageEnd();
2062
      }
2063
 
2064
      public void getResult() throws org.apache.thrift.TException {
2065
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2066
          throw new IllegalStateException("Method call not finished!");
2067
        }
2068
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2069
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2070
        (new Client(prot)).recv_fulfillPOForExtBilling();
2071
      }
2072
    }
2073
 
7410 amar.kumar 2074
    public void closePO(long poId, org.apache.thrift.async.AsyncMethodCallback<closePO_call> resultHandler) throws org.apache.thrift.TException {
2075
      checkReady();
2076
      closePO_call method_call = new closePO_call(poId, resultHandler, this, ___protocolFactory, ___transport);
2077
      this.___currentMethod = method_call;
2078
      ___manager.call(method_call);
2079
    }
2080
 
2081
    public static class closePO_call extends org.apache.thrift.async.TAsyncMethodCall {
2082
      private long poId;
2083
      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 {
2084
        super(client, protocolFactory, transport, resultHandler, false);
2085
        this.poId = poId;
2086
      }
2087
 
2088
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2089
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closePO", org.apache.thrift.protocol.TMessageType.CALL, 0));
2090
        closePO_args args = new closePO_args();
2091
        args.setPoId(poId);
2092
        args.write(prot);
2093
        prot.writeMessageEnd();
2094
      }
2095
 
2096
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2097
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2098
          throw new IllegalStateException("Method call not finished!");
2099
        }
2100
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2101
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2102
        (new Client(prot)).recv_closePO();
2103
      }
2104
    }
2105
 
2106
    public void isInvoiceReceived(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<isInvoiceReceived_call> resultHandler) throws org.apache.thrift.TException {
2107
      checkReady();
2108
      isInvoiceReceived_call method_call = new isInvoiceReceived_call(invoiceNumber, supplierId, resultHandler, this, ___protocolFactory, ___transport);
2109
      this.___currentMethod = method_call;
2110
      ___manager.call(method_call);
2111
    }
2112
 
2113
    public static class isInvoiceReceived_call extends org.apache.thrift.async.TAsyncMethodCall {
2114
      private String invoiceNumber;
2115
      private long supplierId;
2116
      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 {
2117
        super(client, protocolFactory, transport, resultHandler, false);
2118
        this.invoiceNumber = invoiceNumber;
2119
        this.supplierId = supplierId;
2120
      }
2121
 
2122
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2123
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isInvoiceReceived", org.apache.thrift.protocol.TMessageType.CALL, 0));
2124
        isInvoiceReceived_args args = new isInvoiceReceived_args();
2125
        args.setInvoiceNumber(invoiceNumber);
2126
        args.setSupplierId(supplierId);
2127
        args.write(prot);
2128
        prot.writeMessageEnd();
2129
      }
2130
 
2131
      public boolean getResult() throws org.apache.thrift.TException {
2132
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2133
          throw new IllegalStateException("Method call not finished!");
2134
        }
2135
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2136
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2137
        return (new Client(prot)).recv_isInvoiceReceived();
2138
      }
2139
    }
2140
 
9829 amar.kumar 2141
    public void changeWarehouseForPO(long id, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<changeWarehouseForPO_call> resultHandler) throws org.apache.thrift.TException {
2142
      checkReady();
2143
      changeWarehouseForPO_call method_call = new changeWarehouseForPO_call(id, warehouseId, resultHandler, this, ___protocolFactory, ___transport);
2144
      this.___currentMethod = method_call;
2145
      ___manager.call(method_call);
2146
    }
2147
 
2148
    public static class changeWarehouseForPO_call extends org.apache.thrift.async.TAsyncMethodCall {
2149
      private long id;
2150
      private long warehouseId;
2151
      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 {
2152
        super(client, protocolFactory, transport, resultHandler, false);
2153
        this.id = id;
2154
        this.warehouseId = warehouseId;
2155
      }
2156
 
2157
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2158
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("changeWarehouseForPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
2159
        changeWarehouseForPO_args args = new changeWarehouseForPO_args();
2160
        args.setId(id);
2161
        args.setWarehouseId(warehouseId);
2162
        args.write(prot);
2163
        prot.writeMessageEnd();
2164
      }
2165
 
2166
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2167
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2168
          throw new IllegalStateException("Method call not finished!");
2169
        }
2170
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2171
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2172
        (new Client(prot)).recv_changeWarehouseForPO();
2173
      }
2174
    }
2175
 
9925 amar.kumar 2176
    public void changePOStatus(long id, POStatus poStatus, org.apache.thrift.async.AsyncMethodCallback<changePOStatus_call> resultHandler) throws org.apache.thrift.TException {
2177
      checkReady();
2178
      changePOStatus_call method_call = new changePOStatus_call(id, poStatus, resultHandler, this, ___protocolFactory, ___transport);
2179
      this.___currentMethod = method_call;
2180
      ___manager.call(method_call);
2181
    }
2182
 
2183
    public static class changePOStatus_call extends org.apache.thrift.async.TAsyncMethodCall {
2184
      private long id;
2185
      private POStatus poStatus;
2186
      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 {
2187
        super(client, protocolFactory, transport, resultHandler, false);
2188
        this.id = id;
2189
        this.poStatus = poStatus;
2190
      }
2191
 
2192
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2193
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("changePOStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
2194
        changePOStatus_args args = new changePOStatus_args();
2195
        args.setId(id);
2196
        args.setPoStatus(poStatus);
2197
        args.write(prot);
2198
        prot.writeMessageEnd();
2199
      }
2200
 
2201
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2202
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2203
          throw new IllegalStateException("Method call not finished!");
2204
        }
2205
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2206
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2207
        (new Client(prot)).recv_changePOStatus();
2208
      }
2209
    }
2210
 
11751 manish.sha 2211
    public void getPurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
2212
      checkReady();
2213
      getPurchaseReturn_call method_call = new getPurchaseReturn_call(id, resultHandler, this, ___protocolFactory, ___transport);
2214
      this.___currentMethod = method_call;
2215
      ___manager.call(method_call);
2216
    }
2217
 
2218
    public static class getPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
2219
      private long id;
2220
      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 {
2221
        super(client, protocolFactory, transport, resultHandler, false);
2222
        this.id = id;
2223
      }
2224
 
2225
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2226
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
2227
        getPurchaseReturn_args args = new getPurchaseReturn_args();
2228
        args.setId(id);
2229
        args.write(prot);
2230
        prot.writeMessageEnd();
2231
      }
2232
 
2233
      public PurchaseReturn getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2234
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2235
          throw new IllegalStateException("Method call not finished!");
2236
        }
2237
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2238
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2239
        return (new Client(prot)).recv_getPurchaseReturn();
2240
      }
2241
    }
2242
 
13600 manish.sha 2243
    public void markPurchasereturnSettled(long id, SettlementType settlementType, String documentNumber, String settlementBy, long settledAmount, org.apache.thrift.async.AsyncMethodCallback<markPurchasereturnSettled_call> resultHandler) throws org.apache.thrift.TException {
2244
      checkReady();
2245
      markPurchasereturnSettled_call method_call = new markPurchasereturnSettled_call(id, settlementType, documentNumber, settlementBy, settledAmount, resultHandler, this, ___protocolFactory, ___transport);
2246
      this.___currentMethod = method_call;
2247
      ___manager.call(method_call);
2248
    }
2249
 
2250
    public static class markPurchasereturnSettled_call extends org.apache.thrift.async.TAsyncMethodCall {
2251
      private long id;
2252
      private SettlementType settlementType;
2253
      private String documentNumber;
2254
      private String settlementBy;
2255
      private long settledAmount;
2256
      public markPurchasereturnSettled_call(long id, SettlementType settlementType, String documentNumber, String settlementBy, long settledAmount, org.apache.thrift.async.AsyncMethodCallback<markPurchasereturnSettled_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 {
2257
        super(client, protocolFactory, transport, resultHandler, false);
2258
        this.id = id;
2259
        this.settlementType = settlementType;
2260
        this.documentNumber = documentNumber;
2261
        this.settlementBy = settlementBy;
2262
        this.settledAmount = settledAmount;
2263
      }
2264
 
2265
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2266
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("markPurchasereturnSettled", org.apache.thrift.protocol.TMessageType.CALL, 0));
2267
        markPurchasereturnSettled_args args = new markPurchasereturnSettled_args();
2268
        args.setId(id);
2269
        args.setSettlementType(settlementType);
2270
        args.setDocumentNumber(documentNumber);
2271
        args.setSettlementBy(settlementBy);
2272
        args.setSettledAmount(settledAmount);
2273
        args.write(prot);
2274
        prot.writeMessageEnd();
2275
      }
2276
 
2277
      public boolean getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2278
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2279
          throw new IllegalStateException("Method call not finished!");
2280
        }
2281
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2282
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2283
        return (new Client(prot)).recv_markPurchasereturnSettled();
2284
      }
2285
    }
2286
 
2287
    public void getPrSettlementsForPurchaseReturn(long purchaseReturnId, org.apache.thrift.async.AsyncMethodCallback<getPrSettlementsForPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
2288
      checkReady();
2289
      getPrSettlementsForPurchaseReturn_call method_call = new getPrSettlementsForPurchaseReturn_call(purchaseReturnId, resultHandler, this, ___protocolFactory, ___transport);
2290
      this.___currentMethod = method_call;
2291
      ___manager.call(method_call);
2292
    }
2293
 
2294
    public static class getPrSettlementsForPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
2295
      private long purchaseReturnId;
2296
      public getPrSettlementsForPurchaseReturn_call(long purchaseReturnId, org.apache.thrift.async.AsyncMethodCallback<getPrSettlementsForPurchaseReturn_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 {
2297
        super(client, protocolFactory, transport, resultHandler, false);
2298
        this.purchaseReturnId = purchaseReturnId;
2299
      }
2300
 
2301
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2302
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPrSettlementsForPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
2303
        getPrSettlementsForPurchaseReturn_args args = new getPrSettlementsForPurchaseReturn_args();
2304
        args.setPurchaseReturnId(purchaseReturnId);
2305
        args.write(prot);
2306
        prot.writeMessageEnd();
2307
      }
2308
 
2309
      public List<PurchaseReturnSettlement> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2310
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2311
          throw new IllegalStateException("Method call not finished!");
2312
        }
2313
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2314
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2315
        return (new Client(prot)).recv_getPrSettlementsForPurchaseReturn();
2316
      }
2317
    }
2318
 
2319
    public void updatePurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<updatePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
2320
      checkReady();
2321
      updatePurchaseReturn_call method_call = new updatePurchaseReturn_call(purchaseReturn, resultHandler, this, ___protocolFactory, ___transport);
2322
      this.___currentMethod = method_call;
2323
      ___manager.call(method_call);
2324
    }
2325
 
2326
    public static class updatePurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
2327
      private PurchaseReturn purchaseReturn;
2328
      public updatePurchaseReturn_call(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<updatePurchaseReturn_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 {
2329
        super(client, protocolFactory, transport, resultHandler, false);
2330
        this.purchaseReturn = purchaseReturn;
2331
      }
2332
 
2333
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2334
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updatePurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
2335
        updatePurchaseReturn_args args = new updatePurchaseReturn_args();
2336
        args.setPurchaseReturn(purchaseReturn);
2337
        args.write(prot);
2338
        prot.writeMessageEnd();
2339
      }
2340
 
2341
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2342
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2343
          throw new IllegalStateException("Method call not finished!");
2344
        }
2345
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2346
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2347
        (new Client(prot)).recv_updatePurchaseReturn();
2348
      }
2349
    }
2350
 
4496 mandeep.dh 2351
  }
2352
 
2353
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
2354
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
2355
    public Processor(I iface) {
2356
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
2357
    }
2358
 
2359
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
2360
      super(iface, getProcessMap(processMap));
2361
    }
2362
 
2363
    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) {
2364
      processMap.put("createPurchaseOrder", new createPurchaseOrder());
2365
      processMap.put("getPurchaseOrder", new getPurchaseOrder());
2366
      processMap.put("getAllPurchaseOrders", new getAllPurchaseOrders());
2367
      processMap.put("getSupplier", new getSupplier());
2368
      processMap.put("startPurchase", new startPurchase());
2369
      processMap.put("closePurchase", new closePurchase());
2370
      processMap.put("getAllPurchases", new getAllPurchases());
6385 amar.kumar 2371
      processMap.put("getPurchasesForPO", new getPurchasesForPO());
4555 mandeep.dh 2372
      processMap.put("getPurchaseOrderForPurchase", new getPurchaseOrderForPurchase());
4754 mandeep.dh 2373
      processMap.put("getPendingPurchaseOrders", new getPendingPurchaseOrders());
2374
      processMap.put("getSuppliers", new getSuppliers());
21847 amit.gupta 2375
      processMap.put("getAllSuppliers", new getAllSuppliers());
4754 mandeep.dh 2376
      processMap.put("fulfillPO", new fulfillPO());
2377
      processMap.put("updatePurchaseOrder", new updatePurchaseOrder());
5185 mandeep.dh 2378
      processMap.put("unFulfillPO", new unFulfillPO());
5443 mandeep.dh 2379
      processMap.put("getInvoices", new getInvoices());
7410 amar.kumar 2380
      processMap.put("getInvoicesForWarehouse", new getInvoicesForWarehouse());
5443 mandeep.dh 2381
      processMap.put("createInvoice", new createInvoice());
5591 mandeep.dh 2382
      processMap.put("addSupplier", new addSupplier());
2383
      processMap.put("updateSupplier", new updateSupplier());
6467 amar.kumar 2384
      processMap.put("createPurchaseReturn", new createPurchaseReturn());
2385
      processMap.put("settlePurchaseReturn", new settlePurchaseReturn());
2386
      processMap.put("getUnsettledPurchaseReturns", new getUnsettledPurchaseReturns());
6630 amar.kumar 2387
      processMap.put("getInvoice", new getInvoice());
6762 amar.kumar 2388
      processMap.put("createPurchaseForOurExtBilling", new createPurchaseForOurExtBilling());
2389
      processMap.put("fulfillPOForExtBilling", new fulfillPOForExtBilling());
7410 amar.kumar 2390
      processMap.put("closePO", new closePO());
2391
      processMap.put("isInvoiceReceived", new isInvoiceReceived());
9829 amar.kumar 2392
      processMap.put("changeWarehouseForPO", new changeWarehouseForPO());
9925 amar.kumar 2393
      processMap.put("changePOStatus", new changePOStatus());
11751 manish.sha 2394
      processMap.put("getPurchaseReturn", new getPurchaseReturn());
13600 manish.sha 2395
      processMap.put("markPurchasereturnSettled", new markPurchasereturnSettled());
2396
      processMap.put("getPrSettlementsForPurchaseReturn", new getPrSettlementsForPurchaseReturn());
2397
      processMap.put("updatePurchaseReturn", new updatePurchaseReturn());
4496 mandeep.dh 2398
      return processMap;
2399
    }
2400
 
2401
    private static class createPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseOrder_args> {
2402
      public createPurchaseOrder() {
2403
        super("createPurchaseOrder");
2404
      }
2405
 
2406
      protected createPurchaseOrder_args getEmptyArgsInstance() {
2407
        return new createPurchaseOrder_args();
2408
      }
2409
 
2410
      protected createPurchaseOrder_result getResult(I iface, createPurchaseOrder_args args) throws org.apache.thrift.TException {
2411
        createPurchaseOrder_result result = new createPurchaseOrder_result();
2412
        try {
2413
          result.success = iface.createPurchaseOrder(args.purchaseOrder);
2414
          result.setSuccessIsSet(true);
2415
        } catch (PurchaseServiceException e) {
2416
          result.e = e;
2417
        }
2418
        return result;
2419
      }
2420
    }
2421
 
2422
    private static class getPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrder_args> {
2423
      public getPurchaseOrder() {
2424
        super("getPurchaseOrder");
2425
      }
2426
 
2427
      protected getPurchaseOrder_args getEmptyArgsInstance() {
2428
        return new getPurchaseOrder_args();
2429
      }
2430
 
2431
      protected getPurchaseOrder_result getResult(I iface, getPurchaseOrder_args args) throws org.apache.thrift.TException {
2432
        getPurchaseOrder_result result = new getPurchaseOrder_result();
2433
        try {
2434
          result.success = iface.getPurchaseOrder(args.id);
2435
        } catch (PurchaseServiceException e) {
2436
          result.e = e;
2437
        }
2438
        return result;
2439
      }
2440
    }
2441
 
2442
    private static class getAllPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchaseOrders_args> {
2443
      public getAllPurchaseOrders() {
2444
        super("getAllPurchaseOrders");
2445
      }
2446
 
2447
      protected getAllPurchaseOrders_args getEmptyArgsInstance() {
2448
        return new getAllPurchaseOrders_args();
2449
      }
2450
 
2451
      protected getAllPurchaseOrders_result getResult(I iface, getAllPurchaseOrders_args args) throws org.apache.thrift.TException {
2452
        getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
2453
        try {
2454
          result.success = iface.getAllPurchaseOrders(args.status);
2455
        } catch (PurchaseServiceException e) {
2456
          result.e = e;
2457
        }
2458
        return result;
2459
      }
2460
    }
2461
 
2462
    private static class getSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSupplier_args> {
2463
      public getSupplier() {
2464
        super("getSupplier");
2465
      }
2466
 
2467
      protected getSupplier_args getEmptyArgsInstance() {
2468
        return new getSupplier_args();
2469
      }
2470
 
2471
      protected getSupplier_result getResult(I iface, getSupplier_args args) throws org.apache.thrift.TException {
2472
        getSupplier_result result = new getSupplier_result();
2473
        try {
2474
          result.success = iface.getSupplier(args.id);
2475
        } catch (PurchaseServiceException e) {
2476
          result.e = e;
2477
        }
2478
        return result;
2479
      }
2480
    }
2481
 
2482
    private static class startPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startPurchase_args> {
2483
      public startPurchase() {
2484
        super("startPurchase");
2485
      }
2486
 
2487
      protected startPurchase_args getEmptyArgsInstance() {
2488
        return new startPurchase_args();
2489
      }
2490
 
2491
      protected startPurchase_result getResult(I iface, startPurchase_args args) throws org.apache.thrift.TException {
2492
        startPurchase_result result = new startPurchase_result();
2493
        try {
11801 manish.sha 2494
          result.success = iface.startPurchase(args.purchaseOrderId, args.invoiceNumber, args.freightCharges, args.purchaseComments);
4496 mandeep.dh 2495
          result.setSuccessIsSet(true);
2496
        } catch (PurchaseServiceException e) {
2497
          result.e = e;
2498
        }
2499
        return result;
2500
      }
2501
    }
2502
 
2503
    private static class closePurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closePurchase_args> {
2504
      public closePurchase() {
2505
        super("closePurchase");
2506
      }
2507
 
2508
      protected closePurchase_args getEmptyArgsInstance() {
2509
        return new closePurchase_args();
2510
      }
2511
 
2512
      protected closePurchase_result getResult(I iface, closePurchase_args args) throws org.apache.thrift.TException {
2513
        closePurchase_result result = new closePurchase_result();
2514
        try {
2515
          result.success = iface.closePurchase(args.purchaseId);
2516
          result.setSuccessIsSet(true);
2517
        } catch (PurchaseServiceException e) {
2518
          result.e = e;
2519
        }
2520
        return result;
2521
      }
2522
    }
2523
 
2524
    private static class getAllPurchases<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchases_args> {
2525
      public getAllPurchases() {
2526
        super("getAllPurchases");
2527
      }
2528
 
2529
      protected getAllPurchases_args getEmptyArgsInstance() {
2530
        return new getAllPurchases_args();
2531
      }
2532
 
2533
      protected getAllPurchases_result getResult(I iface, getAllPurchases_args args) throws org.apache.thrift.TException {
2534
        getAllPurchases_result result = new getAllPurchases_result();
2535
        try {
2536
          result.success = iface.getAllPurchases(args.purchaseOrderId, args.open);
2537
        } catch (PurchaseServiceException e) {
2538
          result.e = e;
2539
        }
2540
        return result;
2541
      }
2542
    }
2543
 
6385 amar.kumar 2544
    private static class getPurchasesForPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchasesForPO_args> {
2545
      public getPurchasesForPO() {
2546
        super("getPurchasesForPO");
2547
      }
2548
 
2549
      protected getPurchasesForPO_args getEmptyArgsInstance() {
2550
        return new getPurchasesForPO_args();
2551
      }
2552
 
2553
      protected getPurchasesForPO_result getResult(I iface, getPurchasesForPO_args args) throws org.apache.thrift.TException {
2554
        getPurchasesForPO_result result = new getPurchasesForPO_result();
2555
        try {
2556
          result.success = iface.getPurchasesForPO(args.purchaseOrderId);
2557
        } catch (PurchaseServiceException e) {
2558
          result.e = e;
2559
        }
2560
        return result;
2561
      }
2562
    }
2563
 
4555 mandeep.dh 2564
    private static class getPurchaseOrderForPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrderForPurchase_args> {
2565
      public getPurchaseOrderForPurchase() {
2566
        super("getPurchaseOrderForPurchase");
4496 mandeep.dh 2567
      }
2568
 
4555 mandeep.dh 2569
      protected getPurchaseOrderForPurchase_args getEmptyArgsInstance() {
2570
        return new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 2571
      }
2572
 
4555 mandeep.dh 2573
      protected getPurchaseOrderForPurchase_result getResult(I iface, getPurchaseOrderForPurchase_args args) throws org.apache.thrift.TException {
2574
        getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
2575
        result.success = iface.getPurchaseOrderForPurchase(args.purchaseId);
4496 mandeep.dh 2576
        return result;
2577
      }
2578
    }
2579
 
4754 mandeep.dh 2580
    private static class getPendingPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPendingPurchaseOrders_args> {
2581
      public getPendingPurchaseOrders() {
2582
        super("getPendingPurchaseOrders");
2583
      }
2584
 
2585
      protected getPendingPurchaseOrders_args getEmptyArgsInstance() {
2586
        return new getPendingPurchaseOrders_args();
2587
      }
2588
 
2589
      protected getPendingPurchaseOrders_result getResult(I iface, getPendingPurchaseOrders_args args) throws org.apache.thrift.TException {
2590
        getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
2591
        try {
2592
          result.success = iface.getPendingPurchaseOrders(args.warehouseId);
2593
        } catch (PurchaseServiceException e) {
2594
          result.e = e;
2595
        }
2596
        return result;
2597
      }
2598
    }
2599
 
2600
    private static class getSuppliers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSuppliers_args> {
2601
      public getSuppliers() {
2602
        super("getSuppliers");
2603
      }
2604
 
2605
      protected getSuppliers_args getEmptyArgsInstance() {
2606
        return new getSuppliers_args();
2607
      }
2608
 
2609
      protected getSuppliers_result getResult(I iface, getSuppliers_args args) throws org.apache.thrift.TException {
2610
        getSuppliers_result result = new getSuppliers_result();
2611
        try {
2612
          result.success = iface.getSuppliers();
2613
        } catch (PurchaseServiceException e) {
2614
          result.e = e;
2615
        }
2616
        return result;
2617
      }
2618
    }
2619
 
21847 amit.gupta 2620
    private static class getAllSuppliers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllSuppliers_args> {
2621
      public getAllSuppliers() {
2622
        super("getAllSuppliers");
2623
      }
2624
 
2625
      protected getAllSuppliers_args getEmptyArgsInstance() {
2626
        return new getAllSuppliers_args();
2627
      }
2628
 
2629
      protected getAllSuppliers_result getResult(I iface, getAllSuppliers_args args) throws org.apache.thrift.TException {
2630
        getAllSuppliers_result result = new getAllSuppliers_result();
2631
        try {
2632
          result.success = iface.getAllSuppliers();
2633
        } catch (PurchaseServiceException e) {
2634
          result.e = e;
2635
        }
2636
        return result;
2637
      }
2638
    }
2639
 
4754 mandeep.dh 2640
    private static class fulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fulfillPO_args> {
2641
      public fulfillPO() {
2642
        super("fulfillPO");
2643
      }
2644
 
2645
      protected fulfillPO_args getEmptyArgsInstance() {
2646
        return new fulfillPO_args();
2647
      }
2648
 
2649
      protected fulfillPO_result getResult(I iface, fulfillPO_args args) throws org.apache.thrift.TException {
2650
        fulfillPO_result result = new fulfillPO_result();
2651
        try {
2652
          iface.fulfillPO(args.purchaseOrderId, args.itemId, args.quantity);
2653
        } catch (PurchaseServiceException e) {
2654
          result.e = e;
2655
        }
2656
        return result;
2657
      }
2658
    }
2659
 
2660
    private static class updatePurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updatePurchaseOrder_args> {
2661
      public updatePurchaseOrder() {
2662
        super("updatePurchaseOrder");
2663
      }
2664
 
2665
      protected updatePurchaseOrder_args getEmptyArgsInstance() {
2666
        return new updatePurchaseOrder_args();
2667
      }
2668
 
2669
      protected updatePurchaseOrder_result getResult(I iface, updatePurchaseOrder_args args) throws org.apache.thrift.TException {
2670
        updatePurchaseOrder_result result = new updatePurchaseOrder_result();
2671
        try {
2672
          iface.updatePurchaseOrder(args.purchaseOrder);
2673
        } catch (PurchaseServiceException e) {
2674
          result.e = e;
2675
        }
2676
        return result;
2677
      }
2678
    }
2679
 
5185 mandeep.dh 2680
    private static class unFulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, unFulfillPO_args> {
2681
      public unFulfillPO() {
2682
        super("unFulfillPO");
2683
      }
2684
 
2685
      protected unFulfillPO_args getEmptyArgsInstance() {
2686
        return new unFulfillPO_args();
2687
      }
2688
 
2689
      protected unFulfillPO_result getResult(I iface, unFulfillPO_args args) throws org.apache.thrift.TException {
2690
        unFulfillPO_result result = new unFulfillPO_result();
2691
        try {
2692
          iface.unFulfillPO(args.purchaseId, args.itemId, args.quantity);
2693
        } catch (PurchaseServiceException e) {
2694
          result.e = e;
2695
        }
2696
        return result;
2697
      }
2698
    }
2699
 
5443 mandeep.dh 2700
    private static class getInvoices<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoices_args> {
2701
      public getInvoices() {
2702
        super("getInvoices");
2703
      }
2704
 
2705
      protected getInvoices_args getEmptyArgsInstance() {
2706
        return new getInvoices_args();
2707
      }
2708
 
2709
      protected getInvoices_result getResult(I iface, getInvoices_args args) throws org.apache.thrift.TException {
2710
        getInvoices_result result = new getInvoices_result();
2711
        result.success = iface.getInvoices(args.date);
2712
        return result;
2713
      }
2714
    }
2715
 
7410 amar.kumar 2716
    private static class getInvoicesForWarehouse<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoicesForWarehouse_args> {
2717
      public getInvoicesForWarehouse() {
2718
        super("getInvoicesForWarehouse");
2719
      }
2720
 
2721
      protected getInvoicesForWarehouse_args getEmptyArgsInstance() {
2722
        return new getInvoicesForWarehouse_args();
2723
      }
2724
 
2725
      protected getInvoicesForWarehouse_result getResult(I iface, getInvoicesForWarehouse_args args) throws org.apache.thrift.TException {
2726
        getInvoicesForWarehouse_result result = new getInvoicesForWarehouse_result();
2727
        result.success = iface.getInvoicesForWarehouse(args.warehouseId, args.supplierId, args.date);
2728
        return result;
2729
      }
2730
    }
2731
 
5443 mandeep.dh 2732
    private static class createInvoice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createInvoice_args> {
2733
      public createInvoice() {
2734
        super("createInvoice");
2735
      }
2736
 
2737
      protected createInvoice_args getEmptyArgsInstance() {
2738
        return new createInvoice_args();
2739
      }
2740
 
2741
      protected createInvoice_result getResult(I iface, createInvoice_args args) throws org.apache.thrift.TException {
2742
        createInvoice_result result = new createInvoice_result();
2743
        try {
2744
          iface.createInvoice(args.invoice);
2745
        } catch (PurchaseServiceException e) {
2746
          result.e = e;
2747
        }
2748
        return result;
2749
      }
2750
    }
2751
 
5591 mandeep.dh 2752
    private static class addSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addSupplier_args> {
2753
      public addSupplier() {
2754
        super("addSupplier");
2755
      }
2756
 
2757
      protected addSupplier_args getEmptyArgsInstance() {
2758
        return new addSupplier_args();
2759
      }
2760
 
2761
      protected addSupplier_result getResult(I iface, addSupplier_args args) throws org.apache.thrift.TException {
2762
        addSupplier_result result = new addSupplier_result();
2763
        result.success = iface.addSupplier(args.supplier);
2764
        return result;
2765
      }
2766
    }
2767
 
2768
    private static class updateSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateSupplier_args> {
2769
      public updateSupplier() {
2770
        super("updateSupplier");
2771
      }
2772
 
2773
      protected updateSupplier_args getEmptyArgsInstance() {
2774
        return new updateSupplier_args();
2775
      }
2776
 
2777
      protected updateSupplier_result getResult(I iface, updateSupplier_args args) throws org.apache.thrift.TException {
2778
        updateSupplier_result result = new updateSupplier_result();
2779
        iface.updateSupplier(args.supplier);
2780
        return result;
2781
      }
2782
    }
2783
 
6467 amar.kumar 2784
    private static class createPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseReturn_args> {
2785
      public createPurchaseReturn() {
2786
        super("createPurchaseReturn");
2787
      }
2788
 
2789
      protected createPurchaseReturn_args getEmptyArgsInstance() {
2790
        return new createPurchaseReturn_args();
2791
      }
2792
 
2793
      protected createPurchaseReturn_result getResult(I iface, createPurchaseReturn_args args) throws org.apache.thrift.TException {
2794
        createPurchaseReturn_result result = new createPurchaseReturn_result();
2795
        result.success = iface.createPurchaseReturn(args.purchaseReturn);
2796
        result.setSuccessIsSet(true);
2797
        return result;
2798
      }
2799
    }
2800
 
2801
    private static class settlePurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, settlePurchaseReturn_args> {
2802
      public settlePurchaseReturn() {
2803
        super("settlePurchaseReturn");
2804
      }
2805
 
2806
      protected settlePurchaseReturn_args getEmptyArgsInstance() {
2807
        return new settlePurchaseReturn_args();
2808
      }
2809
 
2810
      protected settlePurchaseReturn_result getResult(I iface, settlePurchaseReturn_args args) throws org.apache.thrift.TException {
2811
        settlePurchaseReturn_result result = new settlePurchaseReturn_result();
2812
        iface.settlePurchaseReturn(args.id);
2813
        return result;
2814
      }
2815
    }
2816
 
2817
    private static class getUnsettledPurchaseReturns<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUnsettledPurchaseReturns_args> {
2818
      public getUnsettledPurchaseReturns() {
2819
        super("getUnsettledPurchaseReturns");
2820
      }
2821
 
2822
      protected getUnsettledPurchaseReturns_args getEmptyArgsInstance() {
2823
        return new getUnsettledPurchaseReturns_args();
2824
      }
2825
 
2826
      protected getUnsettledPurchaseReturns_result getResult(I iface, getUnsettledPurchaseReturns_args args) throws org.apache.thrift.TException {
2827
        getUnsettledPurchaseReturns_result result = new getUnsettledPurchaseReturns_result();
2828
        result.success = iface.getUnsettledPurchaseReturns();
2829
        return result;
2830
      }
2831
    }
2832
 
6630 amar.kumar 2833
    private static class getInvoice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoice_args> {
2834
      public getInvoice() {
2835
        super("getInvoice");
2836
      }
2837
 
2838
      protected getInvoice_args getEmptyArgsInstance() {
2839
        return new getInvoice_args();
2840
      }
2841
 
2842
      protected getInvoice_result getResult(I iface, getInvoice_args args) throws org.apache.thrift.TException {
2843
        getInvoice_result result = new getInvoice_result();
2844
        result.success = iface.getInvoice(args.invoiceNumber, args.supplierId);
2845
        return result;
2846
      }
2847
    }
2848
 
6762 amar.kumar 2849
    private static class createPurchaseForOurExtBilling<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseForOurExtBilling_args> {
2850
      public createPurchaseForOurExtBilling() {
2851
        super("createPurchaseForOurExtBilling");
2852
      }
2853
 
2854
      protected createPurchaseForOurExtBilling_args getEmptyArgsInstance() {
2855
        return new createPurchaseForOurExtBilling_args();
2856
      }
2857
 
2858
      protected createPurchaseForOurExtBilling_result getResult(I iface, createPurchaseForOurExtBilling_args args) throws org.apache.thrift.TException {
2859
        createPurchaseForOurExtBilling_result result = new createPurchaseForOurExtBilling_result();
7672 rajveer 2860
        result.success = iface.createPurchaseForOurExtBilling(args.invoiceNumber, args.unitPrice, args.nlc, args.itemId);
6762 amar.kumar 2861
        result.setSuccessIsSet(true);
2862
        return result;
2863
      }
2864
    }
2865
 
2866
    private static class fulfillPOForExtBilling<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fulfillPOForExtBilling_args> {
2867
      public fulfillPOForExtBilling() {
2868
        super("fulfillPOForExtBilling");
2869
      }
2870
 
2871
      protected fulfillPOForExtBilling_args getEmptyArgsInstance() {
2872
        return new fulfillPOForExtBilling_args();
2873
      }
2874
 
2875
      protected fulfillPOForExtBilling_result getResult(I iface, fulfillPOForExtBilling_args args) throws org.apache.thrift.TException {
2876
        fulfillPOForExtBilling_result result = new fulfillPOForExtBilling_result();
2877
        iface.fulfillPOForExtBilling(args.itemId, args.quantity);
2878
        return result;
2879
      }
2880
    }
2881
 
7410 amar.kumar 2882
    private static class closePO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closePO_args> {
2883
      public closePO() {
2884
        super("closePO");
2885
      }
2886
 
2887
      protected closePO_args getEmptyArgsInstance() {
2888
        return new closePO_args();
2889
      }
2890
 
2891
      protected closePO_result getResult(I iface, closePO_args args) throws org.apache.thrift.TException {
2892
        closePO_result result = new closePO_result();
2893
        try {
2894
          iface.closePO(args.poId);
2895
        } catch (PurchaseServiceException e) {
2896
          result.e = e;
2897
        }
2898
        return result;
2899
      }
2900
    }
2901
 
2902
    private static class isInvoiceReceived<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isInvoiceReceived_args> {
2903
      public isInvoiceReceived() {
2904
        super("isInvoiceReceived");
2905
      }
2906
 
2907
      protected isInvoiceReceived_args getEmptyArgsInstance() {
2908
        return new isInvoiceReceived_args();
2909
      }
2910
 
2911
      protected isInvoiceReceived_result getResult(I iface, isInvoiceReceived_args args) throws org.apache.thrift.TException {
2912
        isInvoiceReceived_result result = new isInvoiceReceived_result();
2913
        result.success = iface.isInvoiceReceived(args.invoiceNumber, args.supplierId);
2914
        result.setSuccessIsSet(true);
2915
        return result;
2916
      }
2917
    }
2918
 
9829 amar.kumar 2919
    private static class changeWarehouseForPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, changeWarehouseForPO_args> {
2920
      public changeWarehouseForPO() {
2921
        super("changeWarehouseForPO");
2922
      }
2923
 
2924
      protected changeWarehouseForPO_args getEmptyArgsInstance() {
2925
        return new changeWarehouseForPO_args();
2926
      }
2927
 
2928
      protected changeWarehouseForPO_result getResult(I iface, changeWarehouseForPO_args args) throws org.apache.thrift.TException {
2929
        changeWarehouseForPO_result result = new changeWarehouseForPO_result();
2930
        try {
2931
          iface.changeWarehouseForPO(args.id, args.warehouseId);
2932
        } catch (PurchaseServiceException e) {
2933
          result.e = e;
2934
        }
2935
        return result;
2936
      }
2937
    }
2938
 
9925 amar.kumar 2939
    private static class changePOStatus<I extends Iface> extends org.apache.thrift.ProcessFunction<I, changePOStatus_args> {
2940
      public changePOStatus() {
2941
        super("changePOStatus");
2942
      }
2943
 
2944
      protected changePOStatus_args getEmptyArgsInstance() {
2945
        return new changePOStatus_args();
2946
      }
2947
 
2948
      protected changePOStatus_result getResult(I iface, changePOStatus_args args) throws org.apache.thrift.TException {
2949
        changePOStatus_result result = new changePOStatus_result();
2950
        try {
2951
          iface.changePOStatus(args.id, args.poStatus);
2952
        } catch (PurchaseServiceException e) {
2953
          result.e = e;
2954
        }
2955
        return result;
2956
      }
2957
    }
2958
 
11751 manish.sha 2959
    private static class getPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseReturn_args> {
2960
      public getPurchaseReturn() {
2961
        super("getPurchaseReturn");
2962
      }
2963
 
2964
      protected getPurchaseReturn_args getEmptyArgsInstance() {
2965
        return new getPurchaseReturn_args();
2966
      }
2967
 
2968
      protected getPurchaseReturn_result getResult(I iface, getPurchaseReturn_args args) throws org.apache.thrift.TException {
2969
        getPurchaseReturn_result result = new getPurchaseReturn_result();
2970
        try {
2971
          result.success = iface.getPurchaseReturn(args.id);
2972
        } catch (PurchaseServiceException e) {
2973
          result.e = e;
2974
        }
2975
        return result;
2976
      }
2977
    }
2978
 
13600 manish.sha 2979
    private static class markPurchasereturnSettled<I extends Iface> extends org.apache.thrift.ProcessFunction<I, markPurchasereturnSettled_args> {
2980
      public markPurchasereturnSettled() {
2981
        super("markPurchasereturnSettled");
2982
      }
2983
 
2984
      protected markPurchasereturnSettled_args getEmptyArgsInstance() {
2985
        return new markPurchasereturnSettled_args();
2986
      }
2987
 
2988
      protected markPurchasereturnSettled_result getResult(I iface, markPurchasereturnSettled_args args) throws org.apache.thrift.TException {
2989
        markPurchasereturnSettled_result result = new markPurchasereturnSettled_result();
2990
        try {
2991
          result.success = iface.markPurchasereturnSettled(args.id, args.settlementType, args.documentNumber, args.settlementBy, args.settledAmount);
2992
          result.setSuccessIsSet(true);
2993
        } catch (PurchaseServiceException e) {
2994
          result.e = e;
2995
        }
2996
        return result;
2997
      }
2998
    }
2999
 
3000
    private static class getPrSettlementsForPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPrSettlementsForPurchaseReturn_args> {
3001
      public getPrSettlementsForPurchaseReturn() {
3002
        super("getPrSettlementsForPurchaseReturn");
3003
      }
3004
 
3005
      protected getPrSettlementsForPurchaseReturn_args getEmptyArgsInstance() {
3006
        return new getPrSettlementsForPurchaseReturn_args();
3007
      }
3008
 
3009
      protected getPrSettlementsForPurchaseReturn_result getResult(I iface, getPrSettlementsForPurchaseReturn_args args) throws org.apache.thrift.TException {
3010
        getPrSettlementsForPurchaseReturn_result result = new getPrSettlementsForPurchaseReturn_result();
3011
        try {
3012
          result.success = iface.getPrSettlementsForPurchaseReturn(args.purchaseReturnId);
3013
        } catch (PurchaseServiceException e) {
3014
          result.e = e;
3015
        }
3016
        return result;
3017
      }
3018
    }
3019
 
3020
    private static class updatePurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updatePurchaseReturn_args> {
3021
      public updatePurchaseReturn() {
3022
        super("updatePurchaseReturn");
3023
      }
3024
 
3025
      protected updatePurchaseReturn_args getEmptyArgsInstance() {
3026
        return new updatePurchaseReturn_args();
3027
      }
3028
 
3029
      protected updatePurchaseReturn_result getResult(I iface, updatePurchaseReturn_args args) throws org.apache.thrift.TException {
3030
        updatePurchaseReturn_result result = new updatePurchaseReturn_result();
3031
        try {
3032
          iface.updatePurchaseReturn(args.purchaseReturn);
3033
        } catch (PurchaseServiceException e) {
3034
          result.e = e;
3035
        }
3036
        return result;
3037
      }
3038
    }
3039
 
4496 mandeep.dh 3040
  }
3041
 
3042
  public static class createPurchaseOrder_args implements org.apache.thrift.TBase<createPurchaseOrder_args, createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
3043
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_args");
3044
 
3045
    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);
3046
 
3047
    private PurchaseOrder purchaseOrder; // required
3048
 
3049
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3050
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3051
      PURCHASE_ORDER((short)1, "purchaseOrder");
3052
 
3053
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3054
 
3055
      static {
3056
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3057
          byName.put(field.getFieldName(), field);
3058
        }
3059
      }
3060
 
3061
      /**
3062
       * Find the _Fields constant that matches fieldId, or null if its not found.
3063
       */
3064
      public static _Fields findByThriftId(int fieldId) {
3065
        switch(fieldId) {
3066
          case 1: // PURCHASE_ORDER
3067
            return PURCHASE_ORDER;
3068
          default:
3069
            return null;
3070
        }
3071
      }
3072
 
3073
      /**
3074
       * Find the _Fields constant that matches fieldId, throwing an exception
3075
       * if it is not found.
3076
       */
3077
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3078
        _Fields fields = findByThriftId(fieldId);
3079
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3080
        return fields;
3081
      }
3082
 
3083
      /**
3084
       * Find the _Fields constant that matches name, or null if its not found.
3085
       */
3086
      public static _Fields findByName(String name) {
3087
        return byName.get(name);
3088
      }
3089
 
3090
      private final short _thriftId;
3091
      private final String _fieldName;
3092
 
3093
      _Fields(short thriftId, String fieldName) {
3094
        _thriftId = thriftId;
3095
        _fieldName = fieldName;
3096
      }
3097
 
3098
      public short getThriftFieldId() {
3099
        return _thriftId;
3100
      }
3101
 
3102
      public String getFieldName() {
3103
        return _fieldName;
3104
      }
3105
    }
3106
 
3107
    // isset id assignments
3108
 
3109
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3110
    static {
3111
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3112
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3113
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
3114
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3115
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_args.class, metaDataMap);
3116
    }
3117
 
3118
    public createPurchaseOrder_args() {
3119
    }
3120
 
3121
    public createPurchaseOrder_args(
3122
      PurchaseOrder purchaseOrder)
3123
    {
3124
      this();
3125
      this.purchaseOrder = purchaseOrder;
3126
    }
3127
 
3128
    /**
3129
     * Performs a deep copy on <i>other</i>.
3130
     */
3131
    public createPurchaseOrder_args(createPurchaseOrder_args other) {
3132
      if (other.isSetPurchaseOrder()) {
3133
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
3134
      }
3135
    }
3136
 
3137
    public createPurchaseOrder_args deepCopy() {
3138
      return new createPurchaseOrder_args(this);
3139
    }
3140
 
3141
    @Override
3142
    public void clear() {
3143
      this.purchaseOrder = null;
3144
    }
3145
 
3146
    public PurchaseOrder getPurchaseOrder() {
3147
      return this.purchaseOrder;
3148
    }
3149
 
3150
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
3151
      this.purchaseOrder = purchaseOrder;
3152
    }
3153
 
3154
    public void unsetPurchaseOrder() {
3155
      this.purchaseOrder = null;
3156
    }
3157
 
3158
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
3159
    public boolean isSetPurchaseOrder() {
3160
      return this.purchaseOrder != null;
3161
    }
3162
 
3163
    public void setPurchaseOrderIsSet(boolean value) {
3164
      if (!value) {
3165
        this.purchaseOrder = null;
3166
      }
3167
    }
3168
 
3169
    public void setFieldValue(_Fields field, Object value) {
3170
      switch (field) {
3171
      case PURCHASE_ORDER:
3172
        if (value == null) {
3173
          unsetPurchaseOrder();
3174
        } else {
3175
          setPurchaseOrder((PurchaseOrder)value);
3176
        }
3177
        break;
3178
 
3179
      }
3180
    }
3181
 
3182
    public Object getFieldValue(_Fields field) {
3183
      switch (field) {
3184
      case PURCHASE_ORDER:
3185
        return getPurchaseOrder();
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 PURCHASE_ORDER:
3199
        return isSetPurchaseOrder();
3200
      }
3201
      throw new IllegalStateException();
3202
    }
3203
 
3204
    @Override
3205
    public boolean equals(Object that) {
3206
      if (that == null)
3207
        return false;
3208
      if (that instanceof createPurchaseOrder_args)
3209
        return this.equals((createPurchaseOrder_args)that);
3210
      return false;
3211
    }
3212
 
3213
    public boolean equals(createPurchaseOrder_args that) {
3214
      if (that == null)
3215
        return false;
3216
 
3217
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
3218
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
3219
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
3220
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
3221
          return false;
3222
        if (!this.purchaseOrder.equals(that.purchaseOrder))
3223
          return false;
3224
      }
3225
 
3226
      return true;
3227
    }
3228
 
3229
    @Override
3230
    public int hashCode() {
3231
      return 0;
3232
    }
3233
 
3234
    public int compareTo(createPurchaseOrder_args other) {
3235
      if (!getClass().equals(other.getClass())) {
3236
        return getClass().getName().compareTo(other.getClass().getName());
3237
      }
3238
 
3239
      int lastComparison = 0;
3240
      createPurchaseOrder_args typedOther = (createPurchaseOrder_args)other;
3241
 
3242
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
3243
      if (lastComparison != 0) {
3244
        return lastComparison;
3245
      }
3246
      if (isSetPurchaseOrder()) {
3247
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
3248
        if (lastComparison != 0) {
3249
          return lastComparison;
3250
        }
3251
      }
3252
      return 0;
3253
    }
3254
 
3255
    public _Fields fieldForId(int fieldId) {
3256
      return _Fields.findByThriftId(fieldId);
3257
    }
3258
 
3259
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3260
      org.apache.thrift.protocol.TField field;
3261
      iprot.readStructBegin();
3262
      while (true)
3263
      {
3264
        field = iprot.readFieldBegin();
3265
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3266
          break;
3267
        }
3268
        switch (field.id) {
3269
          case 1: // PURCHASE_ORDER
3270
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3271
              this.purchaseOrder = new PurchaseOrder();
3272
              this.purchaseOrder.read(iprot);
3273
            } else { 
3274
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3275
            }
3276
            break;
3277
          default:
3278
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3279
        }
3280
        iprot.readFieldEnd();
3281
      }
3282
      iprot.readStructEnd();
3283
      validate();
3284
    }
3285
 
3286
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3287
      validate();
3288
 
3289
      oprot.writeStructBegin(STRUCT_DESC);
3290
      if (this.purchaseOrder != null) {
3291
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
3292
        this.purchaseOrder.write(oprot);
3293
        oprot.writeFieldEnd();
3294
      }
3295
      oprot.writeFieldStop();
3296
      oprot.writeStructEnd();
3297
    }
3298
 
3299
    @Override
3300
    public String toString() {
3301
      StringBuilder sb = new StringBuilder("createPurchaseOrder_args(");
3302
      boolean first = true;
3303
 
3304
      sb.append("purchaseOrder:");
3305
      if (this.purchaseOrder == null) {
3306
        sb.append("null");
3307
      } else {
3308
        sb.append(this.purchaseOrder);
3309
      }
3310
      first = false;
3311
      sb.append(")");
3312
      return sb.toString();
3313
    }
3314
 
3315
    public void validate() throws org.apache.thrift.TException {
3316
      // check for required fields
3317
    }
3318
 
3319
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3320
      try {
3321
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3322
      } catch (org.apache.thrift.TException te) {
3323
        throw new java.io.IOException(te);
3324
      }
3325
    }
3326
 
3327
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3328
      try {
3329
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3330
      } catch (org.apache.thrift.TException te) {
3331
        throw new java.io.IOException(te);
3332
      }
3333
    }
3334
 
3335
  }
3336
 
3337
  public static class createPurchaseOrder_result implements org.apache.thrift.TBase<createPurchaseOrder_result, createPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
3338
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_result");
3339
 
3340
    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);
3341
    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);
3342
 
3343
    private long success; // required
3344
    private PurchaseServiceException e; // required
3345
 
3346
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3347
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3348
      SUCCESS((short)0, "success"),
3349
      E((short)1, "e");
3350
 
3351
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3352
 
3353
      static {
3354
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3355
          byName.put(field.getFieldName(), field);
3356
        }
3357
      }
3358
 
3359
      /**
3360
       * Find the _Fields constant that matches fieldId, or null if its not found.
3361
       */
3362
      public static _Fields findByThriftId(int fieldId) {
3363
        switch(fieldId) {
3364
          case 0: // SUCCESS
3365
            return SUCCESS;
3366
          case 1: // E
3367
            return E;
3368
          default:
3369
            return null;
3370
        }
3371
      }
3372
 
3373
      /**
3374
       * Find the _Fields constant that matches fieldId, throwing an exception
3375
       * if it is not found.
3376
       */
3377
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3378
        _Fields fields = findByThriftId(fieldId);
3379
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3380
        return fields;
3381
      }
3382
 
3383
      /**
3384
       * Find the _Fields constant that matches name, or null if its not found.
3385
       */
3386
      public static _Fields findByName(String name) {
3387
        return byName.get(name);
3388
      }
3389
 
3390
      private final short _thriftId;
3391
      private final String _fieldName;
3392
 
3393
      _Fields(short thriftId, String fieldName) {
3394
        _thriftId = thriftId;
3395
        _fieldName = fieldName;
3396
      }
3397
 
3398
      public short getThriftFieldId() {
3399
        return _thriftId;
3400
      }
3401
 
3402
      public String getFieldName() {
3403
        return _fieldName;
3404
      }
3405
    }
3406
 
3407
    // isset id assignments
3408
    private static final int __SUCCESS_ISSET_ID = 0;
3409
    private BitSet __isset_bit_vector = new BitSet(1);
3410
 
3411
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3412
    static {
3413
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3414
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3415
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3416
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3417
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3418
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3419
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_result.class, metaDataMap);
3420
    }
3421
 
3422
    public createPurchaseOrder_result() {
3423
    }
3424
 
3425
    public createPurchaseOrder_result(
3426
      long success,
3427
      PurchaseServiceException e)
3428
    {
3429
      this();
3430
      this.success = success;
3431
      setSuccessIsSet(true);
3432
      this.e = e;
3433
    }
3434
 
3435
    /**
3436
     * Performs a deep copy on <i>other</i>.
3437
     */
3438
    public createPurchaseOrder_result(createPurchaseOrder_result other) {
3439
      __isset_bit_vector.clear();
3440
      __isset_bit_vector.or(other.__isset_bit_vector);
3441
      this.success = other.success;
3442
      if (other.isSetE()) {
3443
        this.e = new PurchaseServiceException(other.e);
3444
      }
3445
    }
3446
 
3447
    public createPurchaseOrder_result deepCopy() {
3448
      return new createPurchaseOrder_result(this);
3449
    }
3450
 
3451
    @Override
3452
    public void clear() {
3453
      setSuccessIsSet(false);
3454
      this.success = 0;
3455
      this.e = null;
3456
    }
3457
 
3458
    public long getSuccess() {
3459
      return this.success;
3460
    }
3461
 
3462
    public void setSuccess(long success) {
3463
      this.success = success;
3464
      setSuccessIsSet(true);
3465
    }
3466
 
3467
    public void unsetSuccess() {
3468
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
3469
    }
3470
 
3471
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
3472
    public boolean isSetSuccess() {
3473
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
3474
    }
3475
 
3476
    public void setSuccessIsSet(boolean value) {
3477
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
3478
    }
3479
 
3480
    public PurchaseServiceException getE() {
3481
      return this.e;
3482
    }
3483
 
3484
    public void setE(PurchaseServiceException e) {
3485
      this.e = e;
3486
    }
3487
 
3488
    public void unsetE() {
3489
      this.e = null;
3490
    }
3491
 
3492
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
3493
    public boolean isSetE() {
3494
      return this.e != null;
3495
    }
3496
 
3497
    public void setEIsSet(boolean value) {
3498
      if (!value) {
3499
        this.e = null;
3500
      }
3501
    }
3502
 
3503
    public void setFieldValue(_Fields field, Object value) {
3504
      switch (field) {
3505
      case SUCCESS:
3506
        if (value == null) {
3507
          unsetSuccess();
3508
        } else {
3509
          setSuccess((Long)value);
3510
        }
3511
        break;
3512
 
3513
      case E:
3514
        if (value == null) {
3515
          unsetE();
3516
        } else {
3517
          setE((PurchaseServiceException)value);
3518
        }
3519
        break;
3520
 
3521
      }
3522
    }
3523
 
3524
    public Object getFieldValue(_Fields field) {
3525
      switch (field) {
3526
      case SUCCESS:
3527
        return Long.valueOf(getSuccess());
3528
 
3529
      case E:
3530
        return getE();
3531
 
3532
      }
3533
      throw new IllegalStateException();
3534
    }
3535
 
3536
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3537
    public boolean isSet(_Fields field) {
3538
      if (field == null) {
3539
        throw new IllegalArgumentException();
3540
      }
3541
 
3542
      switch (field) {
3543
      case SUCCESS:
3544
        return isSetSuccess();
3545
      case E:
3546
        return isSetE();
3547
      }
3548
      throw new IllegalStateException();
3549
    }
3550
 
3551
    @Override
3552
    public boolean equals(Object that) {
3553
      if (that == null)
3554
        return false;
3555
      if (that instanceof createPurchaseOrder_result)
3556
        return this.equals((createPurchaseOrder_result)that);
3557
      return false;
3558
    }
3559
 
3560
    public boolean equals(createPurchaseOrder_result that) {
3561
      if (that == null)
3562
        return false;
3563
 
3564
      boolean this_present_success = true;
3565
      boolean that_present_success = true;
3566
      if (this_present_success || that_present_success) {
3567
        if (!(this_present_success && that_present_success))
3568
          return false;
3569
        if (this.success != that.success)
3570
          return false;
3571
      }
3572
 
3573
      boolean this_present_e = true && this.isSetE();
3574
      boolean that_present_e = true && that.isSetE();
3575
      if (this_present_e || that_present_e) {
3576
        if (!(this_present_e && that_present_e))
3577
          return false;
3578
        if (!this.e.equals(that.e))
3579
          return false;
3580
      }
3581
 
3582
      return true;
3583
    }
3584
 
3585
    @Override
3586
    public int hashCode() {
3587
      return 0;
3588
    }
3589
 
3590
    public int compareTo(createPurchaseOrder_result other) {
3591
      if (!getClass().equals(other.getClass())) {
3592
        return getClass().getName().compareTo(other.getClass().getName());
3593
      }
3594
 
3595
      int lastComparison = 0;
3596
      createPurchaseOrder_result typedOther = (createPurchaseOrder_result)other;
3597
 
3598
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3599
      if (lastComparison != 0) {
3600
        return lastComparison;
3601
      }
3602
      if (isSetSuccess()) {
3603
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3604
        if (lastComparison != 0) {
3605
          return lastComparison;
3606
        }
3607
      }
3608
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
3609
      if (lastComparison != 0) {
3610
        return lastComparison;
3611
      }
3612
      if (isSetE()) {
3613
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
3614
        if (lastComparison != 0) {
3615
          return lastComparison;
3616
        }
3617
      }
3618
      return 0;
3619
    }
3620
 
3621
    public _Fields fieldForId(int fieldId) {
3622
      return _Fields.findByThriftId(fieldId);
3623
    }
3624
 
3625
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3626
      org.apache.thrift.protocol.TField field;
3627
      iprot.readStructBegin();
3628
      while (true)
3629
      {
3630
        field = iprot.readFieldBegin();
3631
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3632
          break;
3633
        }
3634
        switch (field.id) {
3635
          case 0: // SUCCESS
3636
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3637
              this.success = iprot.readI64();
3638
              setSuccessIsSet(true);
3639
            } else { 
3640
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3641
            }
3642
            break;
3643
          case 1: // E
3644
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3645
              this.e = new PurchaseServiceException();
3646
              this.e.read(iprot);
3647
            } else { 
3648
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3649
            }
3650
            break;
3651
          default:
3652
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3653
        }
3654
        iprot.readFieldEnd();
3655
      }
3656
      iprot.readStructEnd();
3657
      validate();
3658
    }
3659
 
3660
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3661
      oprot.writeStructBegin(STRUCT_DESC);
3662
 
3663
      if (this.isSetSuccess()) {
3664
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3665
        oprot.writeI64(this.success);
3666
        oprot.writeFieldEnd();
3667
      } else if (this.isSetE()) {
3668
        oprot.writeFieldBegin(E_FIELD_DESC);
3669
        this.e.write(oprot);
3670
        oprot.writeFieldEnd();
3671
      }
3672
      oprot.writeFieldStop();
3673
      oprot.writeStructEnd();
3674
    }
3675
 
3676
    @Override
3677
    public String toString() {
3678
      StringBuilder sb = new StringBuilder("createPurchaseOrder_result(");
3679
      boolean first = true;
3680
 
3681
      sb.append("success:");
3682
      sb.append(this.success);
3683
      first = false;
3684
      if (!first) sb.append(", ");
3685
      sb.append("e:");
3686
      if (this.e == null) {
3687
        sb.append("null");
3688
      } else {
3689
        sb.append(this.e);
3690
      }
3691
      first = false;
3692
      sb.append(")");
3693
      return sb.toString();
3694
    }
3695
 
3696
    public void validate() throws org.apache.thrift.TException {
3697
      // check for required fields
3698
    }
3699
 
3700
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3701
      try {
3702
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3703
      } catch (org.apache.thrift.TException te) {
3704
        throw new java.io.IOException(te);
3705
      }
3706
    }
3707
 
3708
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3709
      try {
3710
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3711
      } catch (org.apache.thrift.TException te) {
3712
        throw new java.io.IOException(te);
3713
      }
3714
    }
3715
 
3716
  }
3717
 
3718
  public static class getPurchaseOrder_args implements org.apache.thrift.TBase<getPurchaseOrder_args, getPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
3719
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_args");
3720
 
3721
    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);
3722
 
3723
    private long id; // required
3724
 
3725
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3726
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3727
      ID((short)1, "id");
3728
 
3729
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3730
 
3731
      static {
3732
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3733
          byName.put(field.getFieldName(), field);
3734
        }
3735
      }
3736
 
3737
      /**
3738
       * Find the _Fields constant that matches fieldId, or null if its not found.
3739
       */
3740
      public static _Fields findByThriftId(int fieldId) {
3741
        switch(fieldId) {
3742
          case 1: // ID
3743
            return ID;
3744
          default:
3745
            return null;
3746
        }
3747
      }
3748
 
3749
      /**
3750
       * Find the _Fields constant that matches fieldId, throwing an exception
3751
       * if it is not found.
3752
       */
3753
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3754
        _Fields fields = findByThriftId(fieldId);
3755
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3756
        return fields;
3757
      }
3758
 
3759
      /**
3760
       * Find the _Fields constant that matches name, or null if its not found.
3761
       */
3762
      public static _Fields findByName(String name) {
3763
        return byName.get(name);
3764
      }
3765
 
3766
      private final short _thriftId;
3767
      private final String _fieldName;
3768
 
3769
      _Fields(short thriftId, String fieldName) {
3770
        _thriftId = thriftId;
3771
        _fieldName = fieldName;
3772
      }
3773
 
3774
      public short getThriftFieldId() {
3775
        return _thriftId;
3776
      }
3777
 
3778
      public String getFieldName() {
3779
        return _fieldName;
3780
      }
3781
    }
3782
 
3783
    // isset id assignments
3784
    private static final int __ID_ISSET_ID = 0;
3785
    private BitSet __isset_bit_vector = new BitSet(1);
3786
 
3787
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3788
    static {
3789
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3790
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3791
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3792
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3793
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_args.class, metaDataMap);
3794
    }
3795
 
3796
    public getPurchaseOrder_args() {
3797
    }
3798
 
3799
    public getPurchaseOrder_args(
3800
      long id)
3801
    {
3802
      this();
3803
      this.id = id;
3804
      setIdIsSet(true);
3805
    }
3806
 
3807
    /**
3808
     * Performs a deep copy on <i>other</i>.
3809
     */
3810
    public getPurchaseOrder_args(getPurchaseOrder_args other) {
3811
      __isset_bit_vector.clear();
3812
      __isset_bit_vector.or(other.__isset_bit_vector);
3813
      this.id = other.id;
3814
    }
3815
 
3816
    public getPurchaseOrder_args deepCopy() {
3817
      return new getPurchaseOrder_args(this);
3818
    }
3819
 
3820
    @Override
3821
    public void clear() {
3822
      setIdIsSet(false);
3823
      this.id = 0;
3824
    }
3825
 
3826
    public long getId() {
3827
      return this.id;
3828
    }
3829
 
3830
    public void setId(long id) {
3831
      this.id = id;
3832
      setIdIsSet(true);
3833
    }
3834
 
3835
    public void unsetId() {
3836
      __isset_bit_vector.clear(__ID_ISSET_ID);
3837
    }
3838
 
3839
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
3840
    public boolean isSetId() {
3841
      return __isset_bit_vector.get(__ID_ISSET_ID);
3842
    }
3843
 
3844
    public void setIdIsSet(boolean value) {
3845
      __isset_bit_vector.set(__ID_ISSET_ID, value);
3846
    }
3847
 
3848
    public void setFieldValue(_Fields field, Object value) {
3849
      switch (field) {
3850
      case ID:
3851
        if (value == null) {
3852
          unsetId();
3853
        } else {
3854
          setId((Long)value);
3855
        }
3856
        break;
3857
 
3858
      }
3859
    }
3860
 
3861
    public Object getFieldValue(_Fields field) {
3862
      switch (field) {
3863
      case ID:
3864
        return Long.valueOf(getId());
3865
 
3866
      }
3867
      throw new IllegalStateException();
3868
    }
3869
 
3870
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3871
    public boolean isSet(_Fields field) {
3872
      if (field == null) {
3873
        throw new IllegalArgumentException();
3874
      }
3875
 
3876
      switch (field) {
3877
      case ID:
3878
        return isSetId();
3879
      }
3880
      throw new IllegalStateException();
3881
    }
3882
 
3883
    @Override
3884
    public boolean equals(Object that) {
3885
      if (that == null)
3886
        return false;
3887
      if (that instanceof getPurchaseOrder_args)
3888
        return this.equals((getPurchaseOrder_args)that);
3889
      return false;
3890
    }
3891
 
3892
    public boolean equals(getPurchaseOrder_args that) {
3893
      if (that == null)
3894
        return false;
3895
 
3896
      boolean this_present_id = true;
3897
      boolean that_present_id = true;
3898
      if (this_present_id || that_present_id) {
3899
        if (!(this_present_id && that_present_id))
3900
          return false;
3901
        if (this.id != that.id)
3902
          return false;
3903
      }
3904
 
3905
      return true;
3906
    }
3907
 
3908
    @Override
3909
    public int hashCode() {
3910
      return 0;
3911
    }
3912
 
3913
    public int compareTo(getPurchaseOrder_args other) {
3914
      if (!getClass().equals(other.getClass())) {
3915
        return getClass().getName().compareTo(other.getClass().getName());
3916
      }
3917
 
3918
      int lastComparison = 0;
3919
      getPurchaseOrder_args typedOther = (getPurchaseOrder_args)other;
3920
 
3921
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
3922
      if (lastComparison != 0) {
3923
        return lastComparison;
3924
      }
3925
      if (isSetId()) {
3926
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
3927
        if (lastComparison != 0) {
3928
          return lastComparison;
3929
        }
3930
      }
3931
      return 0;
3932
    }
3933
 
3934
    public _Fields fieldForId(int fieldId) {
3935
      return _Fields.findByThriftId(fieldId);
3936
    }
3937
 
3938
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3939
      org.apache.thrift.protocol.TField field;
3940
      iprot.readStructBegin();
3941
      while (true)
3942
      {
3943
        field = iprot.readFieldBegin();
3944
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3945
          break;
3946
        }
3947
        switch (field.id) {
3948
          case 1: // ID
3949
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3950
              this.id = iprot.readI64();
3951
              setIdIsSet(true);
3952
            } else { 
3953
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3954
            }
3955
            break;
3956
          default:
3957
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3958
        }
3959
        iprot.readFieldEnd();
3960
      }
3961
      iprot.readStructEnd();
3962
      validate();
3963
    }
3964
 
3965
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3966
      validate();
3967
 
3968
      oprot.writeStructBegin(STRUCT_DESC);
3969
      oprot.writeFieldBegin(ID_FIELD_DESC);
3970
      oprot.writeI64(this.id);
3971
      oprot.writeFieldEnd();
3972
      oprot.writeFieldStop();
3973
      oprot.writeStructEnd();
3974
    }
3975
 
3976
    @Override
3977
    public String toString() {
3978
      StringBuilder sb = new StringBuilder("getPurchaseOrder_args(");
3979
      boolean first = true;
3980
 
3981
      sb.append("id:");
3982
      sb.append(this.id);
3983
      first = false;
3984
      sb.append(")");
3985
      return sb.toString();
3986
    }
3987
 
3988
    public void validate() throws org.apache.thrift.TException {
3989
      // check for required fields
3990
    }
3991
 
3992
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3993
      try {
3994
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3995
      } catch (org.apache.thrift.TException te) {
3996
        throw new java.io.IOException(te);
3997
      }
3998
    }
3999
 
4000
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4001
      try {
4002
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4003
      } catch (org.apache.thrift.TException te) {
4004
        throw new java.io.IOException(te);
4005
      }
4006
    }
4007
 
4008
  }
4009
 
4010
  public static class getPurchaseOrder_result implements org.apache.thrift.TBase<getPurchaseOrder_result, getPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
4011
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_result");
4012
 
4013
    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);
4014
    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);
4015
 
4016
    private PurchaseOrder success; // required
4017
    private PurchaseServiceException e; // required
4018
 
4019
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4020
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4021
      SUCCESS((short)0, "success"),
4022
      E((short)1, "e");
4023
 
4024
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4025
 
4026
      static {
4027
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4028
          byName.put(field.getFieldName(), field);
4029
        }
4030
      }
4031
 
4032
      /**
4033
       * Find the _Fields constant that matches fieldId, or null if its not found.
4034
       */
4035
      public static _Fields findByThriftId(int fieldId) {
4036
        switch(fieldId) {
4037
          case 0: // SUCCESS
4038
            return SUCCESS;
4039
          case 1: // E
4040
            return E;
4041
          default:
4042
            return null;
4043
        }
4044
      }
4045
 
4046
      /**
4047
       * Find the _Fields constant that matches fieldId, throwing an exception
4048
       * if it is not found.
4049
       */
4050
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4051
        _Fields fields = findByThriftId(fieldId);
4052
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4053
        return fields;
4054
      }
4055
 
4056
      /**
4057
       * Find the _Fields constant that matches name, or null if its not found.
4058
       */
4059
      public static _Fields findByName(String name) {
4060
        return byName.get(name);
4061
      }
4062
 
4063
      private final short _thriftId;
4064
      private final String _fieldName;
4065
 
4066
      _Fields(short thriftId, String fieldName) {
4067
        _thriftId = thriftId;
4068
        _fieldName = fieldName;
4069
      }
4070
 
4071
      public short getThriftFieldId() {
4072
        return _thriftId;
4073
      }
4074
 
4075
      public String getFieldName() {
4076
        return _fieldName;
4077
      }
4078
    }
4079
 
4080
    // isset id assignments
4081
 
4082
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4083
    static {
4084
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4085
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4086
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
4087
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4088
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4089
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4090
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_result.class, metaDataMap);
4091
    }
4092
 
4093
    public getPurchaseOrder_result() {
4094
    }
4095
 
4096
    public getPurchaseOrder_result(
4097
      PurchaseOrder success,
4098
      PurchaseServiceException e)
4099
    {
4100
      this();
4101
      this.success = success;
4102
      this.e = e;
4103
    }
4104
 
4105
    /**
4106
     * Performs a deep copy on <i>other</i>.
4107
     */
4108
    public getPurchaseOrder_result(getPurchaseOrder_result other) {
4109
      if (other.isSetSuccess()) {
4110
        this.success = new PurchaseOrder(other.success);
4111
      }
4112
      if (other.isSetE()) {
4113
        this.e = new PurchaseServiceException(other.e);
4114
      }
4115
    }
4116
 
4117
    public getPurchaseOrder_result deepCopy() {
4118
      return new getPurchaseOrder_result(this);
4119
    }
4120
 
4121
    @Override
4122
    public void clear() {
4123
      this.success = null;
4124
      this.e = null;
4125
    }
4126
 
4127
    public PurchaseOrder getSuccess() {
4128
      return this.success;
4129
    }
4130
 
4131
    public void setSuccess(PurchaseOrder success) {
4132
      this.success = success;
4133
    }
4134
 
4135
    public void unsetSuccess() {
4136
      this.success = null;
4137
    }
4138
 
4139
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
4140
    public boolean isSetSuccess() {
4141
      return this.success != null;
4142
    }
4143
 
4144
    public void setSuccessIsSet(boolean value) {
4145
      if (!value) {
4146
        this.success = null;
4147
      }
4148
    }
4149
 
4150
    public PurchaseServiceException getE() {
4151
      return this.e;
4152
    }
4153
 
4154
    public void setE(PurchaseServiceException e) {
4155
      this.e = e;
4156
    }
4157
 
4158
    public void unsetE() {
4159
      this.e = null;
4160
    }
4161
 
4162
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
4163
    public boolean isSetE() {
4164
      return this.e != null;
4165
    }
4166
 
4167
    public void setEIsSet(boolean value) {
4168
      if (!value) {
4169
        this.e = null;
4170
      }
4171
    }
4172
 
4173
    public void setFieldValue(_Fields field, Object value) {
4174
      switch (field) {
4175
      case SUCCESS:
4176
        if (value == null) {
4177
          unsetSuccess();
4178
        } else {
4179
          setSuccess((PurchaseOrder)value);
4180
        }
4181
        break;
4182
 
4183
      case E:
4184
        if (value == null) {
4185
          unsetE();
4186
        } else {
4187
          setE((PurchaseServiceException)value);
4188
        }
4189
        break;
4190
 
4191
      }
4192
    }
4193
 
4194
    public Object getFieldValue(_Fields field) {
4195
      switch (field) {
4196
      case SUCCESS:
4197
        return getSuccess();
4198
 
4199
      case E:
4200
        return getE();
4201
 
4202
      }
4203
      throw new IllegalStateException();
4204
    }
4205
 
4206
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4207
    public boolean isSet(_Fields field) {
4208
      if (field == null) {
4209
        throw new IllegalArgumentException();
4210
      }
4211
 
4212
      switch (field) {
4213
      case SUCCESS:
4214
        return isSetSuccess();
4215
      case E:
4216
        return isSetE();
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 getPurchaseOrder_result)
4226
        return this.equals((getPurchaseOrder_result)that);
4227
      return false;
4228
    }
4229
 
4230
    public boolean equals(getPurchaseOrder_result that) {
4231
      if (that == null)
4232
        return false;
4233
 
4234
      boolean this_present_success = true && this.isSetSuccess();
4235
      boolean that_present_success = true && that.isSetSuccess();
4236
      if (this_present_success || that_present_success) {
4237
        if (!(this_present_success && that_present_success))
4238
          return false;
4239
        if (!this.success.equals(that.success))
4240
          return false;
4241
      }
4242
 
4243
      boolean this_present_e = true && this.isSetE();
4244
      boolean that_present_e = true && that.isSetE();
4245
      if (this_present_e || that_present_e) {
4246
        if (!(this_present_e && that_present_e))
4247
          return false;
4248
        if (!this.e.equals(that.e))
4249
          return false;
4250
      }
4251
 
4252
      return true;
4253
    }
4254
 
4255
    @Override
4256
    public int hashCode() {
4257
      return 0;
4258
    }
4259
 
4260
    public int compareTo(getPurchaseOrder_result other) {
4261
      if (!getClass().equals(other.getClass())) {
4262
        return getClass().getName().compareTo(other.getClass().getName());
4263
      }
4264
 
4265
      int lastComparison = 0;
4266
      getPurchaseOrder_result typedOther = (getPurchaseOrder_result)other;
4267
 
4268
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
4269
      if (lastComparison != 0) {
4270
        return lastComparison;
4271
      }
4272
      if (isSetSuccess()) {
4273
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4274
        if (lastComparison != 0) {
4275
          return lastComparison;
4276
        }
4277
      }
4278
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
4279
      if (lastComparison != 0) {
4280
        return lastComparison;
4281
      }
4282
      if (isSetE()) {
4283
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
4284
        if (lastComparison != 0) {
4285
          return lastComparison;
4286
        }
4287
      }
4288
      return 0;
4289
    }
4290
 
4291
    public _Fields fieldForId(int fieldId) {
4292
      return _Fields.findByThriftId(fieldId);
4293
    }
4294
 
4295
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4296
      org.apache.thrift.protocol.TField field;
4297
      iprot.readStructBegin();
4298
      while (true)
4299
      {
4300
        field = iprot.readFieldBegin();
4301
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4302
          break;
4303
        }
4304
        switch (field.id) {
4305
          case 0: // SUCCESS
4306
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4307
              this.success = new PurchaseOrder();
4308
              this.success.read(iprot);
4309
            } else { 
4310
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4311
            }
4312
            break;
4313
          case 1: // E
4314
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4315
              this.e = new PurchaseServiceException();
4316
              this.e.read(iprot);
4317
            } else { 
4318
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4319
            }
4320
            break;
4321
          default:
4322
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4323
        }
4324
        iprot.readFieldEnd();
4325
      }
4326
      iprot.readStructEnd();
4327
      validate();
4328
    }
4329
 
4330
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4331
      oprot.writeStructBegin(STRUCT_DESC);
4332
 
4333
      if (this.isSetSuccess()) {
4334
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4335
        this.success.write(oprot);
4336
        oprot.writeFieldEnd();
4337
      } else if (this.isSetE()) {
4338
        oprot.writeFieldBegin(E_FIELD_DESC);
4339
        this.e.write(oprot);
4340
        oprot.writeFieldEnd();
4341
      }
4342
      oprot.writeFieldStop();
4343
      oprot.writeStructEnd();
4344
    }
4345
 
4346
    @Override
4347
    public String toString() {
4348
      StringBuilder sb = new StringBuilder("getPurchaseOrder_result(");
4349
      boolean first = true;
4350
 
4351
      sb.append("success:");
4352
      if (this.success == null) {
4353
        sb.append("null");
4354
      } else {
4355
        sb.append(this.success);
4356
      }
4357
      first = false;
4358
      if (!first) sb.append(", ");
4359
      sb.append("e:");
4360
      if (this.e == null) {
4361
        sb.append("null");
4362
      } else {
4363
        sb.append(this.e);
4364
      }
4365
      first = false;
4366
      sb.append(")");
4367
      return sb.toString();
4368
    }
4369
 
4370
    public void validate() throws org.apache.thrift.TException {
4371
      // check for required fields
4372
    }
4373
 
4374
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4375
      try {
4376
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4377
      } catch (org.apache.thrift.TException te) {
4378
        throw new java.io.IOException(te);
4379
      }
4380
    }
4381
 
4382
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4383
      try {
4384
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4385
      } catch (org.apache.thrift.TException te) {
4386
        throw new java.io.IOException(te);
4387
      }
4388
    }
4389
 
4390
  }
4391
 
4392
  public static class getAllPurchaseOrders_args implements org.apache.thrift.TBase<getAllPurchaseOrders_args, getAllPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
4393
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_args");
4394
 
4395
    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);
4396
 
4397
    private POStatus status; // required
4398
 
4399
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4400
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4401
      /**
4402
       * 
4403
       * @see POStatus
4404
       */
4405
      STATUS((short)1, "status");
4406
 
4407
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4408
 
4409
      static {
4410
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4411
          byName.put(field.getFieldName(), field);
4412
        }
4413
      }
4414
 
4415
      /**
4416
       * Find the _Fields constant that matches fieldId, or null if its not found.
4417
       */
4418
      public static _Fields findByThriftId(int fieldId) {
4419
        switch(fieldId) {
4420
          case 1: // STATUS
4421
            return STATUS;
4422
          default:
4423
            return null;
4424
        }
4425
      }
4426
 
4427
      /**
4428
       * Find the _Fields constant that matches fieldId, throwing an exception
4429
       * if it is not found.
4430
       */
4431
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4432
        _Fields fields = findByThriftId(fieldId);
4433
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4434
        return fields;
4435
      }
4436
 
4437
      /**
4438
       * Find the _Fields constant that matches name, or null if its not found.
4439
       */
4440
      public static _Fields findByName(String name) {
4441
        return byName.get(name);
4442
      }
4443
 
4444
      private final short _thriftId;
4445
      private final String _fieldName;
4446
 
4447
      _Fields(short thriftId, String fieldName) {
4448
        _thriftId = thriftId;
4449
        _fieldName = fieldName;
4450
      }
4451
 
4452
      public short getThriftFieldId() {
4453
        return _thriftId;
4454
      }
4455
 
4456
      public String getFieldName() {
4457
        return _fieldName;
4458
      }
4459
    }
4460
 
4461
    // isset id assignments
4462
 
4463
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4464
    static {
4465
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4466
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4467
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, POStatus.class)));
4468
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4469
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_args.class, metaDataMap);
4470
    }
4471
 
4472
    public getAllPurchaseOrders_args() {
4473
    }
4474
 
4475
    public getAllPurchaseOrders_args(
4476
      POStatus status)
4477
    {
4478
      this();
4479
      this.status = status;
4480
    }
4481
 
4482
    /**
4483
     * Performs a deep copy on <i>other</i>.
4484
     */
4485
    public getAllPurchaseOrders_args(getAllPurchaseOrders_args other) {
4486
      if (other.isSetStatus()) {
4487
        this.status = other.status;
4488
      }
4489
    }
4490
 
4491
    public getAllPurchaseOrders_args deepCopy() {
4492
      return new getAllPurchaseOrders_args(this);
4493
    }
4494
 
4495
    @Override
4496
    public void clear() {
4497
      this.status = null;
4498
    }
4499
 
4500
    /**
4501
     * 
4502
     * @see POStatus
4503
     */
4504
    public POStatus getStatus() {
4505
      return this.status;
4506
    }
4507
 
4508
    /**
4509
     * 
4510
     * @see POStatus
4511
     */
4512
    public void setStatus(POStatus status) {
4513
      this.status = status;
4514
    }
4515
 
4516
    public void unsetStatus() {
4517
      this.status = null;
4518
    }
4519
 
4520
    /** Returns true if field status is set (has been assigned a value) and false otherwise */
4521
    public boolean isSetStatus() {
4522
      return this.status != null;
4523
    }
4524
 
4525
    public void setStatusIsSet(boolean value) {
4526
      if (!value) {
4527
        this.status = null;
4528
      }
4529
    }
4530
 
4531
    public void setFieldValue(_Fields field, Object value) {
4532
      switch (field) {
4533
      case STATUS:
4534
        if (value == null) {
4535
          unsetStatus();
4536
        } else {
4537
          setStatus((POStatus)value);
4538
        }
4539
        break;
4540
 
4541
      }
4542
    }
4543
 
4544
    public Object getFieldValue(_Fields field) {
4545
      switch (field) {
4546
      case STATUS:
4547
        return getStatus();
4548
 
4549
      }
4550
      throw new IllegalStateException();
4551
    }
4552
 
4553
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4554
    public boolean isSet(_Fields field) {
4555
      if (field == null) {
4556
        throw new IllegalArgumentException();
4557
      }
4558
 
4559
      switch (field) {
4560
      case STATUS:
4561
        return isSetStatus();
4562
      }
4563
      throw new IllegalStateException();
4564
    }
4565
 
4566
    @Override
4567
    public boolean equals(Object that) {
4568
      if (that == null)
4569
        return false;
4570
      if (that instanceof getAllPurchaseOrders_args)
4571
        return this.equals((getAllPurchaseOrders_args)that);
4572
      return false;
4573
    }
4574
 
4575
    public boolean equals(getAllPurchaseOrders_args that) {
4576
      if (that == null)
4577
        return false;
4578
 
4579
      boolean this_present_status = true && this.isSetStatus();
4580
      boolean that_present_status = true && that.isSetStatus();
4581
      if (this_present_status || that_present_status) {
4582
        if (!(this_present_status && that_present_status))
4583
          return false;
4584
        if (!this.status.equals(that.status))
4585
          return false;
4586
      }
4587
 
4588
      return true;
4589
    }
4590
 
4591
    @Override
4592
    public int hashCode() {
4593
      return 0;
4594
    }
4595
 
4596
    public int compareTo(getAllPurchaseOrders_args other) {
4597
      if (!getClass().equals(other.getClass())) {
4598
        return getClass().getName().compareTo(other.getClass().getName());
4599
      }
4600
 
4601
      int lastComparison = 0;
4602
      getAllPurchaseOrders_args typedOther = (getAllPurchaseOrders_args)other;
4603
 
4604
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
4605
      if (lastComparison != 0) {
4606
        return lastComparison;
4607
      }
4608
      if (isSetStatus()) {
4609
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
4610
        if (lastComparison != 0) {
4611
          return lastComparison;
4612
        }
4613
      }
4614
      return 0;
4615
    }
4616
 
4617
    public _Fields fieldForId(int fieldId) {
4618
      return _Fields.findByThriftId(fieldId);
4619
    }
4620
 
4621
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4622
      org.apache.thrift.protocol.TField field;
4623
      iprot.readStructBegin();
4624
      while (true)
4625
      {
4626
        field = iprot.readFieldBegin();
4627
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4628
          break;
4629
        }
4630
        switch (field.id) {
4631
          case 1: // STATUS
4632
            if (field.type == org.apache.thrift.protocol.TType.I32) {
4633
              this.status = POStatus.findByValue(iprot.readI32());
4634
            } else { 
4635
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4636
            }
4637
            break;
4638
          default:
4639
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4640
        }
4641
        iprot.readFieldEnd();
4642
      }
4643
      iprot.readStructEnd();
4644
      validate();
4645
    }
4646
 
4647
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4648
      validate();
4649
 
4650
      oprot.writeStructBegin(STRUCT_DESC);
4651
      if (this.status != null) {
4652
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4653
        oprot.writeI32(this.status.getValue());
4654
        oprot.writeFieldEnd();
4655
      }
4656
      oprot.writeFieldStop();
4657
      oprot.writeStructEnd();
4658
    }
4659
 
4660
    @Override
4661
    public String toString() {
4662
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_args(");
4663
      boolean first = true;
4664
 
4665
      sb.append("status:");
4666
      if (this.status == null) {
4667
        sb.append("null");
4668
      } else {
4669
        sb.append(this.status);
4670
      }
4671
      first = false;
4672
      sb.append(")");
4673
      return sb.toString();
4674
    }
4675
 
4676
    public void validate() throws org.apache.thrift.TException {
4677
      // check for required fields
4678
    }
4679
 
4680
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4681
      try {
4682
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4683
      } catch (org.apache.thrift.TException te) {
4684
        throw new java.io.IOException(te);
4685
      }
4686
    }
4687
 
4688
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4689
      try {
4690
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4691
      } catch (org.apache.thrift.TException te) {
4692
        throw new java.io.IOException(te);
4693
      }
4694
    }
4695
 
4696
  }
4697
 
4698
  public static class getAllPurchaseOrders_result implements org.apache.thrift.TBase<getAllPurchaseOrders_result, getAllPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
4699
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_result");
4700
 
4701
    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);
4702
    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);
4703
 
4704
    private List<PurchaseOrder> success; // required
4705
    private PurchaseServiceException e; // required
4706
 
4707
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4708
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4709
      SUCCESS((short)0, "success"),
4710
      E((short)1, "e");
4711
 
4712
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4713
 
4714
      static {
4715
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4716
          byName.put(field.getFieldName(), field);
4717
        }
4718
      }
4719
 
4720
      /**
4721
       * Find the _Fields constant that matches fieldId, or null if its not found.
4722
       */
4723
      public static _Fields findByThriftId(int fieldId) {
4724
        switch(fieldId) {
4725
          case 0: // SUCCESS
4726
            return SUCCESS;
4727
          case 1: // E
4728
            return E;
4729
          default:
4730
            return null;
4731
        }
4732
      }
4733
 
4734
      /**
4735
       * Find the _Fields constant that matches fieldId, throwing an exception
4736
       * if it is not found.
4737
       */
4738
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4739
        _Fields fields = findByThriftId(fieldId);
4740
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4741
        return fields;
4742
      }
4743
 
4744
      /**
4745
       * Find the _Fields constant that matches name, or null if its not found.
4746
       */
4747
      public static _Fields findByName(String name) {
4748
        return byName.get(name);
4749
      }
4750
 
4751
      private final short _thriftId;
4752
      private final String _fieldName;
4753
 
4754
      _Fields(short thriftId, String fieldName) {
4755
        _thriftId = thriftId;
4756
        _fieldName = fieldName;
4757
      }
4758
 
4759
      public short getThriftFieldId() {
4760
        return _thriftId;
4761
      }
4762
 
4763
      public String getFieldName() {
4764
        return _fieldName;
4765
      }
4766
    }
4767
 
4768
    // isset id assignments
4769
 
4770
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4771
    static {
4772
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4773
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4774
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
4775
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
4776
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4777
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4778
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4779
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_result.class, metaDataMap);
4780
    }
4781
 
4782
    public getAllPurchaseOrders_result() {
4783
    }
4784
 
4785
    public getAllPurchaseOrders_result(
4786
      List<PurchaseOrder> success,
4787
      PurchaseServiceException e)
4788
    {
4789
      this();
4790
      this.success = success;
4791
      this.e = e;
4792
    }
4793
 
4794
    /**
4795
     * Performs a deep copy on <i>other</i>.
4796
     */
4797
    public getAllPurchaseOrders_result(getAllPurchaseOrders_result other) {
4798
      if (other.isSetSuccess()) {
4799
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
4800
        for (PurchaseOrder other_element : other.success) {
4801
          __this__success.add(new PurchaseOrder(other_element));
4802
        }
4803
        this.success = __this__success;
4804
      }
4805
      if (other.isSetE()) {
4806
        this.e = new PurchaseServiceException(other.e);
4807
      }
4808
    }
4809
 
4810
    public getAllPurchaseOrders_result deepCopy() {
4811
      return new getAllPurchaseOrders_result(this);
4812
    }
4813
 
4814
    @Override
4815
    public void clear() {
4816
      this.success = null;
4817
      this.e = null;
4818
    }
4819
 
4820
    public int getSuccessSize() {
4821
      return (this.success == null) ? 0 : this.success.size();
4822
    }
4823
 
4824
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
4825
      return (this.success == null) ? null : this.success.iterator();
4826
    }
4827
 
4828
    public void addToSuccess(PurchaseOrder elem) {
4829
      if (this.success == null) {
4830
        this.success = new ArrayList<PurchaseOrder>();
4831
      }
4832
      this.success.add(elem);
4833
    }
4834
 
4835
    public List<PurchaseOrder> getSuccess() {
4836
      return this.success;
4837
    }
4838
 
4839
    public void setSuccess(List<PurchaseOrder> success) {
4840
      this.success = success;
4841
    }
4842
 
4843
    public void unsetSuccess() {
4844
      this.success = null;
4845
    }
4846
 
4847
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
4848
    public boolean isSetSuccess() {
4849
      return this.success != null;
4850
    }
4851
 
4852
    public void setSuccessIsSet(boolean value) {
4853
      if (!value) {
4854
        this.success = null;
4855
      }
4856
    }
4857
 
4858
    public PurchaseServiceException getE() {
4859
      return this.e;
4860
    }
4861
 
4862
    public void setE(PurchaseServiceException e) {
4863
      this.e = e;
4864
    }
4865
 
4866
    public void unsetE() {
4867
      this.e = null;
4868
    }
4869
 
4870
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
4871
    public boolean isSetE() {
4872
      return this.e != null;
4873
    }
4874
 
4875
    public void setEIsSet(boolean value) {
4876
      if (!value) {
4877
        this.e = null;
4878
      }
4879
    }
4880
 
4881
    public void setFieldValue(_Fields field, Object value) {
4882
      switch (field) {
4883
      case SUCCESS:
4884
        if (value == null) {
4885
          unsetSuccess();
4886
        } else {
4887
          setSuccess((List<PurchaseOrder>)value);
4888
        }
4889
        break;
4890
 
4891
      case E:
4892
        if (value == null) {
4893
          unsetE();
4894
        } else {
4895
          setE((PurchaseServiceException)value);
4896
        }
4897
        break;
4898
 
4899
      }
4900
    }
4901
 
4902
    public Object getFieldValue(_Fields field) {
4903
      switch (field) {
4904
      case SUCCESS:
4905
        return getSuccess();
4906
 
4907
      case E:
4908
        return getE();
4909
 
4910
      }
4911
      throw new IllegalStateException();
4912
    }
4913
 
4914
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4915
    public boolean isSet(_Fields field) {
4916
      if (field == null) {
4917
        throw new IllegalArgumentException();
4918
      }
4919
 
4920
      switch (field) {
4921
      case SUCCESS:
4922
        return isSetSuccess();
4923
      case E:
4924
        return isSetE();
4925
      }
4926
      throw new IllegalStateException();
4927
    }
4928
 
4929
    @Override
4930
    public boolean equals(Object that) {
4931
      if (that == null)
4932
        return false;
4933
      if (that instanceof getAllPurchaseOrders_result)
4934
        return this.equals((getAllPurchaseOrders_result)that);
4935
      return false;
4936
    }
4937
 
4938
    public boolean equals(getAllPurchaseOrders_result that) {
4939
      if (that == null)
4940
        return false;
4941
 
4942
      boolean this_present_success = true && this.isSetSuccess();
4943
      boolean that_present_success = true && that.isSetSuccess();
4944
      if (this_present_success || that_present_success) {
4945
        if (!(this_present_success && that_present_success))
4946
          return false;
4947
        if (!this.success.equals(that.success))
4948
          return false;
4949
      }
4950
 
4951
      boolean this_present_e = true && this.isSetE();
4952
      boolean that_present_e = true && that.isSetE();
4953
      if (this_present_e || that_present_e) {
4954
        if (!(this_present_e && that_present_e))
4955
          return false;
4956
        if (!this.e.equals(that.e))
4957
          return false;
4958
      }
4959
 
4960
      return true;
4961
    }
4962
 
4963
    @Override
4964
    public int hashCode() {
4965
      return 0;
4966
    }
4967
 
4968
    public int compareTo(getAllPurchaseOrders_result other) {
4969
      if (!getClass().equals(other.getClass())) {
4970
        return getClass().getName().compareTo(other.getClass().getName());
4971
      }
4972
 
4973
      int lastComparison = 0;
4974
      getAllPurchaseOrders_result typedOther = (getAllPurchaseOrders_result)other;
4975
 
4976
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
4977
      if (lastComparison != 0) {
4978
        return lastComparison;
4979
      }
4980
      if (isSetSuccess()) {
4981
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4982
        if (lastComparison != 0) {
4983
          return lastComparison;
4984
        }
4985
      }
4986
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
4987
      if (lastComparison != 0) {
4988
        return lastComparison;
4989
      }
4990
      if (isSetE()) {
4991
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
4992
        if (lastComparison != 0) {
4993
          return lastComparison;
4994
        }
4995
      }
4996
      return 0;
4997
    }
4998
 
4999
    public _Fields fieldForId(int fieldId) {
5000
      return _Fields.findByThriftId(fieldId);
5001
    }
5002
 
5003
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5004
      org.apache.thrift.protocol.TField field;
5005
      iprot.readStructBegin();
5006
      while (true)
5007
      {
5008
        field = iprot.readFieldBegin();
5009
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5010
          break;
5011
        }
5012
        switch (field.id) {
5013
          case 0: // SUCCESS
5014
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
5015
              {
5016
                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
5017
                this.success = new ArrayList<PurchaseOrder>(_list4.size);
5018
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
5019
                {
5020
                  PurchaseOrder _elem6; // required
5021
                  _elem6 = new PurchaseOrder();
5022
                  _elem6.read(iprot);
5023
                  this.success.add(_elem6);
5024
                }
5025
                iprot.readListEnd();
5026
              }
5027
            } else { 
5028
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5029
            }
5030
            break;
5031
          case 1: // E
5032
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5033
              this.e = new PurchaseServiceException();
5034
              this.e.read(iprot);
5035
            } else { 
5036
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5037
            }
5038
            break;
5039
          default:
5040
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5041
        }
5042
        iprot.readFieldEnd();
5043
      }
5044
      iprot.readStructEnd();
5045
      validate();
5046
    }
5047
 
5048
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5049
      oprot.writeStructBegin(STRUCT_DESC);
5050
 
5051
      if (this.isSetSuccess()) {
5052
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5053
        {
5054
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
5055
          for (PurchaseOrder _iter7 : this.success)
5056
          {
5057
            _iter7.write(oprot);
5058
          }
5059
          oprot.writeListEnd();
5060
        }
5061
        oprot.writeFieldEnd();
5062
      } else if (this.isSetE()) {
5063
        oprot.writeFieldBegin(E_FIELD_DESC);
5064
        this.e.write(oprot);
5065
        oprot.writeFieldEnd();
5066
      }
5067
      oprot.writeFieldStop();
5068
      oprot.writeStructEnd();
5069
    }
5070
 
5071
    @Override
5072
    public String toString() {
5073
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_result(");
5074
      boolean first = true;
5075
 
5076
      sb.append("success:");
5077
      if (this.success == null) {
5078
        sb.append("null");
5079
      } else {
5080
        sb.append(this.success);
5081
      }
5082
      first = false;
5083
      if (!first) sb.append(", ");
5084
      sb.append("e:");
5085
      if (this.e == null) {
5086
        sb.append("null");
5087
      } else {
5088
        sb.append(this.e);
5089
      }
5090
      first = false;
5091
      sb.append(")");
5092
      return sb.toString();
5093
    }
5094
 
5095
    public void validate() throws org.apache.thrift.TException {
5096
      // check for required fields
5097
    }
5098
 
5099
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5100
      try {
5101
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5102
      } catch (org.apache.thrift.TException te) {
5103
        throw new java.io.IOException(te);
5104
      }
5105
    }
5106
 
5107
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5108
      try {
5109
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5110
      } catch (org.apache.thrift.TException te) {
5111
        throw new java.io.IOException(te);
5112
      }
5113
    }
5114
 
5115
  }
5116
 
5117
  public static class getSupplier_args implements org.apache.thrift.TBase<getSupplier_args, getSupplier_args._Fields>, java.io.Serializable, Cloneable   {
5118
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_args");
5119
 
5120
    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);
5121
 
5122
    private long id; // required
5123
 
5124
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5125
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5126
      ID((short)1, "id");
5127
 
5128
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5129
 
5130
      static {
5131
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5132
          byName.put(field.getFieldName(), field);
5133
        }
5134
      }
5135
 
5136
      /**
5137
       * Find the _Fields constant that matches fieldId, or null if its not found.
5138
       */
5139
      public static _Fields findByThriftId(int fieldId) {
5140
        switch(fieldId) {
5141
          case 1: // ID
5142
            return ID;
5143
          default:
5144
            return null;
5145
        }
5146
      }
5147
 
5148
      /**
5149
       * Find the _Fields constant that matches fieldId, throwing an exception
5150
       * if it is not found.
5151
       */
5152
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5153
        _Fields fields = findByThriftId(fieldId);
5154
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5155
        return fields;
5156
      }
5157
 
5158
      /**
5159
       * Find the _Fields constant that matches name, or null if its not found.
5160
       */
5161
      public static _Fields findByName(String name) {
5162
        return byName.get(name);
5163
      }
5164
 
5165
      private final short _thriftId;
5166
      private final String _fieldName;
5167
 
5168
      _Fields(short thriftId, String fieldName) {
5169
        _thriftId = thriftId;
5170
        _fieldName = fieldName;
5171
      }
5172
 
5173
      public short getThriftFieldId() {
5174
        return _thriftId;
5175
      }
5176
 
5177
      public String getFieldName() {
5178
        return _fieldName;
5179
      }
5180
    }
5181
 
5182
    // isset id assignments
5183
    private static final int __ID_ISSET_ID = 0;
5184
    private BitSet __isset_bit_vector = new BitSet(1);
5185
 
5186
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5187
    static {
5188
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5189
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5190
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5191
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5192
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_args.class, metaDataMap);
5193
    }
5194
 
5195
    public getSupplier_args() {
5196
    }
5197
 
5198
    public getSupplier_args(
5199
      long id)
5200
    {
5201
      this();
5202
      this.id = id;
5203
      setIdIsSet(true);
5204
    }
5205
 
5206
    /**
5207
     * Performs a deep copy on <i>other</i>.
5208
     */
5209
    public getSupplier_args(getSupplier_args other) {
5210
      __isset_bit_vector.clear();
5211
      __isset_bit_vector.or(other.__isset_bit_vector);
5212
      this.id = other.id;
5213
    }
5214
 
5215
    public getSupplier_args deepCopy() {
5216
      return new getSupplier_args(this);
5217
    }
5218
 
5219
    @Override
5220
    public void clear() {
5221
      setIdIsSet(false);
5222
      this.id = 0;
5223
    }
5224
 
5225
    public long getId() {
5226
      return this.id;
5227
    }
5228
 
5229
    public void setId(long id) {
5230
      this.id = id;
5231
      setIdIsSet(true);
5232
    }
5233
 
5234
    public void unsetId() {
5235
      __isset_bit_vector.clear(__ID_ISSET_ID);
5236
    }
5237
 
5238
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
5239
    public boolean isSetId() {
5240
      return __isset_bit_vector.get(__ID_ISSET_ID);
5241
    }
5242
 
5243
    public void setIdIsSet(boolean value) {
5244
      __isset_bit_vector.set(__ID_ISSET_ID, value);
5245
    }
5246
 
5247
    public void setFieldValue(_Fields field, Object value) {
5248
      switch (field) {
5249
      case ID:
5250
        if (value == null) {
5251
          unsetId();
5252
        } else {
5253
          setId((Long)value);
5254
        }
5255
        break;
5256
 
5257
      }
5258
    }
5259
 
5260
    public Object getFieldValue(_Fields field) {
5261
      switch (field) {
5262
      case ID:
5263
        return Long.valueOf(getId());
5264
 
5265
      }
5266
      throw new IllegalStateException();
5267
    }
5268
 
5269
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5270
    public boolean isSet(_Fields field) {
5271
      if (field == null) {
5272
        throw new IllegalArgumentException();
5273
      }
5274
 
5275
      switch (field) {
5276
      case ID:
5277
        return isSetId();
5278
      }
5279
      throw new IllegalStateException();
5280
    }
5281
 
5282
    @Override
5283
    public boolean equals(Object that) {
5284
      if (that == null)
5285
        return false;
5286
      if (that instanceof getSupplier_args)
5287
        return this.equals((getSupplier_args)that);
5288
      return false;
5289
    }
5290
 
5291
    public boolean equals(getSupplier_args that) {
5292
      if (that == null)
5293
        return false;
5294
 
5295
      boolean this_present_id = true;
5296
      boolean that_present_id = true;
5297
      if (this_present_id || that_present_id) {
5298
        if (!(this_present_id && that_present_id))
5299
          return false;
5300
        if (this.id != that.id)
5301
          return false;
5302
      }
5303
 
5304
      return true;
5305
    }
5306
 
5307
    @Override
5308
    public int hashCode() {
5309
      return 0;
5310
    }
5311
 
5312
    public int compareTo(getSupplier_args other) {
5313
      if (!getClass().equals(other.getClass())) {
5314
        return getClass().getName().compareTo(other.getClass().getName());
5315
      }
5316
 
5317
      int lastComparison = 0;
5318
      getSupplier_args typedOther = (getSupplier_args)other;
5319
 
5320
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
5321
      if (lastComparison != 0) {
5322
        return lastComparison;
5323
      }
5324
      if (isSetId()) {
5325
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
5326
        if (lastComparison != 0) {
5327
          return lastComparison;
5328
        }
5329
      }
5330
      return 0;
5331
    }
5332
 
5333
    public _Fields fieldForId(int fieldId) {
5334
      return _Fields.findByThriftId(fieldId);
5335
    }
5336
 
5337
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5338
      org.apache.thrift.protocol.TField field;
5339
      iprot.readStructBegin();
5340
      while (true)
5341
      {
5342
        field = iprot.readFieldBegin();
5343
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5344
          break;
5345
        }
5346
        switch (field.id) {
5347
          case 1: // ID
5348
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5349
              this.id = iprot.readI64();
5350
              setIdIsSet(true);
5351
            } else { 
5352
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5353
            }
5354
            break;
5355
          default:
5356
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5357
        }
5358
        iprot.readFieldEnd();
5359
      }
5360
      iprot.readStructEnd();
5361
      validate();
5362
    }
5363
 
5364
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5365
      validate();
5366
 
5367
      oprot.writeStructBegin(STRUCT_DESC);
5368
      oprot.writeFieldBegin(ID_FIELD_DESC);
5369
      oprot.writeI64(this.id);
5370
      oprot.writeFieldEnd();
5371
      oprot.writeFieldStop();
5372
      oprot.writeStructEnd();
5373
    }
5374
 
5375
    @Override
5376
    public String toString() {
5377
      StringBuilder sb = new StringBuilder("getSupplier_args(");
5378
      boolean first = true;
5379
 
5380
      sb.append("id:");
5381
      sb.append(this.id);
5382
      first = false;
5383
      sb.append(")");
5384
      return sb.toString();
5385
    }
5386
 
5387
    public void validate() throws org.apache.thrift.TException {
5388
      // check for required fields
5389
    }
5390
 
5391
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5392
      try {
5393
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5394
      } catch (org.apache.thrift.TException te) {
5395
        throw new java.io.IOException(te);
5396
      }
5397
    }
5398
 
5399
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5400
      try {
21844 amit.gupta 5401
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
5402
        __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 5403
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5404
      } catch (org.apache.thrift.TException te) {
5405
        throw new java.io.IOException(te);
5406
      }
5407
    }
5408
 
5409
  }
5410
 
5411
  public static class getSupplier_result implements org.apache.thrift.TBase<getSupplier_result, getSupplier_result._Fields>, java.io.Serializable, Cloneable   {
5412
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_result");
5413
 
5414
    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);
5415
    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);
5416
 
5417
    private Supplier success; // required
5418
    private PurchaseServiceException e; // required
5419
 
5420
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5421
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5422
      SUCCESS((short)0, "success"),
5423
      E((short)1, "e");
5424
 
5425
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5426
 
5427
      static {
5428
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5429
          byName.put(field.getFieldName(), field);
5430
        }
5431
      }
5432
 
5433
      /**
5434
       * Find the _Fields constant that matches fieldId, or null if its not found.
5435
       */
5436
      public static _Fields findByThriftId(int fieldId) {
5437
        switch(fieldId) {
5438
          case 0: // SUCCESS
5439
            return SUCCESS;
5440
          case 1: // E
5441
            return E;
5442
          default:
5443
            return null;
5444
        }
5445
      }
5446
 
5447
      /**
5448
       * Find the _Fields constant that matches fieldId, throwing an exception
5449
       * if it is not found.
5450
       */
5451
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5452
        _Fields fields = findByThriftId(fieldId);
5453
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5454
        return fields;
5455
      }
5456
 
5457
      /**
5458
       * Find the _Fields constant that matches name, or null if its not found.
5459
       */
5460
      public static _Fields findByName(String name) {
5461
        return byName.get(name);
5462
      }
5463
 
5464
      private final short _thriftId;
5465
      private final String _fieldName;
5466
 
5467
      _Fields(short thriftId, String fieldName) {
5468
        _thriftId = thriftId;
5469
        _fieldName = fieldName;
5470
      }
5471
 
5472
      public short getThriftFieldId() {
5473
        return _thriftId;
5474
      }
5475
 
5476
      public String getFieldName() {
5477
        return _fieldName;
5478
      }
5479
    }
5480
 
5481
    // isset id assignments
5482
 
5483
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5484
    static {
5485
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5486
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5487
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
5488
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5489
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5490
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5491
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_result.class, metaDataMap);
5492
    }
5493
 
5494
    public getSupplier_result() {
5495
    }
5496
 
5497
    public getSupplier_result(
5498
      Supplier success,
5499
      PurchaseServiceException e)
5500
    {
5501
      this();
5502
      this.success = success;
5503
      this.e = e;
5504
    }
5505
 
5506
    /**
5507
     * Performs a deep copy on <i>other</i>.
5508
     */
5509
    public getSupplier_result(getSupplier_result other) {
5510
      if (other.isSetSuccess()) {
5511
        this.success = new Supplier(other.success);
5512
      }
5513
      if (other.isSetE()) {
5514
        this.e = new PurchaseServiceException(other.e);
5515
      }
5516
    }
5517
 
5518
    public getSupplier_result deepCopy() {
5519
      return new getSupplier_result(this);
5520
    }
5521
 
5522
    @Override
5523
    public void clear() {
5524
      this.success = null;
5525
      this.e = null;
5526
    }
5527
 
5528
    public Supplier getSuccess() {
5529
      return this.success;
5530
    }
5531
 
5532
    public void setSuccess(Supplier success) {
5533
      this.success = success;
5534
    }
5535
 
5536
    public void unsetSuccess() {
5537
      this.success = null;
5538
    }
5539
 
5540
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5541
    public boolean isSetSuccess() {
5542
      return this.success != null;
5543
    }
5544
 
5545
    public void setSuccessIsSet(boolean value) {
5546
      if (!value) {
5547
        this.success = null;
5548
      }
5549
    }
5550
 
5551
    public PurchaseServiceException getE() {
5552
      return this.e;
5553
    }
5554
 
5555
    public void setE(PurchaseServiceException e) {
5556
      this.e = e;
5557
    }
5558
 
5559
    public void unsetE() {
5560
      this.e = null;
5561
    }
5562
 
5563
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
5564
    public boolean isSetE() {
5565
      return this.e != null;
5566
    }
5567
 
5568
    public void setEIsSet(boolean value) {
5569
      if (!value) {
5570
        this.e = null;
5571
      }
5572
    }
5573
 
5574
    public void setFieldValue(_Fields field, Object value) {
5575
      switch (field) {
5576
      case SUCCESS:
5577
        if (value == null) {
5578
          unsetSuccess();
5579
        } else {
5580
          setSuccess((Supplier)value);
5581
        }
5582
        break;
5583
 
5584
      case E:
5585
        if (value == null) {
5586
          unsetE();
5587
        } else {
5588
          setE((PurchaseServiceException)value);
5589
        }
5590
        break;
5591
 
5592
      }
5593
    }
5594
 
5595
    public Object getFieldValue(_Fields field) {
5596
      switch (field) {
5597
      case SUCCESS:
5598
        return getSuccess();
5599
 
5600
      case E:
5601
        return getE();
5602
 
5603
      }
5604
      throw new IllegalStateException();
5605
    }
5606
 
5607
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5608
    public boolean isSet(_Fields field) {
5609
      if (field == null) {
5610
        throw new IllegalArgumentException();
5611
      }
5612
 
5613
      switch (field) {
5614
      case SUCCESS:
5615
        return isSetSuccess();
5616
      case E:
5617
        return isSetE();
5618
      }
5619
      throw new IllegalStateException();
5620
    }
5621
 
5622
    @Override
5623
    public boolean equals(Object that) {
5624
      if (that == null)
5625
        return false;
5626
      if (that instanceof getSupplier_result)
5627
        return this.equals((getSupplier_result)that);
5628
      return false;
5629
    }
5630
 
5631
    public boolean equals(getSupplier_result that) {
5632
      if (that == null)
5633
        return false;
5634
 
5635
      boolean this_present_success = true && this.isSetSuccess();
5636
      boolean that_present_success = true && that.isSetSuccess();
5637
      if (this_present_success || that_present_success) {
5638
        if (!(this_present_success && that_present_success))
5639
          return false;
5640
        if (!this.success.equals(that.success))
5641
          return false;
5642
      }
5643
 
5644
      boolean this_present_e = true && this.isSetE();
5645
      boolean that_present_e = true && that.isSetE();
5646
      if (this_present_e || that_present_e) {
5647
        if (!(this_present_e && that_present_e))
5648
          return false;
5649
        if (!this.e.equals(that.e))
5650
          return false;
5651
      }
5652
 
5653
      return true;
5654
    }
5655
 
5656
    @Override
5657
    public int hashCode() {
5658
      return 0;
5659
    }
5660
 
5661
    public int compareTo(getSupplier_result other) {
5662
      if (!getClass().equals(other.getClass())) {
5663
        return getClass().getName().compareTo(other.getClass().getName());
5664
      }
5665
 
5666
      int lastComparison = 0;
5667
      getSupplier_result typedOther = (getSupplier_result)other;
5668
 
5669
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5670
      if (lastComparison != 0) {
5671
        return lastComparison;
5672
      }
5673
      if (isSetSuccess()) {
5674
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5675
        if (lastComparison != 0) {
5676
          return lastComparison;
5677
        }
5678
      }
5679
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
5680
      if (lastComparison != 0) {
5681
        return lastComparison;
5682
      }
5683
      if (isSetE()) {
5684
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
5685
        if (lastComparison != 0) {
5686
          return lastComparison;
5687
        }
5688
      }
5689
      return 0;
5690
    }
5691
 
5692
    public _Fields fieldForId(int fieldId) {
5693
      return _Fields.findByThriftId(fieldId);
5694
    }
5695
 
5696
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5697
      org.apache.thrift.protocol.TField field;
5698
      iprot.readStructBegin();
5699
      while (true)
5700
      {
5701
        field = iprot.readFieldBegin();
5702
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5703
          break;
5704
        }
5705
        switch (field.id) {
5706
          case 0: // SUCCESS
5707
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5708
              this.success = new Supplier();
5709
              this.success.read(iprot);
5710
            } else { 
5711
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5712
            }
5713
            break;
5714
          case 1: // E
5715
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5716
              this.e = new PurchaseServiceException();
5717
              this.e.read(iprot);
5718
            } else { 
5719
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5720
            }
5721
            break;
5722
          default:
5723
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5724
        }
5725
        iprot.readFieldEnd();
5726
      }
5727
      iprot.readStructEnd();
5728
      validate();
5729
    }
5730
 
5731
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5732
      oprot.writeStructBegin(STRUCT_DESC);
5733
 
5734
      if (this.isSetSuccess()) {
5735
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5736
        this.success.write(oprot);
5737
        oprot.writeFieldEnd();
5738
      } else if (this.isSetE()) {
5739
        oprot.writeFieldBegin(E_FIELD_DESC);
5740
        this.e.write(oprot);
5741
        oprot.writeFieldEnd();
5742
      }
5743
      oprot.writeFieldStop();
5744
      oprot.writeStructEnd();
5745
    }
5746
 
5747
    @Override
5748
    public String toString() {
5749
      StringBuilder sb = new StringBuilder("getSupplier_result(");
5750
      boolean first = true;
5751
 
5752
      sb.append("success:");
5753
      if (this.success == null) {
5754
        sb.append("null");
5755
      } else {
5756
        sb.append(this.success);
5757
      }
5758
      first = false;
5759
      if (!first) sb.append(", ");
5760
      sb.append("e:");
5761
      if (this.e == null) {
5762
        sb.append("null");
5763
      } else {
5764
        sb.append(this.e);
5765
      }
5766
      first = false;
5767
      sb.append(")");
5768
      return sb.toString();
5769
    }
5770
 
5771
    public void validate() throws org.apache.thrift.TException {
5772
      // check for required fields
5773
    }
5774
 
5775
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5776
      try {
5777
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5778
      } catch (org.apache.thrift.TException te) {
5779
        throw new java.io.IOException(te);
5780
      }
5781
    }
5782
 
5783
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5784
      try {
5785
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5786
      } catch (org.apache.thrift.TException te) {
5787
        throw new java.io.IOException(te);
5788
      }
5789
    }
5790
 
5791
  }
5792
 
5793
  public static class startPurchase_args implements org.apache.thrift.TBase<startPurchase_args, startPurchase_args._Fields>, java.io.Serializable, Cloneable   {
5794
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_args");
5795
 
5796
    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);
5797
    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);
5798
    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 5799
    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 5800
 
5801
    private long purchaseOrderId; // required
5802
    private String invoiceNumber; // required
5803
    private double freightCharges; // required
11801 manish.sha 5804
    private String purchaseComments; // required
4496 mandeep.dh 5805
 
5806
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5807
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5808
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
5809
      INVOICE_NUMBER((short)2, "invoiceNumber"),
11801 manish.sha 5810
      FREIGHT_CHARGES((short)3, "freightCharges"),
5811
      PURCHASE_COMMENTS((short)4, "purchaseComments");
4496 mandeep.dh 5812
 
5813
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5814
 
5815
      static {
5816
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5817
          byName.put(field.getFieldName(), field);
5818
        }
5819
      }
5820
 
5821
      /**
5822
       * Find the _Fields constant that matches fieldId, or null if its not found.
5823
       */
5824
      public static _Fields findByThriftId(int fieldId) {
5825
        switch(fieldId) {
5826
          case 1: // PURCHASE_ORDER_ID
5827
            return PURCHASE_ORDER_ID;
5828
          case 2: // INVOICE_NUMBER
5829
            return INVOICE_NUMBER;
5830
          case 3: // FREIGHT_CHARGES
5831
            return FREIGHT_CHARGES;
11801 manish.sha 5832
          case 4: // PURCHASE_COMMENTS
5833
            return PURCHASE_COMMENTS;
4496 mandeep.dh 5834
          default:
5835
            return null;
5836
        }
5837
      }
5838
 
5839
      /**
5840
       * Find the _Fields constant that matches fieldId, throwing an exception
5841
       * if it is not found.
5842
       */
5843
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5844
        _Fields fields = findByThriftId(fieldId);
5845
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5846
        return fields;
5847
      }
5848
 
5849
      /**
5850
       * Find the _Fields constant that matches name, or null if its not found.
5851
       */
5852
      public static _Fields findByName(String name) {
5853
        return byName.get(name);
5854
      }
5855
 
5856
      private final short _thriftId;
5857
      private final String _fieldName;
5858
 
5859
      _Fields(short thriftId, String fieldName) {
5860
        _thriftId = thriftId;
5861
        _fieldName = fieldName;
5862
      }
5863
 
5864
      public short getThriftFieldId() {
5865
        return _thriftId;
5866
      }
5867
 
5868
      public String getFieldName() {
5869
        return _fieldName;
5870
      }
5871
    }
5872
 
5873
    // isset id assignments
5874
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
5875
    private static final int __FREIGHTCHARGES_ISSET_ID = 1;
5876
    private BitSet __isset_bit_vector = new BitSet(2);
5877
 
5878
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5879
    static {
5880
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5881
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5882
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5883
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5884
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
5885
      tmpMap.put(_Fields.FREIGHT_CHARGES, new org.apache.thrift.meta_data.FieldMetaData("freightCharges", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5886
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
11801 manish.sha 5887
      tmpMap.put(_Fields.PURCHASE_COMMENTS, new org.apache.thrift.meta_data.FieldMetaData("purchaseComments", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5888
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
4496 mandeep.dh 5889
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5890
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_args.class, metaDataMap);
5891
    }
5892
 
5893
    public startPurchase_args() {
5894
    }
5895
 
5896
    public startPurchase_args(
5897
      long purchaseOrderId,
5898
      String invoiceNumber,
11801 manish.sha 5899
      double freightCharges,
5900
      String purchaseComments)
4496 mandeep.dh 5901
    {
5902
      this();
5903
      this.purchaseOrderId = purchaseOrderId;
5904
      setPurchaseOrderIdIsSet(true);
5905
      this.invoiceNumber = invoiceNumber;
5906
      this.freightCharges = freightCharges;
5907
      setFreightChargesIsSet(true);
11801 manish.sha 5908
      this.purchaseComments = purchaseComments;
4496 mandeep.dh 5909
    }
5910
 
5911
    /**
5912
     * Performs a deep copy on <i>other</i>.
5913
     */
5914
    public startPurchase_args(startPurchase_args other) {
5915
      __isset_bit_vector.clear();
5916
      __isset_bit_vector.or(other.__isset_bit_vector);
5917
      this.purchaseOrderId = other.purchaseOrderId;
5918
      if (other.isSetInvoiceNumber()) {
5919
        this.invoiceNumber = other.invoiceNumber;
5920
      }
5921
      this.freightCharges = other.freightCharges;
11801 manish.sha 5922
      if (other.isSetPurchaseComments()) {
5923
        this.purchaseComments = other.purchaseComments;
5924
      }
4496 mandeep.dh 5925
    }
5926
 
5927
    public startPurchase_args deepCopy() {
5928
      return new startPurchase_args(this);
5929
    }
5930
 
5931
    @Override
5932
    public void clear() {
5933
      setPurchaseOrderIdIsSet(false);
5934
      this.purchaseOrderId = 0;
5935
      this.invoiceNumber = null;
5936
      setFreightChargesIsSet(false);
5937
      this.freightCharges = 0.0;
11801 manish.sha 5938
      this.purchaseComments = null;
4496 mandeep.dh 5939
    }
5940
 
5941
    public long getPurchaseOrderId() {
5942
      return this.purchaseOrderId;
5943
    }
5944
 
5945
    public void setPurchaseOrderId(long purchaseOrderId) {
5946
      this.purchaseOrderId = purchaseOrderId;
5947
      setPurchaseOrderIdIsSet(true);
5948
    }
5949
 
5950
    public void unsetPurchaseOrderId() {
5951
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
5952
    }
5953
 
5954
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
5955
    public boolean isSetPurchaseOrderId() {
5956
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
5957
    }
5958
 
5959
    public void setPurchaseOrderIdIsSet(boolean value) {
5960
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
5961
    }
5962
 
5963
    public String getInvoiceNumber() {
5964
      return this.invoiceNumber;
5965
    }
5966
 
5967
    public void setInvoiceNumber(String invoiceNumber) {
5968
      this.invoiceNumber = invoiceNumber;
5969
    }
5970
 
5971
    public void unsetInvoiceNumber() {
5972
      this.invoiceNumber = null;
5973
    }
5974
 
5975
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
5976
    public boolean isSetInvoiceNumber() {
5977
      return this.invoiceNumber != null;
5978
    }
5979
 
5980
    public void setInvoiceNumberIsSet(boolean value) {
5981
      if (!value) {
5982
        this.invoiceNumber = null;
5983
      }
5984
    }
5985
 
5986
    public double getFreightCharges() {
5987
      return this.freightCharges;
5988
    }
5989
 
5990
    public void setFreightCharges(double freightCharges) {
5991
      this.freightCharges = freightCharges;
5992
      setFreightChargesIsSet(true);
5993
    }
5994
 
5995
    public void unsetFreightCharges() {
5996
      __isset_bit_vector.clear(__FREIGHTCHARGES_ISSET_ID);
5997
    }
5998
 
5999
    /** Returns true if field freightCharges is set (has been assigned a value) and false otherwise */
6000
    public boolean isSetFreightCharges() {
6001
      return __isset_bit_vector.get(__FREIGHTCHARGES_ISSET_ID);
6002
    }
6003
 
6004
    public void setFreightChargesIsSet(boolean value) {
6005
      __isset_bit_vector.set(__FREIGHTCHARGES_ISSET_ID, value);
6006
    }
6007
 
11801 manish.sha 6008
    public String getPurchaseComments() {
6009
      return this.purchaseComments;
6010
    }
6011
 
6012
    public void setPurchaseComments(String purchaseComments) {
6013
      this.purchaseComments = purchaseComments;
6014
    }
6015
 
6016
    public void unsetPurchaseComments() {
6017
      this.purchaseComments = null;
6018
    }
6019
 
6020
    /** Returns true if field purchaseComments is set (has been assigned a value) and false otherwise */
6021
    public boolean isSetPurchaseComments() {
6022
      return this.purchaseComments != null;
6023
    }
6024
 
6025
    public void setPurchaseCommentsIsSet(boolean value) {
6026
      if (!value) {
6027
        this.purchaseComments = null;
6028
      }
6029
    }
6030
 
4496 mandeep.dh 6031
    public void setFieldValue(_Fields field, Object value) {
6032
      switch (field) {
6033
      case PURCHASE_ORDER_ID:
6034
        if (value == null) {
6035
          unsetPurchaseOrderId();
6036
        } else {
6037
          setPurchaseOrderId((Long)value);
6038
        }
6039
        break;
6040
 
6041
      case INVOICE_NUMBER:
6042
        if (value == null) {
6043
          unsetInvoiceNumber();
6044
        } else {
6045
          setInvoiceNumber((String)value);
6046
        }
6047
        break;
6048
 
6049
      case FREIGHT_CHARGES:
6050
        if (value == null) {
6051
          unsetFreightCharges();
6052
        } else {
6053
          setFreightCharges((Double)value);
6054
        }
6055
        break;
6056
 
11801 manish.sha 6057
      case PURCHASE_COMMENTS:
6058
        if (value == null) {
6059
          unsetPurchaseComments();
6060
        } else {
6061
          setPurchaseComments((String)value);
6062
        }
6063
        break;
6064
 
4496 mandeep.dh 6065
      }
6066
    }
6067
 
6068
    public Object getFieldValue(_Fields field) {
6069
      switch (field) {
6070
      case PURCHASE_ORDER_ID:
6071
        return Long.valueOf(getPurchaseOrderId());
6072
 
6073
      case INVOICE_NUMBER:
6074
        return getInvoiceNumber();
6075
 
6076
      case FREIGHT_CHARGES:
6077
        return Double.valueOf(getFreightCharges());
6078
 
11801 manish.sha 6079
      case PURCHASE_COMMENTS:
6080
        return getPurchaseComments();
6081
 
4496 mandeep.dh 6082
      }
6083
      throw new IllegalStateException();
6084
    }
6085
 
6086
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6087
    public boolean isSet(_Fields field) {
6088
      if (field == null) {
6089
        throw new IllegalArgumentException();
6090
      }
6091
 
6092
      switch (field) {
6093
      case PURCHASE_ORDER_ID:
6094
        return isSetPurchaseOrderId();
6095
      case INVOICE_NUMBER:
6096
        return isSetInvoiceNumber();
6097
      case FREIGHT_CHARGES:
6098
        return isSetFreightCharges();
11801 manish.sha 6099
      case PURCHASE_COMMENTS:
6100
        return isSetPurchaseComments();
4496 mandeep.dh 6101
      }
6102
      throw new IllegalStateException();
6103
    }
6104
 
6105
    @Override
6106
    public boolean equals(Object that) {
6107
      if (that == null)
6108
        return false;
6109
      if (that instanceof startPurchase_args)
6110
        return this.equals((startPurchase_args)that);
6111
      return false;
6112
    }
6113
 
6114
    public boolean equals(startPurchase_args that) {
6115
      if (that == null)
6116
        return false;
6117
 
6118
      boolean this_present_purchaseOrderId = true;
6119
      boolean that_present_purchaseOrderId = true;
6120
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
6121
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
6122
          return false;
6123
        if (this.purchaseOrderId != that.purchaseOrderId)
6124
          return false;
6125
      }
6126
 
6127
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
6128
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
6129
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
6130
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
6131
          return false;
6132
        if (!this.invoiceNumber.equals(that.invoiceNumber))
6133
          return false;
6134
      }
6135
 
6136
      boolean this_present_freightCharges = true;
6137
      boolean that_present_freightCharges = true;
6138
      if (this_present_freightCharges || that_present_freightCharges) {
6139
        if (!(this_present_freightCharges && that_present_freightCharges))
6140
          return false;
6141
        if (this.freightCharges != that.freightCharges)
6142
          return false;
6143
      }
6144
 
11801 manish.sha 6145
      boolean this_present_purchaseComments = true && this.isSetPurchaseComments();
6146
      boolean that_present_purchaseComments = true && that.isSetPurchaseComments();
6147
      if (this_present_purchaseComments || that_present_purchaseComments) {
6148
        if (!(this_present_purchaseComments && that_present_purchaseComments))
6149
          return false;
6150
        if (!this.purchaseComments.equals(that.purchaseComments))
6151
          return false;
6152
      }
6153
 
4496 mandeep.dh 6154
      return true;
6155
    }
6156
 
6157
    @Override
6158
    public int hashCode() {
6159
      return 0;
6160
    }
6161
 
6162
    public int compareTo(startPurchase_args other) {
6163
      if (!getClass().equals(other.getClass())) {
6164
        return getClass().getName().compareTo(other.getClass().getName());
6165
      }
6166
 
6167
      int lastComparison = 0;
6168
      startPurchase_args typedOther = (startPurchase_args)other;
6169
 
6170
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
6171
      if (lastComparison != 0) {
6172
        return lastComparison;
6173
      }
6174
      if (isSetPurchaseOrderId()) {
6175
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
6176
        if (lastComparison != 0) {
6177
          return lastComparison;
6178
        }
6179
      }
6180
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
6181
      if (lastComparison != 0) {
6182
        return lastComparison;
6183
      }
6184
      if (isSetInvoiceNumber()) {
6185
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
6186
        if (lastComparison != 0) {
6187
          return lastComparison;
6188
        }
6189
      }
6190
      lastComparison = Boolean.valueOf(isSetFreightCharges()).compareTo(typedOther.isSetFreightCharges());
6191
      if (lastComparison != 0) {
6192
        return lastComparison;
6193
      }
6194
      if (isSetFreightCharges()) {
6195
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freightCharges, typedOther.freightCharges);
6196
        if (lastComparison != 0) {
6197
          return lastComparison;
6198
        }
6199
      }
11801 manish.sha 6200
      lastComparison = Boolean.valueOf(isSetPurchaseComments()).compareTo(typedOther.isSetPurchaseComments());
6201
      if (lastComparison != 0) {
6202
        return lastComparison;
6203
      }
6204
      if (isSetPurchaseComments()) {
6205
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseComments, typedOther.purchaseComments);
6206
        if (lastComparison != 0) {
6207
          return lastComparison;
6208
        }
6209
      }
4496 mandeep.dh 6210
      return 0;
6211
    }
6212
 
6213
    public _Fields fieldForId(int fieldId) {
6214
      return _Fields.findByThriftId(fieldId);
6215
    }
6216
 
6217
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6218
      org.apache.thrift.protocol.TField field;
6219
      iprot.readStructBegin();
6220
      while (true)
6221
      {
6222
        field = iprot.readFieldBegin();
6223
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6224
          break;
6225
        }
6226
        switch (field.id) {
6227
          case 1: // PURCHASE_ORDER_ID
6228
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6229
              this.purchaseOrderId = iprot.readI64();
6230
              setPurchaseOrderIdIsSet(true);
6231
            } else { 
6232
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6233
            }
6234
            break;
6235
          case 2: // INVOICE_NUMBER
6236
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
6237
              this.invoiceNumber = iprot.readString();
6238
            } else { 
6239
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6240
            }
6241
            break;
6242
          case 3: // FREIGHT_CHARGES
6243
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
6244
              this.freightCharges = iprot.readDouble();
6245
              setFreightChargesIsSet(true);
6246
            } else { 
6247
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6248
            }
6249
            break;
11801 manish.sha 6250
          case 4: // PURCHASE_COMMENTS
6251
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
6252
              this.purchaseComments = iprot.readString();
6253
            } else { 
6254
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6255
            }
6256
            break;
4496 mandeep.dh 6257
          default:
6258
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6259
        }
6260
        iprot.readFieldEnd();
6261
      }
6262
      iprot.readStructEnd();
6263
      validate();
6264
    }
6265
 
6266
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6267
      validate();
6268
 
6269
      oprot.writeStructBegin(STRUCT_DESC);
6270
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
6271
      oprot.writeI64(this.purchaseOrderId);
6272
      oprot.writeFieldEnd();
6273
      if (this.invoiceNumber != null) {
6274
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
6275
        oprot.writeString(this.invoiceNumber);
6276
        oprot.writeFieldEnd();
6277
      }
6278
      oprot.writeFieldBegin(FREIGHT_CHARGES_FIELD_DESC);
6279
      oprot.writeDouble(this.freightCharges);
6280
      oprot.writeFieldEnd();
11801 manish.sha 6281
      if (this.purchaseComments != null) {
6282
        oprot.writeFieldBegin(PURCHASE_COMMENTS_FIELD_DESC);
6283
        oprot.writeString(this.purchaseComments);
6284
        oprot.writeFieldEnd();
6285
      }
4496 mandeep.dh 6286
      oprot.writeFieldStop();
6287
      oprot.writeStructEnd();
6288
    }
6289
 
6290
    @Override
6291
    public String toString() {
6292
      StringBuilder sb = new StringBuilder("startPurchase_args(");
6293
      boolean first = true;
6294
 
6295
      sb.append("purchaseOrderId:");
6296
      sb.append(this.purchaseOrderId);
6297
      first = false;
6298
      if (!first) sb.append(", ");
6299
      sb.append("invoiceNumber:");
6300
      if (this.invoiceNumber == null) {
6301
        sb.append("null");
6302
      } else {
6303
        sb.append(this.invoiceNumber);
6304
      }
6305
      first = false;
6306
      if (!first) sb.append(", ");
6307
      sb.append("freightCharges:");
6308
      sb.append(this.freightCharges);
6309
      first = false;
11801 manish.sha 6310
      if (!first) sb.append(", ");
6311
      sb.append("purchaseComments:");
6312
      if (this.purchaseComments == null) {
6313
        sb.append("null");
6314
      } else {
6315
        sb.append(this.purchaseComments);
6316
      }
6317
      first = false;
4496 mandeep.dh 6318
      sb.append(")");
6319
      return sb.toString();
6320
    }
6321
 
6322
    public void validate() throws org.apache.thrift.TException {
6323
      // check for required fields
6324
    }
6325
 
6326
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6327
      try {
6328
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6329
      } catch (org.apache.thrift.TException te) {
6330
        throw new java.io.IOException(te);
6331
      }
6332
    }
6333
 
6334
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6335
      try {
6336
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6337
      } catch (org.apache.thrift.TException te) {
6338
        throw new java.io.IOException(te);
6339
      }
6340
    }
6341
 
6342
  }
6343
 
6344
  public static class startPurchase_result implements org.apache.thrift.TBase<startPurchase_result, startPurchase_result._Fields>, java.io.Serializable, Cloneable   {
6345
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_result");
6346
 
6347
    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);
6348
    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);
6349
 
6350
    private long success; // required
6351
    private PurchaseServiceException e; // required
6352
 
6353
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6354
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6355
      SUCCESS((short)0, "success"),
6356
      E((short)1, "e");
6357
 
6358
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6359
 
6360
      static {
6361
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6362
          byName.put(field.getFieldName(), field);
6363
        }
6364
      }
6365
 
6366
      /**
6367
       * Find the _Fields constant that matches fieldId, or null if its not found.
6368
       */
6369
      public static _Fields findByThriftId(int fieldId) {
6370
        switch(fieldId) {
6371
          case 0: // SUCCESS
6372
            return SUCCESS;
6373
          case 1: // E
6374
            return E;
6375
          default:
6376
            return null;
6377
        }
6378
      }
6379
 
6380
      /**
6381
       * Find the _Fields constant that matches fieldId, throwing an exception
6382
       * if it is not found.
6383
       */
6384
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6385
        _Fields fields = findByThriftId(fieldId);
6386
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6387
        return fields;
6388
      }
6389
 
6390
      /**
6391
       * Find the _Fields constant that matches name, or null if its not found.
6392
       */
6393
      public static _Fields findByName(String name) {
6394
        return byName.get(name);
6395
      }
6396
 
6397
      private final short _thriftId;
6398
      private final String _fieldName;
6399
 
6400
      _Fields(short thriftId, String fieldName) {
6401
        _thriftId = thriftId;
6402
        _fieldName = fieldName;
6403
      }
6404
 
6405
      public short getThriftFieldId() {
6406
        return _thriftId;
6407
      }
6408
 
6409
      public String getFieldName() {
6410
        return _fieldName;
6411
      }
6412
    }
6413
 
6414
    // isset id assignments
6415
    private static final int __SUCCESS_ISSET_ID = 0;
6416
    private BitSet __isset_bit_vector = new BitSet(1);
6417
 
6418
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6419
    static {
6420
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6421
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6422
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6423
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6424
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6425
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6426
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_result.class, metaDataMap);
6427
    }
6428
 
6429
    public startPurchase_result() {
6430
    }
6431
 
6432
    public startPurchase_result(
6433
      long success,
6434
      PurchaseServiceException e)
6435
    {
6436
      this();
6437
      this.success = success;
6438
      setSuccessIsSet(true);
6439
      this.e = e;
6440
    }
6441
 
6442
    /**
6443
     * Performs a deep copy on <i>other</i>.
6444
     */
6445
    public startPurchase_result(startPurchase_result other) {
6446
      __isset_bit_vector.clear();
6447
      __isset_bit_vector.or(other.__isset_bit_vector);
6448
      this.success = other.success;
6449
      if (other.isSetE()) {
6450
        this.e = new PurchaseServiceException(other.e);
6451
      }
6452
    }
6453
 
6454
    public startPurchase_result deepCopy() {
6455
      return new startPurchase_result(this);
6456
    }
6457
 
6458
    @Override
6459
    public void clear() {
6460
      setSuccessIsSet(false);
6461
      this.success = 0;
6462
      this.e = null;
6463
    }
6464
 
6465
    public long getSuccess() {
6466
      return this.success;
6467
    }
6468
 
6469
    public void setSuccess(long success) {
6470
      this.success = success;
6471
      setSuccessIsSet(true);
6472
    }
6473
 
6474
    public void unsetSuccess() {
6475
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
6476
    }
6477
 
6478
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
6479
    public boolean isSetSuccess() {
6480
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
6481
    }
6482
 
6483
    public void setSuccessIsSet(boolean value) {
6484
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
6485
    }
6486
 
6487
    public PurchaseServiceException getE() {
6488
      return this.e;
6489
    }
6490
 
6491
    public void setE(PurchaseServiceException e) {
6492
      this.e = e;
6493
    }
6494
 
6495
    public void unsetE() {
6496
      this.e = null;
6497
    }
6498
 
6499
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
6500
    public boolean isSetE() {
6501
      return this.e != null;
6502
    }
6503
 
6504
    public void setEIsSet(boolean value) {
6505
      if (!value) {
6506
        this.e = null;
6507
      }
6508
    }
6509
 
6510
    public void setFieldValue(_Fields field, Object value) {
6511
      switch (field) {
6512
      case SUCCESS:
6513
        if (value == null) {
6514
          unsetSuccess();
6515
        } else {
6516
          setSuccess((Long)value);
6517
        }
6518
        break;
6519
 
6520
      case E:
6521
        if (value == null) {
6522
          unsetE();
6523
        } else {
6524
          setE((PurchaseServiceException)value);
6525
        }
6526
        break;
6527
 
6528
      }
6529
    }
6530
 
6531
    public Object getFieldValue(_Fields field) {
6532
      switch (field) {
6533
      case SUCCESS:
6534
        return Long.valueOf(getSuccess());
6535
 
6536
      case E:
6537
        return getE();
6538
 
6539
      }
6540
      throw new IllegalStateException();
6541
    }
6542
 
6543
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6544
    public boolean isSet(_Fields field) {
6545
      if (field == null) {
6546
        throw new IllegalArgumentException();
6547
      }
6548
 
6549
      switch (field) {
6550
      case SUCCESS:
6551
        return isSetSuccess();
6552
      case E:
6553
        return isSetE();
6554
      }
6555
      throw new IllegalStateException();
6556
    }
6557
 
6558
    @Override
6559
    public boolean equals(Object that) {
6560
      if (that == null)
6561
        return false;
6562
      if (that instanceof startPurchase_result)
6563
        return this.equals((startPurchase_result)that);
6564
      return false;
6565
    }
6566
 
6567
    public boolean equals(startPurchase_result that) {
6568
      if (that == null)
6569
        return false;
6570
 
6571
      boolean this_present_success = true;
6572
      boolean that_present_success = true;
6573
      if (this_present_success || that_present_success) {
6574
        if (!(this_present_success && that_present_success))
6575
          return false;
6576
        if (this.success != that.success)
6577
          return false;
6578
      }
6579
 
6580
      boolean this_present_e = true && this.isSetE();
6581
      boolean that_present_e = true && that.isSetE();
6582
      if (this_present_e || that_present_e) {
6583
        if (!(this_present_e && that_present_e))
6584
          return false;
6585
        if (!this.e.equals(that.e))
6586
          return false;
6587
      }
6588
 
6589
      return true;
6590
    }
6591
 
6592
    @Override
6593
    public int hashCode() {
6594
      return 0;
6595
    }
6596
 
6597
    public int compareTo(startPurchase_result other) {
6598
      if (!getClass().equals(other.getClass())) {
6599
        return getClass().getName().compareTo(other.getClass().getName());
6600
      }
6601
 
6602
      int lastComparison = 0;
6603
      startPurchase_result typedOther = (startPurchase_result)other;
6604
 
6605
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6606
      if (lastComparison != 0) {
6607
        return lastComparison;
6608
      }
6609
      if (isSetSuccess()) {
6610
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6611
        if (lastComparison != 0) {
6612
          return lastComparison;
6613
        }
6614
      }
6615
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
6616
      if (lastComparison != 0) {
6617
        return lastComparison;
6618
      }
6619
      if (isSetE()) {
6620
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
6621
        if (lastComparison != 0) {
6622
          return lastComparison;
6623
        }
6624
      }
6625
      return 0;
6626
    }
6627
 
6628
    public _Fields fieldForId(int fieldId) {
6629
      return _Fields.findByThriftId(fieldId);
6630
    }
6631
 
6632
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6633
      org.apache.thrift.protocol.TField field;
6634
      iprot.readStructBegin();
6635
      while (true)
6636
      {
6637
        field = iprot.readFieldBegin();
6638
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6639
          break;
6640
        }
6641
        switch (field.id) {
6642
          case 0: // SUCCESS
6643
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6644
              this.success = iprot.readI64();
6645
              setSuccessIsSet(true);
6646
            } else { 
6647
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6648
            }
6649
            break;
6650
          case 1: // E
6651
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6652
              this.e = new PurchaseServiceException();
6653
              this.e.read(iprot);
6654
            } else { 
6655
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6656
            }
6657
            break;
6658
          default:
6659
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6660
        }
6661
        iprot.readFieldEnd();
6662
      }
6663
      iprot.readStructEnd();
6664
      validate();
6665
    }
6666
 
6667
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6668
      oprot.writeStructBegin(STRUCT_DESC);
6669
 
6670
      if (this.isSetSuccess()) {
6671
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6672
        oprot.writeI64(this.success);
6673
        oprot.writeFieldEnd();
6674
      } else if (this.isSetE()) {
6675
        oprot.writeFieldBegin(E_FIELD_DESC);
6676
        this.e.write(oprot);
6677
        oprot.writeFieldEnd();
6678
      }
6679
      oprot.writeFieldStop();
6680
      oprot.writeStructEnd();
6681
    }
6682
 
6683
    @Override
6684
    public String toString() {
6685
      StringBuilder sb = new StringBuilder("startPurchase_result(");
6686
      boolean first = true;
6687
 
6688
      sb.append("success:");
6689
      sb.append(this.success);
6690
      first = false;
6691
      if (!first) sb.append(", ");
6692
      sb.append("e:");
6693
      if (this.e == null) {
6694
        sb.append("null");
6695
      } else {
6696
        sb.append(this.e);
6697
      }
6698
      first = false;
6699
      sb.append(")");
6700
      return sb.toString();
6701
    }
6702
 
6703
    public void validate() throws org.apache.thrift.TException {
6704
      // check for required fields
6705
    }
6706
 
6707
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6708
      try {
6709
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6710
      } catch (org.apache.thrift.TException te) {
6711
        throw new java.io.IOException(te);
6712
      }
6713
    }
6714
 
6715
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6716
      try {
6717
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6718
      } catch (org.apache.thrift.TException te) {
6719
        throw new java.io.IOException(te);
6720
      }
6721
    }
6722
 
6723
  }
6724
 
6725
  public static class closePurchase_args implements org.apache.thrift.TBase<closePurchase_args, closePurchase_args._Fields>, java.io.Serializable, Cloneable   {
6726
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_args");
6727
 
6728
    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);
6729
 
6730
    private long purchaseId; // required
6731
 
6732
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6733
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6734
      PURCHASE_ID((short)1, "purchaseId");
6735
 
6736
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6737
 
6738
      static {
6739
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6740
          byName.put(field.getFieldName(), field);
6741
        }
6742
      }
6743
 
6744
      /**
6745
       * Find the _Fields constant that matches fieldId, or null if its not found.
6746
       */
6747
      public static _Fields findByThriftId(int fieldId) {
6748
        switch(fieldId) {
6749
          case 1: // PURCHASE_ID
6750
            return PURCHASE_ID;
6751
          default:
6752
            return null;
6753
        }
6754
      }
6755
 
6756
      /**
6757
       * Find the _Fields constant that matches fieldId, throwing an exception
6758
       * if it is not found.
6759
       */
6760
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6761
        _Fields fields = findByThriftId(fieldId);
6762
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6763
        return fields;
6764
      }
6765
 
6766
      /**
6767
       * Find the _Fields constant that matches name, or null if its not found.
6768
       */
6769
      public static _Fields findByName(String name) {
6770
        return byName.get(name);
6771
      }
6772
 
6773
      private final short _thriftId;
6774
      private final String _fieldName;
6775
 
6776
      _Fields(short thriftId, String fieldName) {
6777
        _thriftId = thriftId;
6778
        _fieldName = fieldName;
6779
      }
6780
 
6781
      public short getThriftFieldId() {
6782
        return _thriftId;
6783
      }
6784
 
6785
      public String getFieldName() {
6786
        return _fieldName;
6787
      }
6788
    }
6789
 
6790
    // isset id assignments
6791
    private static final int __PURCHASEID_ISSET_ID = 0;
6792
    private BitSet __isset_bit_vector = new BitSet(1);
6793
 
6794
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6795
    static {
6796
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6797
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6798
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6799
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6800
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_args.class, metaDataMap);
6801
    }
6802
 
6803
    public closePurchase_args() {
6804
    }
6805
 
6806
    public closePurchase_args(
6807
      long purchaseId)
6808
    {
6809
      this();
6810
      this.purchaseId = purchaseId;
6811
      setPurchaseIdIsSet(true);
6812
    }
6813
 
6814
    /**
6815
     * Performs a deep copy on <i>other</i>.
6816
     */
6817
    public closePurchase_args(closePurchase_args other) {
6818
      __isset_bit_vector.clear();
6819
      __isset_bit_vector.or(other.__isset_bit_vector);
6820
      this.purchaseId = other.purchaseId;
6821
    }
6822
 
6823
    public closePurchase_args deepCopy() {
6824
      return new closePurchase_args(this);
6825
    }
6826
 
6827
    @Override
6828
    public void clear() {
6829
      setPurchaseIdIsSet(false);
6830
      this.purchaseId = 0;
6831
    }
6832
 
6833
    public long getPurchaseId() {
6834
      return this.purchaseId;
6835
    }
6836
 
6837
    public void setPurchaseId(long purchaseId) {
6838
      this.purchaseId = purchaseId;
6839
      setPurchaseIdIsSet(true);
6840
    }
6841
 
6842
    public void unsetPurchaseId() {
6843
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
6844
    }
6845
 
6846
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
6847
    public boolean isSetPurchaseId() {
6848
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
6849
    }
6850
 
6851
    public void setPurchaseIdIsSet(boolean value) {
6852
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
6853
    }
6854
 
6855
    public void setFieldValue(_Fields field, Object value) {
6856
      switch (field) {
6857
      case PURCHASE_ID:
6858
        if (value == null) {
6859
          unsetPurchaseId();
6860
        } else {
6861
          setPurchaseId((Long)value);
6862
        }
6863
        break;
6864
 
6865
      }
6866
    }
6867
 
6868
    public Object getFieldValue(_Fields field) {
6869
      switch (field) {
6870
      case PURCHASE_ID:
6871
        return Long.valueOf(getPurchaseId());
6872
 
6873
      }
6874
      throw new IllegalStateException();
6875
    }
6876
 
6877
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6878
    public boolean isSet(_Fields field) {
6879
      if (field == null) {
6880
        throw new IllegalArgumentException();
6881
      }
6882
 
6883
      switch (field) {
6884
      case PURCHASE_ID:
6885
        return isSetPurchaseId();
6886
      }
6887
      throw new IllegalStateException();
6888
    }
6889
 
6890
    @Override
6891
    public boolean equals(Object that) {
6892
      if (that == null)
6893
        return false;
6894
      if (that instanceof closePurchase_args)
6895
        return this.equals((closePurchase_args)that);
6896
      return false;
6897
    }
6898
 
6899
    public boolean equals(closePurchase_args that) {
6900
      if (that == null)
6901
        return false;
6902
 
6903
      boolean this_present_purchaseId = true;
6904
      boolean that_present_purchaseId = true;
6905
      if (this_present_purchaseId || that_present_purchaseId) {
6906
        if (!(this_present_purchaseId && that_present_purchaseId))
6907
          return false;
6908
        if (this.purchaseId != that.purchaseId)
6909
          return false;
6910
      }
6911
 
6912
      return true;
6913
    }
6914
 
6915
    @Override
6916
    public int hashCode() {
6917
      return 0;
6918
    }
6919
 
6920
    public int compareTo(closePurchase_args other) {
6921
      if (!getClass().equals(other.getClass())) {
6922
        return getClass().getName().compareTo(other.getClass().getName());
6923
      }
6924
 
6925
      int lastComparison = 0;
6926
      closePurchase_args typedOther = (closePurchase_args)other;
6927
 
6928
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
6929
      if (lastComparison != 0) {
6930
        return lastComparison;
6931
      }
6932
      if (isSetPurchaseId()) {
6933
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
6934
        if (lastComparison != 0) {
6935
          return lastComparison;
6936
        }
6937
      }
6938
      return 0;
6939
    }
6940
 
6941
    public _Fields fieldForId(int fieldId) {
6942
      return _Fields.findByThriftId(fieldId);
6943
    }
6944
 
6945
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6946
      org.apache.thrift.protocol.TField field;
6947
      iprot.readStructBegin();
6948
      while (true)
6949
      {
6950
        field = iprot.readFieldBegin();
6951
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6952
          break;
6953
        }
6954
        switch (field.id) {
6955
          case 1: // PURCHASE_ID
6956
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6957
              this.purchaseId = iprot.readI64();
6958
              setPurchaseIdIsSet(true);
6959
            } else { 
6960
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6961
            }
6962
            break;
6963
          default:
6964
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6965
        }
6966
        iprot.readFieldEnd();
6967
      }
6968
      iprot.readStructEnd();
6969
      validate();
6970
    }
6971
 
6972
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6973
      validate();
6974
 
6975
      oprot.writeStructBegin(STRUCT_DESC);
6976
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
6977
      oprot.writeI64(this.purchaseId);
6978
      oprot.writeFieldEnd();
6979
      oprot.writeFieldStop();
6980
      oprot.writeStructEnd();
6981
    }
6982
 
6983
    @Override
6984
    public String toString() {
6985
      StringBuilder sb = new StringBuilder("closePurchase_args(");
6986
      boolean first = true;
6987
 
6988
      sb.append("purchaseId:");
6989
      sb.append(this.purchaseId);
6990
      first = false;
6991
      sb.append(")");
6992
      return sb.toString();
6993
    }
6994
 
6995
    public void validate() throws org.apache.thrift.TException {
6996
      // check for required fields
6997
    }
6998
 
6999
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7000
      try {
7001
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7002
      } catch (org.apache.thrift.TException te) {
7003
        throw new java.io.IOException(te);
7004
      }
7005
    }
7006
 
7007
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7008
      try {
7009
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7010
      } catch (org.apache.thrift.TException te) {
7011
        throw new java.io.IOException(te);
7012
      }
7013
    }
7014
 
7015
  }
7016
 
7017
  public static class closePurchase_result implements org.apache.thrift.TBase<closePurchase_result, closePurchase_result._Fields>, java.io.Serializable, Cloneable   {
7018
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_result");
7019
 
7020
    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);
7021
    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);
7022
 
7023
    private long success; // required
7024
    private PurchaseServiceException e; // required
7025
 
7026
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7027
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7028
      SUCCESS((short)0, "success"),
7029
      E((short)1, "e");
7030
 
7031
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7032
 
7033
      static {
7034
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7035
          byName.put(field.getFieldName(), field);
7036
        }
7037
      }
7038
 
7039
      /**
7040
       * Find the _Fields constant that matches fieldId, or null if its not found.
7041
       */
7042
      public static _Fields findByThriftId(int fieldId) {
7043
        switch(fieldId) {
7044
          case 0: // SUCCESS
7045
            return SUCCESS;
7046
          case 1: // E
7047
            return E;
7048
          default:
7049
            return null;
7050
        }
7051
      }
7052
 
7053
      /**
7054
       * Find the _Fields constant that matches fieldId, throwing an exception
7055
       * if it is not found.
7056
       */
7057
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7058
        _Fields fields = findByThriftId(fieldId);
7059
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7060
        return fields;
7061
      }
7062
 
7063
      /**
7064
       * Find the _Fields constant that matches name, or null if its not found.
7065
       */
7066
      public static _Fields findByName(String name) {
7067
        return byName.get(name);
7068
      }
7069
 
7070
      private final short _thriftId;
7071
      private final String _fieldName;
7072
 
7073
      _Fields(short thriftId, String fieldName) {
7074
        _thriftId = thriftId;
7075
        _fieldName = fieldName;
7076
      }
7077
 
7078
      public short getThriftFieldId() {
7079
        return _thriftId;
7080
      }
7081
 
7082
      public String getFieldName() {
7083
        return _fieldName;
7084
      }
7085
    }
7086
 
7087
    // isset id assignments
7088
    private static final int __SUCCESS_ISSET_ID = 0;
7089
    private BitSet __isset_bit_vector = new BitSet(1);
7090
 
7091
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7092
    static {
7093
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7094
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7095
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7096
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7097
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7098
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7099
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_result.class, metaDataMap);
7100
    }
7101
 
7102
    public closePurchase_result() {
7103
    }
7104
 
7105
    public closePurchase_result(
7106
      long success,
7107
      PurchaseServiceException e)
7108
    {
7109
      this();
7110
      this.success = success;
7111
      setSuccessIsSet(true);
7112
      this.e = e;
7113
    }
7114
 
7115
    /**
7116
     * Performs a deep copy on <i>other</i>.
7117
     */
7118
    public closePurchase_result(closePurchase_result other) {
7119
      __isset_bit_vector.clear();
7120
      __isset_bit_vector.or(other.__isset_bit_vector);
7121
      this.success = other.success;
7122
      if (other.isSetE()) {
7123
        this.e = new PurchaseServiceException(other.e);
7124
      }
7125
    }
7126
 
7127
    public closePurchase_result deepCopy() {
7128
      return new closePurchase_result(this);
7129
    }
7130
 
7131
    @Override
7132
    public void clear() {
7133
      setSuccessIsSet(false);
7134
      this.success = 0;
7135
      this.e = null;
7136
    }
7137
 
7138
    public long getSuccess() {
7139
      return this.success;
7140
    }
7141
 
7142
    public void setSuccess(long success) {
7143
      this.success = success;
7144
      setSuccessIsSet(true);
7145
    }
7146
 
7147
    public void unsetSuccess() {
7148
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7149
    }
7150
 
7151
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7152
    public boolean isSetSuccess() {
7153
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7154
    }
7155
 
7156
    public void setSuccessIsSet(boolean value) {
7157
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7158
    }
7159
 
7160
    public PurchaseServiceException getE() {
7161
      return this.e;
7162
    }
7163
 
7164
    public void setE(PurchaseServiceException e) {
7165
      this.e = e;
7166
    }
7167
 
7168
    public void unsetE() {
7169
      this.e = null;
7170
    }
7171
 
7172
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
7173
    public boolean isSetE() {
7174
      return this.e != null;
7175
    }
7176
 
7177
    public void setEIsSet(boolean value) {
7178
      if (!value) {
7179
        this.e = null;
7180
      }
7181
    }
7182
 
7183
    public void setFieldValue(_Fields field, Object value) {
7184
      switch (field) {
7185
      case SUCCESS:
7186
        if (value == null) {
7187
          unsetSuccess();
7188
        } else {
7189
          setSuccess((Long)value);
7190
        }
7191
        break;
7192
 
7193
      case E:
7194
        if (value == null) {
7195
          unsetE();
7196
        } else {
7197
          setE((PurchaseServiceException)value);
7198
        }
7199
        break;
7200
 
7201
      }
7202
    }
7203
 
7204
    public Object getFieldValue(_Fields field) {
7205
      switch (field) {
7206
      case SUCCESS:
7207
        return Long.valueOf(getSuccess());
7208
 
7209
      case E:
7210
        return getE();
7211
 
7212
      }
7213
      throw new IllegalStateException();
7214
    }
7215
 
7216
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7217
    public boolean isSet(_Fields field) {
7218
      if (field == null) {
7219
        throw new IllegalArgumentException();
7220
      }
7221
 
7222
      switch (field) {
7223
      case SUCCESS:
7224
        return isSetSuccess();
7225
      case E:
7226
        return isSetE();
7227
      }
7228
      throw new IllegalStateException();
7229
    }
7230
 
7231
    @Override
7232
    public boolean equals(Object that) {
7233
      if (that == null)
7234
        return false;
7235
      if (that instanceof closePurchase_result)
7236
        return this.equals((closePurchase_result)that);
7237
      return false;
7238
    }
7239
 
7240
    public boolean equals(closePurchase_result that) {
7241
      if (that == null)
7242
        return false;
7243
 
7244
      boolean this_present_success = true;
7245
      boolean that_present_success = true;
7246
      if (this_present_success || that_present_success) {
7247
        if (!(this_present_success && that_present_success))
7248
          return false;
7249
        if (this.success != that.success)
7250
          return false;
7251
      }
7252
 
7253
      boolean this_present_e = true && this.isSetE();
7254
      boolean that_present_e = true && that.isSetE();
7255
      if (this_present_e || that_present_e) {
7256
        if (!(this_present_e && that_present_e))
7257
          return false;
7258
        if (!this.e.equals(that.e))
7259
          return false;
7260
      }
7261
 
7262
      return true;
7263
    }
7264
 
7265
    @Override
7266
    public int hashCode() {
7267
      return 0;
7268
    }
7269
 
7270
    public int compareTo(closePurchase_result other) {
7271
      if (!getClass().equals(other.getClass())) {
7272
        return getClass().getName().compareTo(other.getClass().getName());
7273
      }
7274
 
7275
      int lastComparison = 0;
7276
      closePurchase_result typedOther = (closePurchase_result)other;
7277
 
7278
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7279
      if (lastComparison != 0) {
7280
        return lastComparison;
7281
      }
7282
      if (isSetSuccess()) {
7283
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7284
        if (lastComparison != 0) {
7285
          return lastComparison;
7286
        }
7287
      }
7288
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
7289
      if (lastComparison != 0) {
7290
        return lastComparison;
7291
      }
7292
      if (isSetE()) {
7293
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
7294
        if (lastComparison != 0) {
7295
          return lastComparison;
7296
        }
7297
      }
7298
      return 0;
7299
    }
7300
 
7301
    public _Fields fieldForId(int fieldId) {
7302
      return _Fields.findByThriftId(fieldId);
7303
    }
7304
 
7305
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7306
      org.apache.thrift.protocol.TField field;
7307
      iprot.readStructBegin();
7308
      while (true)
7309
      {
7310
        field = iprot.readFieldBegin();
7311
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7312
          break;
7313
        }
7314
        switch (field.id) {
7315
          case 0: // SUCCESS
7316
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7317
              this.success = iprot.readI64();
7318
              setSuccessIsSet(true);
7319
            } else { 
7320
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7321
            }
7322
            break;
7323
          case 1: // E
7324
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7325
              this.e = new PurchaseServiceException();
7326
              this.e.read(iprot);
7327
            } else { 
7328
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7329
            }
7330
            break;
7331
          default:
7332
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7333
        }
7334
        iprot.readFieldEnd();
7335
      }
7336
      iprot.readStructEnd();
7337
      validate();
7338
    }
7339
 
7340
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7341
      oprot.writeStructBegin(STRUCT_DESC);
7342
 
7343
      if (this.isSetSuccess()) {
7344
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7345
        oprot.writeI64(this.success);
7346
        oprot.writeFieldEnd();
7347
      } else if (this.isSetE()) {
7348
        oprot.writeFieldBegin(E_FIELD_DESC);
7349
        this.e.write(oprot);
7350
        oprot.writeFieldEnd();
7351
      }
7352
      oprot.writeFieldStop();
7353
      oprot.writeStructEnd();
7354
    }
7355
 
7356
    @Override
7357
    public String toString() {
7358
      StringBuilder sb = new StringBuilder("closePurchase_result(");
7359
      boolean first = true;
7360
 
7361
      sb.append("success:");
7362
      sb.append(this.success);
7363
      first = false;
7364
      if (!first) sb.append(", ");
7365
      sb.append("e:");
7366
      if (this.e == null) {
7367
        sb.append("null");
7368
      } else {
7369
        sb.append(this.e);
7370
      }
7371
      first = false;
7372
      sb.append(")");
7373
      return sb.toString();
7374
    }
7375
 
7376
    public void validate() throws org.apache.thrift.TException {
7377
      // check for required fields
7378
    }
7379
 
7380
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7381
      try {
7382
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7383
      } catch (org.apache.thrift.TException te) {
7384
        throw new java.io.IOException(te);
7385
      }
7386
    }
7387
 
7388
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7389
      try {
7390
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7391
      } catch (org.apache.thrift.TException te) {
7392
        throw new java.io.IOException(te);
7393
      }
7394
    }
7395
 
7396
  }
7397
 
7398
  public static class getAllPurchases_args implements org.apache.thrift.TBase<getAllPurchases_args, getAllPurchases_args._Fields>, java.io.Serializable, Cloneable   {
7399
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_args");
7400
 
7401
    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);
7402
    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);
7403
 
7404
    private long purchaseOrderId; // required
7405
    private boolean open; // required
7406
 
7407
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7408
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7409
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
7410
      OPEN((short)2, "open");
7411
 
7412
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7413
 
7414
      static {
7415
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7416
          byName.put(field.getFieldName(), field);
7417
        }
7418
      }
7419
 
7420
      /**
7421
       * Find the _Fields constant that matches fieldId, or null if its not found.
7422
       */
7423
      public static _Fields findByThriftId(int fieldId) {
7424
        switch(fieldId) {
7425
          case 1: // PURCHASE_ORDER_ID
7426
            return PURCHASE_ORDER_ID;
7427
          case 2: // OPEN
7428
            return OPEN;
7429
          default:
7430
            return null;
7431
        }
7432
      }
7433
 
7434
      /**
7435
       * Find the _Fields constant that matches fieldId, throwing an exception
7436
       * if it is not found.
7437
       */
7438
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7439
        _Fields fields = findByThriftId(fieldId);
7440
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7441
        return fields;
7442
      }
7443
 
7444
      /**
7445
       * Find the _Fields constant that matches name, or null if its not found.
7446
       */
7447
      public static _Fields findByName(String name) {
7448
        return byName.get(name);
7449
      }
7450
 
7451
      private final short _thriftId;
7452
      private final String _fieldName;
7453
 
7454
      _Fields(short thriftId, String fieldName) {
7455
        _thriftId = thriftId;
7456
        _fieldName = fieldName;
7457
      }
7458
 
7459
      public short getThriftFieldId() {
7460
        return _thriftId;
7461
      }
7462
 
7463
      public String getFieldName() {
7464
        return _fieldName;
7465
      }
7466
    }
7467
 
7468
    // isset id assignments
7469
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
7470
    private static final int __OPEN_ISSET_ID = 1;
7471
    private BitSet __isset_bit_vector = new BitSet(2);
7472
 
7473
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7474
    static {
7475
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7476
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7477
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7478
      tmpMap.put(_Fields.OPEN, new org.apache.thrift.meta_data.FieldMetaData("open", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7479
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
7480
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7481
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_args.class, metaDataMap);
7482
    }
7483
 
7484
    public getAllPurchases_args() {
7485
    }
7486
 
7487
    public getAllPurchases_args(
7488
      long purchaseOrderId,
7489
      boolean open)
7490
    {
7491
      this();
7492
      this.purchaseOrderId = purchaseOrderId;
7493
      setPurchaseOrderIdIsSet(true);
7494
      this.open = open;
7495
      setOpenIsSet(true);
7496
    }
7497
 
7498
    /**
7499
     * Performs a deep copy on <i>other</i>.
7500
     */
7501
    public getAllPurchases_args(getAllPurchases_args other) {
7502
      __isset_bit_vector.clear();
7503
      __isset_bit_vector.or(other.__isset_bit_vector);
7504
      this.purchaseOrderId = other.purchaseOrderId;
7505
      this.open = other.open;
7506
    }
7507
 
7508
    public getAllPurchases_args deepCopy() {
7509
      return new getAllPurchases_args(this);
7510
    }
7511
 
7512
    @Override
7513
    public void clear() {
7514
      setPurchaseOrderIdIsSet(false);
7515
      this.purchaseOrderId = 0;
7516
      setOpenIsSet(false);
7517
      this.open = false;
7518
    }
7519
 
7520
    public long getPurchaseOrderId() {
7521
      return this.purchaseOrderId;
7522
    }
7523
 
7524
    public void setPurchaseOrderId(long purchaseOrderId) {
7525
      this.purchaseOrderId = purchaseOrderId;
7526
      setPurchaseOrderIdIsSet(true);
7527
    }
7528
 
7529
    public void unsetPurchaseOrderId() {
7530
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
7531
    }
7532
 
7533
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
7534
    public boolean isSetPurchaseOrderId() {
7535
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
7536
    }
7537
 
7538
    public void setPurchaseOrderIdIsSet(boolean value) {
7539
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
7540
    }
7541
 
7542
    public boolean isOpen() {
7543
      return this.open;
7544
    }
7545
 
7546
    public void setOpen(boolean open) {
7547
      this.open = open;
7548
      setOpenIsSet(true);
7549
    }
7550
 
7551
    public void unsetOpen() {
7552
      __isset_bit_vector.clear(__OPEN_ISSET_ID);
7553
    }
7554
 
7555
    /** Returns true if field open is set (has been assigned a value) and false otherwise */
7556
    public boolean isSetOpen() {
7557
      return __isset_bit_vector.get(__OPEN_ISSET_ID);
7558
    }
7559
 
7560
    public void setOpenIsSet(boolean value) {
7561
      __isset_bit_vector.set(__OPEN_ISSET_ID, value);
7562
    }
7563
 
7564
    public void setFieldValue(_Fields field, Object value) {
7565
      switch (field) {
7566
      case PURCHASE_ORDER_ID:
7567
        if (value == null) {
7568
          unsetPurchaseOrderId();
7569
        } else {
7570
          setPurchaseOrderId((Long)value);
7571
        }
7572
        break;
7573
 
7574
      case OPEN:
7575
        if (value == null) {
7576
          unsetOpen();
7577
        } else {
7578
          setOpen((Boolean)value);
7579
        }
7580
        break;
7581
 
7582
      }
7583
    }
7584
 
7585
    public Object getFieldValue(_Fields field) {
7586
      switch (field) {
7587
      case PURCHASE_ORDER_ID:
7588
        return Long.valueOf(getPurchaseOrderId());
7589
 
7590
      case OPEN:
7591
        return Boolean.valueOf(isOpen());
7592
 
7593
      }
7594
      throw new IllegalStateException();
7595
    }
7596
 
7597
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7598
    public boolean isSet(_Fields field) {
7599
      if (field == null) {
7600
        throw new IllegalArgumentException();
7601
      }
7602
 
7603
      switch (field) {
7604
      case PURCHASE_ORDER_ID:
7605
        return isSetPurchaseOrderId();
7606
      case OPEN:
7607
        return isSetOpen();
7608
      }
7609
      throw new IllegalStateException();
7610
    }
7611
 
7612
    @Override
7613
    public boolean equals(Object that) {
7614
      if (that == null)
7615
        return false;
7616
      if (that instanceof getAllPurchases_args)
7617
        return this.equals((getAllPurchases_args)that);
7618
      return false;
7619
    }
7620
 
7621
    public boolean equals(getAllPurchases_args that) {
7622
      if (that == null)
7623
        return false;
7624
 
7625
      boolean this_present_purchaseOrderId = true;
7626
      boolean that_present_purchaseOrderId = true;
7627
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
7628
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
7629
          return false;
7630
        if (this.purchaseOrderId != that.purchaseOrderId)
7631
          return false;
7632
      }
7633
 
7634
      boolean this_present_open = true;
7635
      boolean that_present_open = true;
7636
      if (this_present_open || that_present_open) {
7637
        if (!(this_present_open && that_present_open))
7638
          return false;
7639
        if (this.open != that.open)
7640
          return false;
7641
      }
7642
 
7643
      return true;
7644
    }
7645
 
7646
    @Override
7647
    public int hashCode() {
7648
      return 0;
7649
    }
7650
 
7651
    public int compareTo(getAllPurchases_args other) {
7652
      if (!getClass().equals(other.getClass())) {
7653
        return getClass().getName().compareTo(other.getClass().getName());
7654
      }
7655
 
7656
      int lastComparison = 0;
7657
      getAllPurchases_args typedOther = (getAllPurchases_args)other;
7658
 
7659
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
7660
      if (lastComparison != 0) {
7661
        return lastComparison;
7662
      }
7663
      if (isSetPurchaseOrderId()) {
7664
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
7665
        if (lastComparison != 0) {
7666
          return lastComparison;
7667
        }
7668
      }
7669
      lastComparison = Boolean.valueOf(isSetOpen()).compareTo(typedOther.isSetOpen());
7670
      if (lastComparison != 0) {
7671
        return lastComparison;
7672
      }
7673
      if (isSetOpen()) {
7674
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.open, typedOther.open);
7675
        if (lastComparison != 0) {
7676
          return lastComparison;
7677
        }
7678
      }
7679
      return 0;
7680
    }
7681
 
7682
    public _Fields fieldForId(int fieldId) {
7683
      return _Fields.findByThriftId(fieldId);
7684
    }
7685
 
7686
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7687
      org.apache.thrift.protocol.TField field;
7688
      iprot.readStructBegin();
7689
      while (true)
7690
      {
7691
        field = iprot.readFieldBegin();
7692
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7693
          break;
7694
        }
7695
        switch (field.id) {
7696
          case 1: // PURCHASE_ORDER_ID
7697
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7698
              this.purchaseOrderId = iprot.readI64();
7699
              setPurchaseOrderIdIsSet(true);
7700
            } else { 
7701
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7702
            }
7703
            break;
7704
          case 2: // OPEN
7705
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
7706
              this.open = iprot.readBool();
7707
              setOpenIsSet(true);
7708
            } else { 
7709
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7710
            }
7711
            break;
7712
          default:
7713
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7714
        }
7715
        iprot.readFieldEnd();
7716
      }
7717
      iprot.readStructEnd();
7718
      validate();
7719
    }
7720
 
7721
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7722
      validate();
7723
 
7724
      oprot.writeStructBegin(STRUCT_DESC);
7725
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
7726
      oprot.writeI64(this.purchaseOrderId);
7727
      oprot.writeFieldEnd();
7728
      oprot.writeFieldBegin(OPEN_FIELD_DESC);
7729
      oprot.writeBool(this.open);
7730
      oprot.writeFieldEnd();
7731
      oprot.writeFieldStop();
7732
      oprot.writeStructEnd();
7733
    }
7734
 
7735
    @Override
7736
    public String toString() {
7737
      StringBuilder sb = new StringBuilder("getAllPurchases_args(");
7738
      boolean first = true;
7739
 
7740
      sb.append("purchaseOrderId:");
7741
      sb.append(this.purchaseOrderId);
7742
      first = false;
7743
      if (!first) sb.append(", ");
7744
      sb.append("open:");
7745
      sb.append(this.open);
7746
      first = false;
7747
      sb.append(")");
7748
      return sb.toString();
7749
    }
7750
 
7751
    public void validate() throws org.apache.thrift.TException {
7752
      // check for required fields
7753
    }
7754
 
7755
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7756
      try {
7757
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7758
      } catch (org.apache.thrift.TException te) {
7759
        throw new java.io.IOException(te);
7760
      }
7761
    }
7762
 
7763
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7764
      try {
7765
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7766
      } catch (org.apache.thrift.TException te) {
7767
        throw new java.io.IOException(te);
7768
      }
7769
    }
7770
 
7771
  }
7772
 
7773
  public static class getAllPurchases_result implements org.apache.thrift.TBase<getAllPurchases_result, getAllPurchases_result._Fields>, java.io.Serializable, Cloneable   {
7774
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_result");
7775
 
7776
    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);
7777
    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);
7778
 
7779
    private List<Purchase> success; // required
7780
    private PurchaseServiceException e; // required
7781
 
7782
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7783
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7784
      SUCCESS((short)0, "success"),
7785
      E((short)1, "e");
7786
 
7787
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7788
 
7789
      static {
7790
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7791
          byName.put(field.getFieldName(), field);
7792
        }
7793
      }
7794
 
7795
      /**
7796
       * Find the _Fields constant that matches fieldId, or null if its not found.
7797
       */
7798
      public static _Fields findByThriftId(int fieldId) {
7799
        switch(fieldId) {
7800
          case 0: // SUCCESS
7801
            return SUCCESS;
7802
          case 1: // E
7803
            return E;
7804
          default:
7805
            return null;
7806
        }
7807
      }
7808
 
7809
      /**
7810
       * Find the _Fields constant that matches fieldId, throwing an exception
7811
       * if it is not found.
7812
       */
7813
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7814
        _Fields fields = findByThriftId(fieldId);
7815
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7816
        return fields;
7817
      }
7818
 
7819
      /**
7820
       * Find the _Fields constant that matches name, or null if its not found.
7821
       */
7822
      public static _Fields findByName(String name) {
7823
        return byName.get(name);
7824
      }
7825
 
7826
      private final short _thriftId;
7827
      private final String _fieldName;
7828
 
7829
      _Fields(short thriftId, String fieldName) {
7830
        _thriftId = thriftId;
7831
        _fieldName = fieldName;
7832
      }
7833
 
7834
      public short getThriftFieldId() {
7835
        return _thriftId;
7836
      }
7837
 
7838
      public String getFieldName() {
7839
        return _fieldName;
7840
      }
7841
    }
7842
 
7843
    // isset id assignments
7844
 
7845
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7846
    static {
7847
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7848
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7849
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7850
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));
7851
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7852
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7853
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7854
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_result.class, metaDataMap);
7855
    }
7856
 
7857
    public getAllPurchases_result() {
7858
    }
7859
 
7860
    public getAllPurchases_result(
7861
      List<Purchase> success,
7862
      PurchaseServiceException e)
7863
    {
7864
      this();
7865
      this.success = success;
7866
      this.e = e;
7867
    }
7868
 
7869
    /**
7870
     * Performs a deep copy on <i>other</i>.
7871
     */
7872
    public getAllPurchases_result(getAllPurchases_result other) {
7873
      if (other.isSetSuccess()) {
7874
        List<Purchase> __this__success = new ArrayList<Purchase>();
7875
        for (Purchase other_element : other.success) {
7876
          __this__success.add(new Purchase(other_element));
7877
        }
7878
        this.success = __this__success;
7879
      }
7880
      if (other.isSetE()) {
7881
        this.e = new PurchaseServiceException(other.e);
7882
      }
7883
    }
7884
 
7885
    public getAllPurchases_result deepCopy() {
7886
      return new getAllPurchases_result(this);
7887
    }
7888
 
7889
    @Override
7890
    public void clear() {
7891
      this.success = null;
7892
      this.e = null;
7893
    }
7894
 
7895
    public int getSuccessSize() {
7896
      return (this.success == null) ? 0 : this.success.size();
7897
    }
7898
 
7899
    public java.util.Iterator<Purchase> getSuccessIterator() {
7900
      return (this.success == null) ? null : this.success.iterator();
7901
    }
7902
 
7903
    public void addToSuccess(Purchase elem) {
7904
      if (this.success == null) {
7905
        this.success = new ArrayList<Purchase>();
7906
      }
7907
      this.success.add(elem);
7908
    }
7909
 
7910
    public List<Purchase> getSuccess() {
7911
      return this.success;
7912
    }
7913
 
7914
    public void setSuccess(List<Purchase> success) {
7915
      this.success = success;
7916
    }
7917
 
7918
    public void unsetSuccess() {
7919
      this.success = null;
7920
    }
7921
 
7922
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7923
    public boolean isSetSuccess() {
7924
      return this.success != null;
7925
    }
7926
 
7927
    public void setSuccessIsSet(boolean value) {
7928
      if (!value) {
7929
        this.success = null;
7930
      }
7931
    }
7932
 
7933
    public PurchaseServiceException getE() {
7934
      return this.e;
7935
    }
7936
 
7937
    public void setE(PurchaseServiceException e) {
7938
      this.e = e;
7939
    }
7940
 
7941
    public void unsetE() {
7942
      this.e = null;
7943
    }
7944
 
7945
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
7946
    public boolean isSetE() {
7947
      return this.e != null;
7948
    }
7949
 
7950
    public void setEIsSet(boolean value) {
7951
      if (!value) {
7952
        this.e = null;
7953
      }
7954
    }
7955
 
7956
    public void setFieldValue(_Fields field, Object value) {
7957
      switch (field) {
7958
      case SUCCESS:
7959
        if (value == null) {
7960
          unsetSuccess();
7961
        } else {
7962
          setSuccess((List<Purchase>)value);
7963
        }
7964
        break;
7965
 
7966
      case E:
7967
        if (value == null) {
7968
          unsetE();
7969
        } else {
7970
          setE((PurchaseServiceException)value);
7971
        }
7972
        break;
7973
 
7974
      }
7975
    }
7976
 
7977
    public Object getFieldValue(_Fields field) {
7978
      switch (field) {
7979
      case SUCCESS:
7980
        return getSuccess();
7981
 
7982
      case E:
7983
        return getE();
7984
 
7985
      }
7986
      throw new IllegalStateException();
7987
    }
7988
 
7989
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7990
    public boolean isSet(_Fields field) {
7991
      if (field == null) {
7992
        throw new IllegalArgumentException();
7993
      }
7994
 
7995
      switch (field) {
7996
      case SUCCESS:
7997
        return isSetSuccess();
7998
      case E:
7999
        return isSetE();
8000
      }
8001
      throw new IllegalStateException();
8002
    }
8003
 
8004
    @Override
8005
    public boolean equals(Object that) {
8006
      if (that == null)
8007
        return false;
8008
      if (that instanceof getAllPurchases_result)
8009
        return this.equals((getAllPurchases_result)that);
8010
      return false;
8011
    }
8012
 
8013
    public boolean equals(getAllPurchases_result that) {
8014
      if (that == null)
8015
        return false;
8016
 
8017
      boolean this_present_success = true && this.isSetSuccess();
8018
      boolean that_present_success = true && that.isSetSuccess();
8019
      if (this_present_success || that_present_success) {
8020
        if (!(this_present_success && that_present_success))
8021
          return false;
8022
        if (!this.success.equals(that.success))
8023
          return false;
8024
      }
8025
 
8026
      boolean this_present_e = true && this.isSetE();
8027
      boolean that_present_e = true && that.isSetE();
8028
      if (this_present_e || that_present_e) {
8029
        if (!(this_present_e && that_present_e))
8030
          return false;
8031
        if (!this.e.equals(that.e))
8032
          return false;
8033
      }
8034
 
8035
      return true;
8036
    }
8037
 
8038
    @Override
8039
    public int hashCode() {
8040
      return 0;
8041
    }
8042
 
8043
    public int compareTo(getAllPurchases_result other) {
8044
      if (!getClass().equals(other.getClass())) {
8045
        return getClass().getName().compareTo(other.getClass().getName());
8046
      }
8047
 
8048
      int lastComparison = 0;
8049
      getAllPurchases_result typedOther = (getAllPurchases_result)other;
8050
 
8051
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8052
      if (lastComparison != 0) {
8053
        return lastComparison;
8054
      }
8055
      if (isSetSuccess()) {
8056
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8057
        if (lastComparison != 0) {
8058
          return lastComparison;
8059
        }
8060
      }
8061
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
8062
      if (lastComparison != 0) {
8063
        return lastComparison;
8064
      }
8065
      if (isSetE()) {
8066
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
8067
        if (lastComparison != 0) {
8068
          return lastComparison;
8069
        }
8070
      }
8071
      return 0;
8072
    }
8073
 
8074
    public _Fields fieldForId(int fieldId) {
8075
      return _Fields.findByThriftId(fieldId);
8076
    }
8077
 
8078
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8079
      org.apache.thrift.protocol.TField field;
8080
      iprot.readStructBegin();
8081
      while (true)
8082
      {
8083
        field = iprot.readFieldBegin();
8084
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8085
          break;
8086
        }
8087
        switch (field.id) {
8088
          case 0: // SUCCESS
8089
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8090
              {
8091
                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
8092
                this.success = new ArrayList<Purchase>(_list8.size);
8093
                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
8094
                {
8095
                  Purchase _elem10; // required
8096
                  _elem10 = new Purchase();
8097
                  _elem10.read(iprot);
8098
                  this.success.add(_elem10);
8099
                }
8100
                iprot.readListEnd();
8101
              }
8102
            } else { 
8103
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8104
            }
8105
            break;
8106
          case 1: // E
8107
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8108
              this.e = new PurchaseServiceException();
8109
              this.e.read(iprot);
8110
            } else { 
8111
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8112
            }
8113
            break;
8114
          default:
8115
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8116
        }
8117
        iprot.readFieldEnd();
8118
      }
8119
      iprot.readStructEnd();
8120
      validate();
8121
    }
8122
 
8123
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8124
      oprot.writeStructBegin(STRUCT_DESC);
8125
 
8126
      if (this.isSetSuccess()) {
8127
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8128
        {
8129
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
8130
          for (Purchase _iter11 : this.success)
8131
          {
8132
            _iter11.write(oprot);
8133
          }
8134
          oprot.writeListEnd();
8135
        }
8136
        oprot.writeFieldEnd();
8137
      } else if (this.isSetE()) {
8138
        oprot.writeFieldBegin(E_FIELD_DESC);
8139
        this.e.write(oprot);
8140
        oprot.writeFieldEnd();
8141
      }
8142
      oprot.writeFieldStop();
8143
      oprot.writeStructEnd();
8144
    }
8145
 
8146
    @Override
8147
    public String toString() {
8148
      StringBuilder sb = new StringBuilder("getAllPurchases_result(");
8149
      boolean first = true;
8150
 
8151
      sb.append("success:");
8152
      if (this.success == null) {
8153
        sb.append("null");
8154
      } else {
8155
        sb.append(this.success);
8156
      }
8157
      first = false;
8158
      if (!first) sb.append(", ");
8159
      sb.append("e:");
8160
      if (this.e == null) {
8161
        sb.append("null");
8162
      } else {
8163
        sb.append(this.e);
8164
      }
8165
      first = false;
8166
      sb.append(")");
8167
      return sb.toString();
8168
    }
8169
 
8170
    public void validate() throws org.apache.thrift.TException {
8171
      // check for required fields
8172
    }
8173
 
8174
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8175
      try {
8176
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8177
      } catch (org.apache.thrift.TException te) {
8178
        throw new java.io.IOException(te);
8179
      }
8180
    }
8181
 
8182
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8183
      try {
8184
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8185
      } catch (org.apache.thrift.TException te) {
8186
        throw new java.io.IOException(te);
8187
      }
8188
    }
8189
 
8190
  }
8191
 
6385 amar.kumar 8192
  public static class getPurchasesForPO_args implements org.apache.thrift.TBase<getPurchasesForPO_args, getPurchasesForPO_args._Fields>, java.io.Serializable, Cloneable   {
8193
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchasesForPO_args");
8194
 
8195
    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);
8196
 
8197
    private long purchaseOrderId; // required
8198
 
8199
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8200
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8201
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId");
8202
 
8203
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8204
 
8205
      static {
8206
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8207
          byName.put(field.getFieldName(), field);
8208
        }
8209
      }
8210
 
8211
      /**
8212
       * Find the _Fields constant that matches fieldId, or null if its not found.
8213
       */
8214
      public static _Fields findByThriftId(int fieldId) {
8215
        switch(fieldId) {
8216
          case 1: // PURCHASE_ORDER_ID
8217
            return PURCHASE_ORDER_ID;
8218
          default:
8219
            return null;
8220
        }
8221
      }
8222
 
8223
      /**
8224
       * Find the _Fields constant that matches fieldId, throwing an exception
8225
       * if it is not found.
8226
       */
8227
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8228
        _Fields fields = findByThriftId(fieldId);
8229
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8230
        return fields;
8231
      }
8232
 
8233
      /**
8234
       * Find the _Fields constant that matches name, or null if its not found.
8235
       */
8236
      public static _Fields findByName(String name) {
8237
        return byName.get(name);
8238
      }
8239
 
8240
      private final short _thriftId;
8241
      private final String _fieldName;
8242
 
8243
      _Fields(short thriftId, String fieldName) {
8244
        _thriftId = thriftId;
8245
        _fieldName = fieldName;
8246
      }
8247
 
8248
      public short getThriftFieldId() {
8249
        return _thriftId;
8250
      }
8251
 
8252
      public String getFieldName() {
8253
        return _fieldName;
8254
      }
8255
    }
8256
 
8257
    // isset id assignments
8258
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
8259
    private BitSet __isset_bit_vector = new BitSet(1);
8260
 
8261
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8262
    static {
8263
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8264
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8265
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8266
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8267
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchasesForPO_args.class, metaDataMap);
8268
    }
8269
 
8270
    public getPurchasesForPO_args() {
8271
    }
8272
 
8273
    public getPurchasesForPO_args(
8274
      long purchaseOrderId)
8275
    {
8276
      this();
8277
      this.purchaseOrderId = purchaseOrderId;
8278
      setPurchaseOrderIdIsSet(true);
8279
    }
8280
 
8281
    /**
8282
     * Performs a deep copy on <i>other</i>.
8283
     */
8284
    public getPurchasesForPO_args(getPurchasesForPO_args other) {
8285
      __isset_bit_vector.clear();
8286
      __isset_bit_vector.or(other.__isset_bit_vector);
8287
      this.purchaseOrderId = other.purchaseOrderId;
8288
    }
8289
 
8290
    public getPurchasesForPO_args deepCopy() {
8291
      return new getPurchasesForPO_args(this);
8292
    }
8293
 
8294
    @Override
8295
    public void clear() {
8296
      setPurchaseOrderIdIsSet(false);
8297
      this.purchaseOrderId = 0;
8298
    }
8299
 
8300
    public long getPurchaseOrderId() {
8301
      return this.purchaseOrderId;
8302
    }
8303
 
8304
    public void setPurchaseOrderId(long purchaseOrderId) {
8305
      this.purchaseOrderId = purchaseOrderId;
8306
      setPurchaseOrderIdIsSet(true);
8307
    }
8308
 
8309
    public void unsetPurchaseOrderId() {
8310
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
8311
    }
8312
 
8313
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
8314
    public boolean isSetPurchaseOrderId() {
8315
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
8316
    }
8317
 
8318
    public void setPurchaseOrderIdIsSet(boolean value) {
8319
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
8320
    }
8321
 
8322
    public void setFieldValue(_Fields field, Object value) {
8323
      switch (field) {
8324
      case PURCHASE_ORDER_ID:
8325
        if (value == null) {
8326
          unsetPurchaseOrderId();
8327
        } else {
8328
          setPurchaseOrderId((Long)value);
8329
        }
8330
        break;
8331
 
8332
      }
8333
    }
8334
 
8335
    public Object getFieldValue(_Fields field) {
8336
      switch (field) {
8337
      case PURCHASE_ORDER_ID:
8338
        return Long.valueOf(getPurchaseOrderId());
8339
 
8340
      }
8341
      throw new IllegalStateException();
8342
    }
8343
 
8344
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8345
    public boolean isSet(_Fields field) {
8346
      if (field == null) {
8347
        throw new IllegalArgumentException();
8348
      }
8349
 
8350
      switch (field) {
8351
      case PURCHASE_ORDER_ID:
8352
        return isSetPurchaseOrderId();
8353
      }
8354
      throw new IllegalStateException();
8355
    }
8356
 
8357
    @Override
8358
    public boolean equals(Object that) {
8359
      if (that == null)
8360
        return false;
8361
      if (that instanceof getPurchasesForPO_args)
8362
        return this.equals((getPurchasesForPO_args)that);
8363
      return false;
8364
    }
8365
 
8366
    public boolean equals(getPurchasesForPO_args that) {
8367
      if (that == null)
8368
        return false;
8369
 
8370
      boolean this_present_purchaseOrderId = true;
8371
      boolean that_present_purchaseOrderId = true;
8372
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
8373
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
8374
          return false;
8375
        if (this.purchaseOrderId != that.purchaseOrderId)
8376
          return false;
8377
      }
8378
 
8379
      return true;
8380
    }
8381
 
8382
    @Override
8383
    public int hashCode() {
8384
      return 0;
8385
    }
8386
 
8387
    public int compareTo(getPurchasesForPO_args other) {
8388
      if (!getClass().equals(other.getClass())) {
8389
        return getClass().getName().compareTo(other.getClass().getName());
8390
      }
8391
 
8392
      int lastComparison = 0;
8393
      getPurchasesForPO_args typedOther = (getPurchasesForPO_args)other;
8394
 
8395
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
8396
      if (lastComparison != 0) {
8397
        return lastComparison;
8398
      }
8399
      if (isSetPurchaseOrderId()) {
8400
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
8401
        if (lastComparison != 0) {
8402
          return lastComparison;
8403
        }
8404
      }
8405
      return 0;
8406
    }
8407
 
8408
    public _Fields fieldForId(int fieldId) {
8409
      return _Fields.findByThriftId(fieldId);
8410
    }
8411
 
8412
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8413
      org.apache.thrift.protocol.TField field;
8414
      iprot.readStructBegin();
8415
      while (true)
8416
      {
8417
        field = iprot.readFieldBegin();
8418
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8419
          break;
8420
        }
8421
        switch (field.id) {
8422
          case 1: // PURCHASE_ORDER_ID
8423
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8424
              this.purchaseOrderId = iprot.readI64();
8425
              setPurchaseOrderIdIsSet(true);
8426
            } else { 
8427
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8428
            }
8429
            break;
8430
          default:
8431
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8432
        }
8433
        iprot.readFieldEnd();
8434
      }
8435
      iprot.readStructEnd();
8436
      validate();
8437
    }
8438
 
8439
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8440
      validate();
8441
 
8442
      oprot.writeStructBegin(STRUCT_DESC);
8443
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
8444
      oprot.writeI64(this.purchaseOrderId);
8445
      oprot.writeFieldEnd();
8446
      oprot.writeFieldStop();
8447
      oprot.writeStructEnd();
8448
    }
8449
 
8450
    @Override
8451
    public String toString() {
8452
      StringBuilder sb = new StringBuilder("getPurchasesForPO_args(");
8453
      boolean first = true;
8454
 
8455
      sb.append("purchaseOrderId:");
8456
      sb.append(this.purchaseOrderId);
8457
      first = false;
8458
      sb.append(")");
8459
      return sb.toString();
8460
    }
8461
 
8462
    public void validate() throws org.apache.thrift.TException {
8463
      // check for required fields
8464
    }
8465
 
8466
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8467
      try {
8468
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8469
      } catch (org.apache.thrift.TException te) {
8470
        throw new java.io.IOException(te);
8471
      }
8472
    }
8473
 
8474
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8475
      try {
8476
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8477
        __isset_bit_vector = new BitSet(1);
8478
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8479
      } catch (org.apache.thrift.TException te) {
8480
        throw new java.io.IOException(te);
8481
      }
8482
    }
8483
 
8484
  }
8485
 
8486
  public static class getPurchasesForPO_result implements org.apache.thrift.TBase<getPurchasesForPO_result, getPurchasesForPO_result._Fields>, java.io.Serializable, Cloneable   {
8487
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchasesForPO_result");
8488
 
8489
    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);
8490
    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);
8491
 
8492
    private List<Purchase> success; // required
8493
    private PurchaseServiceException e; // required
8494
 
8495
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8496
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8497
      SUCCESS((short)0, "success"),
8498
      E((short)1, "e");
8499
 
8500
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8501
 
8502
      static {
8503
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8504
          byName.put(field.getFieldName(), field);
8505
        }
8506
      }
8507
 
8508
      /**
8509
       * Find the _Fields constant that matches fieldId, or null if its not found.
8510
       */
8511
      public static _Fields findByThriftId(int fieldId) {
8512
        switch(fieldId) {
8513
          case 0: // SUCCESS
8514
            return SUCCESS;
8515
          case 1: // E
8516
            return E;
8517
          default:
8518
            return null;
8519
        }
8520
      }
8521
 
8522
      /**
8523
       * Find the _Fields constant that matches fieldId, throwing an exception
8524
       * if it is not found.
8525
       */
8526
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8527
        _Fields fields = findByThriftId(fieldId);
8528
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8529
        return fields;
8530
      }
8531
 
8532
      /**
8533
       * Find the _Fields constant that matches name, or null if its not found.
8534
       */
8535
      public static _Fields findByName(String name) {
8536
        return byName.get(name);
8537
      }
8538
 
8539
      private final short _thriftId;
8540
      private final String _fieldName;
8541
 
8542
      _Fields(short thriftId, String fieldName) {
8543
        _thriftId = thriftId;
8544
        _fieldName = fieldName;
8545
      }
8546
 
8547
      public short getThriftFieldId() {
8548
        return _thriftId;
8549
      }
8550
 
8551
      public String getFieldName() {
8552
        return _fieldName;
8553
      }
8554
    }
8555
 
8556
    // isset id assignments
8557
 
8558
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8559
    static {
8560
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8561
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8562
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
8563
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));
8564
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8565
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
8566
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8567
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchasesForPO_result.class, metaDataMap);
8568
    }
8569
 
8570
    public getPurchasesForPO_result() {
8571
    }
8572
 
8573
    public getPurchasesForPO_result(
8574
      List<Purchase> success,
8575
      PurchaseServiceException e)
8576
    {
8577
      this();
8578
      this.success = success;
8579
      this.e = e;
8580
    }
8581
 
8582
    /**
8583
     * Performs a deep copy on <i>other</i>.
8584
     */
8585
    public getPurchasesForPO_result(getPurchasesForPO_result other) {
8586
      if (other.isSetSuccess()) {
8587
        List<Purchase> __this__success = new ArrayList<Purchase>();
8588
        for (Purchase other_element : other.success) {
8589
          __this__success.add(new Purchase(other_element));
8590
        }
8591
        this.success = __this__success;
8592
      }
8593
      if (other.isSetE()) {
8594
        this.e = new PurchaseServiceException(other.e);
8595
      }
8596
    }
8597
 
8598
    public getPurchasesForPO_result deepCopy() {
8599
      return new getPurchasesForPO_result(this);
8600
    }
8601
 
8602
    @Override
8603
    public void clear() {
8604
      this.success = null;
8605
      this.e = null;
8606
    }
8607
 
8608
    public int getSuccessSize() {
8609
      return (this.success == null) ? 0 : this.success.size();
8610
    }
8611
 
8612
    public java.util.Iterator<Purchase> getSuccessIterator() {
8613
      return (this.success == null) ? null : this.success.iterator();
8614
    }
8615
 
8616
    public void addToSuccess(Purchase elem) {
8617
      if (this.success == null) {
8618
        this.success = new ArrayList<Purchase>();
8619
      }
8620
      this.success.add(elem);
8621
    }
8622
 
8623
    public List<Purchase> getSuccess() {
8624
      return this.success;
8625
    }
8626
 
8627
    public void setSuccess(List<Purchase> success) {
8628
      this.success = success;
8629
    }
8630
 
8631
    public void unsetSuccess() {
8632
      this.success = null;
8633
    }
8634
 
8635
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8636
    public boolean isSetSuccess() {
8637
      return this.success != null;
8638
    }
8639
 
8640
    public void setSuccessIsSet(boolean value) {
8641
      if (!value) {
8642
        this.success = null;
8643
      }
8644
    }
8645
 
8646
    public PurchaseServiceException getE() {
8647
      return this.e;
8648
    }
8649
 
8650
    public void setE(PurchaseServiceException e) {
8651
      this.e = e;
8652
    }
8653
 
8654
    public void unsetE() {
8655
      this.e = null;
8656
    }
8657
 
8658
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
8659
    public boolean isSetE() {
8660
      return this.e != null;
8661
    }
8662
 
8663
    public void setEIsSet(boolean value) {
8664
      if (!value) {
8665
        this.e = null;
8666
      }
8667
    }
8668
 
8669
    public void setFieldValue(_Fields field, Object value) {
8670
      switch (field) {
8671
      case SUCCESS:
8672
        if (value == null) {
8673
          unsetSuccess();
8674
        } else {
8675
          setSuccess((List<Purchase>)value);
8676
        }
8677
        break;
8678
 
8679
      case E:
8680
        if (value == null) {
8681
          unsetE();
8682
        } else {
8683
          setE((PurchaseServiceException)value);
8684
        }
8685
        break;
8686
 
8687
      }
8688
    }
8689
 
8690
    public Object getFieldValue(_Fields field) {
8691
      switch (field) {
8692
      case SUCCESS:
8693
        return getSuccess();
8694
 
8695
      case E:
8696
        return getE();
8697
 
8698
      }
8699
      throw new IllegalStateException();
8700
    }
8701
 
8702
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8703
    public boolean isSet(_Fields field) {
8704
      if (field == null) {
8705
        throw new IllegalArgumentException();
8706
      }
8707
 
8708
      switch (field) {
8709
      case SUCCESS:
8710
        return isSetSuccess();
8711
      case E:
8712
        return isSetE();
8713
      }
8714
      throw new IllegalStateException();
8715
    }
8716
 
8717
    @Override
8718
    public boolean equals(Object that) {
8719
      if (that == null)
8720
        return false;
8721
      if (that instanceof getPurchasesForPO_result)
8722
        return this.equals((getPurchasesForPO_result)that);
8723
      return false;
8724
    }
8725
 
8726
    public boolean equals(getPurchasesForPO_result that) {
8727
      if (that == null)
8728
        return false;
8729
 
8730
      boolean this_present_success = true && this.isSetSuccess();
8731
      boolean that_present_success = true && that.isSetSuccess();
8732
      if (this_present_success || that_present_success) {
8733
        if (!(this_present_success && that_present_success))
8734
          return false;
8735
        if (!this.success.equals(that.success))
8736
          return false;
8737
      }
8738
 
8739
      boolean this_present_e = true && this.isSetE();
8740
      boolean that_present_e = true && that.isSetE();
8741
      if (this_present_e || that_present_e) {
8742
        if (!(this_present_e && that_present_e))
8743
          return false;
8744
        if (!this.e.equals(that.e))
8745
          return false;
8746
      }
8747
 
8748
      return true;
8749
    }
8750
 
8751
    @Override
8752
    public int hashCode() {
8753
      return 0;
8754
    }
8755
 
8756
    public int compareTo(getPurchasesForPO_result other) {
8757
      if (!getClass().equals(other.getClass())) {
8758
        return getClass().getName().compareTo(other.getClass().getName());
8759
      }
8760
 
8761
      int lastComparison = 0;
8762
      getPurchasesForPO_result typedOther = (getPurchasesForPO_result)other;
8763
 
8764
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8765
      if (lastComparison != 0) {
8766
        return lastComparison;
8767
      }
8768
      if (isSetSuccess()) {
8769
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8770
        if (lastComparison != 0) {
8771
          return lastComparison;
8772
        }
8773
      }
8774
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
8775
      if (lastComparison != 0) {
8776
        return lastComparison;
8777
      }
8778
      if (isSetE()) {
8779
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
8780
        if (lastComparison != 0) {
8781
          return lastComparison;
8782
        }
8783
      }
8784
      return 0;
8785
    }
8786
 
8787
    public _Fields fieldForId(int fieldId) {
8788
      return _Fields.findByThriftId(fieldId);
8789
    }
8790
 
8791
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8792
      org.apache.thrift.protocol.TField field;
8793
      iprot.readStructBegin();
8794
      while (true)
8795
      {
8796
        field = iprot.readFieldBegin();
8797
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8798
          break;
8799
        }
8800
        switch (field.id) {
8801
          case 0: // SUCCESS
8802
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8803
              {
8804
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
8805
                this.success = new ArrayList<Purchase>(_list12.size);
8806
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
8807
                {
8808
                  Purchase _elem14; // required
8809
                  _elem14 = new Purchase();
8810
                  _elem14.read(iprot);
8811
                  this.success.add(_elem14);
8812
                }
8813
                iprot.readListEnd();
8814
              }
8815
            } else { 
8816
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8817
            }
8818
            break;
8819
          case 1: // E
8820
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8821
              this.e = new PurchaseServiceException();
8822
              this.e.read(iprot);
8823
            } else { 
8824
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8825
            }
8826
            break;
8827
          default:
8828
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8829
        }
8830
        iprot.readFieldEnd();
8831
      }
8832
      iprot.readStructEnd();
8833
      validate();
8834
    }
8835
 
8836
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8837
      oprot.writeStructBegin(STRUCT_DESC);
8838
 
8839
      if (this.isSetSuccess()) {
8840
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8841
        {
8842
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
8843
          for (Purchase _iter15 : this.success)
8844
          {
8845
            _iter15.write(oprot);
8846
          }
8847
          oprot.writeListEnd();
8848
        }
8849
        oprot.writeFieldEnd();
8850
      } else if (this.isSetE()) {
8851
        oprot.writeFieldBegin(E_FIELD_DESC);
8852
        this.e.write(oprot);
8853
        oprot.writeFieldEnd();
8854
      }
8855
      oprot.writeFieldStop();
8856
      oprot.writeStructEnd();
8857
    }
8858
 
8859
    @Override
8860
    public String toString() {
8861
      StringBuilder sb = new StringBuilder("getPurchasesForPO_result(");
8862
      boolean first = true;
8863
 
8864
      sb.append("success:");
8865
      if (this.success == null) {
8866
        sb.append("null");
8867
      } else {
8868
        sb.append(this.success);
8869
      }
8870
      first = false;
8871
      if (!first) sb.append(", ");
8872
      sb.append("e:");
8873
      if (this.e == null) {
8874
        sb.append("null");
8875
      } else {
8876
        sb.append(this.e);
8877
      }
8878
      first = false;
8879
      sb.append(")");
8880
      return sb.toString();
8881
    }
8882
 
8883
    public void validate() throws org.apache.thrift.TException {
8884
      // check for required fields
8885
    }
8886
 
8887
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8888
      try {
8889
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8890
      } catch (org.apache.thrift.TException te) {
8891
        throw new java.io.IOException(te);
8892
      }
8893
    }
8894
 
8895
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8896
      try {
8897
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8898
      } catch (org.apache.thrift.TException te) {
8899
        throw new java.io.IOException(te);
8900
      }
8901
    }
8902
 
8903
  }
8904
 
4555 mandeep.dh 8905
  public static class getPurchaseOrderForPurchase_args implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_args, getPurchaseOrderForPurchase_args._Fields>, java.io.Serializable, Cloneable   {
8906
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_args");
4496 mandeep.dh 8907
 
8908
    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);
8909
 
8910
    private long purchaseId; // required
8911
 
8912
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8913
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4555 mandeep.dh 8914
      PURCHASE_ID((short)1, "purchaseId");
4496 mandeep.dh 8915
 
8916
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8917
 
8918
      static {
8919
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8920
          byName.put(field.getFieldName(), field);
8921
        }
8922
      }
8923
 
8924
      /**
8925
       * Find the _Fields constant that matches fieldId, or null if its not found.
8926
       */
8927
      public static _Fields findByThriftId(int fieldId) {
8928
        switch(fieldId) {
8929
          case 1: // PURCHASE_ID
8930
            return PURCHASE_ID;
8931
          default:
8932
            return null;
8933
        }
8934
      }
8935
 
8936
      /**
8937
       * Find the _Fields constant that matches fieldId, throwing an exception
8938
       * if it is not found.
8939
       */
8940
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8941
        _Fields fields = findByThriftId(fieldId);
8942
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8943
        return fields;
8944
      }
8945
 
8946
      /**
8947
       * Find the _Fields constant that matches name, or null if its not found.
8948
       */
8949
      public static _Fields findByName(String name) {
8950
        return byName.get(name);
8951
      }
8952
 
8953
      private final short _thriftId;
8954
      private final String _fieldName;
8955
 
8956
      _Fields(short thriftId, String fieldName) {
8957
        _thriftId = thriftId;
8958
        _fieldName = fieldName;
8959
      }
8960
 
8961
      public short getThriftFieldId() {
8962
        return _thriftId;
8963
      }
8964
 
8965
      public String getFieldName() {
8966
        return _fieldName;
8967
      }
8968
    }
8969
 
8970
    // isset id assignments
8971
    private static final int __PURCHASEID_ISSET_ID = 0;
4555 mandeep.dh 8972
    private BitSet __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 8973
 
8974
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8975
    static {
8976
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8977
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8978
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8979
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 8980
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_args.class, metaDataMap);
4496 mandeep.dh 8981
    }
8982
 
4555 mandeep.dh 8983
    public getPurchaseOrderForPurchase_args() {
4496 mandeep.dh 8984
    }
8985
 
4555 mandeep.dh 8986
    public getPurchaseOrderForPurchase_args(
8987
      long purchaseId)
4496 mandeep.dh 8988
    {
8989
      this();
8990
      this.purchaseId = purchaseId;
8991
      setPurchaseIdIsSet(true);
8992
    }
8993
 
8994
    /**
8995
     * Performs a deep copy on <i>other</i>.
8996
     */
4555 mandeep.dh 8997
    public getPurchaseOrderForPurchase_args(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 8998
      __isset_bit_vector.clear();
8999
      __isset_bit_vector.or(other.__isset_bit_vector);
9000
      this.purchaseId = other.purchaseId;
9001
    }
9002
 
4555 mandeep.dh 9003
    public getPurchaseOrderForPurchase_args deepCopy() {
9004
      return new getPurchaseOrderForPurchase_args(this);
4496 mandeep.dh 9005
    }
9006
 
9007
    @Override
9008
    public void clear() {
9009
      setPurchaseIdIsSet(false);
9010
      this.purchaseId = 0;
9011
    }
9012
 
9013
    public long getPurchaseId() {
9014
      return this.purchaseId;
9015
    }
9016
 
9017
    public void setPurchaseId(long purchaseId) {
9018
      this.purchaseId = purchaseId;
9019
      setPurchaseIdIsSet(true);
9020
    }
9021
 
9022
    public void unsetPurchaseId() {
9023
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
9024
    }
9025
 
9026
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
9027
    public boolean isSetPurchaseId() {
9028
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
9029
    }
9030
 
9031
    public void setPurchaseIdIsSet(boolean value) {
9032
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
9033
    }
9034
 
9035
    public void setFieldValue(_Fields field, Object value) {
9036
      switch (field) {
9037
      case PURCHASE_ID:
9038
        if (value == null) {
9039
          unsetPurchaseId();
9040
        } else {
9041
          setPurchaseId((Long)value);
9042
        }
9043
        break;
9044
 
9045
      }
9046
    }
9047
 
9048
    public Object getFieldValue(_Fields field) {
9049
      switch (field) {
9050
      case PURCHASE_ID:
9051
        return Long.valueOf(getPurchaseId());
9052
 
9053
      }
9054
      throw new IllegalStateException();
9055
    }
9056
 
9057
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9058
    public boolean isSet(_Fields field) {
9059
      if (field == null) {
9060
        throw new IllegalArgumentException();
9061
      }
9062
 
9063
      switch (field) {
9064
      case PURCHASE_ID:
9065
        return isSetPurchaseId();
9066
      }
9067
      throw new IllegalStateException();
9068
    }
9069
 
9070
    @Override
9071
    public boolean equals(Object that) {
9072
      if (that == null)
9073
        return false;
4555 mandeep.dh 9074
      if (that instanceof getPurchaseOrderForPurchase_args)
9075
        return this.equals((getPurchaseOrderForPurchase_args)that);
4496 mandeep.dh 9076
      return false;
9077
    }
9078
 
4555 mandeep.dh 9079
    public boolean equals(getPurchaseOrderForPurchase_args that) {
4496 mandeep.dh 9080
      if (that == null)
9081
        return false;
9082
 
9083
      boolean this_present_purchaseId = true;
9084
      boolean that_present_purchaseId = true;
9085
      if (this_present_purchaseId || that_present_purchaseId) {
9086
        if (!(this_present_purchaseId && that_present_purchaseId))
9087
          return false;
9088
        if (this.purchaseId != that.purchaseId)
9089
          return false;
9090
      }
9091
 
9092
      return true;
9093
    }
9094
 
9095
    @Override
9096
    public int hashCode() {
9097
      return 0;
9098
    }
9099
 
4555 mandeep.dh 9100
    public int compareTo(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 9101
      if (!getClass().equals(other.getClass())) {
9102
        return getClass().getName().compareTo(other.getClass().getName());
9103
      }
9104
 
9105
      int lastComparison = 0;
4555 mandeep.dh 9106
      getPurchaseOrderForPurchase_args typedOther = (getPurchaseOrderForPurchase_args)other;
4496 mandeep.dh 9107
 
9108
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
9109
      if (lastComparison != 0) {
9110
        return lastComparison;
9111
      }
9112
      if (isSetPurchaseId()) {
9113
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
9114
        if (lastComparison != 0) {
9115
          return lastComparison;
9116
        }
9117
      }
9118
      return 0;
9119
    }
9120
 
9121
    public _Fields fieldForId(int fieldId) {
9122
      return _Fields.findByThriftId(fieldId);
9123
    }
9124
 
9125
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9126
      org.apache.thrift.protocol.TField field;
9127
      iprot.readStructBegin();
9128
      while (true)
9129
      {
9130
        field = iprot.readFieldBegin();
9131
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9132
          break;
9133
        }
9134
        switch (field.id) {
9135
          case 1: // PURCHASE_ID
9136
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9137
              this.purchaseId = iprot.readI64();
9138
              setPurchaseIdIsSet(true);
9139
            } else { 
9140
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9141
            }
9142
            break;
9143
          default:
9144
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9145
        }
9146
        iprot.readFieldEnd();
9147
      }
9148
      iprot.readStructEnd();
9149
      validate();
9150
    }
9151
 
9152
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9153
      validate();
9154
 
9155
      oprot.writeStructBegin(STRUCT_DESC);
9156
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
9157
      oprot.writeI64(this.purchaseId);
9158
      oprot.writeFieldEnd();
9159
      oprot.writeFieldStop();
9160
      oprot.writeStructEnd();
9161
    }
9162
 
9163
    @Override
9164
    public String toString() {
4555 mandeep.dh 9165
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_args(");
4496 mandeep.dh 9166
      boolean first = true;
9167
 
9168
      sb.append("purchaseId:");
9169
      sb.append(this.purchaseId);
9170
      first = false;
9171
      sb.append(")");
9172
      return sb.toString();
9173
    }
9174
 
9175
    public void validate() throws org.apache.thrift.TException {
9176
      // check for required fields
9177
    }
9178
 
9179
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9180
      try {
9181
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9182
      } catch (org.apache.thrift.TException te) {
9183
        throw new java.io.IOException(te);
9184
      }
9185
    }
9186
 
9187
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9188
      try {
4555 mandeep.dh 9189
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9190
        __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 9191
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9192
      } catch (org.apache.thrift.TException te) {
9193
        throw new java.io.IOException(te);
9194
      }
9195
    }
9196
 
9197
  }
9198
 
4555 mandeep.dh 9199
  public static class getPurchaseOrderForPurchase_result implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_result, getPurchaseOrderForPurchase_result._Fields>, java.io.Serializable, Cloneable   {
9200
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_result");
4496 mandeep.dh 9201
 
4555 mandeep.dh 9202
    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 9203
 
4555 mandeep.dh 9204
    private PurchaseOrder success; // required
4496 mandeep.dh 9205
 
9206
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9207
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9208
      SUCCESS((short)0, "success");
9209
 
9210
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9211
 
9212
      static {
9213
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9214
          byName.put(field.getFieldName(), field);
9215
        }
9216
      }
9217
 
9218
      /**
9219
       * Find the _Fields constant that matches fieldId, or null if its not found.
9220
       */
9221
      public static _Fields findByThriftId(int fieldId) {
9222
        switch(fieldId) {
9223
          case 0: // SUCCESS
9224
            return SUCCESS;
9225
          default:
9226
            return null;
9227
        }
9228
      }
9229
 
9230
      /**
9231
       * Find the _Fields constant that matches fieldId, throwing an exception
9232
       * if it is not found.
9233
       */
9234
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9235
        _Fields fields = findByThriftId(fieldId);
9236
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9237
        return fields;
9238
      }
9239
 
9240
      /**
9241
       * Find the _Fields constant that matches name, or null if its not found.
9242
       */
9243
      public static _Fields findByName(String name) {
9244
        return byName.get(name);
9245
      }
9246
 
9247
      private final short _thriftId;
9248
      private final String _fieldName;
9249
 
9250
      _Fields(short thriftId, String fieldName) {
9251
        _thriftId = thriftId;
9252
        _fieldName = fieldName;
9253
      }
9254
 
9255
      public short getThriftFieldId() {
9256
        return _thriftId;
9257
      }
9258
 
9259
      public String getFieldName() {
9260
        return _fieldName;
9261
      }
9262
    }
9263
 
9264
    // isset id assignments
9265
 
9266
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9267
    static {
9268
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9269
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 9270
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
4496 mandeep.dh 9271
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 9272
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_result.class, metaDataMap);
4496 mandeep.dh 9273
    }
9274
 
4555 mandeep.dh 9275
    public getPurchaseOrderForPurchase_result() {
4496 mandeep.dh 9276
    }
9277
 
4555 mandeep.dh 9278
    public getPurchaseOrderForPurchase_result(
9279
      PurchaseOrder success)
4496 mandeep.dh 9280
    {
9281
      this();
9282
      this.success = success;
9283
    }
9284
 
9285
    /**
9286
     * Performs a deep copy on <i>other</i>.
9287
     */
4555 mandeep.dh 9288
    public getPurchaseOrderForPurchase_result(getPurchaseOrderForPurchase_result other) {
9289
      if (other.isSetSuccess()) {
9290
        this.success = new PurchaseOrder(other.success);
9291
      }
4496 mandeep.dh 9292
    }
9293
 
4555 mandeep.dh 9294
    public getPurchaseOrderForPurchase_result deepCopy() {
9295
      return new getPurchaseOrderForPurchase_result(this);
4496 mandeep.dh 9296
    }
9297
 
9298
    @Override
9299
    public void clear() {
4555 mandeep.dh 9300
      this.success = null;
4496 mandeep.dh 9301
    }
9302
 
4555 mandeep.dh 9303
    public PurchaseOrder getSuccess() {
4496 mandeep.dh 9304
      return this.success;
9305
    }
9306
 
4555 mandeep.dh 9307
    public void setSuccess(PurchaseOrder success) {
4496 mandeep.dh 9308
      this.success = success;
9309
    }
9310
 
9311
    public void unsetSuccess() {
4555 mandeep.dh 9312
      this.success = null;
4496 mandeep.dh 9313
    }
9314
 
9315
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9316
    public boolean isSetSuccess() {
4555 mandeep.dh 9317
      return this.success != null;
4496 mandeep.dh 9318
    }
9319
 
9320
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 9321
      if (!value) {
9322
        this.success = null;
9323
      }
4496 mandeep.dh 9324
    }
9325
 
9326
    public void setFieldValue(_Fields field, Object value) {
9327
      switch (field) {
9328
      case SUCCESS:
9329
        if (value == null) {
9330
          unsetSuccess();
9331
        } else {
4555 mandeep.dh 9332
          setSuccess((PurchaseOrder)value);
4496 mandeep.dh 9333
        }
9334
        break;
9335
 
9336
      }
9337
    }
9338
 
9339
    public Object getFieldValue(_Fields field) {
9340
      switch (field) {
9341
      case SUCCESS:
4555 mandeep.dh 9342
        return getSuccess();
4496 mandeep.dh 9343
 
9344
      }
9345
      throw new IllegalStateException();
9346
    }
9347
 
9348
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9349
    public boolean isSet(_Fields field) {
9350
      if (field == null) {
9351
        throw new IllegalArgumentException();
9352
      }
9353
 
9354
      switch (field) {
9355
      case SUCCESS:
9356
        return isSetSuccess();
9357
      }
9358
      throw new IllegalStateException();
9359
    }
9360
 
9361
    @Override
9362
    public boolean equals(Object that) {
9363
      if (that == null)
9364
        return false;
4555 mandeep.dh 9365
      if (that instanceof getPurchaseOrderForPurchase_result)
9366
        return this.equals((getPurchaseOrderForPurchase_result)that);
4496 mandeep.dh 9367
      return false;
9368
    }
9369
 
4555 mandeep.dh 9370
    public boolean equals(getPurchaseOrderForPurchase_result that) {
4496 mandeep.dh 9371
      if (that == null)
9372
        return false;
9373
 
4555 mandeep.dh 9374
      boolean this_present_success = true && this.isSetSuccess();
9375
      boolean that_present_success = true && that.isSetSuccess();
4496 mandeep.dh 9376
      if (this_present_success || that_present_success) {
9377
        if (!(this_present_success && that_present_success))
9378
          return false;
4555 mandeep.dh 9379
        if (!this.success.equals(that.success))
4496 mandeep.dh 9380
          return false;
9381
      }
9382
 
9383
      return true;
9384
    }
9385
 
9386
    @Override
9387
    public int hashCode() {
9388
      return 0;
9389
    }
9390
 
4555 mandeep.dh 9391
    public int compareTo(getPurchaseOrderForPurchase_result other) {
4496 mandeep.dh 9392
      if (!getClass().equals(other.getClass())) {
9393
        return getClass().getName().compareTo(other.getClass().getName());
9394
      }
9395
 
9396
      int lastComparison = 0;
4555 mandeep.dh 9397
      getPurchaseOrderForPurchase_result typedOther = (getPurchaseOrderForPurchase_result)other;
4496 mandeep.dh 9398
 
9399
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9400
      if (lastComparison != 0) {
9401
        return lastComparison;
9402
      }
9403
      if (isSetSuccess()) {
9404
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9405
        if (lastComparison != 0) {
9406
          return lastComparison;
9407
        }
9408
      }
9409
      return 0;
9410
    }
9411
 
9412
    public _Fields fieldForId(int fieldId) {
9413
      return _Fields.findByThriftId(fieldId);
9414
    }
9415
 
9416
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9417
      org.apache.thrift.protocol.TField field;
9418
      iprot.readStructBegin();
9419
      while (true)
9420
      {
9421
        field = iprot.readFieldBegin();
9422
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9423
          break;
9424
        }
9425
        switch (field.id) {
9426
          case 0: // SUCCESS
4555 mandeep.dh 9427
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9428
              this.success = new PurchaseOrder();
9429
              this.success.read(iprot);
4496 mandeep.dh 9430
            } else { 
9431
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9432
            }
9433
            break;
9434
          default:
9435
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9436
        }
9437
        iprot.readFieldEnd();
9438
      }
9439
      iprot.readStructEnd();
9440
      validate();
9441
    }
9442
 
9443
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9444
      oprot.writeStructBegin(STRUCT_DESC);
9445
 
9446
      if (this.isSetSuccess()) {
9447
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 9448
        this.success.write(oprot);
4496 mandeep.dh 9449
        oprot.writeFieldEnd();
9450
      }
9451
      oprot.writeFieldStop();
9452
      oprot.writeStructEnd();
9453
    }
9454
 
9455
    @Override
9456
    public String toString() {
4555 mandeep.dh 9457
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_result(");
4496 mandeep.dh 9458
      boolean first = true;
9459
 
9460
      sb.append("success:");
4555 mandeep.dh 9461
      if (this.success == null) {
9462
        sb.append("null");
9463
      } else {
9464
        sb.append(this.success);
9465
      }
4496 mandeep.dh 9466
      first = false;
9467
      sb.append(")");
9468
      return sb.toString();
9469
    }
9470
 
9471
    public void validate() throws org.apache.thrift.TException {
9472
      // check for required fields
9473
    }
9474
 
9475
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9476
      try {
9477
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9478
      } catch (org.apache.thrift.TException te) {
9479
        throw new java.io.IOException(te);
9480
      }
9481
    }
9482
 
9483
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9484
      try {
9485
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9486
      } catch (org.apache.thrift.TException te) {
9487
        throw new java.io.IOException(te);
9488
      }
9489
    }
9490
 
9491
  }
9492
 
4754 mandeep.dh 9493
  public static class getPendingPurchaseOrders_args implements org.apache.thrift.TBase<getPendingPurchaseOrders_args, getPendingPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
9494
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_args");
9495
 
9496
    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);
9497
 
9498
    private long warehouseId; // required
9499
 
9500
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9501
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9502
      WAREHOUSE_ID((short)1, "warehouseId");
9503
 
9504
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9505
 
9506
      static {
9507
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9508
          byName.put(field.getFieldName(), field);
9509
        }
9510
      }
9511
 
9512
      /**
9513
       * Find the _Fields constant that matches fieldId, or null if its not found.
9514
       */
9515
      public static _Fields findByThriftId(int fieldId) {
9516
        switch(fieldId) {
9517
          case 1: // WAREHOUSE_ID
9518
            return WAREHOUSE_ID;
9519
          default:
9520
            return null;
9521
        }
9522
      }
9523
 
9524
      /**
9525
       * Find the _Fields constant that matches fieldId, throwing an exception
9526
       * if it is not found.
9527
       */
9528
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9529
        _Fields fields = findByThriftId(fieldId);
9530
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9531
        return fields;
9532
      }
9533
 
9534
      /**
9535
       * Find the _Fields constant that matches name, or null if its not found.
9536
       */
9537
      public static _Fields findByName(String name) {
9538
        return byName.get(name);
9539
      }
9540
 
9541
      private final short _thriftId;
9542
      private final String _fieldName;
9543
 
9544
      _Fields(short thriftId, String fieldName) {
9545
        _thriftId = thriftId;
9546
        _fieldName = fieldName;
9547
      }
9548
 
9549
      public short getThriftFieldId() {
9550
        return _thriftId;
9551
      }
9552
 
9553
      public String getFieldName() {
9554
        return _fieldName;
9555
      }
9556
    }
9557
 
9558
    // isset id assignments
9559
    private static final int __WAREHOUSEID_ISSET_ID = 0;
9560
    private BitSet __isset_bit_vector = new BitSet(1);
9561
 
9562
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9563
    static {
9564
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9565
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9566
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9567
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9568
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_args.class, metaDataMap);
9569
    }
9570
 
9571
    public getPendingPurchaseOrders_args() {
9572
    }
9573
 
9574
    public getPendingPurchaseOrders_args(
9575
      long warehouseId)
9576
    {
9577
      this();
9578
      this.warehouseId = warehouseId;
9579
      setWarehouseIdIsSet(true);
9580
    }
9581
 
9582
    /**
9583
     * Performs a deep copy on <i>other</i>.
9584
     */
9585
    public getPendingPurchaseOrders_args(getPendingPurchaseOrders_args other) {
9586
      __isset_bit_vector.clear();
9587
      __isset_bit_vector.or(other.__isset_bit_vector);
9588
      this.warehouseId = other.warehouseId;
9589
    }
9590
 
9591
    public getPendingPurchaseOrders_args deepCopy() {
9592
      return new getPendingPurchaseOrders_args(this);
9593
    }
9594
 
9595
    @Override
9596
    public void clear() {
9597
      setWarehouseIdIsSet(false);
9598
      this.warehouseId = 0;
9599
    }
9600
 
9601
    public long getWarehouseId() {
9602
      return this.warehouseId;
9603
    }
9604
 
9605
    public void setWarehouseId(long warehouseId) {
9606
      this.warehouseId = warehouseId;
9607
      setWarehouseIdIsSet(true);
9608
    }
9609
 
9610
    public void unsetWarehouseId() {
9611
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
9612
    }
9613
 
9614
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
9615
    public boolean isSetWarehouseId() {
9616
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
9617
    }
9618
 
9619
    public void setWarehouseIdIsSet(boolean value) {
9620
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
9621
    }
9622
 
9623
    public void setFieldValue(_Fields field, Object value) {
9624
      switch (field) {
9625
      case WAREHOUSE_ID:
9626
        if (value == null) {
9627
          unsetWarehouseId();
9628
        } else {
9629
          setWarehouseId((Long)value);
9630
        }
9631
        break;
9632
 
9633
      }
9634
    }
9635
 
9636
    public Object getFieldValue(_Fields field) {
9637
      switch (field) {
9638
      case WAREHOUSE_ID:
9639
        return Long.valueOf(getWarehouseId());
9640
 
9641
      }
9642
      throw new IllegalStateException();
9643
    }
9644
 
9645
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9646
    public boolean isSet(_Fields field) {
9647
      if (field == null) {
9648
        throw new IllegalArgumentException();
9649
      }
9650
 
9651
      switch (field) {
9652
      case WAREHOUSE_ID:
9653
        return isSetWarehouseId();
9654
      }
9655
      throw new IllegalStateException();
9656
    }
9657
 
9658
    @Override
9659
    public boolean equals(Object that) {
9660
      if (that == null)
9661
        return false;
9662
      if (that instanceof getPendingPurchaseOrders_args)
9663
        return this.equals((getPendingPurchaseOrders_args)that);
9664
      return false;
9665
    }
9666
 
9667
    public boolean equals(getPendingPurchaseOrders_args that) {
9668
      if (that == null)
9669
        return false;
9670
 
9671
      boolean this_present_warehouseId = true;
9672
      boolean that_present_warehouseId = true;
9673
      if (this_present_warehouseId || that_present_warehouseId) {
9674
        if (!(this_present_warehouseId && that_present_warehouseId))
9675
          return false;
9676
        if (this.warehouseId != that.warehouseId)
9677
          return false;
9678
      }
9679
 
9680
      return true;
9681
    }
9682
 
9683
    @Override
9684
    public int hashCode() {
9685
      return 0;
9686
    }
9687
 
9688
    public int compareTo(getPendingPurchaseOrders_args other) {
9689
      if (!getClass().equals(other.getClass())) {
9690
        return getClass().getName().compareTo(other.getClass().getName());
9691
      }
9692
 
9693
      int lastComparison = 0;
9694
      getPendingPurchaseOrders_args typedOther = (getPendingPurchaseOrders_args)other;
9695
 
9696
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
9697
      if (lastComparison != 0) {
9698
        return lastComparison;
9699
      }
9700
      if (isSetWarehouseId()) {
9701
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
9702
        if (lastComparison != 0) {
9703
          return lastComparison;
9704
        }
9705
      }
9706
      return 0;
9707
    }
9708
 
9709
    public _Fields fieldForId(int fieldId) {
9710
      return _Fields.findByThriftId(fieldId);
9711
    }
9712
 
9713
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9714
      org.apache.thrift.protocol.TField field;
9715
      iprot.readStructBegin();
9716
      while (true)
9717
      {
9718
        field = iprot.readFieldBegin();
9719
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9720
          break;
9721
        }
9722
        switch (field.id) {
9723
          case 1: // WAREHOUSE_ID
9724
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9725
              this.warehouseId = iprot.readI64();
9726
              setWarehouseIdIsSet(true);
9727
            } else { 
9728
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9729
            }
9730
            break;
9731
          default:
9732
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9733
        }
9734
        iprot.readFieldEnd();
9735
      }
9736
      iprot.readStructEnd();
9737
      validate();
9738
    }
9739
 
9740
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9741
      validate();
9742
 
9743
      oprot.writeStructBegin(STRUCT_DESC);
9744
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
9745
      oprot.writeI64(this.warehouseId);
9746
      oprot.writeFieldEnd();
9747
      oprot.writeFieldStop();
9748
      oprot.writeStructEnd();
9749
    }
9750
 
9751
    @Override
9752
    public String toString() {
9753
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_args(");
9754
      boolean first = true;
9755
 
9756
      sb.append("warehouseId:");
9757
      sb.append(this.warehouseId);
9758
      first = false;
9759
      sb.append(")");
9760
      return sb.toString();
9761
    }
9762
 
9763
    public void validate() throws org.apache.thrift.TException {
9764
      // check for required fields
9765
    }
9766
 
9767
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9768
      try {
9769
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9770
      } catch (org.apache.thrift.TException te) {
9771
        throw new java.io.IOException(te);
9772
      }
9773
    }
9774
 
9775
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9776
      try {
9777
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9778
        __isset_bit_vector = new BitSet(1);
9779
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9780
      } catch (org.apache.thrift.TException te) {
9781
        throw new java.io.IOException(te);
9782
      }
9783
    }
9784
 
9785
  }
9786
 
9787
  public static class getPendingPurchaseOrders_result implements org.apache.thrift.TBase<getPendingPurchaseOrders_result, getPendingPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
9788
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_result");
9789
 
9790
    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);
9791
    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);
9792
 
9793
    private List<PurchaseOrder> success; // required
9794
    private PurchaseServiceException e; // required
9795
 
9796
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9797
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9798
      SUCCESS((short)0, "success"),
9799
      E((short)1, "e");
9800
 
9801
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9802
 
9803
      static {
9804
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9805
          byName.put(field.getFieldName(), field);
9806
        }
9807
      }
9808
 
9809
      /**
9810
       * Find the _Fields constant that matches fieldId, or null if its not found.
9811
       */
9812
      public static _Fields findByThriftId(int fieldId) {
9813
        switch(fieldId) {
9814
          case 0: // SUCCESS
9815
            return SUCCESS;
9816
          case 1: // E
9817
            return E;
9818
          default:
9819
            return null;
9820
        }
9821
      }
9822
 
9823
      /**
9824
       * Find the _Fields constant that matches fieldId, throwing an exception
9825
       * if it is not found.
9826
       */
9827
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9828
        _Fields fields = findByThriftId(fieldId);
9829
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9830
        return fields;
9831
      }
9832
 
9833
      /**
9834
       * Find the _Fields constant that matches name, or null if its not found.
9835
       */
9836
      public static _Fields findByName(String name) {
9837
        return byName.get(name);
9838
      }
9839
 
9840
      private final short _thriftId;
9841
      private final String _fieldName;
9842
 
9843
      _Fields(short thriftId, String fieldName) {
9844
        _thriftId = thriftId;
9845
        _fieldName = fieldName;
9846
      }
9847
 
9848
      public short getThriftFieldId() {
9849
        return _thriftId;
9850
      }
9851
 
9852
      public String getFieldName() {
9853
        return _fieldName;
9854
      }
9855
    }
9856
 
9857
    // isset id assignments
9858
 
9859
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9860
    static {
9861
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9862
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9863
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
9864
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
9865
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9866
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9867
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9868
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_result.class, metaDataMap);
9869
    }
9870
 
9871
    public getPendingPurchaseOrders_result() {
9872
    }
9873
 
9874
    public getPendingPurchaseOrders_result(
9875
      List<PurchaseOrder> success,
9876
      PurchaseServiceException e)
9877
    {
9878
      this();
9879
      this.success = success;
9880
      this.e = e;
9881
    }
9882
 
9883
    /**
9884
     * Performs a deep copy on <i>other</i>.
9885
     */
9886
    public getPendingPurchaseOrders_result(getPendingPurchaseOrders_result other) {
9887
      if (other.isSetSuccess()) {
9888
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
9889
        for (PurchaseOrder other_element : other.success) {
9890
          __this__success.add(new PurchaseOrder(other_element));
9891
        }
9892
        this.success = __this__success;
9893
      }
9894
      if (other.isSetE()) {
9895
        this.e = new PurchaseServiceException(other.e);
9896
      }
9897
    }
9898
 
9899
    public getPendingPurchaseOrders_result deepCopy() {
9900
      return new getPendingPurchaseOrders_result(this);
9901
    }
9902
 
9903
    @Override
9904
    public void clear() {
9905
      this.success = null;
9906
      this.e = null;
9907
    }
9908
 
9909
    public int getSuccessSize() {
9910
      return (this.success == null) ? 0 : this.success.size();
9911
    }
9912
 
9913
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
9914
      return (this.success == null) ? null : this.success.iterator();
9915
    }
9916
 
9917
    public void addToSuccess(PurchaseOrder elem) {
9918
      if (this.success == null) {
9919
        this.success = new ArrayList<PurchaseOrder>();
9920
      }
9921
      this.success.add(elem);
9922
    }
9923
 
9924
    public List<PurchaseOrder> getSuccess() {
9925
      return this.success;
9926
    }
9927
 
9928
    public void setSuccess(List<PurchaseOrder> success) {
9929
      this.success = success;
9930
    }
9931
 
9932
    public void unsetSuccess() {
9933
      this.success = null;
9934
    }
9935
 
9936
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9937
    public boolean isSetSuccess() {
9938
      return this.success != null;
9939
    }
9940
 
9941
    public void setSuccessIsSet(boolean value) {
9942
      if (!value) {
9943
        this.success = null;
9944
      }
9945
    }
9946
 
9947
    public PurchaseServiceException getE() {
9948
      return this.e;
9949
    }
9950
 
9951
    public void setE(PurchaseServiceException e) {
9952
      this.e = e;
9953
    }
9954
 
9955
    public void unsetE() {
9956
      this.e = null;
9957
    }
9958
 
9959
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
9960
    public boolean isSetE() {
9961
      return this.e != null;
9962
    }
9963
 
9964
    public void setEIsSet(boolean value) {
9965
      if (!value) {
9966
        this.e = null;
9967
      }
9968
    }
9969
 
9970
    public void setFieldValue(_Fields field, Object value) {
9971
      switch (field) {
9972
      case SUCCESS:
9973
        if (value == null) {
9974
          unsetSuccess();
9975
        } else {
9976
          setSuccess((List<PurchaseOrder>)value);
9977
        }
9978
        break;
9979
 
9980
      case E:
9981
        if (value == null) {
9982
          unsetE();
9983
        } else {
9984
          setE((PurchaseServiceException)value);
9985
        }
9986
        break;
9987
 
9988
      }
9989
    }
9990
 
9991
    public Object getFieldValue(_Fields field) {
9992
      switch (field) {
9993
      case SUCCESS:
9994
        return getSuccess();
9995
 
9996
      case E:
9997
        return getE();
9998
 
9999
      }
10000
      throw new IllegalStateException();
10001
    }
10002
 
10003
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10004
    public boolean isSet(_Fields field) {
10005
      if (field == null) {
10006
        throw new IllegalArgumentException();
10007
      }
10008
 
10009
      switch (field) {
10010
      case SUCCESS:
10011
        return isSetSuccess();
10012
      case E:
10013
        return isSetE();
10014
      }
10015
      throw new IllegalStateException();
10016
    }
10017
 
10018
    @Override
10019
    public boolean equals(Object that) {
10020
      if (that == null)
10021
        return false;
10022
      if (that instanceof getPendingPurchaseOrders_result)
10023
        return this.equals((getPendingPurchaseOrders_result)that);
10024
      return false;
10025
    }
10026
 
10027
    public boolean equals(getPendingPurchaseOrders_result that) {
10028
      if (that == null)
10029
        return false;
10030
 
10031
      boolean this_present_success = true && this.isSetSuccess();
10032
      boolean that_present_success = true && that.isSetSuccess();
10033
      if (this_present_success || that_present_success) {
10034
        if (!(this_present_success && that_present_success))
10035
          return false;
10036
        if (!this.success.equals(that.success))
10037
          return false;
10038
      }
10039
 
10040
      boolean this_present_e = true && this.isSetE();
10041
      boolean that_present_e = true && that.isSetE();
10042
      if (this_present_e || that_present_e) {
10043
        if (!(this_present_e && that_present_e))
10044
          return false;
10045
        if (!this.e.equals(that.e))
10046
          return false;
10047
      }
10048
 
10049
      return true;
10050
    }
10051
 
10052
    @Override
10053
    public int hashCode() {
10054
      return 0;
10055
    }
10056
 
10057
    public int compareTo(getPendingPurchaseOrders_result other) {
10058
      if (!getClass().equals(other.getClass())) {
10059
        return getClass().getName().compareTo(other.getClass().getName());
10060
      }
10061
 
10062
      int lastComparison = 0;
10063
      getPendingPurchaseOrders_result typedOther = (getPendingPurchaseOrders_result)other;
10064
 
10065
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
10066
      if (lastComparison != 0) {
10067
        return lastComparison;
10068
      }
10069
      if (isSetSuccess()) {
10070
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
10071
        if (lastComparison != 0) {
10072
          return lastComparison;
10073
        }
10074
      }
10075
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
10076
      if (lastComparison != 0) {
10077
        return lastComparison;
10078
      }
10079
      if (isSetE()) {
10080
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
10081
        if (lastComparison != 0) {
10082
          return lastComparison;
10083
        }
10084
      }
10085
      return 0;
10086
    }
10087
 
10088
    public _Fields fieldForId(int fieldId) {
10089
      return _Fields.findByThriftId(fieldId);
10090
    }
10091
 
10092
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10093
      org.apache.thrift.protocol.TField field;
10094
      iprot.readStructBegin();
10095
      while (true)
10096
      {
10097
        field = iprot.readFieldBegin();
10098
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10099
          break;
10100
        }
10101
        switch (field.id) {
10102
          case 0: // SUCCESS
10103
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
10104
              {
6385 amar.kumar 10105
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
10106
                this.success = new ArrayList<PurchaseOrder>(_list16.size);
10107
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
4754 mandeep.dh 10108
                {
6385 amar.kumar 10109
                  PurchaseOrder _elem18; // required
10110
                  _elem18 = new PurchaseOrder();
10111
                  _elem18.read(iprot);
10112
                  this.success.add(_elem18);
4754 mandeep.dh 10113
                }
10114
                iprot.readListEnd();
10115
              }
10116
            } else { 
10117
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10118
            }
10119
            break;
10120
          case 1: // E
10121
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10122
              this.e = new PurchaseServiceException();
10123
              this.e.read(iprot);
10124
            } else { 
10125
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10126
            }
10127
            break;
10128
          default:
10129
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10130
        }
10131
        iprot.readFieldEnd();
10132
      }
10133
      iprot.readStructEnd();
10134
      validate();
10135
    }
10136
 
10137
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10138
      oprot.writeStructBegin(STRUCT_DESC);
10139
 
10140
      if (this.isSetSuccess()) {
10141
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10142
        {
10143
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 10144
          for (PurchaseOrder _iter19 : this.success)
4754 mandeep.dh 10145
          {
6385 amar.kumar 10146
            _iter19.write(oprot);
4754 mandeep.dh 10147
          }
10148
          oprot.writeListEnd();
10149
        }
10150
        oprot.writeFieldEnd();
10151
      } else if (this.isSetE()) {
10152
        oprot.writeFieldBegin(E_FIELD_DESC);
10153
        this.e.write(oprot);
10154
        oprot.writeFieldEnd();
10155
      }
10156
      oprot.writeFieldStop();
10157
      oprot.writeStructEnd();
10158
    }
10159
 
10160
    @Override
10161
    public String toString() {
10162
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_result(");
10163
      boolean first = true;
10164
 
10165
      sb.append("success:");
10166
      if (this.success == null) {
10167
        sb.append("null");
10168
      } else {
10169
        sb.append(this.success);
10170
      }
10171
      first = false;
10172
      if (!first) sb.append(", ");
10173
      sb.append("e:");
10174
      if (this.e == null) {
10175
        sb.append("null");
10176
      } else {
10177
        sb.append(this.e);
10178
      }
10179
      first = false;
10180
      sb.append(")");
10181
      return sb.toString();
10182
    }
10183
 
10184
    public void validate() throws org.apache.thrift.TException {
10185
      // check for required fields
10186
    }
10187
 
10188
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10189
      try {
10190
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10191
      } catch (org.apache.thrift.TException te) {
10192
        throw new java.io.IOException(te);
10193
      }
10194
    }
10195
 
10196
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10197
      try {
10198
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10199
      } catch (org.apache.thrift.TException te) {
10200
        throw new java.io.IOException(te);
10201
      }
10202
    }
10203
 
10204
  }
10205
 
10206
  public static class getSuppliers_args implements org.apache.thrift.TBase<getSuppliers_args, getSuppliers_args._Fields>, java.io.Serializable, Cloneable   {
10207
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_args");
10208
 
10209
 
10210
 
10211
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10212
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10213
;
10214
 
10215
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10216
 
10217
      static {
10218
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10219
          byName.put(field.getFieldName(), field);
10220
        }
10221
      }
10222
 
10223
      /**
10224
       * Find the _Fields constant that matches fieldId, or null if its not found.
10225
       */
10226
      public static _Fields findByThriftId(int fieldId) {
10227
        switch(fieldId) {
10228
          default:
10229
            return null;
10230
        }
10231
      }
10232
 
10233
      /**
10234
       * Find the _Fields constant that matches fieldId, throwing an exception
10235
       * if it is not found.
10236
       */
10237
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10238
        _Fields fields = findByThriftId(fieldId);
10239
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10240
        return fields;
10241
      }
10242
 
10243
      /**
10244
       * Find the _Fields constant that matches name, or null if its not found.
10245
       */
10246
      public static _Fields findByName(String name) {
10247
        return byName.get(name);
10248
      }
10249
 
10250
      private final short _thriftId;
10251
      private final String _fieldName;
10252
 
10253
      _Fields(short thriftId, String fieldName) {
10254
        _thriftId = thriftId;
10255
        _fieldName = fieldName;
10256
      }
10257
 
10258
      public short getThriftFieldId() {
10259
        return _thriftId;
10260
      }
10261
 
10262
      public String getFieldName() {
10263
        return _fieldName;
10264
      }
10265
    }
10266
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10267
    static {
10268
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10269
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10270
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_args.class, metaDataMap);
10271
    }
10272
 
10273
    public getSuppliers_args() {
10274
    }
10275
 
10276
    /**
10277
     * Performs a deep copy on <i>other</i>.
10278
     */
10279
    public getSuppliers_args(getSuppliers_args other) {
10280
    }
10281
 
10282
    public getSuppliers_args deepCopy() {
10283
      return new getSuppliers_args(this);
10284
    }
10285
 
10286
    @Override
10287
    public void clear() {
10288
    }
10289
 
10290
    public void setFieldValue(_Fields field, Object value) {
10291
      switch (field) {
10292
      }
10293
    }
10294
 
10295
    public Object getFieldValue(_Fields field) {
10296
      switch (field) {
10297
      }
10298
      throw new IllegalStateException();
10299
    }
10300
 
10301
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10302
    public boolean isSet(_Fields field) {
10303
      if (field == null) {
10304
        throw new IllegalArgumentException();
10305
      }
10306
 
10307
      switch (field) {
10308
      }
10309
      throw new IllegalStateException();
10310
    }
10311
 
10312
    @Override
10313
    public boolean equals(Object that) {
10314
      if (that == null)
10315
        return false;
10316
      if (that instanceof getSuppliers_args)
10317
        return this.equals((getSuppliers_args)that);
10318
      return false;
10319
    }
10320
 
10321
    public boolean equals(getSuppliers_args that) {
10322
      if (that == null)
10323
        return false;
10324
 
10325
      return true;
10326
    }
10327
 
10328
    @Override
10329
    public int hashCode() {
10330
      return 0;
10331
    }
10332
 
10333
    public int compareTo(getSuppliers_args other) {
10334
      if (!getClass().equals(other.getClass())) {
10335
        return getClass().getName().compareTo(other.getClass().getName());
10336
      }
10337
 
10338
      int lastComparison = 0;
10339
      getSuppliers_args typedOther = (getSuppliers_args)other;
10340
 
10341
      return 0;
10342
    }
10343
 
10344
    public _Fields fieldForId(int fieldId) {
10345
      return _Fields.findByThriftId(fieldId);
10346
    }
10347
 
10348
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10349
      org.apache.thrift.protocol.TField field;
10350
      iprot.readStructBegin();
10351
      while (true)
10352
      {
10353
        field = iprot.readFieldBegin();
10354
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10355
          break;
10356
        }
10357
        switch (field.id) {
10358
          default:
10359
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10360
        }
10361
        iprot.readFieldEnd();
10362
      }
10363
      iprot.readStructEnd();
10364
      validate();
10365
    }
10366
 
10367
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10368
      validate();
10369
 
10370
      oprot.writeStructBegin(STRUCT_DESC);
10371
      oprot.writeFieldStop();
10372
      oprot.writeStructEnd();
10373
    }
10374
 
10375
    @Override
10376
    public String toString() {
10377
      StringBuilder sb = new StringBuilder("getSuppliers_args(");
10378
      boolean first = true;
10379
 
10380
      sb.append(")");
10381
      return sb.toString();
10382
    }
10383
 
10384
    public void validate() throws org.apache.thrift.TException {
10385
      // check for required fields
10386
    }
10387
 
10388
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10389
      try {
10390
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10391
      } catch (org.apache.thrift.TException te) {
10392
        throw new java.io.IOException(te);
10393
      }
10394
    }
10395
 
10396
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10397
      try {
10398
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10399
      } catch (org.apache.thrift.TException te) {
10400
        throw new java.io.IOException(te);
10401
      }
10402
    }
10403
 
10404
  }
10405
 
10406
  public static class getSuppliers_result implements org.apache.thrift.TBase<getSuppliers_result, getSuppliers_result._Fields>, java.io.Serializable, Cloneable   {
10407
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_result");
10408
 
10409
    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);
10410
    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);
10411
 
10412
    private List<Supplier> success; // required
10413
    private PurchaseServiceException e; // required
10414
 
10415
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10416
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10417
      SUCCESS((short)0, "success"),
10418
      E((short)1, "e");
10419
 
10420
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10421
 
10422
      static {
10423
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10424
          byName.put(field.getFieldName(), field);
10425
        }
10426
      }
10427
 
10428
      /**
10429
       * Find the _Fields constant that matches fieldId, or null if its not found.
10430
       */
10431
      public static _Fields findByThriftId(int fieldId) {
10432
        switch(fieldId) {
10433
          case 0: // SUCCESS
10434
            return SUCCESS;
10435
          case 1: // E
10436
            return E;
10437
          default:
10438
            return null;
10439
        }
10440
      }
10441
 
10442
      /**
10443
       * Find the _Fields constant that matches fieldId, throwing an exception
10444
       * if it is not found.
10445
       */
10446
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10447
        _Fields fields = findByThriftId(fieldId);
10448
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10449
        return fields;
10450
      }
10451
 
10452
      /**
10453
       * Find the _Fields constant that matches name, or null if its not found.
10454
       */
10455
      public static _Fields findByName(String name) {
10456
        return byName.get(name);
10457
      }
10458
 
10459
      private final short _thriftId;
10460
      private final String _fieldName;
10461
 
10462
      _Fields(short thriftId, String fieldName) {
10463
        _thriftId = thriftId;
10464
        _fieldName = fieldName;
10465
      }
10466
 
10467
      public short getThriftFieldId() {
10468
        return _thriftId;
10469
      }
10470
 
10471
      public String getFieldName() {
10472
        return _fieldName;
10473
      }
10474
    }
10475
 
10476
    // isset id assignments
10477
 
10478
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10479
    static {
10480
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10481
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10482
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
10483
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class))));
10484
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10485
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
10486
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10487
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_result.class, metaDataMap);
10488
    }
10489
 
10490
    public getSuppliers_result() {
10491
    }
10492
 
10493
    public getSuppliers_result(
10494
      List<Supplier> success,
10495
      PurchaseServiceException e)
10496
    {
10497
      this();
10498
      this.success = success;
10499
      this.e = e;
10500
    }
10501
 
10502
    /**
10503
     * Performs a deep copy on <i>other</i>.
10504
     */
10505
    public getSuppliers_result(getSuppliers_result other) {
10506
      if (other.isSetSuccess()) {
10507
        List<Supplier> __this__success = new ArrayList<Supplier>();
10508
        for (Supplier other_element : other.success) {
10509
          __this__success.add(new Supplier(other_element));
10510
        }
10511
        this.success = __this__success;
10512
      }
10513
      if (other.isSetE()) {
10514
        this.e = new PurchaseServiceException(other.e);
10515
      }
10516
    }
10517
 
10518
    public getSuppliers_result deepCopy() {
10519
      return new getSuppliers_result(this);
10520
    }
10521
 
10522
    @Override
10523
    public void clear() {
10524
      this.success = null;
10525
      this.e = null;
10526
    }
10527
 
10528
    public int getSuccessSize() {
10529
      return (this.success == null) ? 0 : this.success.size();
10530
    }
10531
 
10532
    public java.util.Iterator<Supplier> getSuccessIterator() {
10533
      return (this.success == null) ? null : this.success.iterator();
10534
    }
10535
 
10536
    public void addToSuccess(Supplier elem) {
10537
      if (this.success == null) {
10538
        this.success = new ArrayList<Supplier>();
10539
      }
10540
      this.success.add(elem);
10541
    }
10542
 
10543
    public List<Supplier> getSuccess() {
10544
      return this.success;
10545
    }
10546
 
10547
    public void setSuccess(List<Supplier> success) {
10548
      this.success = success;
10549
    }
10550
 
10551
    public void unsetSuccess() {
10552
      this.success = null;
10553
    }
10554
 
10555
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
10556
    public boolean isSetSuccess() {
10557
      return this.success != null;
10558
    }
10559
 
10560
    public void setSuccessIsSet(boolean value) {
10561
      if (!value) {
10562
        this.success = null;
10563
      }
10564
    }
10565
 
10566
    public PurchaseServiceException getE() {
10567
      return this.e;
10568
    }
10569
 
10570
    public void setE(PurchaseServiceException e) {
10571
      this.e = e;
10572
    }
10573
 
10574
    public void unsetE() {
10575
      this.e = null;
10576
    }
10577
 
10578
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
10579
    public boolean isSetE() {
10580
      return this.e != null;
10581
    }
10582
 
10583
    public void setEIsSet(boolean value) {
10584
      if (!value) {
10585
        this.e = null;
10586
      }
10587
    }
10588
 
10589
    public void setFieldValue(_Fields field, Object value) {
10590
      switch (field) {
10591
      case SUCCESS:
10592
        if (value == null) {
10593
          unsetSuccess();
10594
        } else {
10595
          setSuccess((List<Supplier>)value);
10596
        }
10597
        break;
10598
 
10599
      case E:
10600
        if (value == null) {
10601
          unsetE();
10602
        } else {
10603
          setE((PurchaseServiceException)value);
10604
        }
10605
        break;
10606
 
10607
      }
10608
    }
10609
 
10610
    public Object getFieldValue(_Fields field) {
10611
      switch (field) {
10612
      case SUCCESS:
10613
        return getSuccess();
10614
 
10615
      case E:
10616
        return getE();
10617
 
10618
      }
10619
      throw new IllegalStateException();
10620
    }
10621
 
10622
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10623
    public boolean isSet(_Fields field) {
10624
      if (field == null) {
10625
        throw new IllegalArgumentException();
10626
      }
10627
 
10628
      switch (field) {
10629
      case SUCCESS:
10630
        return isSetSuccess();
10631
      case E:
10632
        return isSetE();
10633
      }
10634
      throw new IllegalStateException();
10635
    }
10636
 
10637
    @Override
10638
    public boolean equals(Object that) {
10639
      if (that == null)
10640
        return false;
10641
      if (that instanceof getSuppliers_result)
10642
        return this.equals((getSuppliers_result)that);
10643
      return false;
10644
    }
10645
 
10646
    public boolean equals(getSuppliers_result that) {
10647
      if (that == null)
10648
        return false;
10649
 
10650
      boolean this_present_success = true && this.isSetSuccess();
10651
      boolean that_present_success = true && that.isSetSuccess();
10652
      if (this_present_success || that_present_success) {
10653
        if (!(this_present_success && that_present_success))
10654
          return false;
10655
        if (!this.success.equals(that.success))
10656
          return false;
10657
      }
10658
 
10659
      boolean this_present_e = true && this.isSetE();
10660
      boolean that_present_e = true && that.isSetE();
10661
      if (this_present_e || that_present_e) {
10662
        if (!(this_present_e && that_present_e))
10663
          return false;
10664
        if (!this.e.equals(that.e))
10665
          return false;
10666
      }
10667
 
10668
      return true;
10669
    }
10670
 
10671
    @Override
10672
    public int hashCode() {
10673
      return 0;
10674
    }
10675
 
10676
    public int compareTo(getSuppliers_result other) {
10677
      if (!getClass().equals(other.getClass())) {
10678
        return getClass().getName().compareTo(other.getClass().getName());
10679
      }
10680
 
10681
      int lastComparison = 0;
10682
      getSuppliers_result typedOther = (getSuppliers_result)other;
10683
 
10684
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
10685
      if (lastComparison != 0) {
10686
        return lastComparison;
10687
      }
10688
      if (isSetSuccess()) {
10689
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
10690
        if (lastComparison != 0) {
10691
          return lastComparison;
10692
        }
10693
      }
10694
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
10695
      if (lastComparison != 0) {
10696
        return lastComparison;
10697
      }
10698
      if (isSetE()) {
10699
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
10700
        if (lastComparison != 0) {
10701
          return lastComparison;
10702
        }
10703
      }
10704
      return 0;
10705
    }
10706
 
10707
    public _Fields fieldForId(int fieldId) {
10708
      return _Fields.findByThriftId(fieldId);
10709
    }
10710
 
10711
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10712
      org.apache.thrift.protocol.TField field;
10713
      iprot.readStructBegin();
10714
      while (true)
10715
      {
10716
        field = iprot.readFieldBegin();
10717
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10718
          break;
10719
        }
10720
        switch (field.id) {
10721
          case 0: // SUCCESS
10722
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
10723
              {
6385 amar.kumar 10724
                org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
10725
                this.success = new ArrayList<Supplier>(_list20.size);
10726
                for (int _i21 = 0; _i21 < _list20.size; ++_i21)
4754 mandeep.dh 10727
                {
6385 amar.kumar 10728
                  Supplier _elem22; // required
10729
                  _elem22 = new Supplier();
10730
                  _elem22.read(iprot);
10731
                  this.success.add(_elem22);
4754 mandeep.dh 10732
                }
10733
                iprot.readListEnd();
10734
              }
10735
            } else { 
10736
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10737
            }
10738
            break;
10739
          case 1: // E
10740
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10741
              this.e = new PurchaseServiceException();
10742
              this.e.read(iprot);
10743
            } else { 
10744
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10745
            }
10746
            break;
10747
          default:
10748
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10749
        }
10750
        iprot.readFieldEnd();
10751
      }
10752
      iprot.readStructEnd();
10753
      validate();
10754
    }
10755
 
10756
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10757
      oprot.writeStructBegin(STRUCT_DESC);
10758
 
10759
      if (this.isSetSuccess()) {
10760
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10761
        {
10762
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 10763
          for (Supplier _iter23 : this.success)
4754 mandeep.dh 10764
          {
6385 amar.kumar 10765
            _iter23.write(oprot);
4754 mandeep.dh 10766
          }
10767
          oprot.writeListEnd();
10768
        }
10769
        oprot.writeFieldEnd();
10770
      } else if (this.isSetE()) {
10771
        oprot.writeFieldBegin(E_FIELD_DESC);
10772
        this.e.write(oprot);
10773
        oprot.writeFieldEnd();
10774
      }
10775
      oprot.writeFieldStop();
10776
      oprot.writeStructEnd();
10777
    }
10778
 
10779
    @Override
10780
    public String toString() {
10781
      StringBuilder sb = new StringBuilder("getSuppliers_result(");
10782
      boolean first = true;
10783
 
10784
      sb.append("success:");
10785
      if (this.success == null) {
10786
        sb.append("null");
10787
      } else {
10788
        sb.append(this.success);
10789
      }
10790
      first = false;
10791
      if (!first) sb.append(", ");
10792
      sb.append("e:");
10793
      if (this.e == null) {
10794
        sb.append("null");
10795
      } else {
10796
        sb.append(this.e);
10797
      }
10798
      first = false;
10799
      sb.append(")");
10800
      return sb.toString();
10801
    }
10802
 
10803
    public void validate() throws org.apache.thrift.TException {
10804
      // check for required fields
10805
    }
10806
 
10807
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10808
      try {
10809
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10810
      } catch (org.apache.thrift.TException te) {
10811
        throw new java.io.IOException(te);
10812
      }
10813
    }
10814
 
10815
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10816
      try {
10817
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10818
      } catch (org.apache.thrift.TException te) {
10819
        throw new java.io.IOException(te);
10820
      }
10821
    }
10822
 
10823
  }
10824
 
21847 amit.gupta 10825
  public static class getAllSuppliers_args implements org.apache.thrift.TBase<getAllSuppliers_args, getAllSuppliers_args._Fields>, java.io.Serializable, Cloneable   {
10826
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllSuppliers_args");
10827
 
10828
 
10829
 
10830
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10831
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10832
;
10833
 
10834
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10835
 
10836
      static {
10837
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10838
          byName.put(field.getFieldName(), field);
10839
        }
10840
      }
10841
 
10842
      /**
10843
       * Find the _Fields constant that matches fieldId, or null if its not found.
10844
       */
10845
      public static _Fields findByThriftId(int fieldId) {
10846
        switch(fieldId) {
10847
          default:
10848
            return null;
10849
        }
10850
      }
10851
 
10852
      /**
10853
       * Find the _Fields constant that matches fieldId, throwing an exception
10854
       * if it is not found.
10855
       */
10856
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10857
        _Fields fields = findByThriftId(fieldId);
10858
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10859
        return fields;
10860
      }
10861
 
10862
      /**
10863
       * Find the _Fields constant that matches name, or null if its not found.
10864
       */
10865
      public static _Fields findByName(String name) {
10866
        return byName.get(name);
10867
      }
10868
 
10869
      private final short _thriftId;
10870
      private final String _fieldName;
10871
 
10872
      _Fields(short thriftId, String fieldName) {
10873
        _thriftId = thriftId;
10874
        _fieldName = fieldName;
10875
      }
10876
 
10877
      public short getThriftFieldId() {
10878
        return _thriftId;
10879
      }
10880
 
10881
      public String getFieldName() {
10882
        return _fieldName;
10883
      }
10884
    }
10885
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10886
    static {
10887
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10888
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10889
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllSuppliers_args.class, metaDataMap);
10890
    }
10891
 
10892
    public getAllSuppliers_args() {
10893
    }
10894
 
10895
    /**
10896
     * Performs a deep copy on <i>other</i>.
10897
     */
10898
    public getAllSuppliers_args(getAllSuppliers_args other) {
10899
    }
10900
 
10901
    public getAllSuppliers_args deepCopy() {
10902
      return new getAllSuppliers_args(this);
10903
    }
10904
 
10905
    @Override
10906
    public void clear() {
10907
    }
10908
 
10909
    public void setFieldValue(_Fields field, Object value) {
10910
      switch (field) {
10911
      }
10912
    }
10913
 
10914
    public Object getFieldValue(_Fields field) {
10915
      switch (field) {
10916
      }
10917
      throw new IllegalStateException();
10918
    }
10919
 
10920
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10921
    public boolean isSet(_Fields field) {
10922
      if (field == null) {
10923
        throw new IllegalArgumentException();
10924
      }
10925
 
10926
      switch (field) {
10927
      }
10928
      throw new IllegalStateException();
10929
    }
10930
 
10931
    @Override
10932
    public boolean equals(Object that) {
10933
      if (that == null)
10934
        return false;
10935
      if (that instanceof getAllSuppliers_args)
10936
        return this.equals((getAllSuppliers_args)that);
10937
      return false;
10938
    }
10939
 
10940
    public boolean equals(getAllSuppliers_args that) {
10941
      if (that == null)
10942
        return false;
10943
 
10944
      return true;
10945
    }
10946
 
10947
    @Override
10948
    public int hashCode() {
10949
      return 0;
10950
    }
10951
 
10952
    public int compareTo(getAllSuppliers_args other) {
10953
      if (!getClass().equals(other.getClass())) {
10954
        return getClass().getName().compareTo(other.getClass().getName());
10955
      }
10956
 
10957
      int lastComparison = 0;
10958
      getAllSuppliers_args typedOther = (getAllSuppliers_args)other;
10959
 
10960
      return 0;
10961
    }
10962
 
10963
    public _Fields fieldForId(int fieldId) {
10964
      return _Fields.findByThriftId(fieldId);
10965
    }
10966
 
10967
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10968
      org.apache.thrift.protocol.TField field;
10969
      iprot.readStructBegin();
10970
      while (true)
10971
      {
10972
        field = iprot.readFieldBegin();
10973
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10974
          break;
10975
        }
10976
        switch (field.id) {
10977
          default:
10978
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10979
        }
10980
        iprot.readFieldEnd();
10981
      }
10982
      iprot.readStructEnd();
10983
      validate();
10984
    }
10985
 
10986
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10987
      validate();
10988
 
10989
      oprot.writeStructBegin(STRUCT_DESC);
10990
      oprot.writeFieldStop();
10991
      oprot.writeStructEnd();
10992
    }
10993
 
10994
    @Override
10995
    public String toString() {
10996
      StringBuilder sb = new StringBuilder("getAllSuppliers_args(");
10997
      boolean first = true;
10998
 
10999
      sb.append(")");
11000
      return sb.toString();
11001
    }
11002
 
11003
    public void validate() throws org.apache.thrift.TException {
11004
      // check for required fields
11005
    }
11006
 
11007
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11008
      try {
11009
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11010
      } catch (org.apache.thrift.TException te) {
11011
        throw new java.io.IOException(te);
11012
      }
11013
    }
11014
 
11015
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11016
      try {
11017
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11018
      } catch (org.apache.thrift.TException te) {
11019
        throw new java.io.IOException(te);
11020
      }
11021
    }
11022
 
11023
  }
11024
 
11025
  public static class getAllSuppliers_result implements org.apache.thrift.TBase<getAllSuppliers_result, getAllSuppliers_result._Fields>, java.io.Serializable, Cloneable   {
11026
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllSuppliers_result");
11027
 
11028
    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);
11029
    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);
11030
 
11031
    private List<Supplier> success; // required
11032
    private PurchaseServiceException e; // required
11033
 
11034
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11035
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11036
      SUCCESS((short)0, "success"),
11037
      E((short)1, "e");
11038
 
11039
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11040
 
11041
      static {
11042
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11043
          byName.put(field.getFieldName(), field);
11044
        }
11045
      }
11046
 
11047
      /**
11048
       * Find the _Fields constant that matches fieldId, or null if its not found.
11049
       */
11050
      public static _Fields findByThriftId(int fieldId) {
11051
        switch(fieldId) {
11052
          case 0: // SUCCESS
11053
            return SUCCESS;
11054
          case 1: // E
11055
            return E;
11056
          default:
11057
            return null;
11058
        }
11059
      }
11060
 
11061
      /**
11062
       * Find the _Fields constant that matches fieldId, throwing an exception
11063
       * if it is not found.
11064
       */
11065
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11066
        _Fields fields = findByThriftId(fieldId);
11067
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11068
        return fields;
11069
      }
11070
 
11071
      /**
11072
       * Find the _Fields constant that matches name, or null if its not found.
11073
       */
11074
      public static _Fields findByName(String name) {
11075
        return byName.get(name);
11076
      }
11077
 
11078
      private final short _thriftId;
11079
      private final String _fieldName;
11080
 
11081
      _Fields(short thriftId, String fieldName) {
11082
        _thriftId = thriftId;
11083
        _fieldName = fieldName;
11084
      }
11085
 
11086
      public short getThriftFieldId() {
11087
        return _thriftId;
11088
      }
11089
 
11090
      public String getFieldName() {
11091
        return _fieldName;
11092
      }
11093
    }
11094
 
11095
    // isset id assignments
11096
 
11097
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11098
    static {
11099
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11100
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11101
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
11102
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class))));
11103
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11104
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11105
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11106
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllSuppliers_result.class, metaDataMap);
11107
    }
11108
 
11109
    public getAllSuppliers_result() {
11110
    }
11111
 
11112
    public getAllSuppliers_result(
11113
      List<Supplier> success,
11114
      PurchaseServiceException e)
11115
    {
11116
      this();
11117
      this.success = success;
11118
      this.e = e;
11119
    }
11120
 
11121
    /**
11122
     * Performs a deep copy on <i>other</i>.
11123
     */
11124
    public getAllSuppliers_result(getAllSuppliers_result other) {
11125
      if (other.isSetSuccess()) {
11126
        List<Supplier> __this__success = new ArrayList<Supplier>();
11127
        for (Supplier other_element : other.success) {
11128
          __this__success.add(new Supplier(other_element));
11129
        }
11130
        this.success = __this__success;
11131
      }
11132
      if (other.isSetE()) {
11133
        this.e = new PurchaseServiceException(other.e);
11134
      }
11135
    }
11136
 
11137
    public getAllSuppliers_result deepCopy() {
11138
      return new getAllSuppliers_result(this);
11139
    }
11140
 
11141
    @Override
11142
    public void clear() {
11143
      this.success = null;
11144
      this.e = null;
11145
    }
11146
 
11147
    public int getSuccessSize() {
11148
      return (this.success == null) ? 0 : this.success.size();
11149
    }
11150
 
11151
    public java.util.Iterator<Supplier> getSuccessIterator() {
11152
      return (this.success == null) ? null : this.success.iterator();
11153
    }
11154
 
11155
    public void addToSuccess(Supplier elem) {
11156
      if (this.success == null) {
11157
        this.success = new ArrayList<Supplier>();
11158
      }
11159
      this.success.add(elem);
11160
    }
11161
 
11162
    public List<Supplier> getSuccess() {
11163
      return this.success;
11164
    }
11165
 
11166
    public void setSuccess(List<Supplier> success) {
11167
      this.success = success;
11168
    }
11169
 
11170
    public void unsetSuccess() {
11171
      this.success = null;
11172
    }
11173
 
11174
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
11175
    public boolean isSetSuccess() {
11176
      return this.success != null;
11177
    }
11178
 
11179
    public void setSuccessIsSet(boolean value) {
11180
      if (!value) {
11181
        this.success = null;
11182
      }
11183
    }
11184
 
11185
    public PurchaseServiceException getE() {
11186
      return this.e;
11187
    }
11188
 
11189
    public void setE(PurchaseServiceException e) {
11190
      this.e = e;
11191
    }
11192
 
11193
    public void unsetE() {
11194
      this.e = null;
11195
    }
11196
 
11197
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
11198
    public boolean isSetE() {
11199
      return this.e != null;
11200
    }
11201
 
11202
    public void setEIsSet(boolean value) {
11203
      if (!value) {
11204
        this.e = null;
11205
      }
11206
    }
11207
 
11208
    public void setFieldValue(_Fields field, Object value) {
11209
      switch (field) {
11210
      case SUCCESS:
11211
        if (value == null) {
11212
          unsetSuccess();
11213
        } else {
11214
          setSuccess((List<Supplier>)value);
11215
        }
11216
        break;
11217
 
11218
      case E:
11219
        if (value == null) {
11220
          unsetE();
11221
        } else {
11222
          setE((PurchaseServiceException)value);
11223
        }
11224
        break;
11225
 
11226
      }
11227
    }
11228
 
11229
    public Object getFieldValue(_Fields field) {
11230
      switch (field) {
11231
      case SUCCESS:
11232
        return getSuccess();
11233
 
11234
      case E:
11235
        return getE();
11236
 
11237
      }
11238
      throw new IllegalStateException();
11239
    }
11240
 
11241
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11242
    public boolean isSet(_Fields field) {
11243
      if (field == null) {
11244
        throw new IllegalArgumentException();
11245
      }
11246
 
11247
      switch (field) {
11248
      case SUCCESS:
11249
        return isSetSuccess();
11250
      case E:
11251
        return isSetE();
11252
      }
11253
      throw new IllegalStateException();
11254
    }
11255
 
11256
    @Override
11257
    public boolean equals(Object that) {
11258
      if (that == null)
11259
        return false;
11260
      if (that instanceof getAllSuppliers_result)
11261
        return this.equals((getAllSuppliers_result)that);
11262
      return false;
11263
    }
11264
 
11265
    public boolean equals(getAllSuppliers_result that) {
11266
      if (that == null)
11267
        return false;
11268
 
11269
      boolean this_present_success = true && this.isSetSuccess();
11270
      boolean that_present_success = true && that.isSetSuccess();
11271
      if (this_present_success || that_present_success) {
11272
        if (!(this_present_success && that_present_success))
11273
          return false;
11274
        if (!this.success.equals(that.success))
11275
          return false;
11276
      }
11277
 
11278
      boolean this_present_e = true && this.isSetE();
11279
      boolean that_present_e = true && that.isSetE();
11280
      if (this_present_e || that_present_e) {
11281
        if (!(this_present_e && that_present_e))
11282
          return false;
11283
        if (!this.e.equals(that.e))
11284
          return false;
11285
      }
11286
 
11287
      return true;
11288
    }
11289
 
11290
    @Override
11291
    public int hashCode() {
11292
      return 0;
11293
    }
11294
 
11295
    public int compareTo(getAllSuppliers_result other) {
11296
      if (!getClass().equals(other.getClass())) {
11297
        return getClass().getName().compareTo(other.getClass().getName());
11298
      }
11299
 
11300
      int lastComparison = 0;
11301
      getAllSuppliers_result typedOther = (getAllSuppliers_result)other;
11302
 
11303
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
11304
      if (lastComparison != 0) {
11305
        return lastComparison;
11306
      }
11307
      if (isSetSuccess()) {
11308
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
11309
        if (lastComparison != 0) {
11310
          return lastComparison;
11311
        }
11312
      }
11313
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
11314
      if (lastComparison != 0) {
11315
        return lastComparison;
11316
      }
11317
      if (isSetE()) {
11318
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
11319
        if (lastComparison != 0) {
11320
          return lastComparison;
11321
        }
11322
      }
11323
      return 0;
11324
    }
11325
 
11326
    public _Fields fieldForId(int fieldId) {
11327
      return _Fields.findByThriftId(fieldId);
11328
    }
11329
 
11330
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11331
      org.apache.thrift.protocol.TField field;
11332
      iprot.readStructBegin();
11333
      while (true)
11334
      {
11335
        field = iprot.readFieldBegin();
11336
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11337
          break;
11338
        }
11339
        switch (field.id) {
11340
          case 0: // SUCCESS
11341
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
11342
              {
11343
                org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
11344
                this.success = new ArrayList<Supplier>(_list24.size);
11345
                for (int _i25 = 0; _i25 < _list24.size; ++_i25)
11346
                {
11347
                  Supplier _elem26; // required
11348
                  _elem26 = new Supplier();
11349
                  _elem26.read(iprot);
11350
                  this.success.add(_elem26);
11351
                }
11352
                iprot.readListEnd();
11353
              }
11354
            } else { 
11355
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11356
            }
11357
            break;
11358
          case 1: // E
11359
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11360
              this.e = new PurchaseServiceException();
11361
              this.e.read(iprot);
11362
            } else { 
11363
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11364
            }
11365
            break;
11366
          default:
11367
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11368
        }
11369
        iprot.readFieldEnd();
11370
      }
11371
      iprot.readStructEnd();
11372
      validate();
11373
    }
11374
 
11375
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11376
      oprot.writeStructBegin(STRUCT_DESC);
11377
 
11378
      if (this.isSetSuccess()) {
11379
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11380
        {
11381
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
11382
          for (Supplier _iter27 : this.success)
11383
          {
11384
            _iter27.write(oprot);
11385
          }
11386
          oprot.writeListEnd();
11387
        }
11388
        oprot.writeFieldEnd();
11389
      } else if (this.isSetE()) {
11390
        oprot.writeFieldBegin(E_FIELD_DESC);
11391
        this.e.write(oprot);
11392
        oprot.writeFieldEnd();
11393
      }
11394
      oprot.writeFieldStop();
11395
      oprot.writeStructEnd();
11396
    }
11397
 
11398
    @Override
11399
    public String toString() {
11400
      StringBuilder sb = new StringBuilder("getAllSuppliers_result(");
11401
      boolean first = true;
11402
 
11403
      sb.append("success:");
11404
      if (this.success == null) {
11405
        sb.append("null");
11406
      } else {
11407
        sb.append(this.success);
11408
      }
11409
      first = false;
11410
      if (!first) sb.append(", ");
11411
      sb.append("e:");
11412
      if (this.e == null) {
11413
        sb.append("null");
11414
      } else {
11415
        sb.append(this.e);
11416
      }
11417
      first = false;
11418
      sb.append(")");
11419
      return sb.toString();
11420
    }
11421
 
11422
    public void validate() throws org.apache.thrift.TException {
11423
      // check for required fields
11424
    }
11425
 
11426
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11427
      try {
11428
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11429
      } catch (org.apache.thrift.TException te) {
11430
        throw new java.io.IOException(te);
11431
      }
11432
    }
11433
 
11434
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11435
      try {
11436
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11437
      } catch (org.apache.thrift.TException te) {
11438
        throw new java.io.IOException(te);
11439
      }
11440
    }
11441
 
11442
  }
11443
 
4754 mandeep.dh 11444
  public static class fulfillPO_args implements org.apache.thrift.TBase<fulfillPO_args, fulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
11445
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_args");
11446
 
11447
    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);
11448
    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);
11449
    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);
11450
 
11451
    private long purchaseOrderId; // required
11452
    private long itemId; // required
11453
    private long quantity; // required
11454
 
11455
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11456
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11457
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
11458
      ITEM_ID((short)2, "itemId"),
11459
      QUANTITY((short)3, "quantity");
11460
 
11461
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11462
 
11463
      static {
11464
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11465
          byName.put(field.getFieldName(), field);
11466
        }
11467
      }
11468
 
11469
      /**
11470
       * Find the _Fields constant that matches fieldId, or null if its not found.
11471
       */
11472
      public static _Fields findByThriftId(int fieldId) {
11473
        switch(fieldId) {
11474
          case 1: // PURCHASE_ORDER_ID
11475
            return PURCHASE_ORDER_ID;
11476
          case 2: // ITEM_ID
11477
            return ITEM_ID;
11478
          case 3: // QUANTITY
11479
            return QUANTITY;
11480
          default:
11481
            return null;
11482
        }
11483
      }
11484
 
11485
      /**
11486
       * Find the _Fields constant that matches fieldId, throwing an exception
11487
       * if it is not found.
11488
       */
11489
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11490
        _Fields fields = findByThriftId(fieldId);
11491
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11492
        return fields;
11493
      }
11494
 
11495
      /**
11496
       * Find the _Fields constant that matches name, or null if its not found.
11497
       */
11498
      public static _Fields findByName(String name) {
11499
        return byName.get(name);
11500
      }
11501
 
11502
      private final short _thriftId;
11503
      private final String _fieldName;
11504
 
11505
      _Fields(short thriftId, String fieldName) {
11506
        _thriftId = thriftId;
11507
        _fieldName = fieldName;
11508
      }
11509
 
11510
      public short getThriftFieldId() {
11511
        return _thriftId;
11512
      }
11513
 
11514
      public String getFieldName() {
11515
        return _fieldName;
11516
      }
11517
    }
11518
 
11519
    // isset id assignments
11520
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
11521
    private static final int __ITEMID_ISSET_ID = 1;
11522
    private static final int __QUANTITY_ISSET_ID = 2;
11523
    private BitSet __isset_bit_vector = new BitSet(3);
11524
 
11525
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11526
    static {
11527
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11528
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11529
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11530
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11531
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11532
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11533
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11534
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11535
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_args.class, metaDataMap);
11536
    }
11537
 
11538
    public fulfillPO_args() {
11539
    }
11540
 
11541
    public fulfillPO_args(
11542
      long purchaseOrderId,
11543
      long itemId,
11544
      long quantity)
11545
    {
11546
      this();
11547
      this.purchaseOrderId = purchaseOrderId;
11548
      setPurchaseOrderIdIsSet(true);
11549
      this.itemId = itemId;
11550
      setItemIdIsSet(true);
11551
      this.quantity = quantity;
11552
      setQuantityIsSet(true);
11553
    }
11554
 
11555
    /**
11556
     * Performs a deep copy on <i>other</i>.
11557
     */
11558
    public fulfillPO_args(fulfillPO_args other) {
11559
      __isset_bit_vector.clear();
11560
      __isset_bit_vector.or(other.__isset_bit_vector);
11561
      this.purchaseOrderId = other.purchaseOrderId;
11562
      this.itemId = other.itemId;
11563
      this.quantity = other.quantity;
11564
    }
11565
 
11566
    public fulfillPO_args deepCopy() {
11567
      return new fulfillPO_args(this);
11568
    }
11569
 
11570
    @Override
11571
    public void clear() {
11572
      setPurchaseOrderIdIsSet(false);
11573
      this.purchaseOrderId = 0;
11574
      setItemIdIsSet(false);
11575
      this.itemId = 0;
11576
      setQuantityIsSet(false);
11577
      this.quantity = 0;
11578
    }
11579
 
11580
    public long getPurchaseOrderId() {
11581
      return this.purchaseOrderId;
11582
    }
11583
 
11584
    public void setPurchaseOrderId(long purchaseOrderId) {
11585
      this.purchaseOrderId = purchaseOrderId;
11586
      setPurchaseOrderIdIsSet(true);
11587
    }
11588
 
11589
    public void unsetPurchaseOrderId() {
11590
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
11591
    }
11592
 
11593
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
11594
    public boolean isSetPurchaseOrderId() {
11595
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
11596
    }
11597
 
11598
    public void setPurchaseOrderIdIsSet(boolean value) {
11599
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
11600
    }
11601
 
11602
    public long getItemId() {
11603
      return this.itemId;
11604
    }
11605
 
11606
    public void setItemId(long itemId) {
11607
      this.itemId = itemId;
11608
      setItemIdIsSet(true);
11609
    }
11610
 
11611
    public void unsetItemId() {
11612
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
11613
    }
11614
 
11615
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
11616
    public boolean isSetItemId() {
11617
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
11618
    }
11619
 
11620
    public void setItemIdIsSet(boolean value) {
11621
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
11622
    }
11623
 
11624
    public long getQuantity() {
11625
      return this.quantity;
11626
    }
11627
 
11628
    public void setQuantity(long quantity) {
11629
      this.quantity = quantity;
11630
      setQuantityIsSet(true);
11631
    }
11632
 
11633
    public void unsetQuantity() {
11634
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
11635
    }
11636
 
11637
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
11638
    public boolean isSetQuantity() {
11639
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
11640
    }
11641
 
11642
    public void setQuantityIsSet(boolean value) {
11643
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
11644
    }
11645
 
11646
    public void setFieldValue(_Fields field, Object value) {
11647
      switch (field) {
11648
      case PURCHASE_ORDER_ID:
11649
        if (value == null) {
11650
          unsetPurchaseOrderId();
11651
        } else {
11652
          setPurchaseOrderId((Long)value);
11653
        }
11654
        break;
11655
 
11656
      case ITEM_ID:
11657
        if (value == null) {
11658
          unsetItemId();
11659
        } else {
11660
          setItemId((Long)value);
11661
        }
11662
        break;
11663
 
11664
      case QUANTITY:
11665
        if (value == null) {
11666
          unsetQuantity();
11667
        } else {
11668
          setQuantity((Long)value);
11669
        }
11670
        break;
11671
 
11672
      }
11673
    }
11674
 
11675
    public Object getFieldValue(_Fields field) {
11676
      switch (field) {
11677
      case PURCHASE_ORDER_ID:
11678
        return Long.valueOf(getPurchaseOrderId());
11679
 
11680
      case ITEM_ID:
11681
        return Long.valueOf(getItemId());
11682
 
11683
      case QUANTITY:
11684
        return Long.valueOf(getQuantity());
11685
 
11686
      }
11687
      throw new IllegalStateException();
11688
    }
11689
 
11690
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11691
    public boolean isSet(_Fields field) {
11692
      if (field == null) {
11693
        throw new IllegalArgumentException();
11694
      }
11695
 
11696
      switch (field) {
11697
      case PURCHASE_ORDER_ID:
11698
        return isSetPurchaseOrderId();
11699
      case ITEM_ID:
11700
        return isSetItemId();
11701
      case QUANTITY:
11702
        return isSetQuantity();
11703
      }
11704
      throw new IllegalStateException();
11705
    }
11706
 
11707
    @Override
11708
    public boolean equals(Object that) {
11709
      if (that == null)
11710
        return false;
11711
      if (that instanceof fulfillPO_args)
11712
        return this.equals((fulfillPO_args)that);
11713
      return false;
11714
    }
11715
 
11716
    public boolean equals(fulfillPO_args that) {
11717
      if (that == null)
11718
        return false;
11719
 
11720
      boolean this_present_purchaseOrderId = true;
11721
      boolean that_present_purchaseOrderId = true;
11722
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
11723
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
11724
          return false;
11725
        if (this.purchaseOrderId != that.purchaseOrderId)
11726
          return false;
11727
      }
11728
 
11729
      boolean this_present_itemId = true;
11730
      boolean that_present_itemId = true;
11731
      if (this_present_itemId || that_present_itemId) {
11732
        if (!(this_present_itemId && that_present_itemId))
11733
          return false;
11734
        if (this.itemId != that.itemId)
11735
          return false;
11736
      }
11737
 
11738
      boolean this_present_quantity = true;
11739
      boolean that_present_quantity = true;
11740
      if (this_present_quantity || that_present_quantity) {
11741
        if (!(this_present_quantity && that_present_quantity))
11742
          return false;
11743
        if (this.quantity != that.quantity)
11744
          return false;
11745
      }
11746
 
11747
      return true;
11748
    }
11749
 
11750
    @Override
11751
    public int hashCode() {
11752
      return 0;
11753
    }
11754
 
11755
    public int compareTo(fulfillPO_args other) {
11756
      if (!getClass().equals(other.getClass())) {
11757
        return getClass().getName().compareTo(other.getClass().getName());
11758
      }
11759
 
11760
      int lastComparison = 0;
11761
      fulfillPO_args typedOther = (fulfillPO_args)other;
11762
 
11763
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
11764
      if (lastComparison != 0) {
11765
        return lastComparison;
11766
      }
11767
      if (isSetPurchaseOrderId()) {
11768
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
11769
        if (lastComparison != 0) {
11770
          return lastComparison;
11771
        }
11772
      }
11773
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
11774
      if (lastComparison != 0) {
11775
        return lastComparison;
11776
      }
11777
      if (isSetItemId()) {
11778
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
11779
        if (lastComparison != 0) {
11780
          return lastComparison;
11781
        }
11782
      }
11783
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
11784
      if (lastComparison != 0) {
11785
        return lastComparison;
11786
      }
11787
      if (isSetQuantity()) {
11788
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
11789
        if (lastComparison != 0) {
11790
          return lastComparison;
11791
        }
11792
      }
11793
      return 0;
11794
    }
11795
 
11796
    public _Fields fieldForId(int fieldId) {
11797
      return _Fields.findByThriftId(fieldId);
11798
    }
11799
 
11800
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11801
      org.apache.thrift.protocol.TField field;
11802
      iprot.readStructBegin();
11803
      while (true)
11804
      {
11805
        field = iprot.readFieldBegin();
11806
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11807
          break;
11808
        }
11809
        switch (field.id) {
11810
          case 1: // PURCHASE_ORDER_ID
11811
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11812
              this.purchaseOrderId = iprot.readI64();
11813
              setPurchaseOrderIdIsSet(true);
11814
            } else { 
11815
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11816
            }
11817
            break;
11818
          case 2: // ITEM_ID
11819
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11820
              this.itemId = iprot.readI64();
11821
              setItemIdIsSet(true);
11822
            } else { 
11823
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11824
            }
11825
            break;
11826
          case 3: // QUANTITY
11827
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11828
              this.quantity = iprot.readI64();
11829
              setQuantityIsSet(true);
11830
            } else { 
11831
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11832
            }
11833
            break;
11834
          default:
11835
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11836
        }
11837
        iprot.readFieldEnd();
11838
      }
11839
      iprot.readStructEnd();
11840
      validate();
11841
    }
11842
 
11843
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11844
      validate();
11845
 
11846
      oprot.writeStructBegin(STRUCT_DESC);
11847
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
11848
      oprot.writeI64(this.purchaseOrderId);
11849
      oprot.writeFieldEnd();
11850
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
11851
      oprot.writeI64(this.itemId);
11852
      oprot.writeFieldEnd();
11853
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
11854
      oprot.writeI64(this.quantity);
11855
      oprot.writeFieldEnd();
11856
      oprot.writeFieldStop();
11857
      oprot.writeStructEnd();
11858
    }
11859
 
11860
    @Override
11861
    public String toString() {
11862
      StringBuilder sb = new StringBuilder("fulfillPO_args(");
11863
      boolean first = true;
11864
 
11865
      sb.append("purchaseOrderId:");
11866
      sb.append(this.purchaseOrderId);
11867
      first = false;
11868
      if (!first) sb.append(", ");
11869
      sb.append("itemId:");
11870
      sb.append(this.itemId);
11871
      first = false;
11872
      if (!first) sb.append(", ");
11873
      sb.append("quantity:");
11874
      sb.append(this.quantity);
11875
      first = false;
11876
      sb.append(")");
11877
      return sb.toString();
11878
    }
11879
 
11880
    public void validate() throws org.apache.thrift.TException {
11881
      // check for required fields
11882
    }
11883
 
11884
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11885
      try {
11886
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11887
      } catch (org.apache.thrift.TException te) {
11888
        throw new java.io.IOException(te);
11889
      }
11890
    }
11891
 
11892
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11893
      try {
11894
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
11895
        __isset_bit_vector = new BitSet(1);
11896
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11897
      } catch (org.apache.thrift.TException te) {
11898
        throw new java.io.IOException(te);
11899
      }
11900
    }
11901
 
11902
  }
11903
 
11904
  public static class fulfillPO_result implements org.apache.thrift.TBase<fulfillPO_result, fulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
11905
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_result");
11906
 
11907
    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);
11908
 
11909
    private PurchaseServiceException e; // required
11910
 
11911
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11912
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11913
      E((short)1, "e");
11914
 
11915
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11916
 
11917
      static {
11918
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11919
          byName.put(field.getFieldName(), field);
11920
        }
11921
      }
11922
 
11923
      /**
11924
       * Find the _Fields constant that matches fieldId, or null if its not found.
11925
       */
11926
      public static _Fields findByThriftId(int fieldId) {
11927
        switch(fieldId) {
11928
          case 1: // E
11929
            return E;
11930
          default:
11931
            return null;
11932
        }
11933
      }
11934
 
11935
      /**
11936
       * Find the _Fields constant that matches fieldId, throwing an exception
11937
       * if it is not found.
11938
       */
11939
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11940
        _Fields fields = findByThriftId(fieldId);
11941
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11942
        return fields;
11943
      }
11944
 
11945
      /**
11946
       * Find the _Fields constant that matches name, or null if its not found.
11947
       */
11948
      public static _Fields findByName(String name) {
11949
        return byName.get(name);
11950
      }
11951
 
11952
      private final short _thriftId;
11953
      private final String _fieldName;
11954
 
11955
      _Fields(short thriftId, String fieldName) {
11956
        _thriftId = thriftId;
11957
        _fieldName = fieldName;
11958
      }
11959
 
11960
      public short getThriftFieldId() {
11961
        return _thriftId;
11962
      }
11963
 
11964
      public String getFieldName() {
11965
        return _fieldName;
11966
      }
11967
    }
11968
 
11969
    // isset id assignments
11970
 
11971
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11972
    static {
11973
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11974
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11975
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11976
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11977
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_result.class, metaDataMap);
11978
    }
11979
 
11980
    public fulfillPO_result() {
11981
    }
11982
 
11983
    public fulfillPO_result(
11984
      PurchaseServiceException e)
11985
    {
11986
      this();
11987
      this.e = e;
11988
    }
11989
 
11990
    /**
11991
     * Performs a deep copy on <i>other</i>.
11992
     */
11993
    public fulfillPO_result(fulfillPO_result other) {
11994
      if (other.isSetE()) {
11995
        this.e = new PurchaseServiceException(other.e);
11996
      }
11997
    }
11998
 
11999
    public fulfillPO_result deepCopy() {
12000
      return new fulfillPO_result(this);
12001
    }
12002
 
12003
    @Override
12004
    public void clear() {
12005
      this.e = null;
12006
    }
12007
 
12008
    public PurchaseServiceException getE() {
12009
      return this.e;
12010
    }
12011
 
12012
    public void setE(PurchaseServiceException e) {
12013
      this.e = e;
12014
    }
12015
 
12016
    public void unsetE() {
12017
      this.e = null;
12018
    }
12019
 
12020
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
12021
    public boolean isSetE() {
12022
      return this.e != null;
12023
    }
12024
 
12025
    public void setEIsSet(boolean value) {
12026
      if (!value) {
12027
        this.e = null;
12028
      }
12029
    }
12030
 
12031
    public void setFieldValue(_Fields field, Object value) {
12032
      switch (field) {
12033
      case E:
12034
        if (value == null) {
12035
          unsetE();
12036
        } else {
12037
          setE((PurchaseServiceException)value);
12038
        }
12039
        break;
12040
 
12041
      }
12042
    }
12043
 
12044
    public Object getFieldValue(_Fields field) {
12045
      switch (field) {
12046
      case E:
12047
        return getE();
12048
 
12049
      }
12050
      throw new IllegalStateException();
12051
    }
12052
 
12053
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12054
    public boolean isSet(_Fields field) {
12055
      if (field == null) {
12056
        throw new IllegalArgumentException();
12057
      }
12058
 
12059
      switch (field) {
12060
      case E:
12061
        return isSetE();
12062
      }
12063
      throw new IllegalStateException();
12064
    }
12065
 
12066
    @Override
12067
    public boolean equals(Object that) {
12068
      if (that == null)
12069
        return false;
12070
      if (that instanceof fulfillPO_result)
12071
        return this.equals((fulfillPO_result)that);
12072
      return false;
12073
    }
12074
 
12075
    public boolean equals(fulfillPO_result that) {
12076
      if (that == null)
12077
        return false;
12078
 
12079
      boolean this_present_e = true && this.isSetE();
12080
      boolean that_present_e = true && that.isSetE();
12081
      if (this_present_e || that_present_e) {
12082
        if (!(this_present_e && that_present_e))
12083
          return false;
12084
        if (!this.e.equals(that.e))
12085
          return false;
12086
      }
12087
 
12088
      return true;
12089
    }
12090
 
12091
    @Override
12092
    public int hashCode() {
12093
      return 0;
12094
    }
12095
 
12096
    public int compareTo(fulfillPO_result other) {
12097
      if (!getClass().equals(other.getClass())) {
12098
        return getClass().getName().compareTo(other.getClass().getName());
12099
      }
12100
 
12101
      int lastComparison = 0;
12102
      fulfillPO_result typedOther = (fulfillPO_result)other;
12103
 
12104
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
12105
      if (lastComparison != 0) {
12106
        return lastComparison;
12107
      }
12108
      if (isSetE()) {
12109
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
12110
        if (lastComparison != 0) {
12111
          return lastComparison;
12112
        }
12113
      }
12114
      return 0;
12115
    }
12116
 
12117
    public _Fields fieldForId(int fieldId) {
12118
      return _Fields.findByThriftId(fieldId);
12119
    }
12120
 
12121
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12122
      org.apache.thrift.protocol.TField field;
12123
      iprot.readStructBegin();
12124
      while (true)
12125
      {
12126
        field = iprot.readFieldBegin();
12127
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12128
          break;
12129
        }
12130
        switch (field.id) {
12131
          case 1: // E
12132
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12133
              this.e = new PurchaseServiceException();
12134
              this.e.read(iprot);
12135
            } else { 
12136
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12137
            }
12138
            break;
12139
          default:
12140
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12141
        }
12142
        iprot.readFieldEnd();
12143
      }
12144
      iprot.readStructEnd();
12145
      validate();
12146
    }
12147
 
12148
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12149
      oprot.writeStructBegin(STRUCT_DESC);
12150
 
12151
      if (this.isSetE()) {
12152
        oprot.writeFieldBegin(E_FIELD_DESC);
12153
        this.e.write(oprot);
12154
        oprot.writeFieldEnd();
12155
      }
12156
      oprot.writeFieldStop();
12157
      oprot.writeStructEnd();
12158
    }
12159
 
12160
    @Override
12161
    public String toString() {
12162
      StringBuilder sb = new StringBuilder("fulfillPO_result(");
12163
      boolean first = true;
12164
 
12165
      sb.append("e:");
12166
      if (this.e == null) {
12167
        sb.append("null");
12168
      } else {
12169
        sb.append(this.e);
12170
      }
12171
      first = false;
12172
      sb.append(")");
12173
      return sb.toString();
12174
    }
12175
 
12176
    public void validate() throws org.apache.thrift.TException {
12177
      // check for required fields
12178
    }
12179
 
12180
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12181
      try {
12182
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12183
      } catch (org.apache.thrift.TException te) {
12184
        throw new java.io.IOException(te);
12185
      }
12186
    }
12187
 
12188
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12189
      try {
12190
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12191
      } catch (org.apache.thrift.TException te) {
12192
        throw new java.io.IOException(te);
12193
      }
12194
    }
12195
 
12196
  }
12197
 
12198
  public static class updatePurchaseOrder_args implements org.apache.thrift.TBase<updatePurchaseOrder_args, updatePurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
12199
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_args");
12200
 
12201
    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);
12202
 
12203
    private PurchaseOrder purchaseOrder; // required
12204
 
12205
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12206
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12207
      PURCHASE_ORDER((short)1, "purchaseOrder");
12208
 
12209
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12210
 
12211
      static {
12212
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12213
          byName.put(field.getFieldName(), field);
12214
        }
12215
      }
12216
 
12217
      /**
12218
       * Find the _Fields constant that matches fieldId, or null if its not found.
12219
       */
12220
      public static _Fields findByThriftId(int fieldId) {
12221
        switch(fieldId) {
12222
          case 1: // PURCHASE_ORDER
12223
            return PURCHASE_ORDER;
12224
          default:
12225
            return null;
12226
        }
12227
      }
12228
 
12229
      /**
12230
       * Find the _Fields constant that matches fieldId, throwing an exception
12231
       * if it is not found.
12232
       */
12233
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12234
        _Fields fields = findByThriftId(fieldId);
12235
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12236
        return fields;
12237
      }
12238
 
12239
      /**
12240
       * Find the _Fields constant that matches name, or null if its not found.
12241
       */
12242
      public static _Fields findByName(String name) {
12243
        return byName.get(name);
12244
      }
12245
 
12246
      private final short _thriftId;
12247
      private final String _fieldName;
12248
 
12249
      _Fields(short thriftId, String fieldName) {
12250
        _thriftId = thriftId;
12251
        _fieldName = fieldName;
12252
      }
12253
 
12254
      public short getThriftFieldId() {
12255
        return _thriftId;
12256
      }
12257
 
12258
      public String getFieldName() {
12259
        return _fieldName;
12260
      }
12261
    }
12262
 
12263
    // isset id assignments
12264
 
12265
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12266
    static {
12267
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12268
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12269
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
12270
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12271
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_args.class, metaDataMap);
12272
    }
12273
 
12274
    public updatePurchaseOrder_args() {
12275
    }
12276
 
12277
    public updatePurchaseOrder_args(
12278
      PurchaseOrder purchaseOrder)
12279
    {
12280
      this();
12281
      this.purchaseOrder = purchaseOrder;
12282
    }
12283
 
12284
    /**
12285
     * Performs a deep copy on <i>other</i>.
12286
     */
12287
    public updatePurchaseOrder_args(updatePurchaseOrder_args other) {
12288
      if (other.isSetPurchaseOrder()) {
12289
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
12290
      }
12291
    }
12292
 
12293
    public updatePurchaseOrder_args deepCopy() {
12294
      return new updatePurchaseOrder_args(this);
12295
    }
12296
 
12297
    @Override
12298
    public void clear() {
12299
      this.purchaseOrder = null;
12300
    }
12301
 
12302
    public PurchaseOrder getPurchaseOrder() {
12303
      return this.purchaseOrder;
12304
    }
12305
 
12306
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
12307
      this.purchaseOrder = purchaseOrder;
12308
    }
12309
 
12310
    public void unsetPurchaseOrder() {
12311
      this.purchaseOrder = null;
12312
    }
12313
 
12314
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
12315
    public boolean isSetPurchaseOrder() {
12316
      return this.purchaseOrder != null;
12317
    }
12318
 
12319
    public void setPurchaseOrderIsSet(boolean value) {
12320
      if (!value) {
12321
        this.purchaseOrder = null;
12322
      }
12323
    }
12324
 
12325
    public void setFieldValue(_Fields field, Object value) {
12326
      switch (field) {
12327
      case PURCHASE_ORDER:
12328
        if (value == null) {
12329
          unsetPurchaseOrder();
12330
        } else {
12331
          setPurchaseOrder((PurchaseOrder)value);
12332
        }
12333
        break;
12334
 
12335
      }
12336
    }
12337
 
12338
    public Object getFieldValue(_Fields field) {
12339
      switch (field) {
12340
      case PURCHASE_ORDER:
12341
        return getPurchaseOrder();
12342
 
12343
      }
12344
      throw new IllegalStateException();
12345
    }
12346
 
12347
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12348
    public boolean isSet(_Fields field) {
12349
      if (field == null) {
12350
        throw new IllegalArgumentException();
12351
      }
12352
 
12353
      switch (field) {
12354
      case PURCHASE_ORDER:
12355
        return isSetPurchaseOrder();
12356
      }
12357
      throw new IllegalStateException();
12358
    }
12359
 
12360
    @Override
12361
    public boolean equals(Object that) {
12362
      if (that == null)
12363
        return false;
12364
      if (that instanceof updatePurchaseOrder_args)
12365
        return this.equals((updatePurchaseOrder_args)that);
12366
      return false;
12367
    }
12368
 
12369
    public boolean equals(updatePurchaseOrder_args that) {
12370
      if (that == null)
12371
        return false;
12372
 
12373
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
12374
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
12375
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
12376
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
12377
          return false;
12378
        if (!this.purchaseOrder.equals(that.purchaseOrder))
12379
          return false;
12380
      }
12381
 
12382
      return true;
12383
    }
12384
 
12385
    @Override
12386
    public int hashCode() {
12387
      return 0;
12388
    }
12389
 
12390
    public int compareTo(updatePurchaseOrder_args other) {
12391
      if (!getClass().equals(other.getClass())) {
12392
        return getClass().getName().compareTo(other.getClass().getName());
12393
      }
12394
 
12395
      int lastComparison = 0;
12396
      updatePurchaseOrder_args typedOther = (updatePurchaseOrder_args)other;
12397
 
12398
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
12399
      if (lastComparison != 0) {
12400
        return lastComparison;
12401
      }
12402
      if (isSetPurchaseOrder()) {
12403
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
12404
        if (lastComparison != 0) {
12405
          return lastComparison;
12406
        }
12407
      }
12408
      return 0;
12409
    }
12410
 
12411
    public _Fields fieldForId(int fieldId) {
12412
      return _Fields.findByThriftId(fieldId);
12413
    }
12414
 
12415
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12416
      org.apache.thrift.protocol.TField field;
12417
      iprot.readStructBegin();
12418
      while (true)
12419
      {
12420
        field = iprot.readFieldBegin();
12421
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12422
          break;
12423
        }
12424
        switch (field.id) {
12425
          case 1: // PURCHASE_ORDER
12426
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12427
              this.purchaseOrder = new PurchaseOrder();
12428
              this.purchaseOrder.read(iprot);
12429
            } else { 
12430
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12431
            }
12432
            break;
12433
          default:
12434
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12435
        }
12436
        iprot.readFieldEnd();
12437
      }
12438
      iprot.readStructEnd();
12439
      validate();
12440
    }
12441
 
12442
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12443
      validate();
12444
 
12445
      oprot.writeStructBegin(STRUCT_DESC);
12446
      if (this.purchaseOrder != null) {
12447
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
12448
        this.purchaseOrder.write(oprot);
12449
        oprot.writeFieldEnd();
12450
      }
12451
      oprot.writeFieldStop();
12452
      oprot.writeStructEnd();
12453
    }
12454
 
12455
    @Override
12456
    public String toString() {
12457
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_args(");
12458
      boolean first = true;
12459
 
12460
      sb.append("purchaseOrder:");
12461
      if (this.purchaseOrder == null) {
12462
        sb.append("null");
12463
      } else {
12464
        sb.append(this.purchaseOrder);
12465
      }
12466
      first = false;
12467
      sb.append(")");
12468
      return sb.toString();
12469
    }
12470
 
12471
    public void validate() throws org.apache.thrift.TException {
12472
      // check for required fields
12473
    }
12474
 
12475
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12476
      try {
12477
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12478
      } catch (org.apache.thrift.TException te) {
12479
        throw new java.io.IOException(te);
12480
      }
12481
    }
12482
 
12483
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12484
      try {
12485
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12486
      } catch (org.apache.thrift.TException te) {
12487
        throw new java.io.IOException(te);
12488
      }
12489
    }
12490
 
12491
  }
12492
 
12493
  public static class updatePurchaseOrder_result implements org.apache.thrift.TBase<updatePurchaseOrder_result, updatePurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
12494
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_result");
12495
 
12496
    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);
12497
 
12498
    private PurchaseServiceException e; // required
12499
 
12500
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12501
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12502
      E((short)1, "e");
12503
 
12504
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12505
 
12506
      static {
12507
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12508
          byName.put(field.getFieldName(), field);
12509
        }
12510
      }
12511
 
12512
      /**
12513
       * Find the _Fields constant that matches fieldId, or null if its not found.
12514
       */
12515
      public static _Fields findByThriftId(int fieldId) {
12516
        switch(fieldId) {
12517
          case 1: // E
12518
            return E;
12519
          default:
12520
            return null;
12521
        }
12522
      }
12523
 
12524
      /**
12525
       * Find the _Fields constant that matches fieldId, throwing an exception
12526
       * if it is not found.
12527
       */
12528
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12529
        _Fields fields = findByThriftId(fieldId);
12530
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12531
        return fields;
12532
      }
12533
 
12534
      /**
12535
       * Find the _Fields constant that matches name, or null if its not found.
12536
       */
12537
      public static _Fields findByName(String name) {
12538
        return byName.get(name);
12539
      }
12540
 
12541
      private final short _thriftId;
12542
      private final String _fieldName;
12543
 
12544
      _Fields(short thriftId, String fieldName) {
12545
        _thriftId = thriftId;
12546
        _fieldName = fieldName;
12547
      }
12548
 
12549
      public short getThriftFieldId() {
12550
        return _thriftId;
12551
      }
12552
 
12553
      public String getFieldName() {
12554
        return _fieldName;
12555
      }
12556
    }
12557
 
12558
    // isset id assignments
12559
 
12560
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12561
    static {
12562
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12563
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12564
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
12565
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12566
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_result.class, metaDataMap);
12567
    }
12568
 
12569
    public updatePurchaseOrder_result() {
12570
    }
12571
 
12572
    public updatePurchaseOrder_result(
12573
      PurchaseServiceException e)
12574
    {
12575
      this();
12576
      this.e = e;
12577
    }
12578
 
12579
    /**
12580
     * Performs a deep copy on <i>other</i>.
12581
     */
12582
    public updatePurchaseOrder_result(updatePurchaseOrder_result other) {
12583
      if (other.isSetE()) {
12584
        this.e = new PurchaseServiceException(other.e);
12585
      }
12586
    }
12587
 
12588
    public updatePurchaseOrder_result deepCopy() {
12589
      return new updatePurchaseOrder_result(this);
12590
    }
12591
 
12592
    @Override
12593
    public void clear() {
12594
      this.e = null;
12595
    }
12596
 
12597
    public PurchaseServiceException getE() {
12598
      return this.e;
12599
    }
12600
 
12601
    public void setE(PurchaseServiceException e) {
12602
      this.e = e;
12603
    }
12604
 
12605
    public void unsetE() {
12606
      this.e = null;
12607
    }
12608
 
12609
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
12610
    public boolean isSetE() {
12611
      return this.e != null;
12612
    }
12613
 
12614
    public void setEIsSet(boolean value) {
12615
      if (!value) {
12616
        this.e = null;
12617
      }
12618
    }
12619
 
12620
    public void setFieldValue(_Fields field, Object value) {
12621
      switch (field) {
12622
      case E:
12623
        if (value == null) {
12624
          unsetE();
12625
        } else {
12626
          setE((PurchaseServiceException)value);
12627
        }
12628
        break;
12629
 
12630
      }
12631
    }
12632
 
12633
    public Object getFieldValue(_Fields field) {
12634
      switch (field) {
12635
      case E:
12636
        return getE();
12637
 
12638
      }
12639
      throw new IllegalStateException();
12640
    }
12641
 
12642
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12643
    public boolean isSet(_Fields field) {
12644
      if (field == null) {
12645
        throw new IllegalArgumentException();
12646
      }
12647
 
12648
      switch (field) {
12649
      case E:
12650
        return isSetE();
12651
      }
12652
      throw new IllegalStateException();
12653
    }
12654
 
12655
    @Override
12656
    public boolean equals(Object that) {
12657
      if (that == null)
12658
        return false;
12659
      if (that instanceof updatePurchaseOrder_result)
12660
        return this.equals((updatePurchaseOrder_result)that);
12661
      return false;
12662
    }
12663
 
12664
    public boolean equals(updatePurchaseOrder_result that) {
12665
      if (that == null)
12666
        return false;
12667
 
12668
      boolean this_present_e = true && this.isSetE();
12669
      boolean that_present_e = true && that.isSetE();
12670
      if (this_present_e || that_present_e) {
12671
        if (!(this_present_e && that_present_e))
12672
          return false;
12673
        if (!this.e.equals(that.e))
12674
          return false;
12675
      }
12676
 
12677
      return true;
12678
    }
12679
 
12680
    @Override
12681
    public int hashCode() {
12682
      return 0;
12683
    }
12684
 
12685
    public int compareTo(updatePurchaseOrder_result other) {
12686
      if (!getClass().equals(other.getClass())) {
12687
        return getClass().getName().compareTo(other.getClass().getName());
12688
      }
12689
 
12690
      int lastComparison = 0;
12691
      updatePurchaseOrder_result typedOther = (updatePurchaseOrder_result)other;
12692
 
12693
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
12694
      if (lastComparison != 0) {
12695
        return lastComparison;
12696
      }
12697
      if (isSetE()) {
12698
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
12699
        if (lastComparison != 0) {
12700
          return lastComparison;
12701
        }
12702
      }
12703
      return 0;
12704
    }
12705
 
12706
    public _Fields fieldForId(int fieldId) {
12707
      return _Fields.findByThriftId(fieldId);
12708
    }
12709
 
12710
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12711
      org.apache.thrift.protocol.TField field;
12712
      iprot.readStructBegin();
12713
      while (true)
12714
      {
12715
        field = iprot.readFieldBegin();
12716
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12717
          break;
12718
        }
12719
        switch (field.id) {
12720
          case 1: // E
12721
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12722
              this.e = new PurchaseServiceException();
12723
              this.e.read(iprot);
12724
            } else { 
12725
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12726
            }
12727
            break;
12728
          default:
12729
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12730
        }
12731
        iprot.readFieldEnd();
12732
      }
12733
      iprot.readStructEnd();
12734
      validate();
12735
    }
12736
 
12737
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12738
      oprot.writeStructBegin(STRUCT_DESC);
12739
 
12740
      if (this.isSetE()) {
12741
        oprot.writeFieldBegin(E_FIELD_DESC);
12742
        this.e.write(oprot);
12743
        oprot.writeFieldEnd();
12744
      }
12745
      oprot.writeFieldStop();
12746
      oprot.writeStructEnd();
12747
    }
12748
 
12749
    @Override
12750
    public String toString() {
12751
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_result(");
12752
      boolean first = true;
12753
 
12754
      sb.append("e:");
12755
      if (this.e == null) {
12756
        sb.append("null");
12757
      } else {
12758
        sb.append(this.e);
12759
      }
12760
      first = false;
12761
      sb.append(")");
12762
      return sb.toString();
12763
    }
12764
 
12765
    public void validate() throws org.apache.thrift.TException {
12766
      // check for required fields
12767
    }
12768
 
12769
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12770
      try {
12771
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12772
      } catch (org.apache.thrift.TException te) {
12773
        throw new java.io.IOException(te);
12774
      }
12775
    }
12776
 
12777
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12778
      try {
12779
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12780
      } catch (org.apache.thrift.TException te) {
12781
        throw new java.io.IOException(te);
12782
      }
12783
    }
12784
 
12785
  }
12786
 
5185 mandeep.dh 12787
  public static class unFulfillPO_args implements org.apache.thrift.TBase<unFulfillPO_args, unFulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
12788
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_args");
12789
 
12790
    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);
12791
    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);
12792
    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);
12793
 
12794
    private long purchaseId; // required
12795
    private long itemId; // required
12796
    private long quantity; // required
12797
 
12798
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12799
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12800
      PURCHASE_ID((short)1, "purchaseId"),
12801
      ITEM_ID((short)2, "itemId"),
12802
      QUANTITY((short)3, "quantity");
12803
 
12804
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12805
 
12806
      static {
12807
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12808
          byName.put(field.getFieldName(), field);
12809
        }
12810
      }
12811
 
12812
      /**
12813
       * Find the _Fields constant that matches fieldId, or null if its not found.
12814
       */
12815
      public static _Fields findByThriftId(int fieldId) {
12816
        switch(fieldId) {
12817
          case 1: // PURCHASE_ID
12818
            return PURCHASE_ID;
12819
          case 2: // ITEM_ID
12820
            return ITEM_ID;
12821
          case 3: // QUANTITY
12822
            return QUANTITY;
12823
          default:
12824
            return null;
12825
        }
12826
      }
12827
 
12828
      /**
12829
       * Find the _Fields constant that matches fieldId, throwing an exception
12830
       * if it is not found.
12831
       */
12832
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12833
        _Fields fields = findByThriftId(fieldId);
12834
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12835
        return fields;
12836
      }
12837
 
12838
      /**
12839
       * Find the _Fields constant that matches name, or null if its not found.
12840
       */
12841
      public static _Fields findByName(String name) {
12842
        return byName.get(name);
12843
      }
12844
 
12845
      private final short _thriftId;
12846
      private final String _fieldName;
12847
 
12848
      _Fields(short thriftId, String fieldName) {
12849
        _thriftId = thriftId;
12850
        _fieldName = fieldName;
12851
      }
12852
 
12853
      public short getThriftFieldId() {
12854
        return _thriftId;
12855
      }
12856
 
12857
      public String getFieldName() {
12858
        return _fieldName;
12859
      }
12860
    }
12861
 
12862
    // isset id assignments
12863
    private static final int __PURCHASEID_ISSET_ID = 0;
12864
    private static final int __ITEMID_ISSET_ID = 1;
12865
    private static final int __QUANTITY_ISSET_ID = 2;
12866
    private BitSet __isset_bit_vector = new BitSet(3);
12867
 
12868
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12869
    static {
12870
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12871
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12872
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12873
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12874
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12875
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12876
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12877
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12878
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_args.class, metaDataMap);
12879
    }
12880
 
12881
    public unFulfillPO_args() {
12882
    }
12883
 
12884
    public unFulfillPO_args(
12885
      long purchaseId,
12886
      long itemId,
12887
      long quantity)
12888
    {
12889
      this();
12890
      this.purchaseId = purchaseId;
12891
      setPurchaseIdIsSet(true);
12892
      this.itemId = itemId;
12893
      setItemIdIsSet(true);
12894
      this.quantity = quantity;
12895
      setQuantityIsSet(true);
12896
    }
12897
 
12898
    /**
12899
     * Performs a deep copy on <i>other</i>.
12900
     */
12901
    public unFulfillPO_args(unFulfillPO_args other) {
12902
      __isset_bit_vector.clear();
12903
      __isset_bit_vector.or(other.__isset_bit_vector);
12904
      this.purchaseId = other.purchaseId;
12905
      this.itemId = other.itemId;
12906
      this.quantity = other.quantity;
12907
    }
12908
 
12909
    public unFulfillPO_args deepCopy() {
12910
      return new unFulfillPO_args(this);
12911
    }
12912
 
12913
    @Override
12914
    public void clear() {
12915
      setPurchaseIdIsSet(false);
12916
      this.purchaseId = 0;
12917
      setItemIdIsSet(false);
12918
      this.itemId = 0;
12919
      setQuantityIsSet(false);
12920
      this.quantity = 0;
12921
    }
12922
 
12923
    public long getPurchaseId() {
12924
      return this.purchaseId;
12925
    }
12926
 
12927
    public void setPurchaseId(long purchaseId) {
12928
      this.purchaseId = purchaseId;
12929
      setPurchaseIdIsSet(true);
12930
    }
12931
 
12932
    public void unsetPurchaseId() {
12933
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
12934
    }
12935
 
12936
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
12937
    public boolean isSetPurchaseId() {
12938
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
12939
    }
12940
 
12941
    public void setPurchaseIdIsSet(boolean value) {
12942
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
12943
    }
12944
 
12945
    public long getItemId() {
12946
      return this.itemId;
12947
    }
12948
 
12949
    public void setItemId(long itemId) {
12950
      this.itemId = itemId;
12951
      setItemIdIsSet(true);
12952
    }
12953
 
12954
    public void unsetItemId() {
12955
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
12956
    }
12957
 
12958
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
12959
    public boolean isSetItemId() {
12960
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
12961
    }
12962
 
12963
    public void setItemIdIsSet(boolean value) {
12964
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
12965
    }
12966
 
12967
    public long getQuantity() {
12968
      return this.quantity;
12969
    }
12970
 
12971
    public void setQuantity(long quantity) {
12972
      this.quantity = quantity;
12973
      setQuantityIsSet(true);
12974
    }
12975
 
12976
    public void unsetQuantity() {
12977
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
12978
    }
12979
 
12980
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
12981
    public boolean isSetQuantity() {
12982
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
12983
    }
12984
 
12985
    public void setQuantityIsSet(boolean value) {
12986
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
12987
    }
12988
 
12989
    public void setFieldValue(_Fields field, Object value) {
12990
      switch (field) {
12991
      case PURCHASE_ID:
12992
        if (value == null) {
12993
          unsetPurchaseId();
12994
        } else {
12995
          setPurchaseId((Long)value);
12996
        }
12997
        break;
12998
 
12999
      case ITEM_ID:
13000
        if (value == null) {
13001
          unsetItemId();
13002
        } else {
13003
          setItemId((Long)value);
13004
        }
13005
        break;
13006
 
13007
      case QUANTITY:
13008
        if (value == null) {
13009
          unsetQuantity();
13010
        } else {
13011
          setQuantity((Long)value);
13012
        }
13013
        break;
13014
 
13015
      }
13016
    }
13017
 
13018
    public Object getFieldValue(_Fields field) {
13019
      switch (field) {
13020
      case PURCHASE_ID:
13021
        return Long.valueOf(getPurchaseId());
13022
 
13023
      case ITEM_ID:
13024
        return Long.valueOf(getItemId());
13025
 
13026
      case QUANTITY:
13027
        return Long.valueOf(getQuantity());
13028
 
13029
      }
13030
      throw new IllegalStateException();
13031
    }
13032
 
13033
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13034
    public boolean isSet(_Fields field) {
13035
      if (field == null) {
13036
        throw new IllegalArgumentException();
13037
      }
13038
 
13039
      switch (field) {
13040
      case PURCHASE_ID:
13041
        return isSetPurchaseId();
13042
      case ITEM_ID:
13043
        return isSetItemId();
13044
      case QUANTITY:
13045
        return isSetQuantity();
13046
      }
13047
      throw new IllegalStateException();
13048
    }
13049
 
13050
    @Override
13051
    public boolean equals(Object that) {
13052
      if (that == null)
13053
        return false;
13054
      if (that instanceof unFulfillPO_args)
13055
        return this.equals((unFulfillPO_args)that);
13056
      return false;
13057
    }
13058
 
13059
    public boolean equals(unFulfillPO_args that) {
13060
      if (that == null)
13061
        return false;
13062
 
13063
      boolean this_present_purchaseId = true;
13064
      boolean that_present_purchaseId = true;
13065
      if (this_present_purchaseId || that_present_purchaseId) {
13066
        if (!(this_present_purchaseId && that_present_purchaseId))
13067
          return false;
13068
        if (this.purchaseId != that.purchaseId)
13069
          return false;
13070
      }
13071
 
13072
      boolean this_present_itemId = true;
13073
      boolean that_present_itemId = true;
13074
      if (this_present_itemId || that_present_itemId) {
13075
        if (!(this_present_itemId && that_present_itemId))
13076
          return false;
13077
        if (this.itemId != that.itemId)
13078
          return false;
13079
      }
13080
 
13081
      boolean this_present_quantity = true;
13082
      boolean that_present_quantity = true;
13083
      if (this_present_quantity || that_present_quantity) {
13084
        if (!(this_present_quantity && that_present_quantity))
13085
          return false;
13086
        if (this.quantity != that.quantity)
13087
          return false;
13088
      }
13089
 
13090
      return true;
13091
    }
13092
 
13093
    @Override
13094
    public int hashCode() {
13095
      return 0;
13096
    }
13097
 
13098
    public int compareTo(unFulfillPO_args other) {
13099
      if (!getClass().equals(other.getClass())) {
13100
        return getClass().getName().compareTo(other.getClass().getName());
13101
      }
13102
 
13103
      int lastComparison = 0;
13104
      unFulfillPO_args typedOther = (unFulfillPO_args)other;
13105
 
13106
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
13107
      if (lastComparison != 0) {
13108
        return lastComparison;
13109
      }
13110
      if (isSetPurchaseId()) {
13111
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
13112
        if (lastComparison != 0) {
13113
          return lastComparison;
13114
        }
13115
      }
13116
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
13117
      if (lastComparison != 0) {
13118
        return lastComparison;
13119
      }
13120
      if (isSetItemId()) {
13121
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
13122
        if (lastComparison != 0) {
13123
          return lastComparison;
13124
        }
13125
      }
13126
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
13127
      if (lastComparison != 0) {
13128
        return lastComparison;
13129
      }
13130
      if (isSetQuantity()) {
13131
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
13132
        if (lastComparison != 0) {
13133
          return lastComparison;
13134
        }
13135
      }
13136
      return 0;
13137
    }
13138
 
13139
    public _Fields fieldForId(int fieldId) {
13140
      return _Fields.findByThriftId(fieldId);
13141
    }
13142
 
13143
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13144
      org.apache.thrift.protocol.TField field;
13145
      iprot.readStructBegin();
13146
      while (true)
13147
      {
13148
        field = iprot.readFieldBegin();
13149
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13150
          break;
13151
        }
13152
        switch (field.id) {
13153
          case 1: // PURCHASE_ID
13154
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13155
              this.purchaseId = iprot.readI64();
13156
              setPurchaseIdIsSet(true);
13157
            } else { 
13158
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13159
            }
13160
            break;
13161
          case 2: // ITEM_ID
13162
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13163
              this.itemId = iprot.readI64();
13164
              setItemIdIsSet(true);
13165
            } else { 
13166
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13167
            }
13168
            break;
13169
          case 3: // QUANTITY
13170
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13171
              this.quantity = iprot.readI64();
13172
              setQuantityIsSet(true);
13173
            } else { 
13174
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13175
            }
13176
            break;
13177
          default:
13178
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13179
        }
13180
        iprot.readFieldEnd();
13181
      }
13182
      iprot.readStructEnd();
13183
      validate();
13184
    }
13185
 
13186
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13187
      validate();
13188
 
13189
      oprot.writeStructBegin(STRUCT_DESC);
13190
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
13191
      oprot.writeI64(this.purchaseId);
13192
      oprot.writeFieldEnd();
13193
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
13194
      oprot.writeI64(this.itemId);
13195
      oprot.writeFieldEnd();
13196
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
13197
      oprot.writeI64(this.quantity);
13198
      oprot.writeFieldEnd();
13199
      oprot.writeFieldStop();
13200
      oprot.writeStructEnd();
13201
    }
13202
 
13203
    @Override
13204
    public String toString() {
13205
      StringBuilder sb = new StringBuilder("unFulfillPO_args(");
13206
      boolean first = true;
13207
 
13208
      sb.append("purchaseId:");
13209
      sb.append(this.purchaseId);
13210
      first = false;
13211
      if (!first) sb.append(", ");
13212
      sb.append("itemId:");
13213
      sb.append(this.itemId);
13214
      first = false;
13215
      if (!first) sb.append(", ");
13216
      sb.append("quantity:");
13217
      sb.append(this.quantity);
13218
      first = false;
13219
      sb.append(")");
13220
      return sb.toString();
13221
    }
13222
 
13223
    public void validate() throws org.apache.thrift.TException {
13224
      // check for required fields
13225
    }
13226
 
13227
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13228
      try {
13229
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13230
      } catch (org.apache.thrift.TException te) {
13231
        throw new java.io.IOException(te);
13232
      }
13233
    }
13234
 
13235
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13236
      try {
13237
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
13238
        __isset_bit_vector = new BitSet(1);
13239
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13240
      } catch (org.apache.thrift.TException te) {
13241
        throw new java.io.IOException(te);
13242
      }
13243
    }
13244
 
13245
  }
13246
 
13247
  public static class unFulfillPO_result implements org.apache.thrift.TBase<unFulfillPO_result, unFulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
13248
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_result");
13249
 
13250
    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);
13251
 
13252
    private PurchaseServiceException e; // required
13253
 
13254
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13255
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13256
      E((short)1, "e");
13257
 
13258
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13259
 
13260
      static {
13261
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13262
          byName.put(field.getFieldName(), field);
13263
        }
13264
      }
13265
 
13266
      /**
13267
       * Find the _Fields constant that matches fieldId, or null if its not found.
13268
       */
13269
      public static _Fields findByThriftId(int fieldId) {
13270
        switch(fieldId) {
13271
          case 1: // E
13272
            return E;
13273
          default:
13274
            return null;
13275
        }
13276
      }
13277
 
13278
      /**
13279
       * Find the _Fields constant that matches fieldId, throwing an exception
13280
       * if it is not found.
13281
       */
13282
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13283
        _Fields fields = findByThriftId(fieldId);
13284
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13285
        return fields;
13286
      }
13287
 
13288
      /**
13289
       * Find the _Fields constant that matches name, or null if its not found.
13290
       */
13291
      public static _Fields findByName(String name) {
13292
        return byName.get(name);
13293
      }
13294
 
13295
      private final short _thriftId;
13296
      private final String _fieldName;
13297
 
13298
      _Fields(short thriftId, String fieldName) {
13299
        _thriftId = thriftId;
13300
        _fieldName = fieldName;
13301
      }
13302
 
13303
      public short getThriftFieldId() {
13304
        return _thriftId;
13305
      }
13306
 
13307
      public String getFieldName() {
13308
        return _fieldName;
13309
      }
13310
    }
13311
 
13312
    // isset id assignments
13313
 
13314
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13315
    static {
13316
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13317
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13318
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
13319
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13320
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_result.class, metaDataMap);
13321
    }
13322
 
13323
    public unFulfillPO_result() {
13324
    }
13325
 
13326
    public unFulfillPO_result(
13327
      PurchaseServiceException e)
13328
    {
13329
      this();
13330
      this.e = e;
13331
    }
13332
 
13333
    /**
13334
     * Performs a deep copy on <i>other</i>.
13335
     */
13336
    public unFulfillPO_result(unFulfillPO_result other) {
13337
      if (other.isSetE()) {
13338
        this.e = new PurchaseServiceException(other.e);
13339
      }
13340
    }
13341
 
13342
    public unFulfillPO_result deepCopy() {
13343
      return new unFulfillPO_result(this);
13344
    }
13345
 
13346
    @Override
13347
    public void clear() {
13348
      this.e = null;
13349
    }
13350
 
13351
    public PurchaseServiceException getE() {
13352
      return this.e;
13353
    }
13354
 
13355
    public void setE(PurchaseServiceException e) {
13356
      this.e = e;
13357
    }
13358
 
13359
    public void unsetE() {
13360
      this.e = null;
13361
    }
13362
 
13363
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
13364
    public boolean isSetE() {
13365
      return this.e != null;
13366
    }
13367
 
13368
    public void setEIsSet(boolean value) {
13369
      if (!value) {
13370
        this.e = null;
13371
      }
13372
    }
13373
 
13374
    public void setFieldValue(_Fields field, Object value) {
13375
      switch (field) {
13376
      case E:
13377
        if (value == null) {
13378
          unsetE();
13379
        } else {
13380
          setE((PurchaseServiceException)value);
13381
        }
13382
        break;
13383
 
13384
      }
13385
    }
13386
 
13387
    public Object getFieldValue(_Fields field) {
13388
      switch (field) {
13389
      case E:
13390
        return getE();
13391
 
13392
      }
13393
      throw new IllegalStateException();
13394
    }
13395
 
13396
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13397
    public boolean isSet(_Fields field) {
13398
      if (field == null) {
13399
        throw new IllegalArgumentException();
13400
      }
13401
 
13402
      switch (field) {
13403
      case E:
13404
        return isSetE();
13405
      }
13406
      throw new IllegalStateException();
13407
    }
13408
 
13409
    @Override
13410
    public boolean equals(Object that) {
13411
      if (that == null)
13412
        return false;
13413
      if (that instanceof unFulfillPO_result)
13414
        return this.equals((unFulfillPO_result)that);
13415
      return false;
13416
    }
13417
 
13418
    public boolean equals(unFulfillPO_result that) {
13419
      if (that == null)
13420
        return false;
13421
 
13422
      boolean this_present_e = true && this.isSetE();
13423
      boolean that_present_e = true && that.isSetE();
13424
      if (this_present_e || that_present_e) {
13425
        if (!(this_present_e && that_present_e))
13426
          return false;
13427
        if (!this.e.equals(that.e))
13428
          return false;
13429
      }
13430
 
13431
      return true;
13432
    }
13433
 
13434
    @Override
13435
    public int hashCode() {
13436
      return 0;
13437
    }
13438
 
13439
    public int compareTo(unFulfillPO_result other) {
13440
      if (!getClass().equals(other.getClass())) {
13441
        return getClass().getName().compareTo(other.getClass().getName());
13442
      }
13443
 
13444
      int lastComparison = 0;
13445
      unFulfillPO_result typedOther = (unFulfillPO_result)other;
13446
 
13447
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
13448
      if (lastComparison != 0) {
13449
        return lastComparison;
13450
      }
13451
      if (isSetE()) {
13452
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
13453
        if (lastComparison != 0) {
13454
          return lastComparison;
13455
        }
13456
      }
13457
      return 0;
13458
    }
13459
 
13460
    public _Fields fieldForId(int fieldId) {
13461
      return _Fields.findByThriftId(fieldId);
13462
    }
13463
 
13464
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13465
      org.apache.thrift.protocol.TField field;
13466
      iprot.readStructBegin();
13467
      while (true)
13468
      {
13469
        field = iprot.readFieldBegin();
13470
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13471
          break;
13472
        }
13473
        switch (field.id) {
13474
          case 1: // E
13475
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
13476
              this.e = new PurchaseServiceException();
13477
              this.e.read(iprot);
13478
            } else { 
13479
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13480
            }
13481
            break;
13482
          default:
13483
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13484
        }
13485
        iprot.readFieldEnd();
13486
      }
13487
      iprot.readStructEnd();
13488
      validate();
13489
    }
13490
 
13491
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13492
      oprot.writeStructBegin(STRUCT_DESC);
13493
 
13494
      if (this.isSetE()) {
13495
        oprot.writeFieldBegin(E_FIELD_DESC);
13496
        this.e.write(oprot);
13497
        oprot.writeFieldEnd();
13498
      }
13499
      oprot.writeFieldStop();
13500
      oprot.writeStructEnd();
13501
    }
13502
 
13503
    @Override
13504
    public String toString() {
13505
      StringBuilder sb = new StringBuilder("unFulfillPO_result(");
13506
      boolean first = true;
13507
 
13508
      sb.append("e:");
13509
      if (this.e == null) {
13510
        sb.append("null");
13511
      } else {
13512
        sb.append(this.e);
13513
      }
13514
      first = false;
13515
      sb.append(")");
13516
      return sb.toString();
13517
    }
13518
 
13519
    public void validate() throws org.apache.thrift.TException {
13520
      // check for required fields
13521
    }
13522
 
13523
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13524
      try {
13525
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13526
      } catch (org.apache.thrift.TException te) {
13527
        throw new java.io.IOException(te);
13528
      }
13529
    }
13530
 
13531
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13532
      try {
13533
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13534
      } catch (org.apache.thrift.TException te) {
13535
        throw new java.io.IOException(te);
13536
      }
13537
    }
13538
 
13539
  }
13540
 
5443 mandeep.dh 13541
  public static class getInvoices_args implements org.apache.thrift.TBase<getInvoices_args, getInvoices_args._Fields>, java.io.Serializable, Cloneable   {
13542
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_args");
13543
 
13544
    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);
13545
 
13546
    private long date; // required
13547
 
13548
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13549
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13550
      DATE((short)1, "date");
13551
 
13552
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13553
 
13554
      static {
13555
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13556
          byName.put(field.getFieldName(), field);
13557
        }
13558
      }
13559
 
13560
      /**
13561
       * Find the _Fields constant that matches fieldId, or null if its not found.
13562
       */
13563
      public static _Fields findByThriftId(int fieldId) {
13564
        switch(fieldId) {
13565
          case 1: // DATE
13566
            return DATE;
13567
          default:
13568
            return null;
13569
        }
13570
      }
13571
 
13572
      /**
13573
       * Find the _Fields constant that matches fieldId, throwing an exception
13574
       * if it is not found.
13575
       */
13576
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13577
        _Fields fields = findByThriftId(fieldId);
13578
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13579
        return fields;
13580
      }
13581
 
13582
      /**
13583
       * Find the _Fields constant that matches name, or null if its not found.
13584
       */
13585
      public static _Fields findByName(String name) {
13586
        return byName.get(name);
13587
      }
13588
 
13589
      private final short _thriftId;
13590
      private final String _fieldName;
13591
 
13592
      _Fields(short thriftId, String fieldName) {
13593
        _thriftId = thriftId;
13594
        _fieldName = fieldName;
13595
      }
13596
 
13597
      public short getThriftFieldId() {
13598
        return _thriftId;
13599
      }
13600
 
13601
      public String getFieldName() {
13602
        return _fieldName;
13603
      }
13604
    }
13605
 
13606
    // isset id assignments
13607
    private static final int __DATE_ISSET_ID = 0;
13608
    private BitSet __isset_bit_vector = new BitSet(1);
13609
 
13610
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13611
    static {
13612
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13613
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13614
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13615
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13616
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_args.class, metaDataMap);
13617
    }
13618
 
13619
    public getInvoices_args() {
13620
    }
13621
 
13622
    public getInvoices_args(
13623
      long date)
13624
    {
13625
      this();
13626
      this.date = date;
13627
      setDateIsSet(true);
13628
    }
13629
 
13630
    /**
13631
     * Performs a deep copy on <i>other</i>.
13632
     */
13633
    public getInvoices_args(getInvoices_args other) {
13634
      __isset_bit_vector.clear();
13635
      __isset_bit_vector.or(other.__isset_bit_vector);
13636
      this.date = other.date;
13637
    }
13638
 
13639
    public getInvoices_args deepCopy() {
13640
      return new getInvoices_args(this);
13641
    }
13642
 
13643
    @Override
13644
    public void clear() {
13645
      setDateIsSet(false);
13646
      this.date = 0;
13647
    }
13648
 
13649
    public long getDate() {
13650
      return this.date;
13651
    }
13652
 
13653
    public void setDate(long date) {
13654
      this.date = date;
13655
      setDateIsSet(true);
13656
    }
13657
 
13658
    public void unsetDate() {
13659
      __isset_bit_vector.clear(__DATE_ISSET_ID);
13660
    }
13661
 
13662
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
13663
    public boolean isSetDate() {
13664
      return __isset_bit_vector.get(__DATE_ISSET_ID);
13665
    }
13666
 
13667
    public void setDateIsSet(boolean value) {
13668
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
13669
    }
13670
 
13671
    public void setFieldValue(_Fields field, Object value) {
13672
      switch (field) {
13673
      case DATE:
13674
        if (value == null) {
13675
          unsetDate();
13676
        } else {
13677
          setDate((Long)value);
13678
        }
13679
        break;
13680
 
13681
      }
13682
    }
13683
 
13684
    public Object getFieldValue(_Fields field) {
13685
      switch (field) {
13686
      case DATE:
13687
        return Long.valueOf(getDate());
13688
 
13689
      }
13690
      throw new IllegalStateException();
13691
    }
13692
 
13693
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13694
    public boolean isSet(_Fields field) {
13695
      if (field == null) {
13696
        throw new IllegalArgumentException();
13697
      }
13698
 
13699
      switch (field) {
13700
      case DATE:
13701
        return isSetDate();
13702
      }
13703
      throw new IllegalStateException();
13704
    }
13705
 
13706
    @Override
13707
    public boolean equals(Object that) {
13708
      if (that == null)
13709
        return false;
13710
      if (that instanceof getInvoices_args)
13711
        return this.equals((getInvoices_args)that);
13712
      return false;
13713
    }
13714
 
13715
    public boolean equals(getInvoices_args that) {
13716
      if (that == null)
13717
        return false;
13718
 
13719
      boolean this_present_date = true;
13720
      boolean that_present_date = true;
13721
      if (this_present_date || that_present_date) {
13722
        if (!(this_present_date && that_present_date))
13723
          return false;
13724
        if (this.date != that.date)
13725
          return false;
13726
      }
13727
 
13728
      return true;
13729
    }
13730
 
13731
    @Override
13732
    public int hashCode() {
13733
      return 0;
13734
    }
13735
 
13736
    public int compareTo(getInvoices_args other) {
13737
      if (!getClass().equals(other.getClass())) {
13738
        return getClass().getName().compareTo(other.getClass().getName());
13739
      }
13740
 
13741
      int lastComparison = 0;
13742
      getInvoices_args typedOther = (getInvoices_args)other;
13743
 
13744
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
13745
      if (lastComparison != 0) {
13746
        return lastComparison;
13747
      }
13748
      if (isSetDate()) {
13749
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
13750
        if (lastComparison != 0) {
13751
          return lastComparison;
13752
        }
13753
      }
13754
      return 0;
13755
    }
13756
 
13757
    public _Fields fieldForId(int fieldId) {
13758
      return _Fields.findByThriftId(fieldId);
13759
    }
13760
 
13761
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13762
      org.apache.thrift.protocol.TField field;
13763
      iprot.readStructBegin();
13764
      while (true)
13765
      {
13766
        field = iprot.readFieldBegin();
13767
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13768
          break;
13769
        }
13770
        switch (field.id) {
13771
          case 1: // DATE
13772
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13773
              this.date = iprot.readI64();
13774
              setDateIsSet(true);
13775
            } else { 
13776
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13777
            }
13778
            break;
13779
          default:
13780
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13781
        }
13782
        iprot.readFieldEnd();
13783
      }
13784
      iprot.readStructEnd();
13785
      validate();
13786
    }
13787
 
13788
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13789
      validate();
13790
 
13791
      oprot.writeStructBegin(STRUCT_DESC);
13792
      oprot.writeFieldBegin(DATE_FIELD_DESC);
13793
      oprot.writeI64(this.date);
13794
      oprot.writeFieldEnd();
13795
      oprot.writeFieldStop();
13796
      oprot.writeStructEnd();
13797
    }
13798
 
13799
    @Override
13800
    public String toString() {
13801
      StringBuilder sb = new StringBuilder("getInvoices_args(");
13802
      boolean first = true;
13803
 
13804
      sb.append("date:");
13805
      sb.append(this.date);
13806
      first = false;
13807
      sb.append(")");
13808
      return sb.toString();
13809
    }
13810
 
13811
    public void validate() throws org.apache.thrift.TException {
13812
      // check for required fields
13813
    }
13814
 
13815
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13816
      try {
13817
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13818
      } catch (org.apache.thrift.TException te) {
13819
        throw new java.io.IOException(te);
13820
      }
13821
    }
13822
 
13823
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13824
      try {
13825
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
13826
        __isset_bit_vector = new BitSet(1);
13827
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13828
      } catch (org.apache.thrift.TException te) {
13829
        throw new java.io.IOException(te);
13830
      }
13831
    }
13832
 
13833
  }
13834
 
13835
  public static class getInvoices_result implements org.apache.thrift.TBase<getInvoices_result, getInvoices_result._Fields>, java.io.Serializable, Cloneable   {
13836
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_result");
13837
 
13838
    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);
13839
 
13840
    private List<Invoice> success; // required
13841
 
13842
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13843
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13844
      SUCCESS((short)0, "success");
13845
 
13846
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13847
 
13848
      static {
13849
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13850
          byName.put(field.getFieldName(), field);
13851
        }
13852
      }
13853
 
13854
      /**
13855
       * Find the _Fields constant that matches fieldId, or null if its not found.
13856
       */
13857
      public static _Fields findByThriftId(int fieldId) {
13858
        switch(fieldId) {
13859
          case 0: // SUCCESS
13860
            return SUCCESS;
13861
          default:
13862
            return null;
13863
        }
13864
      }
13865
 
13866
      /**
13867
       * Find the _Fields constant that matches fieldId, throwing an exception
13868
       * if it is not found.
13869
       */
13870
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13871
        _Fields fields = findByThriftId(fieldId);
13872
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13873
        return fields;
13874
      }
13875
 
13876
      /**
13877
       * Find the _Fields constant that matches name, or null if its not found.
13878
       */
13879
      public static _Fields findByName(String name) {
13880
        return byName.get(name);
13881
      }
13882
 
13883
      private final short _thriftId;
13884
      private final String _fieldName;
13885
 
13886
      _Fields(short thriftId, String fieldName) {
13887
        _thriftId = thriftId;
13888
        _fieldName = fieldName;
13889
      }
13890
 
13891
      public short getThriftFieldId() {
13892
        return _thriftId;
13893
      }
13894
 
13895
      public String getFieldName() {
13896
        return _fieldName;
13897
      }
13898
    }
13899
 
13900
    // isset id assignments
13901
 
13902
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13903
    static {
13904
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13905
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13906
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
13907
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class))));
13908
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13909
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_result.class, metaDataMap);
13910
    }
13911
 
13912
    public getInvoices_result() {
13913
    }
13914
 
13915
    public getInvoices_result(
13916
      List<Invoice> success)
13917
    {
13918
      this();
13919
      this.success = success;
13920
    }
13921
 
13922
    /**
13923
     * Performs a deep copy on <i>other</i>.
13924
     */
13925
    public getInvoices_result(getInvoices_result other) {
13926
      if (other.isSetSuccess()) {
13927
        List<Invoice> __this__success = new ArrayList<Invoice>();
13928
        for (Invoice other_element : other.success) {
13929
          __this__success.add(new Invoice(other_element));
13930
        }
13931
        this.success = __this__success;
13932
      }
13933
    }
13934
 
13935
    public getInvoices_result deepCopy() {
13936
      return new getInvoices_result(this);
13937
    }
13938
 
13939
    @Override
13940
    public void clear() {
13941
      this.success = null;
13942
    }
13943
 
13944
    public int getSuccessSize() {
13945
      return (this.success == null) ? 0 : this.success.size();
13946
    }
13947
 
13948
    public java.util.Iterator<Invoice> getSuccessIterator() {
13949
      return (this.success == null) ? null : this.success.iterator();
13950
    }
13951
 
13952
    public void addToSuccess(Invoice elem) {
13953
      if (this.success == null) {
13954
        this.success = new ArrayList<Invoice>();
13955
      }
13956
      this.success.add(elem);
13957
    }
13958
 
13959
    public List<Invoice> getSuccess() {
13960
      return this.success;
13961
    }
13962
 
13963
    public void setSuccess(List<Invoice> success) {
13964
      this.success = success;
13965
    }
13966
 
13967
    public void unsetSuccess() {
13968
      this.success = null;
13969
    }
13970
 
13971
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
13972
    public boolean isSetSuccess() {
13973
      return this.success != null;
13974
    }
13975
 
13976
    public void setSuccessIsSet(boolean value) {
13977
      if (!value) {
13978
        this.success = null;
13979
      }
13980
    }
13981
 
13982
    public void setFieldValue(_Fields field, Object value) {
13983
      switch (field) {
13984
      case SUCCESS:
13985
        if (value == null) {
13986
          unsetSuccess();
13987
        } else {
13988
          setSuccess((List<Invoice>)value);
13989
        }
13990
        break;
13991
 
13992
      }
13993
    }
13994
 
13995
    public Object getFieldValue(_Fields field) {
13996
      switch (field) {
13997
      case SUCCESS:
13998
        return getSuccess();
13999
 
14000
      }
14001
      throw new IllegalStateException();
14002
    }
14003
 
14004
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14005
    public boolean isSet(_Fields field) {
14006
      if (field == null) {
14007
        throw new IllegalArgumentException();
14008
      }
14009
 
14010
      switch (field) {
14011
      case SUCCESS:
14012
        return isSetSuccess();
14013
      }
14014
      throw new IllegalStateException();
14015
    }
14016
 
14017
    @Override
14018
    public boolean equals(Object that) {
14019
      if (that == null)
14020
        return false;
14021
      if (that instanceof getInvoices_result)
14022
        return this.equals((getInvoices_result)that);
14023
      return false;
14024
    }
14025
 
14026
    public boolean equals(getInvoices_result that) {
14027
      if (that == null)
14028
        return false;
14029
 
14030
      boolean this_present_success = true && this.isSetSuccess();
14031
      boolean that_present_success = true && that.isSetSuccess();
14032
      if (this_present_success || that_present_success) {
14033
        if (!(this_present_success && that_present_success))
14034
          return false;
14035
        if (!this.success.equals(that.success))
14036
          return false;
14037
      }
14038
 
14039
      return true;
14040
    }
14041
 
14042
    @Override
14043
    public int hashCode() {
14044
      return 0;
14045
    }
14046
 
14047
    public int compareTo(getInvoices_result other) {
14048
      if (!getClass().equals(other.getClass())) {
14049
        return getClass().getName().compareTo(other.getClass().getName());
14050
      }
14051
 
14052
      int lastComparison = 0;
14053
      getInvoices_result typedOther = (getInvoices_result)other;
14054
 
14055
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
14056
      if (lastComparison != 0) {
14057
        return lastComparison;
14058
      }
14059
      if (isSetSuccess()) {
14060
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
14061
        if (lastComparison != 0) {
14062
          return lastComparison;
14063
        }
14064
      }
14065
      return 0;
14066
    }
14067
 
14068
    public _Fields fieldForId(int fieldId) {
14069
      return _Fields.findByThriftId(fieldId);
14070
    }
14071
 
14072
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14073
      org.apache.thrift.protocol.TField field;
14074
      iprot.readStructBegin();
14075
      while (true)
14076
      {
14077
        field = iprot.readFieldBegin();
14078
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14079
          break;
14080
        }
14081
        switch (field.id) {
14082
          case 0: // SUCCESS
14083
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
14084
              {
21847 amit.gupta 14085
                org.apache.thrift.protocol.TList _list28 = iprot.readListBegin();
14086
                this.success = new ArrayList<Invoice>(_list28.size);
14087
                for (int _i29 = 0; _i29 < _list28.size; ++_i29)
5443 mandeep.dh 14088
                {
21847 amit.gupta 14089
                  Invoice _elem30; // required
14090
                  _elem30 = new Invoice();
14091
                  _elem30.read(iprot);
14092
                  this.success.add(_elem30);
5443 mandeep.dh 14093
                }
14094
                iprot.readListEnd();
14095
              }
14096
            } else { 
14097
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14098
            }
14099
            break;
14100
          default:
14101
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14102
        }
14103
        iprot.readFieldEnd();
14104
      }
14105
      iprot.readStructEnd();
14106
      validate();
14107
    }
14108
 
14109
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14110
      oprot.writeStructBegin(STRUCT_DESC);
14111
 
14112
      if (this.isSetSuccess()) {
14113
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14114
        {
14115
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
21847 amit.gupta 14116
          for (Invoice _iter31 : this.success)
5443 mandeep.dh 14117
          {
21847 amit.gupta 14118
            _iter31.write(oprot);
5443 mandeep.dh 14119
          }
14120
          oprot.writeListEnd();
14121
        }
14122
        oprot.writeFieldEnd();
14123
      }
14124
      oprot.writeFieldStop();
14125
      oprot.writeStructEnd();
14126
    }
14127
 
14128
    @Override
14129
    public String toString() {
14130
      StringBuilder sb = new StringBuilder("getInvoices_result(");
14131
      boolean first = true;
14132
 
14133
      sb.append("success:");
14134
      if (this.success == null) {
14135
        sb.append("null");
14136
      } else {
14137
        sb.append(this.success);
14138
      }
14139
      first = false;
14140
      sb.append(")");
14141
      return sb.toString();
14142
    }
14143
 
14144
    public void validate() throws org.apache.thrift.TException {
14145
      // check for required fields
14146
    }
14147
 
14148
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14149
      try {
14150
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14151
      } catch (org.apache.thrift.TException te) {
14152
        throw new java.io.IOException(te);
14153
      }
14154
    }
14155
 
14156
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14157
      try {
14158
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14159
      } catch (org.apache.thrift.TException te) {
14160
        throw new java.io.IOException(te);
14161
      }
14162
    }
14163
 
14164
  }
14165
 
7410 amar.kumar 14166
  public static class getInvoicesForWarehouse_args implements org.apache.thrift.TBase<getInvoicesForWarehouse_args, getInvoicesForWarehouse_args._Fields>, java.io.Serializable, Cloneable   {
14167
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoicesForWarehouse_args");
14168
 
14169
    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);
14170
    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);
14171
    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);
14172
 
14173
    private long warehouseId; // required
14174
    private long supplierId; // required
14175
    private long date; // required
14176
 
14177
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14178
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14179
      WAREHOUSE_ID((short)1, "warehouseId"),
14180
      SUPPLIER_ID((short)2, "supplierId"),
14181
      DATE((short)3, "date");
14182
 
14183
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14184
 
14185
      static {
14186
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14187
          byName.put(field.getFieldName(), field);
14188
        }
14189
      }
14190
 
14191
      /**
14192
       * Find the _Fields constant that matches fieldId, or null if its not found.
14193
       */
14194
      public static _Fields findByThriftId(int fieldId) {
14195
        switch(fieldId) {
14196
          case 1: // WAREHOUSE_ID
14197
            return WAREHOUSE_ID;
14198
          case 2: // SUPPLIER_ID
14199
            return SUPPLIER_ID;
14200
          case 3: // DATE
14201
            return DATE;
14202
          default:
14203
            return null;
14204
        }
14205
      }
14206
 
14207
      /**
14208
       * Find the _Fields constant that matches fieldId, throwing an exception
14209
       * if it is not found.
14210
       */
14211
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14212
        _Fields fields = findByThriftId(fieldId);
14213
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14214
        return fields;
14215
      }
14216
 
14217
      /**
14218
       * Find the _Fields constant that matches name, or null if its not found.
14219
       */
14220
      public static _Fields findByName(String name) {
14221
        return byName.get(name);
14222
      }
14223
 
14224
      private final short _thriftId;
14225
      private final String _fieldName;
14226
 
14227
      _Fields(short thriftId, String fieldName) {
14228
        _thriftId = thriftId;
14229
        _fieldName = fieldName;
14230
      }
14231
 
14232
      public short getThriftFieldId() {
14233
        return _thriftId;
14234
      }
14235
 
14236
      public String getFieldName() {
14237
        return _fieldName;
14238
      }
14239
    }
14240
 
14241
    // isset id assignments
14242
    private static final int __WAREHOUSEID_ISSET_ID = 0;
14243
    private static final int __SUPPLIERID_ISSET_ID = 1;
14244
    private static final int __DATE_ISSET_ID = 2;
14245
    private BitSet __isset_bit_vector = new BitSet(3);
14246
 
14247
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14248
    static {
14249
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14250
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14251
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
14252
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14253
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
14254
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14255
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
14256
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14257
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoicesForWarehouse_args.class, metaDataMap);
14258
    }
14259
 
14260
    public getInvoicesForWarehouse_args() {
14261
    }
14262
 
14263
    public getInvoicesForWarehouse_args(
14264
      long warehouseId,
14265
      long supplierId,
14266
      long date)
14267
    {
14268
      this();
14269
      this.warehouseId = warehouseId;
14270
      setWarehouseIdIsSet(true);
14271
      this.supplierId = supplierId;
14272
      setSupplierIdIsSet(true);
14273
      this.date = date;
14274
      setDateIsSet(true);
14275
    }
14276
 
14277
    /**
14278
     * Performs a deep copy on <i>other</i>.
14279
     */
14280
    public getInvoicesForWarehouse_args(getInvoicesForWarehouse_args other) {
14281
      __isset_bit_vector.clear();
14282
      __isset_bit_vector.or(other.__isset_bit_vector);
14283
      this.warehouseId = other.warehouseId;
14284
      this.supplierId = other.supplierId;
14285
      this.date = other.date;
14286
    }
14287
 
14288
    public getInvoicesForWarehouse_args deepCopy() {
14289
      return new getInvoicesForWarehouse_args(this);
14290
    }
14291
 
14292
    @Override
14293
    public void clear() {
14294
      setWarehouseIdIsSet(false);
14295
      this.warehouseId = 0;
14296
      setSupplierIdIsSet(false);
14297
      this.supplierId = 0;
14298
      setDateIsSet(false);
14299
      this.date = 0;
14300
    }
14301
 
14302
    public long getWarehouseId() {
14303
      return this.warehouseId;
14304
    }
14305
 
14306
    public void setWarehouseId(long warehouseId) {
14307
      this.warehouseId = warehouseId;
14308
      setWarehouseIdIsSet(true);
14309
    }
14310
 
14311
    public void unsetWarehouseId() {
14312
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
14313
    }
14314
 
14315
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
14316
    public boolean isSetWarehouseId() {
14317
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
14318
    }
14319
 
14320
    public void setWarehouseIdIsSet(boolean value) {
14321
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
14322
    }
14323
 
14324
    public long getSupplierId() {
14325
      return this.supplierId;
14326
    }
14327
 
14328
    public void setSupplierId(long supplierId) {
14329
      this.supplierId = supplierId;
14330
      setSupplierIdIsSet(true);
14331
    }
14332
 
14333
    public void unsetSupplierId() {
14334
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
14335
    }
14336
 
14337
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
14338
    public boolean isSetSupplierId() {
14339
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
14340
    }
14341
 
14342
    public void setSupplierIdIsSet(boolean value) {
14343
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
14344
    }
14345
 
14346
    public long getDate() {
14347
      return this.date;
14348
    }
14349
 
14350
    public void setDate(long date) {
14351
      this.date = date;
14352
      setDateIsSet(true);
14353
    }
14354
 
14355
    public void unsetDate() {
14356
      __isset_bit_vector.clear(__DATE_ISSET_ID);
14357
    }
14358
 
14359
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
14360
    public boolean isSetDate() {
14361
      return __isset_bit_vector.get(__DATE_ISSET_ID);
14362
    }
14363
 
14364
    public void setDateIsSet(boolean value) {
14365
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
14366
    }
14367
 
14368
    public void setFieldValue(_Fields field, Object value) {
14369
      switch (field) {
14370
      case WAREHOUSE_ID:
14371
        if (value == null) {
14372
          unsetWarehouseId();
14373
        } else {
14374
          setWarehouseId((Long)value);
14375
        }
14376
        break;
14377
 
14378
      case SUPPLIER_ID:
14379
        if (value == null) {
14380
          unsetSupplierId();
14381
        } else {
14382
          setSupplierId((Long)value);
14383
        }
14384
        break;
14385
 
14386
      case DATE:
14387
        if (value == null) {
14388
          unsetDate();
14389
        } else {
14390
          setDate((Long)value);
14391
        }
14392
        break;
14393
 
14394
      }
14395
    }
14396
 
14397
    public Object getFieldValue(_Fields field) {
14398
      switch (field) {
14399
      case WAREHOUSE_ID:
14400
        return Long.valueOf(getWarehouseId());
14401
 
14402
      case SUPPLIER_ID:
14403
        return Long.valueOf(getSupplierId());
14404
 
14405
      case DATE:
14406
        return Long.valueOf(getDate());
14407
 
14408
      }
14409
      throw new IllegalStateException();
14410
    }
14411
 
14412
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14413
    public boolean isSet(_Fields field) {
14414
      if (field == null) {
14415
        throw new IllegalArgumentException();
14416
      }
14417
 
14418
      switch (field) {
14419
      case WAREHOUSE_ID:
14420
        return isSetWarehouseId();
14421
      case SUPPLIER_ID:
14422
        return isSetSupplierId();
14423
      case DATE:
14424
        return isSetDate();
14425
      }
14426
      throw new IllegalStateException();
14427
    }
14428
 
14429
    @Override
14430
    public boolean equals(Object that) {
14431
      if (that == null)
14432
        return false;
14433
      if (that instanceof getInvoicesForWarehouse_args)
14434
        return this.equals((getInvoicesForWarehouse_args)that);
14435
      return false;
14436
    }
14437
 
14438
    public boolean equals(getInvoicesForWarehouse_args that) {
14439
      if (that == null)
14440
        return false;
14441
 
14442
      boolean this_present_warehouseId = true;
14443
      boolean that_present_warehouseId = true;
14444
      if (this_present_warehouseId || that_present_warehouseId) {
14445
        if (!(this_present_warehouseId && that_present_warehouseId))
14446
          return false;
14447
        if (this.warehouseId != that.warehouseId)
14448
          return false;
14449
      }
14450
 
14451
      boolean this_present_supplierId = true;
14452
      boolean that_present_supplierId = true;
14453
      if (this_present_supplierId || that_present_supplierId) {
14454
        if (!(this_present_supplierId && that_present_supplierId))
14455
          return false;
14456
        if (this.supplierId != that.supplierId)
14457
          return false;
14458
      }
14459
 
14460
      boolean this_present_date = true;
14461
      boolean that_present_date = true;
14462
      if (this_present_date || that_present_date) {
14463
        if (!(this_present_date && that_present_date))
14464
          return false;
14465
        if (this.date != that.date)
14466
          return false;
14467
      }
14468
 
14469
      return true;
14470
    }
14471
 
14472
    @Override
14473
    public int hashCode() {
14474
      return 0;
14475
    }
14476
 
14477
    public int compareTo(getInvoicesForWarehouse_args other) {
14478
      if (!getClass().equals(other.getClass())) {
14479
        return getClass().getName().compareTo(other.getClass().getName());
14480
      }
14481
 
14482
      int lastComparison = 0;
14483
      getInvoicesForWarehouse_args typedOther = (getInvoicesForWarehouse_args)other;
14484
 
14485
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
14486
      if (lastComparison != 0) {
14487
        return lastComparison;
14488
      }
14489
      if (isSetWarehouseId()) {
14490
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
14491
        if (lastComparison != 0) {
14492
          return lastComparison;
14493
        }
14494
      }
14495
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
14496
      if (lastComparison != 0) {
14497
        return lastComparison;
14498
      }
14499
      if (isSetSupplierId()) {
14500
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
14501
        if (lastComparison != 0) {
14502
          return lastComparison;
14503
        }
14504
      }
14505
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
14506
      if (lastComparison != 0) {
14507
        return lastComparison;
14508
      }
14509
      if (isSetDate()) {
14510
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
14511
        if (lastComparison != 0) {
14512
          return lastComparison;
14513
        }
14514
      }
14515
      return 0;
14516
    }
14517
 
14518
    public _Fields fieldForId(int fieldId) {
14519
      return _Fields.findByThriftId(fieldId);
14520
    }
14521
 
14522
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14523
      org.apache.thrift.protocol.TField field;
14524
      iprot.readStructBegin();
14525
      while (true)
14526
      {
14527
        field = iprot.readFieldBegin();
14528
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14529
          break;
14530
        }
14531
        switch (field.id) {
14532
          case 1: // WAREHOUSE_ID
14533
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14534
              this.warehouseId = iprot.readI64();
14535
              setWarehouseIdIsSet(true);
14536
            } else { 
14537
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14538
            }
14539
            break;
14540
          case 2: // SUPPLIER_ID
14541
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14542
              this.supplierId = iprot.readI64();
14543
              setSupplierIdIsSet(true);
14544
            } else { 
14545
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14546
            }
14547
            break;
14548
          case 3: // DATE
14549
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14550
              this.date = iprot.readI64();
14551
              setDateIsSet(true);
14552
            } else { 
14553
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14554
            }
14555
            break;
14556
          default:
14557
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14558
        }
14559
        iprot.readFieldEnd();
14560
      }
14561
      iprot.readStructEnd();
14562
      validate();
14563
    }
14564
 
14565
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14566
      validate();
14567
 
14568
      oprot.writeStructBegin(STRUCT_DESC);
14569
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
14570
      oprot.writeI64(this.warehouseId);
14571
      oprot.writeFieldEnd();
14572
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
14573
      oprot.writeI64(this.supplierId);
14574
      oprot.writeFieldEnd();
14575
      oprot.writeFieldBegin(DATE_FIELD_DESC);
14576
      oprot.writeI64(this.date);
14577
      oprot.writeFieldEnd();
14578
      oprot.writeFieldStop();
14579
      oprot.writeStructEnd();
14580
    }
14581
 
14582
    @Override
14583
    public String toString() {
14584
      StringBuilder sb = new StringBuilder("getInvoicesForWarehouse_args(");
14585
      boolean first = true;
14586
 
14587
      sb.append("warehouseId:");
14588
      sb.append(this.warehouseId);
14589
      first = false;
14590
      if (!first) sb.append(", ");
14591
      sb.append("supplierId:");
14592
      sb.append(this.supplierId);
14593
      first = false;
14594
      if (!first) sb.append(", ");
14595
      sb.append("date:");
14596
      sb.append(this.date);
14597
      first = false;
14598
      sb.append(")");
14599
      return sb.toString();
14600
    }
14601
 
14602
    public void validate() throws org.apache.thrift.TException {
14603
      // check for required fields
14604
    }
14605
 
14606
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14607
      try {
14608
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14609
      } catch (org.apache.thrift.TException te) {
14610
        throw new java.io.IOException(te);
14611
      }
14612
    }
14613
 
14614
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14615
      try {
14616
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
14617
        __isset_bit_vector = new BitSet(1);
14618
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14619
      } catch (org.apache.thrift.TException te) {
14620
        throw new java.io.IOException(te);
14621
      }
14622
    }
14623
 
14624
  }
14625
 
14626
  public static class getInvoicesForWarehouse_result implements org.apache.thrift.TBase<getInvoicesForWarehouse_result, getInvoicesForWarehouse_result._Fields>, java.io.Serializable, Cloneable   {
14627
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoicesForWarehouse_result");
14628
 
14629
    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);
14630
 
14631
    private List<Invoice> success; // required
14632
 
14633
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14634
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14635
      SUCCESS((short)0, "success");
14636
 
14637
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14638
 
14639
      static {
14640
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14641
          byName.put(field.getFieldName(), field);
14642
        }
14643
      }
14644
 
14645
      /**
14646
       * Find the _Fields constant that matches fieldId, or null if its not found.
14647
       */
14648
      public static _Fields findByThriftId(int fieldId) {
14649
        switch(fieldId) {
14650
          case 0: // SUCCESS
14651
            return SUCCESS;
14652
          default:
14653
            return null;
14654
        }
14655
      }
14656
 
14657
      /**
14658
       * Find the _Fields constant that matches fieldId, throwing an exception
14659
       * if it is not found.
14660
       */
14661
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14662
        _Fields fields = findByThriftId(fieldId);
14663
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14664
        return fields;
14665
      }
14666
 
14667
      /**
14668
       * Find the _Fields constant that matches name, or null if its not found.
14669
       */
14670
      public static _Fields findByName(String name) {
14671
        return byName.get(name);
14672
      }
14673
 
14674
      private final short _thriftId;
14675
      private final String _fieldName;
14676
 
14677
      _Fields(short thriftId, String fieldName) {
14678
        _thriftId = thriftId;
14679
        _fieldName = fieldName;
14680
      }
14681
 
14682
      public short getThriftFieldId() {
14683
        return _thriftId;
14684
      }
14685
 
14686
      public String getFieldName() {
14687
        return _fieldName;
14688
      }
14689
    }
14690
 
14691
    // isset id assignments
14692
 
14693
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14694
    static {
14695
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14696
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14697
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
14698
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class))));
14699
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14700
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoicesForWarehouse_result.class, metaDataMap);
14701
    }
14702
 
14703
    public getInvoicesForWarehouse_result() {
14704
    }
14705
 
14706
    public getInvoicesForWarehouse_result(
14707
      List<Invoice> success)
14708
    {
14709
      this();
14710
      this.success = success;
14711
    }
14712
 
14713
    /**
14714
     * Performs a deep copy on <i>other</i>.
14715
     */
14716
    public getInvoicesForWarehouse_result(getInvoicesForWarehouse_result other) {
14717
      if (other.isSetSuccess()) {
14718
        List<Invoice> __this__success = new ArrayList<Invoice>();
14719
        for (Invoice other_element : other.success) {
14720
          __this__success.add(new Invoice(other_element));
14721
        }
14722
        this.success = __this__success;
14723
      }
14724
    }
14725
 
14726
    public getInvoicesForWarehouse_result deepCopy() {
14727
      return new getInvoicesForWarehouse_result(this);
14728
    }
14729
 
14730
    @Override
14731
    public void clear() {
14732
      this.success = null;
14733
    }
14734
 
14735
    public int getSuccessSize() {
14736
      return (this.success == null) ? 0 : this.success.size();
14737
    }
14738
 
14739
    public java.util.Iterator<Invoice> getSuccessIterator() {
14740
      return (this.success == null) ? null : this.success.iterator();
14741
    }
14742
 
14743
    public void addToSuccess(Invoice elem) {
14744
      if (this.success == null) {
14745
        this.success = new ArrayList<Invoice>();
14746
      }
14747
      this.success.add(elem);
14748
    }
14749
 
14750
    public List<Invoice> getSuccess() {
14751
      return this.success;
14752
    }
14753
 
14754
    public void setSuccess(List<Invoice> success) {
14755
      this.success = success;
14756
    }
14757
 
14758
    public void unsetSuccess() {
14759
      this.success = null;
14760
    }
14761
 
14762
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
14763
    public boolean isSetSuccess() {
14764
      return this.success != null;
14765
    }
14766
 
14767
    public void setSuccessIsSet(boolean value) {
14768
      if (!value) {
14769
        this.success = null;
14770
      }
14771
    }
14772
 
14773
    public void setFieldValue(_Fields field, Object value) {
14774
      switch (field) {
14775
      case SUCCESS:
14776
        if (value == null) {
14777
          unsetSuccess();
14778
        } else {
14779
          setSuccess((List<Invoice>)value);
14780
        }
14781
        break;
14782
 
14783
      }
14784
    }
14785
 
14786
    public Object getFieldValue(_Fields field) {
14787
      switch (field) {
14788
      case SUCCESS:
14789
        return getSuccess();
14790
 
14791
      }
14792
      throw new IllegalStateException();
14793
    }
14794
 
14795
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14796
    public boolean isSet(_Fields field) {
14797
      if (field == null) {
14798
        throw new IllegalArgumentException();
14799
      }
14800
 
14801
      switch (field) {
14802
      case SUCCESS:
14803
        return isSetSuccess();
14804
      }
14805
      throw new IllegalStateException();
14806
    }
14807
 
14808
    @Override
14809
    public boolean equals(Object that) {
14810
      if (that == null)
14811
        return false;
14812
      if (that instanceof getInvoicesForWarehouse_result)
14813
        return this.equals((getInvoicesForWarehouse_result)that);
14814
      return false;
14815
    }
14816
 
14817
    public boolean equals(getInvoicesForWarehouse_result that) {
14818
      if (that == null)
14819
        return false;
14820
 
14821
      boolean this_present_success = true && this.isSetSuccess();
14822
      boolean that_present_success = true && that.isSetSuccess();
14823
      if (this_present_success || that_present_success) {
14824
        if (!(this_present_success && that_present_success))
14825
          return false;
14826
        if (!this.success.equals(that.success))
14827
          return false;
14828
      }
14829
 
14830
      return true;
14831
    }
14832
 
14833
    @Override
14834
    public int hashCode() {
14835
      return 0;
14836
    }
14837
 
14838
    public int compareTo(getInvoicesForWarehouse_result other) {
14839
      if (!getClass().equals(other.getClass())) {
14840
        return getClass().getName().compareTo(other.getClass().getName());
14841
      }
14842
 
14843
      int lastComparison = 0;
14844
      getInvoicesForWarehouse_result typedOther = (getInvoicesForWarehouse_result)other;
14845
 
14846
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
14847
      if (lastComparison != 0) {
14848
        return lastComparison;
14849
      }
14850
      if (isSetSuccess()) {
14851
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
14852
        if (lastComparison != 0) {
14853
          return lastComparison;
14854
        }
14855
      }
14856
      return 0;
14857
    }
14858
 
14859
    public _Fields fieldForId(int fieldId) {
14860
      return _Fields.findByThriftId(fieldId);
14861
    }
14862
 
14863
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14864
      org.apache.thrift.protocol.TField field;
14865
      iprot.readStructBegin();
14866
      while (true)
14867
      {
14868
        field = iprot.readFieldBegin();
14869
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14870
          break;
14871
        }
14872
        switch (field.id) {
14873
          case 0: // SUCCESS
14874
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
14875
              {
21847 amit.gupta 14876
                org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
14877
                this.success = new ArrayList<Invoice>(_list32.size);
14878
                for (int _i33 = 0; _i33 < _list32.size; ++_i33)
7410 amar.kumar 14879
                {
21847 amit.gupta 14880
                  Invoice _elem34; // required
14881
                  _elem34 = new Invoice();
14882
                  _elem34.read(iprot);
14883
                  this.success.add(_elem34);
7410 amar.kumar 14884
                }
14885
                iprot.readListEnd();
14886
              }
14887
            } else { 
14888
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14889
            }
14890
            break;
14891
          default:
14892
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14893
        }
14894
        iprot.readFieldEnd();
14895
      }
14896
      iprot.readStructEnd();
14897
      validate();
14898
    }
14899
 
14900
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14901
      oprot.writeStructBegin(STRUCT_DESC);
14902
 
14903
      if (this.isSetSuccess()) {
14904
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14905
        {
14906
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
21847 amit.gupta 14907
          for (Invoice _iter35 : this.success)
7410 amar.kumar 14908
          {
21847 amit.gupta 14909
            _iter35.write(oprot);
7410 amar.kumar 14910
          }
14911
          oprot.writeListEnd();
14912
        }
14913
        oprot.writeFieldEnd();
14914
      }
14915
      oprot.writeFieldStop();
14916
      oprot.writeStructEnd();
14917
    }
14918
 
14919
    @Override
14920
    public String toString() {
14921
      StringBuilder sb = new StringBuilder("getInvoicesForWarehouse_result(");
14922
      boolean first = true;
14923
 
14924
      sb.append("success:");
14925
      if (this.success == null) {
14926
        sb.append("null");
14927
      } else {
14928
        sb.append(this.success);
14929
      }
14930
      first = false;
14931
      sb.append(")");
14932
      return sb.toString();
14933
    }
14934
 
14935
    public void validate() throws org.apache.thrift.TException {
14936
      // check for required fields
14937
    }
14938
 
14939
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14940
      try {
14941
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14942
      } catch (org.apache.thrift.TException te) {
14943
        throw new java.io.IOException(te);
14944
      }
14945
    }
14946
 
14947
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14948
      try {
14949
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14950
      } catch (org.apache.thrift.TException te) {
14951
        throw new java.io.IOException(te);
14952
      }
14953
    }
14954
 
14955
  }
14956
 
5443 mandeep.dh 14957
  public static class createInvoice_args implements org.apache.thrift.TBase<createInvoice_args, createInvoice_args._Fields>, java.io.Serializable, Cloneable   {
14958
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_args");
14959
 
14960
    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);
14961
 
14962
    private Invoice invoice; // required
14963
 
14964
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14965
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14966
      INVOICE((short)1, "invoice");
14967
 
14968
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14969
 
14970
      static {
14971
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14972
          byName.put(field.getFieldName(), field);
14973
        }
14974
      }
14975
 
14976
      /**
14977
       * Find the _Fields constant that matches fieldId, or null if its not found.
14978
       */
14979
      public static _Fields findByThriftId(int fieldId) {
14980
        switch(fieldId) {
14981
          case 1: // INVOICE
14982
            return INVOICE;
14983
          default:
14984
            return null;
14985
        }
14986
      }
14987
 
14988
      /**
14989
       * Find the _Fields constant that matches fieldId, throwing an exception
14990
       * if it is not found.
14991
       */
14992
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14993
        _Fields fields = findByThriftId(fieldId);
14994
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14995
        return fields;
14996
      }
14997
 
14998
      /**
14999
       * Find the _Fields constant that matches name, or null if its not found.
15000
       */
15001
      public static _Fields findByName(String name) {
15002
        return byName.get(name);
15003
      }
15004
 
15005
      private final short _thriftId;
15006
      private final String _fieldName;
15007
 
15008
      _Fields(short thriftId, String fieldName) {
15009
        _thriftId = thriftId;
15010
        _fieldName = fieldName;
15011
      }
15012
 
15013
      public short getThriftFieldId() {
15014
        return _thriftId;
15015
      }
15016
 
15017
      public String getFieldName() {
15018
        return _fieldName;
15019
      }
15020
    }
15021
 
15022
    // isset id assignments
15023
 
15024
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15025
    static {
15026
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15027
      tmpMap.put(_Fields.INVOICE, new org.apache.thrift.meta_data.FieldMetaData("invoice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15028
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class)));
15029
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15030
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_args.class, metaDataMap);
15031
    }
15032
 
15033
    public createInvoice_args() {
15034
    }
15035
 
15036
    public createInvoice_args(
15037
      Invoice invoice)
15038
    {
15039
      this();
15040
      this.invoice = invoice;
15041
    }
15042
 
15043
    /**
15044
     * Performs a deep copy on <i>other</i>.
15045
     */
15046
    public createInvoice_args(createInvoice_args other) {
15047
      if (other.isSetInvoice()) {
15048
        this.invoice = new Invoice(other.invoice);
15049
      }
15050
    }
15051
 
15052
    public createInvoice_args deepCopy() {
15053
      return new createInvoice_args(this);
15054
    }
15055
 
15056
    @Override
15057
    public void clear() {
15058
      this.invoice = null;
15059
    }
15060
 
15061
    public Invoice getInvoice() {
15062
      return this.invoice;
15063
    }
15064
 
15065
    public void setInvoice(Invoice invoice) {
15066
      this.invoice = invoice;
15067
    }
15068
 
15069
    public void unsetInvoice() {
15070
      this.invoice = null;
15071
    }
15072
 
15073
    /** Returns true if field invoice is set (has been assigned a value) and false otherwise */
15074
    public boolean isSetInvoice() {
15075
      return this.invoice != null;
15076
    }
15077
 
15078
    public void setInvoiceIsSet(boolean value) {
15079
      if (!value) {
15080
        this.invoice = null;
15081
      }
15082
    }
15083
 
15084
    public void setFieldValue(_Fields field, Object value) {
15085
      switch (field) {
15086
      case INVOICE:
15087
        if (value == null) {
15088
          unsetInvoice();
15089
        } else {
15090
          setInvoice((Invoice)value);
15091
        }
15092
        break;
15093
 
15094
      }
15095
    }
15096
 
15097
    public Object getFieldValue(_Fields field) {
15098
      switch (field) {
15099
      case INVOICE:
15100
        return getInvoice();
15101
 
15102
      }
15103
      throw new IllegalStateException();
15104
    }
15105
 
15106
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15107
    public boolean isSet(_Fields field) {
15108
      if (field == null) {
15109
        throw new IllegalArgumentException();
15110
      }
15111
 
15112
      switch (field) {
15113
      case INVOICE:
15114
        return isSetInvoice();
15115
      }
15116
      throw new IllegalStateException();
15117
    }
15118
 
15119
    @Override
15120
    public boolean equals(Object that) {
15121
      if (that == null)
15122
        return false;
15123
      if (that instanceof createInvoice_args)
15124
        return this.equals((createInvoice_args)that);
15125
      return false;
15126
    }
15127
 
15128
    public boolean equals(createInvoice_args that) {
15129
      if (that == null)
15130
        return false;
15131
 
15132
      boolean this_present_invoice = true && this.isSetInvoice();
15133
      boolean that_present_invoice = true && that.isSetInvoice();
15134
      if (this_present_invoice || that_present_invoice) {
15135
        if (!(this_present_invoice && that_present_invoice))
15136
          return false;
15137
        if (!this.invoice.equals(that.invoice))
15138
          return false;
15139
      }
15140
 
15141
      return true;
15142
    }
15143
 
15144
    @Override
15145
    public int hashCode() {
15146
      return 0;
15147
    }
15148
 
15149
    public int compareTo(createInvoice_args other) {
15150
      if (!getClass().equals(other.getClass())) {
15151
        return getClass().getName().compareTo(other.getClass().getName());
15152
      }
15153
 
15154
      int lastComparison = 0;
15155
      createInvoice_args typedOther = (createInvoice_args)other;
15156
 
15157
      lastComparison = Boolean.valueOf(isSetInvoice()).compareTo(typedOther.isSetInvoice());
15158
      if (lastComparison != 0) {
15159
        return lastComparison;
15160
      }
15161
      if (isSetInvoice()) {
15162
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoice, typedOther.invoice);
15163
        if (lastComparison != 0) {
15164
          return lastComparison;
15165
        }
15166
      }
15167
      return 0;
15168
    }
15169
 
15170
    public _Fields fieldForId(int fieldId) {
15171
      return _Fields.findByThriftId(fieldId);
15172
    }
15173
 
15174
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15175
      org.apache.thrift.protocol.TField field;
15176
      iprot.readStructBegin();
15177
      while (true)
15178
      {
15179
        field = iprot.readFieldBegin();
15180
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15181
          break;
15182
        }
15183
        switch (field.id) {
15184
          case 1: // INVOICE
15185
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15186
              this.invoice = new Invoice();
15187
              this.invoice.read(iprot);
15188
            } else { 
15189
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15190
            }
15191
            break;
15192
          default:
15193
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15194
        }
15195
        iprot.readFieldEnd();
15196
      }
15197
      iprot.readStructEnd();
15198
      validate();
15199
    }
15200
 
15201
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15202
      validate();
15203
 
15204
      oprot.writeStructBegin(STRUCT_DESC);
15205
      if (this.invoice != null) {
15206
        oprot.writeFieldBegin(INVOICE_FIELD_DESC);
15207
        this.invoice.write(oprot);
15208
        oprot.writeFieldEnd();
15209
      }
15210
      oprot.writeFieldStop();
15211
      oprot.writeStructEnd();
15212
    }
15213
 
15214
    @Override
15215
    public String toString() {
15216
      StringBuilder sb = new StringBuilder("createInvoice_args(");
15217
      boolean first = true;
15218
 
15219
      sb.append("invoice:");
15220
      if (this.invoice == null) {
15221
        sb.append("null");
15222
      } else {
15223
        sb.append(this.invoice);
15224
      }
15225
      first = false;
15226
      sb.append(")");
15227
      return sb.toString();
15228
    }
15229
 
15230
    public void validate() throws org.apache.thrift.TException {
15231
      // check for required fields
15232
    }
15233
 
15234
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15235
      try {
15236
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15237
      } catch (org.apache.thrift.TException te) {
15238
        throw new java.io.IOException(te);
15239
      }
15240
    }
15241
 
15242
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15243
      try {
15244
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15245
      } catch (org.apache.thrift.TException te) {
15246
        throw new java.io.IOException(te);
15247
      }
15248
    }
15249
 
15250
  }
15251
 
15252
  public static class createInvoice_result implements org.apache.thrift.TBase<createInvoice_result, createInvoice_result._Fields>, java.io.Serializable, Cloneable   {
15253
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_result");
15254
 
15255
    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);
15256
 
15257
    private PurchaseServiceException e; // required
15258
 
15259
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15260
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15261
      E((short)1, "e");
15262
 
15263
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15264
 
15265
      static {
15266
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15267
          byName.put(field.getFieldName(), field);
15268
        }
15269
      }
15270
 
15271
      /**
15272
       * Find the _Fields constant that matches fieldId, or null if its not found.
15273
       */
15274
      public static _Fields findByThriftId(int fieldId) {
15275
        switch(fieldId) {
15276
          case 1: // E
15277
            return E;
15278
          default:
15279
            return null;
15280
        }
15281
      }
15282
 
15283
      /**
15284
       * Find the _Fields constant that matches fieldId, throwing an exception
15285
       * if it is not found.
15286
       */
15287
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15288
        _Fields fields = findByThriftId(fieldId);
15289
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15290
        return fields;
15291
      }
15292
 
15293
      /**
15294
       * Find the _Fields constant that matches name, or null if its not found.
15295
       */
15296
      public static _Fields findByName(String name) {
15297
        return byName.get(name);
15298
      }
15299
 
15300
      private final short _thriftId;
15301
      private final String _fieldName;
15302
 
15303
      _Fields(short thriftId, String fieldName) {
15304
        _thriftId = thriftId;
15305
        _fieldName = fieldName;
15306
      }
15307
 
15308
      public short getThriftFieldId() {
15309
        return _thriftId;
15310
      }
15311
 
15312
      public String getFieldName() {
15313
        return _fieldName;
15314
      }
15315
    }
15316
 
15317
    // isset id assignments
15318
 
15319
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15320
    static {
15321
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15322
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15323
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
15324
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15325
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_result.class, metaDataMap);
15326
    }
15327
 
15328
    public createInvoice_result() {
15329
    }
15330
 
15331
    public createInvoice_result(
15332
      PurchaseServiceException e)
15333
    {
15334
      this();
15335
      this.e = e;
15336
    }
15337
 
15338
    /**
15339
     * Performs a deep copy on <i>other</i>.
15340
     */
15341
    public createInvoice_result(createInvoice_result other) {
15342
      if (other.isSetE()) {
15343
        this.e = new PurchaseServiceException(other.e);
15344
      }
15345
    }
15346
 
15347
    public createInvoice_result deepCopy() {
15348
      return new createInvoice_result(this);
15349
    }
15350
 
15351
    @Override
15352
    public void clear() {
15353
      this.e = null;
15354
    }
15355
 
15356
    public PurchaseServiceException getE() {
15357
      return this.e;
15358
    }
15359
 
15360
    public void setE(PurchaseServiceException e) {
15361
      this.e = e;
15362
    }
15363
 
15364
    public void unsetE() {
15365
      this.e = null;
15366
    }
15367
 
15368
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
15369
    public boolean isSetE() {
15370
      return this.e != null;
15371
    }
15372
 
15373
    public void setEIsSet(boolean value) {
15374
      if (!value) {
15375
        this.e = null;
15376
      }
15377
    }
15378
 
15379
    public void setFieldValue(_Fields field, Object value) {
15380
      switch (field) {
15381
      case E:
15382
        if (value == null) {
15383
          unsetE();
15384
        } else {
15385
          setE((PurchaseServiceException)value);
15386
        }
15387
        break;
15388
 
15389
      }
15390
    }
15391
 
15392
    public Object getFieldValue(_Fields field) {
15393
      switch (field) {
15394
      case E:
15395
        return getE();
15396
 
15397
      }
15398
      throw new IllegalStateException();
15399
    }
15400
 
15401
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15402
    public boolean isSet(_Fields field) {
15403
      if (field == null) {
15404
        throw new IllegalArgumentException();
15405
      }
15406
 
15407
      switch (field) {
15408
      case E:
15409
        return isSetE();
15410
      }
15411
      throw new IllegalStateException();
15412
    }
15413
 
15414
    @Override
15415
    public boolean equals(Object that) {
15416
      if (that == null)
15417
        return false;
15418
      if (that instanceof createInvoice_result)
15419
        return this.equals((createInvoice_result)that);
15420
      return false;
15421
    }
15422
 
15423
    public boolean equals(createInvoice_result that) {
15424
      if (that == null)
15425
        return false;
15426
 
15427
      boolean this_present_e = true && this.isSetE();
15428
      boolean that_present_e = true && that.isSetE();
15429
      if (this_present_e || that_present_e) {
15430
        if (!(this_present_e && that_present_e))
15431
          return false;
15432
        if (!this.e.equals(that.e))
15433
          return false;
15434
      }
15435
 
15436
      return true;
15437
    }
15438
 
15439
    @Override
15440
    public int hashCode() {
15441
      return 0;
15442
    }
15443
 
15444
    public int compareTo(createInvoice_result other) {
15445
      if (!getClass().equals(other.getClass())) {
15446
        return getClass().getName().compareTo(other.getClass().getName());
15447
      }
15448
 
15449
      int lastComparison = 0;
15450
      createInvoice_result typedOther = (createInvoice_result)other;
15451
 
15452
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
15453
      if (lastComparison != 0) {
15454
        return lastComparison;
15455
      }
15456
      if (isSetE()) {
15457
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
15458
        if (lastComparison != 0) {
15459
          return lastComparison;
15460
        }
15461
      }
15462
      return 0;
15463
    }
15464
 
15465
    public _Fields fieldForId(int fieldId) {
15466
      return _Fields.findByThriftId(fieldId);
15467
    }
15468
 
15469
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15470
      org.apache.thrift.protocol.TField field;
15471
      iprot.readStructBegin();
15472
      while (true)
15473
      {
15474
        field = iprot.readFieldBegin();
15475
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15476
          break;
15477
        }
15478
        switch (field.id) {
15479
          case 1: // E
15480
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15481
              this.e = new PurchaseServiceException();
15482
              this.e.read(iprot);
15483
            } else { 
15484
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15485
            }
15486
            break;
15487
          default:
15488
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15489
        }
15490
        iprot.readFieldEnd();
15491
      }
15492
      iprot.readStructEnd();
15493
      validate();
15494
    }
15495
 
15496
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15497
      oprot.writeStructBegin(STRUCT_DESC);
15498
 
15499
      if (this.isSetE()) {
15500
        oprot.writeFieldBegin(E_FIELD_DESC);
15501
        this.e.write(oprot);
15502
        oprot.writeFieldEnd();
15503
      }
15504
      oprot.writeFieldStop();
15505
      oprot.writeStructEnd();
15506
    }
15507
 
15508
    @Override
15509
    public String toString() {
15510
      StringBuilder sb = new StringBuilder("createInvoice_result(");
15511
      boolean first = true;
15512
 
15513
      sb.append("e:");
15514
      if (this.e == null) {
15515
        sb.append("null");
15516
      } else {
15517
        sb.append(this.e);
15518
      }
15519
      first = false;
15520
      sb.append(")");
15521
      return sb.toString();
15522
    }
15523
 
15524
    public void validate() throws org.apache.thrift.TException {
15525
      // check for required fields
15526
    }
15527
 
15528
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15529
      try {
15530
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15531
      } catch (org.apache.thrift.TException te) {
15532
        throw new java.io.IOException(te);
15533
      }
15534
    }
15535
 
15536
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15537
      try {
15538
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15539
      } catch (org.apache.thrift.TException te) {
15540
        throw new java.io.IOException(te);
15541
      }
15542
    }
15543
 
15544
  }
15545
 
5591 mandeep.dh 15546
  public static class addSupplier_args implements org.apache.thrift.TBase<addSupplier_args, addSupplier_args._Fields>, java.io.Serializable, Cloneable   {
15547
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSupplier_args");
15548
 
15549
    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);
15550
 
15551
    private Supplier supplier; // required
15552
 
15553
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15554
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15555
      SUPPLIER((short)1, "supplier");
15556
 
15557
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15558
 
15559
      static {
15560
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15561
          byName.put(field.getFieldName(), field);
15562
        }
15563
      }
15564
 
15565
      /**
15566
       * Find the _Fields constant that matches fieldId, or null if its not found.
15567
       */
15568
      public static _Fields findByThriftId(int fieldId) {
15569
        switch(fieldId) {
15570
          case 1: // SUPPLIER
15571
            return SUPPLIER;
15572
          default:
15573
            return null;
15574
        }
15575
      }
15576
 
15577
      /**
15578
       * Find the _Fields constant that matches fieldId, throwing an exception
15579
       * if it is not found.
15580
       */
15581
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15582
        _Fields fields = findByThriftId(fieldId);
15583
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15584
        return fields;
15585
      }
15586
 
15587
      /**
15588
       * Find the _Fields constant that matches name, or null if its not found.
15589
       */
15590
      public static _Fields findByName(String name) {
15591
        return byName.get(name);
15592
      }
15593
 
15594
      private final short _thriftId;
15595
      private final String _fieldName;
15596
 
15597
      _Fields(short thriftId, String fieldName) {
15598
        _thriftId = thriftId;
15599
        _fieldName = fieldName;
15600
      }
15601
 
15602
      public short getThriftFieldId() {
15603
        return _thriftId;
15604
      }
15605
 
15606
      public String getFieldName() {
15607
        return _fieldName;
15608
      }
15609
    }
15610
 
15611
    // isset id assignments
15612
 
15613
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15614
    static {
15615
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15616
      tmpMap.put(_Fields.SUPPLIER, new org.apache.thrift.meta_data.FieldMetaData("supplier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15617
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
15618
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15619
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSupplier_args.class, metaDataMap);
15620
    }
15621
 
15622
    public addSupplier_args() {
15623
    }
15624
 
15625
    public addSupplier_args(
15626
      Supplier supplier)
15627
    {
15628
      this();
15629
      this.supplier = supplier;
15630
    }
15631
 
15632
    /**
15633
     * Performs a deep copy on <i>other</i>.
15634
     */
15635
    public addSupplier_args(addSupplier_args other) {
15636
      if (other.isSetSupplier()) {
15637
        this.supplier = new Supplier(other.supplier);
15638
      }
15639
    }
15640
 
15641
    public addSupplier_args deepCopy() {
15642
      return new addSupplier_args(this);
15643
    }
15644
 
15645
    @Override
15646
    public void clear() {
15647
      this.supplier = null;
15648
    }
15649
 
15650
    public Supplier getSupplier() {
15651
      return this.supplier;
15652
    }
15653
 
15654
    public void setSupplier(Supplier supplier) {
15655
      this.supplier = supplier;
15656
    }
15657
 
15658
    public void unsetSupplier() {
15659
      this.supplier = null;
15660
    }
15661
 
15662
    /** Returns true if field supplier is set (has been assigned a value) and false otherwise */
15663
    public boolean isSetSupplier() {
15664
      return this.supplier != null;
15665
    }
15666
 
15667
    public void setSupplierIsSet(boolean value) {
15668
      if (!value) {
15669
        this.supplier = null;
15670
      }
15671
    }
15672
 
15673
    public void setFieldValue(_Fields field, Object value) {
15674
      switch (field) {
15675
      case SUPPLIER:
15676
        if (value == null) {
15677
          unsetSupplier();
15678
        } else {
15679
          setSupplier((Supplier)value);
15680
        }
15681
        break;
15682
 
15683
      }
15684
    }
15685
 
15686
    public Object getFieldValue(_Fields field) {
15687
      switch (field) {
15688
      case SUPPLIER:
15689
        return getSupplier();
15690
 
15691
      }
15692
      throw new IllegalStateException();
15693
    }
15694
 
15695
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15696
    public boolean isSet(_Fields field) {
15697
      if (field == null) {
15698
        throw new IllegalArgumentException();
15699
      }
15700
 
15701
      switch (field) {
15702
      case SUPPLIER:
15703
        return isSetSupplier();
15704
      }
15705
      throw new IllegalStateException();
15706
    }
15707
 
15708
    @Override
15709
    public boolean equals(Object that) {
15710
      if (that == null)
15711
        return false;
15712
      if (that instanceof addSupplier_args)
15713
        return this.equals((addSupplier_args)that);
15714
      return false;
15715
    }
15716
 
15717
    public boolean equals(addSupplier_args that) {
15718
      if (that == null)
15719
        return false;
15720
 
15721
      boolean this_present_supplier = true && this.isSetSupplier();
15722
      boolean that_present_supplier = true && that.isSetSupplier();
15723
      if (this_present_supplier || that_present_supplier) {
15724
        if (!(this_present_supplier && that_present_supplier))
15725
          return false;
15726
        if (!this.supplier.equals(that.supplier))
15727
          return false;
15728
      }
15729
 
15730
      return true;
15731
    }
15732
 
15733
    @Override
15734
    public int hashCode() {
15735
      return 0;
15736
    }
15737
 
15738
    public int compareTo(addSupplier_args other) {
15739
      if (!getClass().equals(other.getClass())) {
15740
        return getClass().getName().compareTo(other.getClass().getName());
15741
      }
15742
 
15743
      int lastComparison = 0;
15744
      addSupplier_args typedOther = (addSupplier_args)other;
15745
 
15746
      lastComparison = Boolean.valueOf(isSetSupplier()).compareTo(typedOther.isSetSupplier());
15747
      if (lastComparison != 0) {
15748
        return lastComparison;
15749
      }
15750
      if (isSetSupplier()) {
15751
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplier, typedOther.supplier);
15752
        if (lastComparison != 0) {
15753
          return lastComparison;
15754
        }
15755
      }
15756
      return 0;
15757
    }
15758
 
15759
    public _Fields fieldForId(int fieldId) {
15760
      return _Fields.findByThriftId(fieldId);
15761
    }
15762
 
15763
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15764
      org.apache.thrift.protocol.TField field;
15765
      iprot.readStructBegin();
15766
      while (true)
15767
      {
15768
        field = iprot.readFieldBegin();
15769
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15770
          break;
15771
        }
15772
        switch (field.id) {
15773
          case 1: // SUPPLIER
15774
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15775
              this.supplier = new Supplier();
15776
              this.supplier.read(iprot);
15777
            } else { 
15778
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15779
            }
15780
            break;
15781
          default:
15782
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15783
        }
15784
        iprot.readFieldEnd();
15785
      }
15786
      iprot.readStructEnd();
15787
      validate();
15788
    }
15789
 
15790
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15791
      validate();
15792
 
15793
      oprot.writeStructBegin(STRUCT_DESC);
15794
      if (this.supplier != null) {
15795
        oprot.writeFieldBegin(SUPPLIER_FIELD_DESC);
15796
        this.supplier.write(oprot);
15797
        oprot.writeFieldEnd();
15798
      }
15799
      oprot.writeFieldStop();
15800
      oprot.writeStructEnd();
15801
    }
15802
 
15803
    @Override
15804
    public String toString() {
15805
      StringBuilder sb = new StringBuilder("addSupplier_args(");
15806
      boolean first = true;
15807
 
15808
      sb.append("supplier:");
15809
      if (this.supplier == null) {
15810
        sb.append("null");
15811
      } else {
15812
        sb.append(this.supplier);
15813
      }
15814
      first = false;
15815
      sb.append(")");
15816
      return sb.toString();
15817
    }
15818
 
15819
    public void validate() throws org.apache.thrift.TException {
15820
      // check for required fields
15821
    }
15822
 
15823
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15824
      try {
15825
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15826
      } catch (org.apache.thrift.TException te) {
15827
        throw new java.io.IOException(te);
15828
      }
15829
    }
15830
 
15831
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15832
      try {
15833
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15834
      } catch (org.apache.thrift.TException te) {
15835
        throw new java.io.IOException(te);
15836
      }
15837
    }
15838
 
15839
  }
15840
 
15841
  public static class addSupplier_result implements org.apache.thrift.TBase<addSupplier_result, addSupplier_result._Fields>, java.io.Serializable, Cloneable   {
15842
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSupplier_result");
15843
 
15844
    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);
15845
 
15846
    private Supplier success; // required
15847
 
15848
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15849
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15850
      SUCCESS((short)0, "success");
15851
 
15852
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15853
 
15854
      static {
15855
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15856
          byName.put(field.getFieldName(), field);
15857
        }
15858
      }
15859
 
15860
      /**
15861
       * Find the _Fields constant that matches fieldId, or null if its not found.
15862
       */
15863
      public static _Fields findByThriftId(int fieldId) {
15864
        switch(fieldId) {
15865
          case 0: // SUCCESS
15866
            return SUCCESS;
15867
          default:
15868
            return null;
15869
        }
15870
      }
15871
 
15872
      /**
15873
       * Find the _Fields constant that matches fieldId, throwing an exception
15874
       * if it is not found.
15875
       */
15876
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15877
        _Fields fields = findByThriftId(fieldId);
15878
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15879
        return fields;
15880
      }
15881
 
15882
      /**
15883
       * Find the _Fields constant that matches name, or null if its not found.
15884
       */
15885
      public static _Fields findByName(String name) {
15886
        return byName.get(name);
15887
      }
15888
 
15889
      private final short _thriftId;
15890
      private final String _fieldName;
15891
 
15892
      _Fields(short thriftId, String fieldName) {
15893
        _thriftId = thriftId;
15894
        _fieldName = fieldName;
15895
      }
15896
 
15897
      public short getThriftFieldId() {
15898
        return _thriftId;
15899
      }
15900
 
15901
      public String getFieldName() {
15902
        return _fieldName;
15903
      }
15904
    }
15905
 
15906
    // isset id assignments
15907
 
15908
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15909
    static {
15910
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15911
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15912
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
15913
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15914
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSupplier_result.class, metaDataMap);
15915
    }
15916
 
15917
    public addSupplier_result() {
15918
    }
15919
 
15920
    public addSupplier_result(
15921
      Supplier success)
15922
    {
15923
      this();
15924
      this.success = success;
15925
    }
15926
 
15927
    /**
15928
     * Performs a deep copy on <i>other</i>.
15929
     */
15930
    public addSupplier_result(addSupplier_result other) {
15931
      if (other.isSetSuccess()) {
15932
        this.success = new Supplier(other.success);
15933
      }
15934
    }
15935
 
15936
    public addSupplier_result deepCopy() {
15937
      return new addSupplier_result(this);
15938
    }
15939
 
15940
    @Override
15941
    public void clear() {
15942
      this.success = null;
15943
    }
15944
 
15945
    public Supplier getSuccess() {
15946
      return this.success;
15947
    }
15948
 
15949
    public void setSuccess(Supplier success) {
15950
      this.success = success;
15951
    }
15952
 
15953
    public void unsetSuccess() {
15954
      this.success = null;
15955
    }
15956
 
15957
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
15958
    public boolean isSetSuccess() {
15959
      return this.success != null;
15960
    }
15961
 
15962
    public void setSuccessIsSet(boolean value) {
15963
      if (!value) {
15964
        this.success = null;
15965
      }
15966
    }
15967
 
15968
    public void setFieldValue(_Fields field, Object value) {
15969
      switch (field) {
15970
      case SUCCESS:
15971
        if (value == null) {
15972
          unsetSuccess();
15973
        } else {
15974
          setSuccess((Supplier)value);
15975
        }
15976
        break;
15977
 
15978
      }
15979
    }
15980
 
15981
    public Object getFieldValue(_Fields field) {
15982
      switch (field) {
15983
      case SUCCESS:
15984
        return getSuccess();
15985
 
15986
      }
15987
      throw new IllegalStateException();
15988
    }
15989
 
15990
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15991
    public boolean isSet(_Fields field) {
15992
      if (field == null) {
15993
        throw new IllegalArgumentException();
15994
      }
15995
 
15996
      switch (field) {
15997
      case SUCCESS:
15998
        return isSetSuccess();
15999
      }
16000
      throw new IllegalStateException();
16001
    }
16002
 
16003
    @Override
16004
    public boolean equals(Object that) {
16005
      if (that == null)
16006
        return false;
16007
      if (that instanceof addSupplier_result)
16008
        return this.equals((addSupplier_result)that);
16009
      return false;
16010
    }
16011
 
16012
    public boolean equals(addSupplier_result that) {
16013
      if (that == null)
16014
        return false;
16015
 
16016
      boolean this_present_success = true && this.isSetSuccess();
16017
      boolean that_present_success = true && that.isSetSuccess();
16018
      if (this_present_success || that_present_success) {
16019
        if (!(this_present_success && that_present_success))
16020
          return false;
16021
        if (!this.success.equals(that.success))
16022
          return false;
16023
      }
16024
 
16025
      return true;
16026
    }
16027
 
16028
    @Override
16029
    public int hashCode() {
16030
      return 0;
16031
    }
16032
 
16033
    public int compareTo(addSupplier_result other) {
16034
      if (!getClass().equals(other.getClass())) {
16035
        return getClass().getName().compareTo(other.getClass().getName());
16036
      }
16037
 
16038
      int lastComparison = 0;
16039
      addSupplier_result typedOther = (addSupplier_result)other;
16040
 
16041
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
16042
      if (lastComparison != 0) {
16043
        return lastComparison;
16044
      }
16045
      if (isSetSuccess()) {
16046
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
16047
        if (lastComparison != 0) {
16048
          return lastComparison;
16049
        }
16050
      }
16051
      return 0;
16052
    }
16053
 
16054
    public _Fields fieldForId(int fieldId) {
16055
      return _Fields.findByThriftId(fieldId);
16056
    }
16057
 
16058
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16059
      org.apache.thrift.protocol.TField field;
16060
      iprot.readStructBegin();
16061
      while (true)
16062
      {
16063
        field = iprot.readFieldBegin();
16064
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16065
          break;
16066
        }
16067
        switch (field.id) {
16068
          case 0: // SUCCESS
16069
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
16070
              this.success = new Supplier();
16071
              this.success.read(iprot);
16072
            } else { 
16073
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16074
            }
16075
            break;
16076
          default:
16077
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16078
        }
16079
        iprot.readFieldEnd();
16080
      }
16081
      iprot.readStructEnd();
16082
      validate();
16083
    }
16084
 
16085
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16086
      oprot.writeStructBegin(STRUCT_DESC);
16087
 
16088
      if (this.isSetSuccess()) {
16089
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16090
        this.success.write(oprot);
16091
        oprot.writeFieldEnd();
16092
      }
16093
      oprot.writeFieldStop();
16094
      oprot.writeStructEnd();
16095
    }
16096
 
16097
    @Override
16098
    public String toString() {
16099
      StringBuilder sb = new StringBuilder("addSupplier_result(");
16100
      boolean first = true;
16101
 
16102
      sb.append("success:");
16103
      if (this.success == null) {
16104
        sb.append("null");
16105
      } else {
16106
        sb.append(this.success);
16107
      }
16108
      first = false;
16109
      sb.append(")");
16110
      return sb.toString();
16111
    }
16112
 
16113
    public void validate() throws org.apache.thrift.TException {
16114
      // check for required fields
16115
    }
16116
 
16117
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16118
      try {
16119
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16120
      } catch (org.apache.thrift.TException te) {
16121
        throw new java.io.IOException(te);
16122
      }
16123
    }
16124
 
16125
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16126
      try {
16127
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16128
      } catch (org.apache.thrift.TException te) {
16129
        throw new java.io.IOException(te);
16130
      }
16131
    }
16132
 
16133
  }
16134
 
16135
  public static class updateSupplier_args implements org.apache.thrift.TBase<updateSupplier_args, updateSupplier_args._Fields>, java.io.Serializable, Cloneable   {
16136
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSupplier_args");
16137
 
16138
    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);
16139
 
16140
    private Supplier supplier; // required
16141
 
16142
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16143
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16144
      SUPPLIER((short)1, "supplier");
16145
 
16146
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16147
 
16148
      static {
16149
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16150
          byName.put(field.getFieldName(), field);
16151
        }
16152
      }
16153
 
16154
      /**
16155
       * Find the _Fields constant that matches fieldId, or null if its not found.
16156
       */
16157
      public static _Fields findByThriftId(int fieldId) {
16158
        switch(fieldId) {
16159
          case 1: // SUPPLIER
16160
            return SUPPLIER;
16161
          default:
16162
            return null;
16163
        }
16164
      }
16165
 
16166
      /**
16167
       * Find the _Fields constant that matches fieldId, throwing an exception
16168
       * if it is not found.
16169
       */
16170
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16171
        _Fields fields = findByThriftId(fieldId);
16172
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16173
        return fields;
16174
      }
16175
 
16176
      /**
16177
       * Find the _Fields constant that matches name, or null if its not found.
16178
       */
16179
      public static _Fields findByName(String name) {
16180
        return byName.get(name);
16181
      }
16182
 
16183
      private final short _thriftId;
16184
      private final String _fieldName;
16185
 
16186
      _Fields(short thriftId, String fieldName) {
16187
        _thriftId = thriftId;
16188
        _fieldName = fieldName;
16189
      }
16190
 
16191
      public short getThriftFieldId() {
16192
        return _thriftId;
16193
      }
16194
 
16195
      public String getFieldName() {
16196
        return _fieldName;
16197
      }
16198
    }
16199
 
16200
    // isset id assignments
16201
 
16202
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16203
    static {
16204
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16205
      tmpMap.put(_Fields.SUPPLIER, new org.apache.thrift.meta_data.FieldMetaData("supplier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16206
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
16207
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16208
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSupplier_args.class, metaDataMap);
16209
    }
16210
 
16211
    public updateSupplier_args() {
16212
    }
16213
 
16214
    public updateSupplier_args(
16215
      Supplier supplier)
16216
    {
16217
      this();
16218
      this.supplier = supplier;
16219
    }
16220
 
16221
    /**
16222
     * Performs a deep copy on <i>other</i>.
16223
     */
16224
    public updateSupplier_args(updateSupplier_args other) {
16225
      if (other.isSetSupplier()) {
16226
        this.supplier = new Supplier(other.supplier);
16227
      }
16228
    }
16229
 
16230
    public updateSupplier_args deepCopy() {
16231
      return new updateSupplier_args(this);
16232
    }
16233
 
16234
    @Override
16235
    public void clear() {
16236
      this.supplier = null;
16237
    }
16238
 
16239
    public Supplier getSupplier() {
16240
      return this.supplier;
16241
    }
16242
 
16243
    public void setSupplier(Supplier supplier) {
16244
      this.supplier = supplier;
16245
    }
16246
 
16247
    public void unsetSupplier() {
16248
      this.supplier = null;
16249
    }
16250
 
16251
    /** Returns true if field supplier is set (has been assigned a value) and false otherwise */
16252
    public boolean isSetSupplier() {
16253
      return this.supplier != null;
16254
    }
16255
 
16256
    public void setSupplierIsSet(boolean value) {
16257
      if (!value) {
16258
        this.supplier = null;
16259
      }
16260
    }
16261
 
16262
    public void setFieldValue(_Fields field, Object value) {
16263
      switch (field) {
16264
      case SUPPLIER:
16265
        if (value == null) {
16266
          unsetSupplier();
16267
        } else {
16268
          setSupplier((Supplier)value);
16269
        }
16270
        break;
16271
 
16272
      }
16273
    }
16274
 
16275
    public Object getFieldValue(_Fields field) {
16276
      switch (field) {
16277
      case SUPPLIER:
16278
        return getSupplier();
16279
 
16280
      }
16281
      throw new IllegalStateException();
16282
    }
16283
 
16284
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16285
    public boolean isSet(_Fields field) {
16286
      if (field == null) {
16287
        throw new IllegalArgumentException();
16288
      }
16289
 
16290
      switch (field) {
16291
      case SUPPLIER:
16292
        return isSetSupplier();
16293
      }
16294
      throw new IllegalStateException();
16295
    }
16296
 
16297
    @Override
16298
    public boolean equals(Object that) {
16299
      if (that == null)
16300
        return false;
16301
      if (that instanceof updateSupplier_args)
16302
        return this.equals((updateSupplier_args)that);
16303
      return false;
16304
    }
16305
 
16306
    public boolean equals(updateSupplier_args that) {
16307
      if (that == null)
16308
        return false;
16309
 
16310
      boolean this_present_supplier = true && this.isSetSupplier();
16311
      boolean that_present_supplier = true && that.isSetSupplier();
16312
      if (this_present_supplier || that_present_supplier) {
16313
        if (!(this_present_supplier && that_present_supplier))
16314
          return false;
16315
        if (!this.supplier.equals(that.supplier))
16316
          return false;
16317
      }
16318
 
16319
      return true;
16320
    }
16321
 
16322
    @Override
16323
    public int hashCode() {
16324
      return 0;
16325
    }
16326
 
16327
    public int compareTo(updateSupplier_args other) {
16328
      if (!getClass().equals(other.getClass())) {
16329
        return getClass().getName().compareTo(other.getClass().getName());
16330
      }
16331
 
16332
      int lastComparison = 0;
16333
      updateSupplier_args typedOther = (updateSupplier_args)other;
16334
 
16335
      lastComparison = Boolean.valueOf(isSetSupplier()).compareTo(typedOther.isSetSupplier());
16336
      if (lastComparison != 0) {
16337
        return lastComparison;
16338
      }
16339
      if (isSetSupplier()) {
16340
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplier, typedOther.supplier);
16341
        if (lastComparison != 0) {
16342
          return lastComparison;
16343
        }
16344
      }
16345
      return 0;
16346
    }
16347
 
16348
    public _Fields fieldForId(int fieldId) {
16349
      return _Fields.findByThriftId(fieldId);
16350
    }
16351
 
16352
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16353
      org.apache.thrift.protocol.TField field;
16354
      iprot.readStructBegin();
16355
      while (true)
16356
      {
16357
        field = iprot.readFieldBegin();
16358
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16359
          break;
16360
        }
16361
        switch (field.id) {
16362
          case 1: // SUPPLIER
16363
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
16364
              this.supplier = new Supplier();
16365
              this.supplier.read(iprot);
16366
            } else { 
16367
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16368
            }
16369
            break;
16370
          default:
16371
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16372
        }
16373
        iprot.readFieldEnd();
16374
      }
16375
      iprot.readStructEnd();
16376
      validate();
16377
    }
16378
 
16379
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16380
      validate();
16381
 
16382
      oprot.writeStructBegin(STRUCT_DESC);
16383
      if (this.supplier != null) {
16384
        oprot.writeFieldBegin(SUPPLIER_FIELD_DESC);
16385
        this.supplier.write(oprot);
16386
        oprot.writeFieldEnd();
16387
      }
16388
      oprot.writeFieldStop();
16389
      oprot.writeStructEnd();
16390
    }
16391
 
16392
    @Override
16393
    public String toString() {
16394
      StringBuilder sb = new StringBuilder("updateSupplier_args(");
16395
      boolean first = true;
16396
 
16397
      sb.append("supplier:");
16398
      if (this.supplier == null) {
16399
        sb.append("null");
16400
      } else {
16401
        sb.append(this.supplier);
16402
      }
16403
      first = false;
16404
      sb.append(")");
16405
      return sb.toString();
16406
    }
16407
 
16408
    public void validate() throws org.apache.thrift.TException {
16409
      // check for required fields
16410
    }
16411
 
16412
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16413
      try {
16414
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16415
      } catch (org.apache.thrift.TException te) {
16416
        throw new java.io.IOException(te);
16417
      }
16418
    }
16419
 
16420
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16421
      try {
16422
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16423
      } catch (org.apache.thrift.TException te) {
16424
        throw new java.io.IOException(te);
16425
      }
16426
    }
16427
 
16428
  }
16429
 
16430
  public static class updateSupplier_result implements org.apache.thrift.TBase<updateSupplier_result, updateSupplier_result._Fields>, java.io.Serializable, Cloneable   {
16431
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSupplier_result");
16432
 
16433
 
16434
 
16435
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16436
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16437
;
16438
 
16439
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16440
 
16441
      static {
16442
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16443
          byName.put(field.getFieldName(), field);
16444
        }
16445
      }
16446
 
16447
      /**
16448
       * Find the _Fields constant that matches fieldId, or null if its not found.
16449
       */
16450
      public static _Fields findByThriftId(int fieldId) {
16451
        switch(fieldId) {
16452
          default:
16453
            return null;
16454
        }
16455
      }
16456
 
16457
      /**
16458
       * Find the _Fields constant that matches fieldId, throwing an exception
16459
       * if it is not found.
16460
       */
16461
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16462
        _Fields fields = findByThriftId(fieldId);
16463
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16464
        return fields;
16465
      }
16466
 
16467
      /**
16468
       * Find the _Fields constant that matches name, or null if its not found.
16469
       */
16470
      public static _Fields findByName(String name) {
16471
        return byName.get(name);
16472
      }
16473
 
16474
      private final short _thriftId;
16475
      private final String _fieldName;
16476
 
16477
      _Fields(short thriftId, String fieldName) {
16478
        _thriftId = thriftId;
16479
        _fieldName = fieldName;
16480
      }
16481
 
16482
      public short getThriftFieldId() {
16483
        return _thriftId;
16484
      }
16485
 
16486
      public String getFieldName() {
16487
        return _fieldName;
16488
      }
16489
    }
16490
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16491
    static {
16492
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16493
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16494
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSupplier_result.class, metaDataMap);
16495
    }
16496
 
16497
    public updateSupplier_result() {
16498
    }
16499
 
16500
    /**
16501
     * Performs a deep copy on <i>other</i>.
16502
     */
16503
    public updateSupplier_result(updateSupplier_result other) {
16504
    }
16505
 
16506
    public updateSupplier_result deepCopy() {
16507
      return new updateSupplier_result(this);
16508
    }
16509
 
16510
    @Override
16511
    public void clear() {
16512
    }
16513
 
16514
    public void setFieldValue(_Fields field, Object value) {
16515
      switch (field) {
16516
      }
16517
    }
16518
 
16519
    public Object getFieldValue(_Fields field) {
16520
      switch (field) {
16521
      }
16522
      throw new IllegalStateException();
16523
    }
16524
 
16525
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16526
    public boolean isSet(_Fields field) {
16527
      if (field == null) {
16528
        throw new IllegalArgumentException();
16529
      }
16530
 
16531
      switch (field) {
16532
      }
16533
      throw new IllegalStateException();
16534
    }
16535
 
16536
    @Override
16537
    public boolean equals(Object that) {
16538
      if (that == null)
16539
        return false;
16540
      if (that instanceof updateSupplier_result)
16541
        return this.equals((updateSupplier_result)that);
16542
      return false;
16543
    }
16544
 
16545
    public boolean equals(updateSupplier_result that) {
16546
      if (that == null)
16547
        return false;
16548
 
16549
      return true;
16550
    }
16551
 
16552
    @Override
16553
    public int hashCode() {
16554
      return 0;
16555
    }
16556
 
16557
    public int compareTo(updateSupplier_result other) {
16558
      if (!getClass().equals(other.getClass())) {
16559
        return getClass().getName().compareTo(other.getClass().getName());
16560
      }
16561
 
16562
      int lastComparison = 0;
16563
      updateSupplier_result typedOther = (updateSupplier_result)other;
16564
 
16565
      return 0;
16566
    }
16567
 
16568
    public _Fields fieldForId(int fieldId) {
16569
      return _Fields.findByThriftId(fieldId);
16570
    }
16571
 
16572
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16573
      org.apache.thrift.protocol.TField field;
16574
      iprot.readStructBegin();
16575
      while (true)
16576
      {
16577
        field = iprot.readFieldBegin();
16578
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16579
          break;
16580
        }
16581
        switch (field.id) {
16582
          default:
16583
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16584
        }
16585
        iprot.readFieldEnd();
16586
      }
16587
      iprot.readStructEnd();
16588
      validate();
16589
    }
16590
 
16591
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16592
      oprot.writeStructBegin(STRUCT_DESC);
16593
 
16594
      oprot.writeFieldStop();
16595
      oprot.writeStructEnd();
16596
    }
16597
 
16598
    @Override
16599
    public String toString() {
16600
      StringBuilder sb = new StringBuilder("updateSupplier_result(");
16601
      boolean first = true;
16602
 
16603
      sb.append(")");
16604
      return sb.toString();
16605
    }
16606
 
16607
    public void validate() throws org.apache.thrift.TException {
16608
      // check for required fields
16609
    }
16610
 
16611
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16612
      try {
16613
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16614
      } catch (org.apache.thrift.TException te) {
16615
        throw new java.io.IOException(te);
16616
      }
16617
    }
16618
 
16619
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16620
      try {
16621
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16622
      } catch (org.apache.thrift.TException te) {
16623
        throw new java.io.IOException(te);
16624
      }
16625
    }
16626
 
16627
  }
16628
 
6467 amar.kumar 16629
  public static class createPurchaseReturn_args implements org.apache.thrift.TBase<createPurchaseReturn_args, createPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
16630
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseReturn_args");
16631
 
16632
    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);
16633
 
16634
    private PurchaseReturn purchaseReturn; // required
16635
 
16636
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16637
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16638
      PURCHASE_RETURN((short)1, "purchaseReturn");
16639
 
16640
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16641
 
16642
      static {
16643
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16644
          byName.put(field.getFieldName(), field);
16645
        }
16646
      }
16647
 
16648
      /**
16649
       * Find the _Fields constant that matches fieldId, or null if its not found.
16650
       */
16651
      public static _Fields findByThriftId(int fieldId) {
16652
        switch(fieldId) {
16653
          case 1: // PURCHASE_RETURN
16654
            return PURCHASE_RETURN;
16655
          default:
16656
            return null;
16657
        }
16658
      }
16659
 
16660
      /**
16661
       * Find the _Fields constant that matches fieldId, throwing an exception
16662
       * if it is not found.
16663
       */
16664
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16665
        _Fields fields = findByThriftId(fieldId);
16666
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16667
        return fields;
16668
      }
16669
 
16670
      /**
16671
       * Find the _Fields constant that matches name, or null if its not found.
16672
       */
16673
      public static _Fields findByName(String name) {
16674
        return byName.get(name);
16675
      }
16676
 
16677
      private final short _thriftId;
16678
      private final String _fieldName;
16679
 
16680
      _Fields(short thriftId, String fieldName) {
16681
        _thriftId = thriftId;
16682
        _fieldName = fieldName;
16683
      }
16684
 
16685
      public short getThriftFieldId() {
16686
        return _thriftId;
16687
      }
16688
 
16689
      public String getFieldName() {
16690
        return _fieldName;
16691
      }
16692
    }
16693
 
16694
    // isset id assignments
16695
 
16696
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16697
    static {
16698
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16699
      tmpMap.put(_Fields.PURCHASE_RETURN, new org.apache.thrift.meta_data.FieldMetaData("purchaseReturn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16700
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class)));
16701
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16702
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseReturn_args.class, metaDataMap);
16703
    }
16704
 
16705
    public createPurchaseReturn_args() {
16706
    }
16707
 
16708
    public createPurchaseReturn_args(
16709
      PurchaseReturn purchaseReturn)
16710
    {
16711
      this();
16712
      this.purchaseReturn = purchaseReturn;
16713
    }
16714
 
16715
    /**
16716
     * Performs a deep copy on <i>other</i>.
16717
     */
16718
    public createPurchaseReturn_args(createPurchaseReturn_args other) {
16719
      if (other.isSetPurchaseReturn()) {
16720
        this.purchaseReturn = new PurchaseReturn(other.purchaseReturn);
16721
      }
16722
    }
16723
 
16724
    public createPurchaseReturn_args deepCopy() {
16725
      return new createPurchaseReturn_args(this);
16726
    }
16727
 
16728
    @Override
16729
    public void clear() {
16730
      this.purchaseReturn = null;
16731
    }
16732
 
16733
    public PurchaseReturn getPurchaseReturn() {
16734
      return this.purchaseReturn;
16735
    }
16736
 
16737
    public void setPurchaseReturn(PurchaseReturn purchaseReturn) {
16738
      this.purchaseReturn = purchaseReturn;
16739
    }
16740
 
16741
    public void unsetPurchaseReturn() {
16742
      this.purchaseReturn = null;
16743
    }
16744
 
16745
    /** Returns true if field purchaseReturn is set (has been assigned a value) and false otherwise */
16746
    public boolean isSetPurchaseReturn() {
16747
      return this.purchaseReturn != null;
16748
    }
16749
 
16750
    public void setPurchaseReturnIsSet(boolean value) {
16751
      if (!value) {
16752
        this.purchaseReturn = null;
16753
      }
16754
    }
16755
 
16756
    public void setFieldValue(_Fields field, Object value) {
16757
      switch (field) {
16758
      case PURCHASE_RETURN:
16759
        if (value == null) {
16760
          unsetPurchaseReturn();
16761
        } else {
16762
          setPurchaseReturn((PurchaseReturn)value);
16763
        }
16764
        break;
16765
 
16766
      }
16767
    }
16768
 
16769
    public Object getFieldValue(_Fields field) {
16770
      switch (field) {
16771
      case PURCHASE_RETURN:
16772
        return getPurchaseReturn();
16773
 
16774
      }
16775
      throw new IllegalStateException();
16776
    }
16777
 
16778
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16779
    public boolean isSet(_Fields field) {
16780
      if (field == null) {
16781
        throw new IllegalArgumentException();
16782
      }
16783
 
16784
      switch (field) {
16785
      case PURCHASE_RETURN:
16786
        return isSetPurchaseReturn();
16787
      }
16788
      throw new IllegalStateException();
16789
    }
16790
 
16791
    @Override
16792
    public boolean equals(Object that) {
16793
      if (that == null)
16794
        return false;
16795
      if (that instanceof createPurchaseReturn_args)
16796
        return this.equals((createPurchaseReturn_args)that);
16797
      return false;
16798
    }
16799
 
16800
    public boolean equals(createPurchaseReturn_args that) {
16801
      if (that == null)
16802
        return false;
16803
 
16804
      boolean this_present_purchaseReturn = true && this.isSetPurchaseReturn();
16805
      boolean that_present_purchaseReturn = true && that.isSetPurchaseReturn();
16806
      if (this_present_purchaseReturn || that_present_purchaseReturn) {
16807
        if (!(this_present_purchaseReturn && that_present_purchaseReturn))
16808
          return false;
16809
        if (!this.purchaseReturn.equals(that.purchaseReturn))
16810
          return false;
16811
      }
16812
 
16813
      return true;
16814
    }
16815
 
16816
    @Override
16817
    public int hashCode() {
16818
      return 0;
16819
    }
16820
 
16821
    public int compareTo(createPurchaseReturn_args other) {
16822
      if (!getClass().equals(other.getClass())) {
16823
        return getClass().getName().compareTo(other.getClass().getName());
16824
      }
16825
 
16826
      int lastComparison = 0;
16827
      createPurchaseReturn_args typedOther = (createPurchaseReturn_args)other;
16828
 
16829
      lastComparison = Boolean.valueOf(isSetPurchaseReturn()).compareTo(typedOther.isSetPurchaseReturn());
16830
      if (lastComparison != 0) {
16831
        return lastComparison;
16832
      }
16833
      if (isSetPurchaseReturn()) {
16834
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseReturn, typedOther.purchaseReturn);
16835
        if (lastComparison != 0) {
16836
          return lastComparison;
16837
        }
16838
      }
16839
      return 0;
16840
    }
16841
 
16842
    public _Fields fieldForId(int fieldId) {
16843
      return _Fields.findByThriftId(fieldId);
16844
    }
16845
 
16846
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16847
      org.apache.thrift.protocol.TField field;
16848
      iprot.readStructBegin();
16849
      while (true)
16850
      {
16851
        field = iprot.readFieldBegin();
16852
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16853
          break;
16854
        }
16855
        switch (field.id) {
16856
          case 1: // PURCHASE_RETURN
16857
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
16858
              this.purchaseReturn = new PurchaseReturn();
16859
              this.purchaseReturn.read(iprot);
16860
            } else { 
16861
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16862
            }
16863
            break;
16864
          default:
16865
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16866
        }
16867
        iprot.readFieldEnd();
16868
      }
16869
      iprot.readStructEnd();
16870
      validate();
16871
    }
16872
 
16873
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16874
      validate();
16875
 
16876
      oprot.writeStructBegin(STRUCT_DESC);
16877
      if (this.purchaseReturn != null) {
16878
        oprot.writeFieldBegin(PURCHASE_RETURN_FIELD_DESC);
16879
        this.purchaseReturn.write(oprot);
16880
        oprot.writeFieldEnd();
16881
      }
16882
      oprot.writeFieldStop();
16883
      oprot.writeStructEnd();
16884
    }
16885
 
16886
    @Override
16887
    public String toString() {
16888
      StringBuilder sb = new StringBuilder("createPurchaseReturn_args(");
16889
      boolean first = true;
16890
 
16891
      sb.append("purchaseReturn:");
16892
      if (this.purchaseReturn == null) {
16893
        sb.append("null");
16894
      } else {
16895
        sb.append(this.purchaseReturn);
16896
      }
16897
      first = false;
16898
      sb.append(")");
16899
      return sb.toString();
16900
    }
16901
 
16902
    public void validate() throws org.apache.thrift.TException {
16903
      // check for required fields
16904
    }
16905
 
16906
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16907
      try {
16908
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16909
      } catch (org.apache.thrift.TException te) {
16910
        throw new java.io.IOException(te);
16911
      }
16912
    }
16913
 
16914
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16915
      try {
16916
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16917
      } catch (org.apache.thrift.TException te) {
16918
        throw new java.io.IOException(te);
16919
      }
16920
    }
16921
 
16922
  }
16923
 
16924
  public static class createPurchaseReturn_result implements org.apache.thrift.TBase<createPurchaseReturn_result, createPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
16925
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseReturn_result");
16926
 
16927
    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);
16928
 
16929
    private long success; // required
16930
 
16931
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16932
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16933
      SUCCESS((short)0, "success");
16934
 
16935
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16936
 
16937
      static {
16938
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16939
          byName.put(field.getFieldName(), field);
16940
        }
16941
      }
16942
 
16943
      /**
16944
       * Find the _Fields constant that matches fieldId, or null if its not found.
16945
       */
16946
      public static _Fields findByThriftId(int fieldId) {
16947
        switch(fieldId) {
16948
          case 0: // SUCCESS
16949
            return SUCCESS;
16950
          default:
16951
            return null;
16952
        }
16953
      }
16954
 
16955
      /**
16956
       * Find the _Fields constant that matches fieldId, throwing an exception
16957
       * if it is not found.
16958
       */
16959
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16960
        _Fields fields = findByThriftId(fieldId);
16961
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16962
        return fields;
16963
      }
16964
 
16965
      /**
16966
       * Find the _Fields constant that matches name, or null if its not found.
16967
       */
16968
      public static _Fields findByName(String name) {
16969
        return byName.get(name);
16970
      }
16971
 
16972
      private final short _thriftId;
16973
      private final String _fieldName;
16974
 
16975
      _Fields(short thriftId, String fieldName) {
16976
        _thriftId = thriftId;
16977
        _fieldName = fieldName;
16978
      }
16979
 
16980
      public short getThriftFieldId() {
16981
        return _thriftId;
16982
      }
16983
 
16984
      public String getFieldName() {
16985
        return _fieldName;
16986
      }
16987
    }
16988
 
16989
    // isset id assignments
16990
    private static final int __SUCCESS_ISSET_ID = 0;
16991
    private BitSet __isset_bit_vector = new BitSet(1);
16992
 
16993
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16994
    static {
16995
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16996
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16997
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
16998
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16999
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseReturn_result.class, metaDataMap);
17000
    }
17001
 
17002
    public createPurchaseReturn_result() {
17003
    }
17004
 
17005
    public createPurchaseReturn_result(
17006
      long success)
17007
    {
17008
      this();
17009
      this.success = success;
17010
      setSuccessIsSet(true);
17011
    }
17012
 
17013
    /**
17014
     * Performs a deep copy on <i>other</i>.
17015
     */
17016
    public createPurchaseReturn_result(createPurchaseReturn_result other) {
17017
      __isset_bit_vector.clear();
17018
      __isset_bit_vector.or(other.__isset_bit_vector);
17019
      this.success = other.success;
17020
    }
17021
 
17022
    public createPurchaseReturn_result deepCopy() {
17023
      return new createPurchaseReturn_result(this);
17024
    }
17025
 
17026
    @Override
17027
    public void clear() {
17028
      setSuccessIsSet(false);
17029
      this.success = 0;
17030
    }
17031
 
17032
    public long getSuccess() {
17033
      return this.success;
17034
    }
17035
 
17036
    public void setSuccess(long success) {
17037
      this.success = success;
17038
      setSuccessIsSet(true);
17039
    }
17040
 
17041
    public void unsetSuccess() {
17042
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
17043
    }
17044
 
17045
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
17046
    public boolean isSetSuccess() {
17047
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
17048
    }
17049
 
17050
    public void setSuccessIsSet(boolean value) {
17051
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
17052
    }
17053
 
17054
    public void setFieldValue(_Fields field, Object value) {
17055
      switch (field) {
17056
      case SUCCESS:
17057
        if (value == null) {
17058
          unsetSuccess();
17059
        } else {
17060
          setSuccess((Long)value);
17061
        }
17062
        break;
17063
 
17064
      }
17065
    }
17066
 
17067
    public Object getFieldValue(_Fields field) {
17068
      switch (field) {
17069
      case SUCCESS:
17070
        return Long.valueOf(getSuccess());
17071
 
17072
      }
17073
      throw new IllegalStateException();
17074
    }
17075
 
17076
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17077
    public boolean isSet(_Fields field) {
17078
      if (field == null) {
17079
        throw new IllegalArgumentException();
17080
      }
17081
 
17082
      switch (field) {
17083
      case SUCCESS:
17084
        return isSetSuccess();
17085
      }
17086
      throw new IllegalStateException();
17087
    }
17088
 
17089
    @Override
17090
    public boolean equals(Object that) {
17091
      if (that == null)
17092
        return false;
17093
      if (that instanceof createPurchaseReturn_result)
17094
        return this.equals((createPurchaseReturn_result)that);
17095
      return false;
17096
    }
17097
 
17098
    public boolean equals(createPurchaseReturn_result that) {
17099
      if (that == null)
17100
        return false;
17101
 
17102
      boolean this_present_success = true;
17103
      boolean that_present_success = true;
17104
      if (this_present_success || that_present_success) {
17105
        if (!(this_present_success && that_present_success))
17106
          return false;
17107
        if (this.success != that.success)
17108
          return false;
17109
      }
17110
 
17111
      return true;
17112
    }
17113
 
17114
    @Override
17115
    public int hashCode() {
17116
      return 0;
17117
    }
17118
 
17119
    public int compareTo(createPurchaseReturn_result other) {
17120
      if (!getClass().equals(other.getClass())) {
17121
        return getClass().getName().compareTo(other.getClass().getName());
17122
      }
17123
 
17124
      int lastComparison = 0;
17125
      createPurchaseReturn_result typedOther = (createPurchaseReturn_result)other;
17126
 
17127
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
17128
      if (lastComparison != 0) {
17129
        return lastComparison;
17130
      }
17131
      if (isSetSuccess()) {
17132
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
17133
        if (lastComparison != 0) {
17134
          return lastComparison;
17135
        }
17136
      }
17137
      return 0;
17138
    }
17139
 
17140
    public _Fields fieldForId(int fieldId) {
17141
      return _Fields.findByThriftId(fieldId);
17142
    }
17143
 
17144
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17145
      org.apache.thrift.protocol.TField field;
17146
      iprot.readStructBegin();
17147
      while (true)
17148
      {
17149
        field = iprot.readFieldBegin();
17150
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17151
          break;
17152
        }
17153
        switch (field.id) {
17154
          case 0: // SUCCESS
17155
            if (field.type == org.apache.thrift.protocol.TType.I64) {
17156
              this.success = iprot.readI64();
17157
              setSuccessIsSet(true);
17158
            } else { 
17159
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17160
            }
17161
            break;
17162
          default:
17163
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17164
        }
17165
        iprot.readFieldEnd();
17166
      }
17167
      iprot.readStructEnd();
17168
      validate();
17169
    }
17170
 
17171
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17172
      oprot.writeStructBegin(STRUCT_DESC);
17173
 
17174
      if (this.isSetSuccess()) {
17175
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17176
        oprot.writeI64(this.success);
17177
        oprot.writeFieldEnd();
17178
      }
17179
      oprot.writeFieldStop();
17180
      oprot.writeStructEnd();
17181
    }
17182
 
17183
    @Override
17184
    public String toString() {
17185
      StringBuilder sb = new StringBuilder("createPurchaseReturn_result(");
17186
      boolean first = true;
17187
 
17188
      sb.append("success:");
17189
      sb.append(this.success);
17190
      first = false;
17191
      sb.append(")");
17192
      return sb.toString();
17193
    }
17194
 
17195
    public void validate() throws org.apache.thrift.TException {
17196
      // check for required fields
17197
    }
17198
 
17199
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17200
      try {
17201
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17202
      } catch (org.apache.thrift.TException te) {
17203
        throw new java.io.IOException(te);
17204
      }
17205
    }
17206
 
17207
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17208
      try {
17209
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17210
      } catch (org.apache.thrift.TException te) {
17211
        throw new java.io.IOException(te);
17212
      }
17213
    }
17214
 
17215
  }
17216
 
17217
  public static class settlePurchaseReturn_args implements org.apache.thrift.TBase<settlePurchaseReturn_args, settlePurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
17218
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("settlePurchaseReturn_args");
17219
 
17220
    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);
17221
 
17222
    private long id; // required
17223
 
17224
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17225
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17226
      ID((short)1, "id");
17227
 
17228
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17229
 
17230
      static {
17231
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17232
          byName.put(field.getFieldName(), field);
17233
        }
17234
      }
17235
 
17236
      /**
17237
       * Find the _Fields constant that matches fieldId, or null if its not found.
17238
       */
17239
      public static _Fields findByThriftId(int fieldId) {
17240
        switch(fieldId) {
17241
          case 1: // ID
17242
            return ID;
17243
          default:
17244
            return null;
17245
        }
17246
      }
17247
 
17248
      /**
17249
       * Find the _Fields constant that matches fieldId, throwing an exception
17250
       * if it is not found.
17251
       */
17252
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17253
        _Fields fields = findByThriftId(fieldId);
17254
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17255
        return fields;
17256
      }
17257
 
17258
      /**
17259
       * Find the _Fields constant that matches name, or null if its not found.
17260
       */
17261
      public static _Fields findByName(String name) {
17262
        return byName.get(name);
17263
      }
17264
 
17265
      private final short _thriftId;
17266
      private final String _fieldName;
17267
 
17268
      _Fields(short thriftId, String fieldName) {
17269
        _thriftId = thriftId;
17270
        _fieldName = fieldName;
17271
      }
17272
 
17273
      public short getThriftFieldId() {
17274
        return _thriftId;
17275
      }
17276
 
17277
      public String getFieldName() {
17278
        return _fieldName;
17279
      }
17280
    }
17281
 
17282
    // isset id assignments
17283
    private static final int __ID_ISSET_ID = 0;
17284
    private BitSet __isset_bit_vector = new BitSet(1);
17285
 
17286
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17287
    static {
17288
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17289
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17290
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
17291
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17292
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(settlePurchaseReturn_args.class, metaDataMap);
17293
    }
17294
 
17295
    public settlePurchaseReturn_args() {
17296
    }
17297
 
17298
    public settlePurchaseReturn_args(
17299
      long id)
17300
    {
17301
      this();
17302
      this.id = id;
17303
      setIdIsSet(true);
17304
    }
17305
 
17306
    /**
17307
     * Performs a deep copy on <i>other</i>.
17308
     */
17309
    public settlePurchaseReturn_args(settlePurchaseReturn_args other) {
17310
      __isset_bit_vector.clear();
17311
      __isset_bit_vector.or(other.__isset_bit_vector);
17312
      this.id = other.id;
17313
    }
17314
 
17315
    public settlePurchaseReturn_args deepCopy() {
17316
      return new settlePurchaseReturn_args(this);
17317
    }
17318
 
17319
    @Override
17320
    public void clear() {
17321
      setIdIsSet(false);
17322
      this.id = 0;
17323
    }
17324
 
17325
    public long getId() {
17326
      return this.id;
17327
    }
17328
 
17329
    public void setId(long id) {
17330
      this.id = id;
17331
      setIdIsSet(true);
17332
    }
17333
 
17334
    public void unsetId() {
17335
      __isset_bit_vector.clear(__ID_ISSET_ID);
17336
    }
17337
 
17338
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
17339
    public boolean isSetId() {
17340
      return __isset_bit_vector.get(__ID_ISSET_ID);
17341
    }
17342
 
17343
    public void setIdIsSet(boolean value) {
17344
      __isset_bit_vector.set(__ID_ISSET_ID, value);
17345
    }
17346
 
17347
    public void setFieldValue(_Fields field, Object value) {
17348
      switch (field) {
17349
      case ID:
17350
        if (value == null) {
17351
          unsetId();
17352
        } else {
17353
          setId((Long)value);
17354
        }
17355
        break;
17356
 
17357
      }
17358
    }
17359
 
17360
    public Object getFieldValue(_Fields field) {
17361
      switch (field) {
17362
      case ID:
17363
        return Long.valueOf(getId());
17364
 
17365
      }
17366
      throw new IllegalStateException();
17367
    }
17368
 
17369
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17370
    public boolean isSet(_Fields field) {
17371
      if (field == null) {
17372
        throw new IllegalArgumentException();
17373
      }
17374
 
17375
      switch (field) {
17376
      case ID:
17377
        return isSetId();
17378
      }
17379
      throw new IllegalStateException();
17380
    }
17381
 
17382
    @Override
17383
    public boolean equals(Object that) {
17384
      if (that == null)
17385
        return false;
17386
      if (that instanceof settlePurchaseReturn_args)
17387
        return this.equals((settlePurchaseReturn_args)that);
17388
      return false;
17389
    }
17390
 
17391
    public boolean equals(settlePurchaseReturn_args that) {
17392
      if (that == null)
17393
        return false;
17394
 
17395
      boolean this_present_id = true;
17396
      boolean that_present_id = true;
17397
      if (this_present_id || that_present_id) {
17398
        if (!(this_present_id && that_present_id))
17399
          return false;
17400
        if (this.id != that.id)
17401
          return false;
17402
      }
17403
 
17404
      return true;
17405
    }
17406
 
17407
    @Override
17408
    public int hashCode() {
17409
      return 0;
17410
    }
17411
 
17412
    public int compareTo(settlePurchaseReturn_args other) {
17413
      if (!getClass().equals(other.getClass())) {
17414
        return getClass().getName().compareTo(other.getClass().getName());
17415
      }
17416
 
17417
      int lastComparison = 0;
17418
      settlePurchaseReturn_args typedOther = (settlePurchaseReturn_args)other;
17419
 
17420
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
17421
      if (lastComparison != 0) {
17422
        return lastComparison;
17423
      }
17424
      if (isSetId()) {
17425
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
17426
        if (lastComparison != 0) {
17427
          return lastComparison;
17428
        }
17429
      }
17430
      return 0;
17431
    }
17432
 
17433
    public _Fields fieldForId(int fieldId) {
17434
      return _Fields.findByThriftId(fieldId);
17435
    }
17436
 
17437
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17438
      org.apache.thrift.protocol.TField field;
17439
      iprot.readStructBegin();
17440
      while (true)
17441
      {
17442
        field = iprot.readFieldBegin();
17443
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17444
          break;
17445
        }
17446
        switch (field.id) {
17447
          case 1: // ID
17448
            if (field.type == org.apache.thrift.protocol.TType.I64) {
17449
              this.id = iprot.readI64();
17450
              setIdIsSet(true);
17451
            } else { 
17452
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17453
            }
17454
            break;
17455
          default:
17456
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17457
        }
17458
        iprot.readFieldEnd();
17459
      }
17460
      iprot.readStructEnd();
17461
      validate();
17462
    }
17463
 
17464
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17465
      validate();
17466
 
17467
      oprot.writeStructBegin(STRUCT_DESC);
17468
      oprot.writeFieldBegin(ID_FIELD_DESC);
17469
      oprot.writeI64(this.id);
17470
      oprot.writeFieldEnd();
17471
      oprot.writeFieldStop();
17472
      oprot.writeStructEnd();
17473
    }
17474
 
17475
    @Override
17476
    public String toString() {
17477
      StringBuilder sb = new StringBuilder("settlePurchaseReturn_args(");
17478
      boolean first = true;
17479
 
17480
      sb.append("id:");
17481
      sb.append(this.id);
17482
      first = false;
17483
      sb.append(")");
17484
      return sb.toString();
17485
    }
17486
 
17487
    public void validate() throws org.apache.thrift.TException {
17488
      // check for required fields
17489
    }
17490
 
17491
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17492
      try {
17493
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17494
      } catch (org.apache.thrift.TException te) {
17495
        throw new java.io.IOException(te);
17496
      }
17497
    }
17498
 
17499
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17500
      try {
17501
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
17502
        __isset_bit_vector = new BitSet(1);
17503
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17504
      } catch (org.apache.thrift.TException te) {
17505
        throw new java.io.IOException(te);
17506
      }
17507
    }
17508
 
17509
  }
17510
 
17511
  public static class settlePurchaseReturn_result implements org.apache.thrift.TBase<settlePurchaseReturn_result, settlePurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
17512
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("settlePurchaseReturn_result");
17513
 
17514
 
17515
 
17516
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17517
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17518
;
17519
 
17520
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17521
 
17522
      static {
17523
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17524
          byName.put(field.getFieldName(), field);
17525
        }
17526
      }
17527
 
17528
      /**
17529
       * Find the _Fields constant that matches fieldId, or null if its not found.
17530
       */
17531
      public static _Fields findByThriftId(int fieldId) {
17532
        switch(fieldId) {
17533
          default:
17534
            return null;
17535
        }
17536
      }
17537
 
17538
      /**
17539
       * Find the _Fields constant that matches fieldId, throwing an exception
17540
       * if it is not found.
17541
       */
17542
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17543
        _Fields fields = findByThriftId(fieldId);
17544
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17545
        return fields;
17546
      }
17547
 
17548
      /**
17549
       * Find the _Fields constant that matches name, or null if its not found.
17550
       */
17551
      public static _Fields findByName(String name) {
17552
        return byName.get(name);
17553
      }
17554
 
17555
      private final short _thriftId;
17556
      private final String _fieldName;
17557
 
17558
      _Fields(short thriftId, String fieldName) {
17559
        _thriftId = thriftId;
17560
        _fieldName = fieldName;
17561
      }
17562
 
17563
      public short getThriftFieldId() {
17564
        return _thriftId;
17565
      }
17566
 
17567
      public String getFieldName() {
17568
        return _fieldName;
17569
      }
17570
    }
17571
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17572
    static {
17573
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17574
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17575
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(settlePurchaseReturn_result.class, metaDataMap);
17576
    }
17577
 
17578
    public settlePurchaseReturn_result() {
17579
    }
17580
 
17581
    /**
17582
     * Performs a deep copy on <i>other</i>.
17583
     */
17584
    public settlePurchaseReturn_result(settlePurchaseReturn_result other) {
17585
    }
17586
 
17587
    public settlePurchaseReturn_result deepCopy() {
17588
      return new settlePurchaseReturn_result(this);
17589
    }
17590
 
17591
    @Override
17592
    public void clear() {
17593
    }
17594
 
17595
    public void setFieldValue(_Fields field, Object value) {
17596
      switch (field) {
17597
      }
17598
    }
17599
 
17600
    public Object getFieldValue(_Fields field) {
17601
      switch (field) {
17602
      }
17603
      throw new IllegalStateException();
17604
    }
17605
 
17606
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17607
    public boolean isSet(_Fields field) {
17608
      if (field == null) {
17609
        throw new IllegalArgumentException();
17610
      }
17611
 
17612
      switch (field) {
17613
      }
17614
      throw new IllegalStateException();
17615
    }
17616
 
17617
    @Override
17618
    public boolean equals(Object that) {
17619
      if (that == null)
17620
        return false;
17621
      if (that instanceof settlePurchaseReturn_result)
17622
        return this.equals((settlePurchaseReturn_result)that);
17623
      return false;
17624
    }
17625
 
17626
    public boolean equals(settlePurchaseReturn_result that) {
17627
      if (that == null)
17628
        return false;
17629
 
17630
      return true;
17631
    }
17632
 
17633
    @Override
17634
    public int hashCode() {
17635
      return 0;
17636
    }
17637
 
17638
    public int compareTo(settlePurchaseReturn_result other) {
17639
      if (!getClass().equals(other.getClass())) {
17640
        return getClass().getName().compareTo(other.getClass().getName());
17641
      }
17642
 
17643
      int lastComparison = 0;
17644
      settlePurchaseReturn_result typedOther = (settlePurchaseReturn_result)other;
17645
 
17646
      return 0;
17647
    }
17648
 
17649
    public _Fields fieldForId(int fieldId) {
17650
      return _Fields.findByThriftId(fieldId);
17651
    }
17652
 
17653
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17654
      org.apache.thrift.protocol.TField field;
17655
      iprot.readStructBegin();
17656
      while (true)
17657
      {
17658
        field = iprot.readFieldBegin();
17659
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17660
          break;
17661
        }
17662
        switch (field.id) {
17663
          default:
17664
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17665
        }
17666
        iprot.readFieldEnd();
17667
      }
17668
      iprot.readStructEnd();
17669
      validate();
17670
    }
17671
 
17672
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17673
      oprot.writeStructBegin(STRUCT_DESC);
17674
 
17675
      oprot.writeFieldStop();
17676
      oprot.writeStructEnd();
17677
    }
17678
 
17679
    @Override
17680
    public String toString() {
17681
      StringBuilder sb = new StringBuilder("settlePurchaseReturn_result(");
17682
      boolean first = true;
17683
 
17684
      sb.append(")");
17685
      return sb.toString();
17686
    }
17687
 
17688
    public void validate() throws org.apache.thrift.TException {
17689
      // check for required fields
17690
    }
17691
 
17692
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17693
      try {
17694
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17695
      } catch (org.apache.thrift.TException te) {
17696
        throw new java.io.IOException(te);
17697
      }
17698
    }
17699
 
17700
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17701
      try {
17702
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17703
      } catch (org.apache.thrift.TException te) {
17704
        throw new java.io.IOException(te);
17705
      }
17706
    }
17707
 
17708
  }
17709
 
17710
  public static class getUnsettledPurchaseReturns_args implements org.apache.thrift.TBase<getUnsettledPurchaseReturns_args, getUnsettledPurchaseReturns_args._Fields>, java.io.Serializable, Cloneable   {
17711
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUnsettledPurchaseReturns_args");
17712
 
17713
 
17714
 
17715
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17716
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17717
;
17718
 
17719
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17720
 
17721
      static {
17722
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17723
          byName.put(field.getFieldName(), field);
17724
        }
17725
      }
17726
 
17727
      /**
17728
       * Find the _Fields constant that matches fieldId, or null if its not found.
17729
       */
17730
      public static _Fields findByThriftId(int fieldId) {
17731
        switch(fieldId) {
17732
          default:
17733
            return null;
17734
        }
17735
      }
17736
 
17737
      /**
17738
       * Find the _Fields constant that matches fieldId, throwing an exception
17739
       * if it is not found.
17740
       */
17741
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17742
        _Fields fields = findByThriftId(fieldId);
17743
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17744
        return fields;
17745
      }
17746
 
17747
      /**
17748
       * Find the _Fields constant that matches name, or null if its not found.
17749
       */
17750
      public static _Fields findByName(String name) {
17751
        return byName.get(name);
17752
      }
17753
 
17754
      private final short _thriftId;
17755
      private final String _fieldName;
17756
 
17757
      _Fields(short thriftId, String fieldName) {
17758
        _thriftId = thriftId;
17759
        _fieldName = fieldName;
17760
      }
17761
 
17762
      public short getThriftFieldId() {
17763
        return _thriftId;
17764
      }
17765
 
17766
      public String getFieldName() {
17767
        return _fieldName;
17768
      }
17769
    }
17770
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17771
    static {
17772
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17773
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17774
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUnsettledPurchaseReturns_args.class, metaDataMap);
17775
    }
17776
 
17777
    public getUnsettledPurchaseReturns_args() {
17778
    }
17779
 
17780
    /**
17781
     * Performs a deep copy on <i>other</i>.
17782
     */
17783
    public getUnsettledPurchaseReturns_args(getUnsettledPurchaseReturns_args other) {
17784
    }
17785
 
17786
    public getUnsettledPurchaseReturns_args deepCopy() {
17787
      return new getUnsettledPurchaseReturns_args(this);
17788
    }
17789
 
17790
    @Override
17791
    public void clear() {
17792
    }
17793
 
17794
    public void setFieldValue(_Fields field, Object value) {
17795
      switch (field) {
17796
      }
17797
    }
17798
 
17799
    public Object getFieldValue(_Fields field) {
17800
      switch (field) {
17801
      }
17802
      throw new IllegalStateException();
17803
    }
17804
 
17805
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17806
    public boolean isSet(_Fields field) {
17807
      if (field == null) {
17808
        throw new IllegalArgumentException();
17809
      }
17810
 
17811
      switch (field) {
17812
      }
17813
      throw new IllegalStateException();
17814
    }
17815
 
17816
    @Override
17817
    public boolean equals(Object that) {
17818
      if (that == null)
17819
        return false;
17820
      if (that instanceof getUnsettledPurchaseReturns_args)
17821
        return this.equals((getUnsettledPurchaseReturns_args)that);
17822
      return false;
17823
    }
17824
 
17825
    public boolean equals(getUnsettledPurchaseReturns_args that) {
17826
      if (that == null)
17827
        return false;
17828
 
17829
      return true;
17830
    }
17831
 
17832
    @Override
17833
    public int hashCode() {
17834
      return 0;
17835
    }
17836
 
17837
    public int compareTo(getUnsettledPurchaseReturns_args other) {
17838
      if (!getClass().equals(other.getClass())) {
17839
        return getClass().getName().compareTo(other.getClass().getName());
17840
      }
17841
 
17842
      int lastComparison = 0;
17843
      getUnsettledPurchaseReturns_args typedOther = (getUnsettledPurchaseReturns_args)other;
17844
 
17845
      return 0;
17846
    }
17847
 
17848
    public _Fields fieldForId(int fieldId) {
17849
      return _Fields.findByThriftId(fieldId);
17850
    }
17851
 
17852
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17853
      org.apache.thrift.protocol.TField field;
17854
      iprot.readStructBegin();
17855
      while (true)
17856
      {
17857
        field = iprot.readFieldBegin();
17858
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17859
          break;
17860
        }
17861
        switch (field.id) {
17862
          default:
17863
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17864
        }
17865
        iprot.readFieldEnd();
17866
      }
17867
      iprot.readStructEnd();
17868
      validate();
17869
    }
17870
 
17871
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17872
      validate();
17873
 
17874
      oprot.writeStructBegin(STRUCT_DESC);
17875
      oprot.writeFieldStop();
17876
      oprot.writeStructEnd();
17877
    }
17878
 
17879
    @Override
17880
    public String toString() {
17881
      StringBuilder sb = new StringBuilder("getUnsettledPurchaseReturns_args(");
17882
      boolean first = true;
17883
 
17884
      sb.append(")");
17885
      return sb.toString();
17886
    }
17887
 
17888
    public void validate() throws org.apache.thrift.TException {
17889
      // check for required fields
17890
    }
17891
 
17892
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17893
      try {
17894
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17895
      } catch (org.apache.thrift.TException te) {
17896
        throw new java.io.IOException(te);
17897
      }
17898
    }
17899
 
17900
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17901
      try {
17902
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17903
      } catch (org.apache.thrift.TException te) {
17904
        throw new java.io.IOException(te);
17905
      }
17906
    }
17907
 
17908
  }
17909
 
17910
  public static class getUnsettledPurchaseReturns_result implements org.apache.thrift.TBase<getUnsettledPurchaseReturns_result, getUnsettledPurchaseReturns_result._Fields>, java.io.Serializable, Cloneable   {
17911
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUnsettledPurchaseReturns_result");
17912
 
17913
    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);
17914
 
17915
    private List<PurchaseReturn> success; // required
17916
 
17917
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17918
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17919
      SUCCESS((short)0, "success");
17920
 
17921
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17922
 
17923
      static {
17924
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17925
          byName.put(field.getFieldName(), field);
17926
        }
17927
      }
17928
 
17929
      /**
17930
       * Find the _Fields constant that matches fieldId, or null if its not found.
17931
       */
17932
      public static _Fields findByThriftId(int fieldId) {
17933
        switch(fieldId) {
17934
          case 0: // SUCCESS
17935
            return SUCCESS;
17936
          default:
17937
            return null;
17938
        }
17939
      }
17940
 
17941
      /**
17942
       * Find the _Fields constant that matches fieldId, throwing an exception
17943
       * if it is not found.
17944
       */
17945
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17946
        _Fields fields = findByThriftId(fieldId);
17947
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17948
        return fields;
17949
      }
17950
 
17951
      /**
17952
       * Find the _Fields constant that matches name, or null if its not found.
17953
       */
17954
      public static _Fields findByName(String name) {
17955
        return byName.get(name);
17956
      }
17957
 
17958
      private final short _thriftId;
17959
      private final String _fieldName;
17960
 
17961
      _Fields(short thriftId, String fieldName) {
17962
        _thriftId = thriftId;
17963
        _fieldName = fieldName;
17964
      }
17965
 
17966
      public short getThriftFieldId() {
17967
        return _thriftId;
17968
      }
17969
 
17970
      public String getFieldName() {
17971
        return _fieldName;
17972
      }
17973
    }
17974
 
17975
    // isset id assignments
17976
 
17977
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17978
    static {
17979
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17980
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17981
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
17982
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class))));
17983
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17984
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUnsettledPurchaseReturns_result.class, metaDataMap);
17985
    }
17986
 
17987
    public getUnsettledPurchaseReturns_result() {
17988
    }
17989
 
17990
    public getUnsettledPurchaseReturns_result(
17991
      List<PurchaseReturn> success)
17992
    {
17993
      this();
17994
      this.success = success;
17995
    }
17996
 
17997
    /**
17998
     * Performs a deep copy on <i>other</i>.
17999
     */
18000
    public getUnsettledPurchaseReturns_result(getUnsettledPurchaseReturns_result other) {
18001
      if (other.isSetSuccess()) {
18002
        List<PurchaseReturn> __this__success = new ArrayList<PurchaseReturn>();
18003
        for (PurchaseReturn other_element : other.success) {
18004
          __this__success.add(new PurchaseReturn(other_element));
18005
        }
18006
        this.success = __this__success;
18007
      }
18008
    }
18009
 
18010
    public getUnsettledPurchaseReturns_result deepCopy() {
18011
      return new getUnsettledPurchaseReturns_result(this);
18012
    }
18013
 
18014
    @Override
18015
    public void clear() {
18016
      this.success = null;
18017
    }
18018
 
18019
    public int getSuccessSize() {
18020
      return (this.success == null) ? 0 : this.success.size();
18021
    }
18022
 
18023
    public java.util.Iterator<PurchaseReturn> getSuccessIterator() {
18024
      return (this.success == null) ? null : this.success.iterator();
18025
    }
18026
 
18027
    public void addToSuccess(PurchaseReturn elem) {
18028
      if (this.success == null) {
18029
        this.success = new ArrayList<PurchaseReturn>();
18030
      }
18031
      this.success.add(elem);
18032
    }
18033
 
18034
    public List<PurchaseReturn> getSuccess() {
18035
      return this.success;
18036
    }
18037
 
18038
    public void setSuccess(List<PurchaseReturn> success) {
18039
      this.success = success;
18040
    }
18041
 
18042
    public void unsetSuccess() {
18043
      this.success = null;
18044
    }
18045
 
18046
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
18047
    public boolean isSetSuccess() {
18048
      return this.success != null;
18049
    }
18050
 
18051
    public void setSuccessIsSet(boolean value) {
18052
      if (!value) {
18053
        this.success = null;
18054
      }
18055
    }
18056
 
18057
    public void setFieldValue(_Fields field, Object value) {
18058
      switch (field) {
18059
      case SUCCESS:
18060
        if (value == null) {
18061
          unsetSuccess();
18062
        } else {
18063
          setSuccess((List<PurchaseReturn>)value);
18064
        }
18065
        break;
18066
 
18067
      }
18068
    }
18069
 
18070
    public Object getFieldValue(_Fields field) {
18071
      switch (field) {
18072
      case SUCCESS:
18073
        return getSuccess();
18074
 
18075
      }
18076
      throw new IllegalStateException();
18077
    }
18078
 
18079
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18080
    public boolean isSet(_Fields field) {
18081
      if (field == null) {
18082
        throw new IllegalArgumentException();
18083
      }
18084
 
18085
      switch (field) {
18086
      case SUCCESS:
18087
        return isSetSuccess();
18088
      }
18089
      throw new IllegalStateException();
18090
    }
18091
 
18092
    @Override
18093
    public boolean equals(Object that) {
18094
      if (that == null)
18095
        return false;
18096
      if (that instanceof getUnsettledPurchaseReturns_result)
18097
        return this.equals((getUnsettledPurchaseReturns_result)that);
18098
      return false;
18099
    }
18100
 
18101
    public boolean equals(getUnsettledPurchaseReturns_result that) {
18102
      if (that == null)
18103
        return false;
18104
 
18105
      boolean this_present_success = true && this.isSetSuccess();
18106
      boolean that_present_success = true && that.isSetSuccess();
18107
      if (this_present_success || that_present_success) {
18108
        if (!(this_present_success && that_present_success))
18109
          return false;
18110
        if (!this.success.equals(that.success))
18111
          return false;
18112
      }
18113
 
18114
      return true;
18115
    }
18116
 
18117
    @Override
18118
    public int hashCode() {
18119
      return 0;
18120
    }
18121
 
18122
    public int compareTo(getUnsettledPurchaseReturns_result other) {
18123
      if (!getClass().equals(other.getClass())) {
18124
        return getClass().getName().compareTo(other.getClass().getName());
18125
      }
18126
 
18127
      int lastComparison = 0;
18128
      getUnsettledPurchaseReturns_result typedOther = (getUnsettledPurchaseReturns_result)other;
18129
 
18130
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
18131
      if (lastComparison != 0) {
18132
        return lastComparison;
18133
      }
18134
      if (isSetSuccess()) {
18135
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
18136
        if (lastComparison != 0) {
18137
          return lastComparison;
18138
        }
18139
      }
18140
      return 0;
18141
    }
18142
 
18143
    public _Fields fieldForId(int fieldId) {
18144
      return _Fields.findByThriftId(fieldId);
18145
    }
18146
 
18147
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18148
      org.apache.thrift.protocol.TField field;
18149
      iprot.readStructBegin();
18150
      while (true)
18151
      {
18152
        field = iprot.readFieldBegin();
18153
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18154
          break;
18155
        }
18156
        switch (field.id) {
18157
          case 0: // SUCCESS
18158
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
18159
              {
21847 amit.gupta 18160
                org.apache.thrift.protocol.TList _list36 = iprot.readListBegin();
18161
                this.success = new ArrayList<PurchaseReturn>(_list36.size);
18162
                for (int _i37 = 0; _i37 < _list36.size; ++_i37)
6467 amar.kumar 18163
                {
21847 amit.gupta 18164
                  PurchaseReturn _elem38; // required
18165
                  _elem38 = new PurchaseReturn();
18166
                  _elem38.read(iprot);
18167
                  this.success.add(_elem38);
6467 amar.kumar 18168
                }
18169
                iprot.readListEnd();
18170
              }
18171
            } else { 
18172
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18173
            }
18174
            break;
18175
          default:
18176
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18177
        }
18178
        iprot.readFieldEnd();
18179
      }
18180
      iprot.readStructEnd();
18181
      validate();
18182
    }
18183
 
18184
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18185
      oprot.writeStructBegin(STRUCT_DESC);
18186
 
18187
      if (this.isSetSuccess()) {
18188
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18189
        {
18190
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
21847 amit.gupta 18191
          for (PurchaseReturn _iter39 : this.success)
6467 amar.kumar 18192
          {
21847 amit.gupta 18193
            _iter39.write(oprot);
6467 amar.kumar 18194
          }
18195
          oprot.writeListEnd();
18196
        }
18197
        oprot.writeFieldEnd();
18198
      }
18199
      oprot.writeFieldStop();
18200
      oprot.writeStructEnd();
18201
    }
18202
 
18203
    @Override
18204
    public String toString() {
18205
      StringBuilder sb = new StringBuilder("getUnsettledPurchaseReturns_result(");
18206
      boolean first = true;
18207
 
18208
      sb.append("success:");
18209
      if (this.success == null) {
18210
        sb.append("null");
18211
      } else {
18212
        sb.append(this.success);
18213
      }
18214
      first = false;
18215
      sb.append(")");
18216
      return sb.toString();
18217
    }
18218
 
18219
    public void validate() throws org.apache.thrift.TException {
18220
      // check for required fields
18221
    }
18222
 
18223
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18224
      try {
18225
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18226
      } catch (org.apache.thrift.TException te) {
18227
        throw new java.io.IOException(te);
18228
      }
18229
    }
18230
 
18231
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18232
      try {
18233
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18234
      } catch (org.apache.thrift.TException te) {
18235
        throw new java.io.IOException(te);
18236
      }
18237
    }
18238
 
18239
  }
18240
 
6630 amar.kumar 18241
  public static class getInvoice_args implements org.apache.thrift.TBase<getInvoice_args, getInvoice_args._Fields>, java.io.Serializable, Cloneable   {
18242
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoice_args");
18243
 
18244
    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);
18245
    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);
18246
 
18247
    private String invoiceNumber; // required
18248
    private long supplierId; // required
18249
 
18250
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18251
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18252
      INVOICE_NUMBER((short)1, "invoiceNumber"),
18253
      SUPPLIER_ID((short)2, "supplierId");
18254
 
18255
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18256
 
18257
      static {
18258
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18259
          byName.put(field.getFieldName(), field);
18260
        }
18261
      }
18262
 
18263
      /**
18264
       * Find the _Fields constant that matches fieldId, or null if its not found.
18265
       */
18266
      public static _Fields findByThriftId(int fieldId) {
18267
        switch(fieldId) {
18268
          case 1: // INVOICE_NUMBER
18269
            return INVOICE_NUMBER;
18270
          case 2: // SUPPLIER_ID
18271
            return SUPPLIER_ID;
18272
          default:
18273
            return null;
18274
        }
18275
      }
18276
 
18277
      /**
18278
       * Find the _Fields constant that matches fieldId, throwing an exception
18279
       * if it is not found.
18280
       */
18281
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18282
        _Fields fields = findByThriftId(fieldId);
18283
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18284
        return fields;
18285
      }
18286
 
18287
      /**
18288
       * Find the _Fields constant that matches name, or null if its not found.
18289
       */
18290
      public static _Fields findByName(String name) {
18291
        return byName.get(name);
18292
      }
18293
 
18294
      private final short _thriftId;
18295
      private final String _fieldName;
18296
 
18297
      _Fields(short thriftId, String fieldName) {
18298
        _thriftId = thriftId;
18299
        _fieldName = fieldName;
18300
      }
18301
 
18302
      public short getThriftFieldId() {
18303
        return _thriftId;
18304
      }
18305
 
18306
      public String getFieldName() {
18307
        return _fieldName;
18308
      }
18309
    }
18310
 
18311
    // isset id assignments
18312
    private static final int __SUPPLIERID_ISSET_ID = 0;
18313
    private BitSet __isset_bit_vector = new BitSet(1);
18314
 
18315
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18316
    static {
18317
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18318
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18319
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
18320
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18321
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18322
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18323
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoice_args.class, metaDataMap);
18324
    }
18325
 
18326
    public getInvoice_args() {
18327
    }
18328
 
18329
    public getInvoice_args(
18330
      String invoiceNumber,
18331
      long supplierId)
18332
    {
18333
      this();
18334
      this.invoiceNumber = invoiceNumber;
18335
      this.supplierId = supplierId;
18336
      setSupplierIdIsSet(true);
18337
    }
18338
 
18339
    /**
18340
     * Performs a deep copy on <i>other</i>.
18341
     */
18342
    public getInvoice_args(getInvoice_args other) {
18343
      __isset_bit_vector.clear();
18344
      __isset_bit_vector.or(other.__isset_bit_vector);
18345
      if (other.isSetInvoiceNumber()) {
18346
        this.invoiceNumber = other.invoiceNumber;
18347
      }
18348
      this.supplierId = other.supplierId;
18349
    }
18350
 
18351
    public getInvoice_args deepCopy() {
18352
      return new getInvoice_args(this);
18353
    }
18354
 
18355
    @Override
18356
    public void clear() {
18357
      this.invoiceNumber = null;
18358
      setSupplierIdIsSet(false);
18359
      this.supplierId = 0;
18360
    }
18361
 
18362
    public String getInvoiceNumber() {
18363
      return this.invoiceNumber;
18364
    }
18365
 
18366
    public void setInvoiceNumber(String invoiceNumber) {
18367
      this.invoiceNumber = invoiceNumber;
18368
    }
18369
 
18370
    public void unsetInvoiceNumber() {
18371
      this.invoiceNumber = null;
18372
    }
18373
 
18374
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
18375
    public boolean isSetInvoiceNumber() {
18376
      return this.invoiceNumber != null;
18377
    }
18378
 
18379
    public void setInvoiceNumberIsSet(boolean value) {
18380
      if (!value) {
18381
        this.invoiceNumber = null;
18382
      }
18383
    }
18384
 
18385
    public long getSupplierId() {
18386
      return this.supplierId;
18387
    }
18388
 
18389
    public void setSupplierId(long supplierId) {
18390
      this.supplierId = supplierId;
18391
      setSupplierIdIsSet(true);
18392
    }
18393
 
18394
    public void unsetSupplierId() {
18395
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
18396
    }
18397
 
18398
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
18399
    public boolean isSetSupplierId() {
18400
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
18401
    }
18402
 
18403
    public void setSupplierIdIsSet(boolean value) {
18404
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
18405
    }
18406
 
18407
    public void setFieldValue(_Fields field, Object value) {
18408
      switch (field) {
18409
      case INVOICE_NUMBER:
18410
        if (value == null) {
18411
          unsetInvoiceNumber();
18412
        } else {
18413
          setInvoiceNumber((String)value);
18414
        }
18415
        break;
18416
 
18417
      case SUPPLIER_ID:
18418
        if (value == null) {
18419
          unsetSupplierId();
18420
        } else {
18421
          setSupplierId((Long)value);
18422
        }
18423
        break;
18424
 
18425
      }
18426
    }
18427
 
18428
    public Object getFieldValue(_Fields field) {
18429
      switch (field) {
18430
      case INVOICE_NUMBER:
18431
        return getInvoiceNumber();
18432
 
18433
      case SUPPLIER_ID:
18434
        return Long.valueOf(getSupplierId());
18435
 
18436
      }
18437
      throw new IllegalStateException();
18438
    }
18439
 
18440
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18441
    public boolean isSet(_Fields field) {
18442
      if (field == null) {
18443
        throw new IllegalArgumentException();
18444
      }
18445
 
18446
      switch (field) {
18447
      case INVOICE_NUMBER:
18448
        return isSetInvoiceNumber();
18449
      case SUPPLIER_ID:
18450
        return isSetSupplierId();
18451
      }
18452
      throw new IllegalStateException();
18453
    }
18454
 
18455
    @Override
18456
    public boolean equals(Object that) {
18457
      if (that == null)
18458
        return false;
18459
      if (that instanceof getInvoice_args)
18460
        return this.equals((getInvoice_args)that);
18461
      return false;
18462
    }
18463
 
18464
    public boolean equals(getInvoice_args that) {
18465
      if (that == null)
18466
        return false;
18467
 
18468
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
18469
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
18470
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
18471
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
18472
          return false;
18473
        if (!this.invoiceNumber.equals(that.invoiceNumber))
18474
          return false;
18475
      }
18476
 
18477
      boolean this_present_supplierId = true;
18478
      boolean that_present_supplierId = true;
18479
      if (this_present_supplierId || that_present_supplierId) {
18480
        if (!(this_present_supplierId && that_present_supplierId))
18481
          return false;
18482
        if (this.supplierId != that.supplierId)
18483
          return false;
18484
      }
18485
 
18486
      return true;
18487
    }
18488
 
18489
    @Override
18490
    public int hashCode() {
18491
      return 0;
18492
    }
18493
 
18494
    public int compareTo(getInvoice_args other) {
18495
      if (!getClass().equals(other.getClass())) {
18496
        return getClass().getName().compareTo(other.getClass().getName());
18497
      }
18498
 
18499
      int lastComparison = 0;
18500
      getInvoice_args typedOther = (getInvoice_args)other;
18501
 
18502
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
18503
      if (lastComparison != 0) {
18504
        return lastComparison;
18505
      }
18506
      if (isSetInvoiceNumber()) {
18507
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
18508
        if (lastComparison != 0) {
18509
          return lastComparison;
18510
        }
18511
      }
18512
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
18513
      if (lastComparison != 0) {
18514
        return lastComparison;
18515
      }
18516
      if (isSetSupplierId()) {
18517
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
18518
        if (lastComparison != 0) {
18519
          return lastComparison;
18520
        }
18521
      }
18522
      return 0;
18523
    }
18524
 
18525
    public _Fields fieldForId(int fieldId) {
18526
      return _Fields.findByThriftId(fieldId);
18527
    }
18528
 
18529
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18530
      org.apache.thrift.protocol.TField field;
18531
      iprot.readStructBegin();
18532
      while (true)
18533
      {
18534
        field = iprot.readFieldBegin();
18535
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18536
          break;
18537
        }
18538
        switch (field.id) {
18539
          case 1: // INVOICE_NUMBER
18540
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
18541
              this.invoiceNumber = iprot.readString();
18542
            } else { 
18543
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18544
            }
18545
            break;
18546
          case 2: // SUPPLIER_ID
18547
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18548
              this.supplierId = iprot.readI64();
18549
              setSupplierIdIsSet(true);
18550
            } else { 
18551
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18552
            }
18553
            break;
18554
          default:
18555
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18556
        }
18557
        iprot.readFieldEnd();
18558
      }
18559
      iprot.readStructEnd();
18560
      validate();
18561
    }
18562
 
18563
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18564
      validate();
18565
 
18566
      oprot.writeStructBegin(STRUCT_DESC);
18567
      if (this.invoiceNumber != null) {
18568
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
18569
        oprot.writeString(this.invoiceNumber);
18570
        oprot.writeFieldEnd();
18571
      }
18572
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
18573
      oprot.writeI64(this.supplierId);
18574
      oprot.writeFieldEnd();
18575
      oprot.writeFieldStop();
18576
      oprot.writeStructEnd();
18577
    }
18578
 
18579
    @Override
18580
    public String toString() {
18581
      StringBuilder sb = new StringBuilder("getInvoice_args(");
18582
      boolean first = true;
18583
 
18584
      sb.append("invoiceNumber:");
18585
      if (this.invoiceNumber == null) {
18586
        sb.append("null");
18587
      } else {
18588
        sb.append(this.invoiceNumber);
18589
      }
18590
      first = false;
18591
      if (!first) sb.append(", ");
18592
      sb.append("supplierId:");
18593
      sb.append(this.supplierId);
18594
      first = false;
18595
      sb.append(")");
18596
      return sb.toString();
18597
    }
18598
 
18599
    public void validate() throws org.apache.thrift.TException {
18600
      // check for required fields
18601
    }
18602
 
18603
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18604
      try {
18605
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18606
      } catch (org.apache.thrift.TException te) {
18607
        throw new java.io.IOException(te);
18608
      }
18609
    }
18610
 
18611
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18612
      try {
18613
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18614
      } catch (org.apache.thrift.TException te) {
18615
        throw new java.io.IOException(te);
18616
      }
18617
    }
18618
 
18619
  }
18620
 
18621
  public static class getInvoice_result implements org.apache.thrift.TBase<getInvoice_result, getInvoice_result._Fields>, java.io.Serializable, Cloneable   {
18622
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoice_result");
18623
 
18624
    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);
18625
 
18626
    private List<PurchaseReturn> success; // required
18627
 
18628
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18629
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18630
      SUCCESS((short)0, "success");
18631
 
18632
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18633
 
18634
      static {
18635
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18636
          byName.put(field.getFieldName(), field);
18637
        }
18638
      }
18639
 
18640
      /**
18641
       * Find the _Fields constant that matches fieldId, or null if its not found.
18642
       */
18643
      public static _Fields findByThriftId(int fieldId) {
18644
        switch(fieldId) {
18645
          case 0: // SUCCESS
18646
            return SUCCESS;
18647
          default:
18648
            return null;
18649
        }
18650
      }
18651
 
18652
      /**
18653
       * Find the _Fields constant that matches fieldId, throwing an exception
18654
       * if it is not found.
18655
       */
18656
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18657
        _Fields fields = findByThriftId(fieldId);
18658
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18659
        return fields;
18660
      }
18661
 
18662
      /**
18663
       * Find the _Fields constant that matches name, or null if its not found.
18664
       */
18665
      public static _Fields findByName(String name) {
18666
        return byName.get(name);
18667
      }
18668
 
18669
      private final short _thriftId;
18670
      private final String _fieldName;
18671
 
18672
      _Fields(short thriftId, String fieldName) {
18673
        _thriftId = thriftId;
18674
        _fieldName = fieldName;
18675
      }
18676
 
18677
      public short getThriftFieldId() {
18678
        return _thriftId;
18679
      }
18680
 
18681
      public String getFieldName() {
18682
        return _fieldName;
18683
      }
18684
    }
18685
 
18686
    // isset id assignments
18687
 
18688
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18689
    static {
18690
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18691
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18692
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
18693
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class))));
18694
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18695
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoice_result.class, metaDataMap);
18696
    }
18697
 
18698
    public getInvoice_result() {
18699
    }
18700
 
18701
    public getInvoice_result(
18702
      List<PurchaseReturn> success)
18703
    {
18704
      this();
18705
      this.success = success;
18706
    }
18707
 
18708
    /**
18709
     * Performs a deep copy on <i>other</i>.
18710
     */
18711
    public getInvoice_result(getInvoice_result other) {
18712
      if (other.isSetSuccess()) {
18713
        List<PurchaseReturn> __this__success = new ArrayList<PurchaseReturn>();
18714
        for (PurchaseReturn other_element : other.success) {
18715
          __this__success.add(new PurchaseReturn(other_element));
18716
        }
18717
        this.success = __this__success;
18718
      }
18719
    }
18720
 
18721
    public getInvoice_result deepCopy() {
18722
      return new getInvoice_result(this);
18723
    }
18724
 
18725
    @Override
18726
    public void clear() {
18727
      this.success = null;
18728
    }
18729
 
18730
    public int getSuccessSize() {
18731
      return (this.success == null) ? 0 : this.success.size();
18732
    }
18733
 
18734
    public java.util.Iterator<PurchaseReturn> getSuccessIterator() {
18735
      return (this.success == null) ? null : this.success.iterator();
18736
    }
18737
 
18738
    public void addToSuccess(PurchaseReturn elem) {
18739
      if (this.success == null) {
18740
        this.success = new ArrayList<PurchaseReturn>();
18741
      }
18742
      this.success.add(elem);
18743
    }
18744
 
18745
    public List<PurchaseReturn> getSuccess() {
18746
      return this.success;
18747
    }
18748
 
18749
    public void setSuccess(List<PurchaseReturn> success) {
18750
      this.success = success;
18751
    }
18752
 
18753
    public void unsetSuccess() {
18754
      this.success = null;
18755
    }
18756
 
18757
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
18758
    public boolean isSetSuccess() {
18759
      return this.success != null;
18760
    }
18761
 
18762
    public void setSuccessIsSet(boolean value) {
18763
      if (!value) {
18764
        this.success = null;
18765
      }
18766
    }
18767
 
18768
    public void setFieldValue(_Fields field, Object value) {
18769
      switch (field) {
18770
      case SUCCESS:
18771
        if (value == null) {
18772
          unsetSuccess();
18773
        } else {
18774
          setSuccess((List<PurchaseReturn>)value);
18775
        }
18776
        break;
18777
 
18778
      }
18779
    }
18780
 
18781
    public Object getFieldValue(_Fields field) {
18782
      switch (field) {
18783
      case SUCCESS:
18784
        return getSuccess();
18785
 
18786
      }
18787
      throw new IllegalStateException();
18788
    }
18789
 
18790
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18791
    public boolean isSet(_Fields field) {
18792
      if (field == null) {
18793
        throw new IllegalArgumentException();
18794
      }
18795
 
18796
      switch (field) {
18797
      case SUCCESS:
18798
        return isSetSuccess();
18799
      }
18800
      throw new IllegalStateException();
18801
    }
18802
 
18803
    @Override
18804
    public boolean equals(Object that) {
18805
      if (that == null)
18806
        return false;
18807
      if (that instanceof getInvoice_result)
18808
        return this.equals((getInvoice_result)that);
18809
      return false;
18810
    }
18811
 
18812
    public boolean equals(getInvoice_result that) {
18813
      if (that == null)
18814
        return false;
18815
 
18816
      boolean this_present_success = true && this.isSetSuccess();
18817
      boolean that_present_success = true && that.isSetSuccess();
18818
      if (this_present_success || that_present_success) {
18819
        if (!(this_present_success && that_present_success))
18820
          return false;
18821
        if (!this.success.equals(that.success))
18822
          return false;
18823
      }
18824
 
18825
      return true;
18826
    }
18827
 
18828
    @Override
18829
    public int hashCode() {
18830
      return 0;
18831
    }
18832
 
18833
    public int compareTo(getInvoice_result other) {
18834
      if (!getClass().equals(other.getClass())) {
18835
        return getClass().getName().compareTo(other.getClass().getName());
18836
      }
18837
 
18838
      int lastComparison = 0;
18839
      getInvoice_result typedOther = (getInvoice_result)other;
18840
 
18841
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
18842
      if (lastComparison != 0) {
18843
        return lastComparison;
18844
      }
18845
      if (isSetSuccess()) {
18846
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
18847
        if (lastComparison != 0) {
18848
          return lastComparison;
18849
        }
18850
      }
18851
      return 0;
18852
    }
18853
 
18854
    public _Fields fieldForId(int fieldId) {
18855
      return _Fields.findByThriftId(fieldId);
18856
    }
18857
 
18858
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18859
      org.apache.thrift.protocol.TField field;
18860
      iprot.readStructBegin();
18861
      while (true)
18862
      {
18863
        field = iprot.readFieldBegin();
18864
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18865
          break;
18866
        }
18867
        switch (field.id) {
18868
          case 0: // SUCCESS
18869
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
18870
              {
21847 amit.gupta 18871
                org.apache.thrift.protocol.TList _list40 = iprot.readListBegin();
18872
                this.success = new ArrayList<PurchaseReturn>(_list40.size);
18873
                for (int _i41 = 0; _i41 < _list40.size; ++_i41)
6630 amar.kumar 18874
                {
21847 amit.gupta 18875
                  PurchaseReturn _elem42; // required
18876
                  _elem42 = new PurchaseReturn();
18877
                  _elem42.read(iprot);
18878
                  this.success.add(_elem42);
6630 amar.kumar 18879
                }
18880
                iprot.readListEnd();
18881
              }
18882
            } else { 
18883
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18884
            }
18885
            break;
18886
          default:
18887
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18888
        }
18889
        iprot.readFieldEnd();
18890
      }
18891
      iprot.readStructEnd();
18892
      validate();
18893
    }
18894
 
18895
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18896
      oprot.writeStructBegin(STRUCT_DESC);
18897
 
18898
      if (this.isSetSuccess()) {
18899
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18900
        {
18901
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
21847 amit.gupta 18902
          for (PurchaseReturn _iter43 : this.success)
6630 amar.kumar 18903
          {
21847 amit.gupta 18904
            _iter43.write(oprot);
6630 amar.kumar 18905
          }
18906
          oprot.writeListEnd();
18907
        }
18908
        oprot.writeFieldEnd();
18909
      }
18910
      oprot.writeFieldStop();
18911
      oprot.writeStructEnd();
18912
    }
18913
 
18914
    @Override
18915
    public String toString() {
18916
      StringBuilder sb = new StringBuilder("getInvoice_result(");
18917
      boolean first = true;
18918
 
18919
      sb.append("success:");
18920
      if (this.success == null) {
18921
        sb.append("null");
18922
      } else {
18923
        sb.append(this.success);
18924
      }
18925
      first = false;
18926
      sb.append(")");
18927
      return sb.toString();
18928
    }
18929
 
18930
    public void validate() throws org.apache.thrift.TException {
18931
      // check for required fields
18932
    }
18933
 
18934
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18935
      try {
18936
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18937
      } catch (org.apache.thrift.TException te) {
18938
        throw new java.io.IOException(te);
18939
      }
18940
    }
18941
 
18942
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18943
      try {
18944
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18945
      } catch (org.apache.thrift.TException te) {
18946
        throw new java.io.IOException(te);
18947
      }
18948
    }
18949
 
18950
  }
18951
 
6762 amar.kumar 18952
  public static class createPurchaseForOurExtBilling_args implements org.apache.thrift.TBase<createPurchaseForOurExtBilling_args, createPurchaseForOurExtBilling_args._Fields>, java.io.Serializable, Cloneable   {
18953
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseForOurExtBilling_args");
18954
 
18955
    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);
18956
    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 18957
    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);
18958
    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 18959
 
18960
    private String invoiceNumber; // required
18961
    private double unitPrice; // required
7672 rajveer 18962
    private double nlc; // required
6762 amar.kumar 18963
    private long itemId; // required
18964
 
18965
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18966
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18967
      INVOICE_NUMBER((short)1, "invoiceNumber"),
18968
      UNIT_PRICE((short)2, "unitPrice"),
7672 rajveer 18969
      NLC((short)3, "nlc"),
18970
      ITEM_ID((short)4, "itemId");
6762 amar.kumar 18971
 
18972
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18973
 
18974
      static {
18975
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18976
          byName.put(field.getFieldName(), field);
18977
        }
18978
      }
18979
 
18980
      /**
18981
       * Find the _Fields constant that matches fieldId, or null if its not found.
18982
       */
18983
      public static _Fields findByThriftId(int fieldId) {
18984
        switch(fieldId) {
18985
          case 1: // INVOICE_NUMBER
18986
            return INVOICE_NUMBER;
18987
          case 2: // UNIT_PRICE
18988
            return UNIT_PRICE;
7672 rajveer 18989
          case 3: // NLC
18990
            return NLC;
18991
          case 4: // ITEM_ID
6762 amar.kumar 18992
            return ITEM_ID;
18993
          default:
18994
            return null;
18995
        }
18996
      }
18997
 
18998
      /**
18999
       * Find the _Fields constant that matches fieldId, throwing an exception
19000
       * if it is not found.
19001
       */
19002
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19003
        _Fields fields = findByThriftId(fieldId);
19004
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19005
        return fields;
19006
      }
19007
 
19008
      /**
19009
       * Find the _Fields constant that matches name, or null if its not found.
19010
       */
19011
      public static _Fields findByName(String name) {
19012
        return byName.get(name);
19013
      }
19014
 
19015
      private final short _thriftId;
19016
      private final String _fieldName;
19017
 
19018
      _Fields(short thriftId, String fieldName) {
19019
        _thriftId = thriftId;
19020
        _fieldName = fieldName;
19021
      }
19022
 
19023
      public short getThriftFieldId() {
19024
        return _thriftId;
19025
      }
19026
 
19027
      public String getFieldName() {
19028
        return _fieldName;
19029
      }
19030
    }
19031
 
19032
    // isset id assignments
19033
    private static final int __UNITPRICE_ISSET_ID = 0;
7672 rajveer 19034
    private static final int __NLC_ISSET_ID = 1;
19035
    private static final int __ITEMID_ISSET_ID = 2;
19036
    private BitSet __isset_bit_vector = new BitSet(3);
6762 amar.kumar 19037
 
19038
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19039
    static {
19040
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19041
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19042
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
19043
      tmpMap.put(_Fields.UNIT_PRICE, new org.apache.thrift.meta_data.FieldMetaData("unitPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19044
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
7672 rajveer 19045
      tmpMap.put(_Fields.NLC, new org.apache.thrift.meta_data.FieldMetaData("nlc", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19046
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
6762 amar.kumar 19047
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19048
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19049
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19050
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseForOurExtBilling_args.class, metaDataMap);
19051
    }
19052
 
19053
    public createPurchaseForOurExtBilling_args() {
19054
    }
19055
 
19056
    public createPurchaseForOurExtBilling_args(
19057
      String invoiceNumber,
19058
      double unitPrice,
7672 rajveer 19059
      double nlc,
6762 amar.kumar 19060
      long itemId)
19061
    {
19062
      this();
19063
      this.invoiceNumber = invoiceNumber;
19064
      this.unitPrice = unitPrice;
19065
      setUnitPriceIsSet(true);
7672 rajveer 19066
      this.nlc = nlc;
19067
      setNlcIsSet(true);
6762 amar.kumar 19068
      this.itemId = itemId;
19069
      setItemIdIsSet(true);
19070
    }
19071
 
19072
    /**
19073
     * Performs a deep copy on <i>other</i>.
19074
     */
19075
    public createPurchaseForOurExtBilling_args(createPurchaseForOurExtBilling_args other) {
19076
      __isset_bit_vector.clear();
19077
      __isset_bit_vector.or(other.__isset_bit_vector);
19078
      if (other.isSetInvoiceNumber()) {
19079
        this.invoiceNumber = other.invoiceNumber;
19080
      }
19081
      this.unitPrice = other.unitPrice;
7672 rajveer 19082
      this.nlc = other.nlc;
6762 amar.kumar 19083
      this.itemId = other.itemId;
19084
    }
19085
 
19086
    public createPurchaseForOurExtBilling_args deepCopy() {
19087
      return new createPurchaseForOurExtBilling_args(this);
19088
    }
19089
 
19090
    @Override
19091
    public void clear() {
19092
      this.invoiceNumber = null;
19093
      setUnitPriceIsSet(false);
19094
      this.unitPrice = 0.0;
7672 rajveer 19095
      setNlcIsSet(false);
19096
      this.nlc = 0.0;
6762 amar.kumar 19097
      setItemIdIsSet(false);
19098
      this.itemId = 0;
19099
    }
19100
 
19101
    public String getInvoiceNumber() {
19102
      return this.invoiceNumber;
19103
    }
19104
 
19105
    public void setInvoiceNumber(String invoiceNumber) {
19106
      this.invoiceNumber = invoiceNumber;
19107
    }
19108
 
19109
    public void unsetInvoiceNumber() {
19110
      this.invoiceNumber = null;
19111
    }
19112
 
19113
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
19114
    public boolean isSetInvoiceNumber() {
19115
      return this.invoiceNumber != null;
19116
    }
19117
 
19118
    public void setInvoiceNumberIsSet(boolean value) {
19119
      if (!value) {
19120
        this.invoiceNumber = null;
19121
      }
19122
    }
19123
 
19124
    public double getUnitPrice() {
19125
      return this.unitPrice;
19126
    }
19127
 
19128
    public void setUnitPrice(double unitPrice) {
19129
      this.unitPrice = unitPrice;
19130
      setUnitPriceIsSet(true);
19131
    }
19132
 
19133
    public void unsetUnitPrice() {
19134
      __isset_bit_vector.clear(__UNITPRICE_ISSET_ID);
19135
    }
19136
 
19137
    /** Returns true if field unitPrice is set (has been assigned a value) and false otherwise */
19138
    public boolean isSetUnitPrice() {
19139
      return __isset_bit_vector.get(__UNITPRICE_ISSET_ID);
19140
    }
19141
 
19142
    public void setUnitPriceIsSet(boolean value) {
19143
      __isset_bit_vector.set(__UNITPRICE_ISSET_ID, value);
19144
    }
19145
 
7672 rajveer 19146
    public double getNlc() {
19147
      return this.nlc;
19148
    }
19149
 
19150
    public void setNlc(double nlc) {
19151
      this.nlc = nlc;
19152
      setNlcIsSet(true);
19153
    }
19154
 
19155
    public void unsetNlc() {
19156
      __isset_bit_vector.clear(__NLC_ISSET_ID);
19157
    }
19158
 
19159
    /** Returns true if field nlc is set (has been assigned a value) and false otherwise */
19160
    public boolean isSetNlc() {
19161
      return __isset_bit_vector.get(__NLC_ISSET_ID);
19162
    }
19163
 
19164
    public void setNlcIsSet(boolean value) {
19165
      __isset_bit_vector.set(__NLC_ISSET_ID, value);
19166
    }
19167
 
6762 amar.kumar 19168
    public long getItemId() {
19169
      return this.itemId;
19170
    }
19171
 
19172
    public void setItemId(long itemId) {
19173
      this.itemId = itemId;
19174
      setItemIdIsSet(true);
19175
    }
19176
 
19177
    public void unsetItemId() {
19178
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
19179
    }
19180
 
19181
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
19182
    public boolean isSetItemId() {
19183
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
19184
    }
19185
 
19186
    public void setItemIdIsSet(boolean value) {
19187
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
19188
    }
19189
 
19190
    public void setFieldValue(_Fields field, Object value) {
19191
      switch (field) {
19192
      case INVOICE_NUMBER:
19193
        if (value == null) {
19194
          unsetInvoiceNumber();
19195
        } else {
19196
          setInvoiceNumber((String)value);
19197
        }
19198
        break;
19199
 
19200
      case UNIT_PRICE:
19201
        if (value == null) {
19202
          unsetUnitPrice();
19203
        } else {
19204
          setUnitPrice((Double)value);
19205
        }
19206
        break;
19207
 
7672 rajveer 19208
      case NLC:
19209
        if (value == null) {
19210
          unsetNlc();
19211
        } else {
19212
          setNlc((Double)value);
19213
        }
19214
        break;
19215
 
6762 amar.kumar 19216
      case ITEM_ID:
19217
        if (value == null) {
19218
          unsetItemId();
19219
        } else {
19220
          setItemId((Long)value);
19221
        }
19222
        break;
19223
 
19224
      }
19225
    }
19226
 
19227
    public Object getFieldValue(_Fields field) {
19228
      switch (field) {
19229
      case INVOICE_NUMBER:
19230
        return getInvoiceNumber();
19231
 
19232
      case UNIT_PRICE:
19233
        return Double.valueOf(getUnitPrice());
19234
 
7672 rajveer 19235
      case NLC:
19236
        return Double.valueOf(getNlc());
19237
 
6762 amar.kumar 19238
      case ITEM_ID:
19239
        return Long.valueOf(getItemId());
19240
 
19241
      }
19242
      throw new IllegalStateException();
19243
    }
19244
 
19245
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19246
    public boolean isSet(_Fields field) {
19247
      if (field == null) {
19248
        throw new IllegalArgumentException();
19249
      }
19250
 
19251
      switch (field) {
19252
      case INVOICE_NUMBER:
19253
        return isSetInvoiceNumber();
19254
      case UNIT_PRICE:
19255
        return isSetUnitPrice();
7672 rajveer 19256
      case NLC:
19257
        return isSetNlc();
6762 amar.kumar 19258
      case ITEM_ID:
19259
        return isSetItemId();
19260
      }
19261
      throw new IllegalStateException();
19262
    }
19263
 
19264
    @Override
19265
    public boolean equals(Object that) {
19266
      if (that == null)
19267
        return false;
19268
      if (that instanceof createPurchaseForOurExtBilling_args)
19269
        return this.equals((createPurchaseForOurExtBilling_args)that);
19270
      return false;
19271
    }
19272
 
19273
    public boolean equals(createPurchaseForOurExtBilling_args that) {
19274
      if (that == null)
19275
        return false;
19276
 
19277
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
19278
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
19279
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
19280
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
19281
          return false;
19282
        if (!this.invoiceNumber.equals(that.invoiceNumber))
19283
          return false;
19284
      }
19285
 
19286
      boolean this_present_unitPrice = true;
19287
      boolean that_present_unitPrice = true;
19288
      if (this_present_unitPrice || that_present_unitPrice) {
19289
        if (!(this_present_unitPrice && that_present_unitPrice))
19290
          return false;
19291
        if (this.unitPrice != that.unitPrice)
19292
          return false;
19293
      }
19294
 
7672 rajveer 19295
      boolean this_present_nlc = true;
19296
      boolean that_present_nlc = true;
19297
      if (this_present_nlc || that_present_nlc) {
19298
        if (!(this_present_nlc && that_present_nlc))
19299
          return false;
19300
        if (this.nlc != that.nlc)
19301
          return false;
19302
      }
19303
 
6762 amar.kumar 19304
      boolean this_present_itemId = true;
19305
      boolean that_present_itemId = true;
19306
      if (this_present_itemId || that_present_itemId) {
19307
        if (!(this_present_itemId && that_present_itemId))
19308
          return false;
19309
        if (this.itemId != that.itemId)
19310
          return false;
19311
      }
19312
 
19313
      return true;
19314
    }
19315
 
19316
    @Override
19317
    public int hashCode() {
19318
      return 0;
19319
    }
19320
 
19321
    public int compareTo(createPurchaseForOurExtBilling_args other) {
19322
      if (!getClass().equals(other.getClass())) {
19323
        return getClass().getName().compareTo(other.getClass().getName());
19324
      }
19325
 
19326
      int lastComparison = 0;
19327
      createPurchaseForOurExtBilling_args typedOther = (createPurchaseForOurExtBilling_args)other;
19328
 
19329
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
19330
      if (lastComparison != 0) {
19331
        return lastComparison;
19332
      }
19333
      if (isSetInvoiceNumber()) {
19334
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
19335
        if (lastComparison != 0) {
19336
          return lastComparison;
19337
        }
19338
      }
19339
      lastComparison = Boolean.valueOf(isSetUnitPrice()).compareTo(typedOther.isSetUnitPrice());
19340
      if (lastComparison != 0) {
19341
        return lastComparison;
19342
      }
19343
      if (isSetUnitPrice()) {
19344
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unitPrice, typedOther.unitPrice);
19345
        if (lastComparison != 0) {
19346
          return lastComparison;
19347
        }
19348
      }
7672 rajveer 19349
      lastComparison = Boolean.valueOf(isSetNlc()).compareTo(typedOther.isSetNlc());
19350
      if (lastComparison != 0) {
19351
        return lastComparison;
19352
      }
19353
      if (isSetNlc()) {
19354
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nlc, typedOther.nlc);
19355
        if (lastComparison != 0) {
19356
          return lastComparison;
19357
        }
19358
      }
6762 amar.kumar 19359
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
19360
      if (lastComparison != 0) {
19361
        return lastComparison;
19362
      }
19363
      if (isSetItemId()) {
19364
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
19365
        if (lastComparison != 0) {
19366
          return lastComparison;
19367
        }
19368
      }
19369
      return 0;
19370
    }
19371
 
19372
    public _Fields fieldForId(int fieldId) {
19373
      return _Fields.findByThriftId(fieldId);
19374
    }
19375
 
19376
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19377
      org.apache.thrift.protocol.TField field;
19378
      iprot.readStructBegin();
19379
      while (true)
19380
      {
19381
        field = iprot.readFieldBegin();
19382
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19383
          break;
19384
        }
19385
        switch (field.id) {
19386
          case 1: // INVOICE_NUMBER
19387
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
19388
              this.invoiceNumber = iprot.readString();
19389
            } else { 
19390
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19391
            }
19392
            break;
19393
          case 2: // UNIT_PRICE
19394
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
19395
              this.unitPrice = iprot.readDouble();
19396
              setUnitPriceIsSet(true);
19397
            } else { 
19398
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19399
            }
19400
            break;
7672 rajveer 19401
          case 3: // NLC
19402
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
19403
              this.nlc = iprot.readDouble();
19404
              setNlcIsSet(true);
19405
            } else { 
19406
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19407
            }
19408
            break;
19409
          case 4: // ITEM_ID
6762 amar.kumar 19410
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19411
              this.itemId = iprot.readI64();
19412
              setItemIdIsSet(true);
19413
            } else { 
19414
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19415
            }
19416
            break;
19417
          default:
19418
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19419
        }
19420
        iprot.readFieldEnd();
19421
      }
19422
      iprot.readStructEnd();
19423
      validate();
19424
    }
19425
 
19426
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19427
      validate();
19428
 
19429
      oprot.writeStructBegin(STRUCT_DESC);
19430
      if (this.invoiceNumber != null) {
19431
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
19432
        oprot.writeString(this.invoiceNumber);
19433
        oprot.writeFieldEnd();
19434
      }
19435
      oprot.writeFieldBegin(UNIT_PRICE_FIELD_DESC);
19436
      oprot.writeDouble(this.unitPrice);
19437
      oprot.writeFieldEnd();
7672 rajveer 19438
      oprot.writeFieldBegin(NLC_FIELD_DESC);
19439
      oprot.writeDouble(this.nlc);
19440
      oprot.writeFieldEnd();
6762 amar.kumar 19441
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
19442
      oprot.writeI64(this.itemId);
19443
      oprot.writeFieldEnd();
19444
      oprot.writeFieldStop();
19445
      oprot.writeStructEnd();
19446
    }
19447
 
19448
    @Override
19449
    public String toString() {
19450
      StringBuilder sb = new StringBuilder("createPurchaseForOurExtBilling_args(");
19451
      boolean first = true;
19452
 
19453
      sb.append("invoiceNumber:");
19454
      if (this.invoiceNumber == null) {
19455
        sb.append("null");
19456
      } else {
19457
        sb.append(this.invoiceNumber);
19458
      }
19459
      first = false;
19460
      if (!first) sb.append(", ");
19461
      sb.append("unitPrice:");
19462
      sb.append(this.unitPrice);
19463
      first = false;
19464
      if (!first) sb.append(", ");
7672 rajveer 19465
      sb.append("nlc:");
19466
      sb.append(this.nlc);
19467
      first = false;
19468
      if (!first) sb.append(", ");
6762 amar.kumar 19469
      sb.append("itemId:");
19470
      sb.append(this.itemId);
19471
      first = false;
19472
      sb.append(")");
19473
      return sb.toString();
19474
    }
19475
 
19476
    public void validate() throws org.apache.thrift.TException {
19477
      // check for required fields
19478
    }
19479
 
19480
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19481
      try {
19482
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19483
      } catch (org.apache.thrift.TException te) {
19484
        throw new java.io.IOException(te);
19485
      }
19486
    }
19487
 
19488
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19489
      try {
19490
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
19491
        __isset_bit_vector = new BitSet(1);
19492
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19493
      } catch (org.apache.thrift.TException te) {
19494
        throw new java.io.IOException(te);
19495
      }
19496
    }
19497
 
19498
  }
19499
 
19500
  public static class createPurchaseForOurExtBilling_result implements org.apache.thrift.TBase<createPurchaseForOurExtBilling_result, createPurchaseForOurExtBilling_result._Fields>, java.io.Serializable, Cloneable   {
19501
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseForOurExtBilling_result");
19502
 
19503
    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);
19504
 
19505
    private long success; // required
19506
 
19507
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19508
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19509
      SUCCESS((short)0, "success");
19510
 
19511
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19512
 
19513
      static {
19514
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19515
          byName.put(field.getFieldName(), field);
19516
        }
19517
      }
19518
 
19519
      /**
19520
       * Find the _Fields constant that matches fieldId, or null if its not found.
19521
       */
19522
      public static _Fields findByThriftId(int fieldId) {
19523
        switch(fieldId) {
19524
          case 0: // SUCCESS
19525
            return SUCCESS;
19526
          default:
19527
            return null;
19528
        }
19529
      }
19530
 
19531
      /**
19532
       * Find the _Fields constant that matches fieldId, throwing an exception
19533
       * if it is not found.
19534
       */
19535
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19536
        _Fields fields = findByThriftId(fieldId);
19537
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19538
        return fields;
19539
      }
19540
 
19541
      /**
19542
       * Find the _Fields constant that matches name, or null if its not found.
19543
       */
19544
      public static _Fields findByName(String name) {
19545
        return byName.get(name);
19546
      }
19547
 
19548
      private final short _thriftId;
19549
      private final String _fieldName;
19550
 
19551
      _Fields(short thriftId, String fieldName) {
19552
        _thriftId = thriftId;
19553
        _fieldName = fieldName;
19554
      }
19555
 
19556
      public short getThriftFieldId() {
19557
        return _thriftId;
19558
      }
19559
 
19560
      public String getFieldName() {
19561
        return _fieldName;
19562
      }
19563
    }
19564
 
19565
    // isset id assignments
19566
    private static final int __SUCCESS_ISSET_ID = 0;
19567
    private BitSet __isset_bit_vector = new BitSet(1);
19568
 
19569
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19570
    static {
19571
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19572
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19573
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19574
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19575
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseForOurExtBilling_result.class, metaDataMap);
19576
    }
19577
 
19578
    public createPurchaseForOurExtBilling_result() {
19579
    }
19580
 
19581
    public createPurchaseForOurExtBilling_result(
19582
      long success)
19583
    {
19584
      this();
19585
      this.success = success;
19586
      setSuccessIsSet(true);
19587
    }
19588
 
19589
    /**
19590
     * Performs a deep copy on <i>other</i>.
19591
     */
19592
    public createPurchaseForOurExtBilling_result(createPurchaseForOurExtBilling_result other) {
19593
      __isset_bit_vector.clear();
19594
      __isset_bit_vector.or(other.__isset_bit_vector);
19595
      this.success = other.success;
19596
    }
19597
 
19598
    public createPurchaseForOurExtBilling_result deepCopy() {
19599
      return new createPurchaseForOurExtBilling_result(this);
19600
    }
19601
 
19602
    @Override
19603
    public void clear() {
19604
      setSuccessIsSet(false);
19605
      this.success = 0;
19606
    }
19607
 
19608
    public long getSuccess() {
19609
      return this.success;
19610
    }
19611
 
19612
    public void setSuccess(long success) {
19613
      this.success = success;
19614
      setSuccessIsSet(true);
19615
    }
19616
 
19617
    public void unsetSuccess() {
19618
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
19619
    }
19620
 
19621
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
19622
    public boolean isSetSuccess() {
19623
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
19624
    }
19625
 
19626
    public void setSuccessIsSet(boolean value) {
19627
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
19628
    }
19629
 
19630
    public void setFieldValue(_Fields field, Object value) {
19631
      switch (field) {
19632
      case SUCCESS:
19633
        if (value == null) {
19634
          unsetSuccess();
19635
        } else {
19636
          setSuccess((Long)value);
19637
        }
19638
        break;
19639
 
19640
      }
19641
    }
19642
 
19643
    public Object getFieldValue(_Fields field) {
19644
      switch (field) {
19645
      case SUCCESS:
19646
        return Long.valueOf(getSuccess());
19647
 
19648
      }
19649
      throw new IllegalStateException();
19650
    }
19651
 
19652
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19653
    public boolean isSet(_Fields field) {
19654
      if (field == null) {
19655
        throw new IllegalArgumentException();
19656
      }
19657
 
19658
      switch (field) {
19659
      case SUCCESS:
19660
        return isSetSuccess();
19661
      }
19662
      throw new IllegalStateException();
19663
    }
19664
 
19665
    @Override
19666
    public boolean equals(Object that) {
19667
      if (that == null)
19668
        return false;
19669
      if (that instanceof createPurchaseForOurExtBilling_result)
19670
        return this.equals((createPurchaseForOurExtBilling_result)that);
19671
      return false;
19672
    }
19673
 
19674
    public boolean equals(createPurchaseForOurExtBilling_result that) {
19675
      if (that == null)
19676
        return false;
19677
 
19678
      boolean this_present_success = true;
19679
      boolean that_present_success = true;
19680
      if (this_present_success || that_present_success) {
19681
        if (!(this_present_success && that_present_success))
19682
          return false;
19683
        if (this.success != that.success)
19684
          return false;
19685
      }
19686
 
19687
      return true;
19688
    }
19689
 
19690
    @Override
19691
    public int hashCode() {
19692
      return 0;
19693
    }
19694
 
19695
    public int compareTo(createPurchaseForOurExtBilling_result other) {
19696
      if (!getClass().equals(other.getClass())) {
19697
        return getClass().getName().compareTo(other.getClass().getName());
19698
      }
19699
 
19700
      int lastComparison = 0;
19701
      createPurchaseForOurExtBilling_result typedOther = (createPurchaseForOurExtBilling_result)other;
19702
 
19703
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
19704
      if (lastComparison != 0) {
19705
        return lastComparison;
19706
      }
19707
      if (isSetSuccess()) {
19708
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
19709
        if (lastComparison != 0) {
19710
          return lastComparison;
19711
        }
19712
      }
19713
      return 0;
19714
    }
19715
 
19716
    public _Fields fieldForId(int fieldId) {
19717
      return _Fields.findByThriftId(fieldId);
19718
    }
19719
 
19720
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19721
      org.apache.thrift.protocol.TField field;
19722
      iprot.readStructBegin();
19723
      while (true)
19724
      {
19725
        field = iprot.readFieldBegin();
19726
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19727
          break;
19728
        }
19729
        switch (field.id) {
19730
          case 0: // SUCCESS
19731
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19732
              this.success = iprot.readI64();
19733
              setSuccessIsSet(true);
19734
            } else { 
19735
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19736
            }
19737
            break;
19738
          default:
19739
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19740
        }
19741
        iprot.readFieldEnd();
19742
      }
19743
      iprot.readStructEnd();
19744
      validate();
19745
    }
19746
 
19747
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19748
      oprot.writeStructBegin(STRUCT_DESC);
19749
 
19750
      if (this.isSetSuccess()) {
19751
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
19752
        oprot.writeI64(this.success);
19753
        oprot.writeFieldEnd();
19754
      }
19755
      oprot.writeFieldStop();
19756
      oprot.writeStructEnd();
19757
    }
19758
 
19759
    @Override
19760
    public String toString() {
19761
      StringBuilder sb = new StringBuilder("createPurchaseForOurExtBilling_result(");
19762
      boolean first = true;
19763
 
19764
      sb.append("success:");
19765
      sb.append(this.success);
19766
      first = false;
19767
      sb.append(")");
19768
      return sb.toString();
19769
    }
19770
 
19771
    public void validate() throws org.apache.thrift.TException {
19772
      // check for required fields
19773
    }
19774
 
19775
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19776
      try {
19777
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19778
      } catch (org.apache.thrift.TException te) {
19779
        throw new java.io.IOException(te);
19780
      }
19781
    }
19782
 
19783
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19784
      try {
19785
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19786
      } catch (org.apache.thrift.TException te) {
19787
        throw new java.io.IOException(te);
19788
      }
19789
    }
19790
 
19791
  }
19792
 
19793
  public static class fulfillPOForExtBilling_args implements org.apache.thrift.TBase<fulfillPOForExtBilling_args, fulfillPOForExtBilling_args._Fields>, java.io.Serializable, Cloneable   {
19794
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPOForExtBilling_args");
19795
 
19796
    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);
19797
    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);
19798
 
19799
    private long itemId; // required
19800
    private long quantity; // required
19801
 
19802
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19803
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19804
      ITEM_ID((short)1, "itemId"),
19805
      QUANTITY((short)2, "quantity");
19806
 
19807
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19808
 
19809
      static {
19810
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19811
          byName.put(field.getFieldName(), field);
19812
        }
19813
      }
19814
 
19815
      /**
19816
       * Find the _Fields constant that matches fieldId, or null if its not found.
19817
       */
19818
      public static _Fields findByThriftId(int fieldId) {
19819
        switch(fieldId) {
19820
          case 1: // ITEM_ID
19821
            return ITEM_ID;
19822
          case 2: // QUANTITY
19823
            return QUANTITY;
19824
          default:
19825
            return null;
19826
        }
19827
      }
19828
 
19829
      /**
19830
       * Find the _Fields constant that matches fieldId, throwing an exception
19831
       * if it is not found.
19832
       */
19833
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19834
        _Fields fields = findByThriftId(fieldId);
19835
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19836
        return fields;
19837
      }
19838
 
19839
      /**
19840
       * Find the _Fields constant that matches name, or null if its not found.
19841
       */
19842
      public static _Fields findByName(String name) {
19843
        return byName.get(name);
19844
      }
19845
 
19846
      private final short _thriftId;
19847
      private final String _fieldName;
19848
 
19849
      _Fields(short thriftId, String fieldName) {
19850
        _thriftId = thriftId;
19851
        _fieldName = fieldName;
19852
      }
19853
 
19854
      public short getThriftFieldId() {
19855
        return _thriftId;
19856
      }
19857
 
19858
      public String getFieldName() {
19859
        return _fieldName;
19860
      }
19861
    }
19862
 
19863
    // isset id assignments
19864
    private static final int __ITEMID_ISSET_ID = 0;
19865
    private static final int __QUANTITY_ISSET_ID = 1;
19866
    private BitSet __isset_bit_vector = new BitSet(2);
19867
 
19868
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19869
    static {
19870
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19871
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19872
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19873
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19874
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19875
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19876
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPOForExtBilling_args.class, metaDataMap);
19877
    }
19878
 
19879
    public fulfillPOForExtBilling_args() {
19880
    }
19881
 
19882
    public fulfillPOForExtBilling_args(
19883
      long itemId,
19884
      long quantity)
19885
    {
19886
      this();
19887
      this.itemId = itemId;
19888
      setItemIdIsSet(true);
19889
      this.quantity = quantity;
19890
      setQuantityIsSet(true);
19891
    }
19892
 
19893
    /**
19894
     * Performs a deep copy on <i>other</i>.
19895
     */
19896
    public fulfillPOForExtBilling_args(fulfillPOForExtBilling_args other) {
19897
      __isset_bit_vector.clear();
19898
      __isset_bit_vector.or(other.__isset_bit_vector);
19899
      this.itemId = other.itemId;
19900
      this.quantity = other.quantity;
19901
    }
19902
 
19903
    public fulfillPOForExtBilling_args deepCopy() {
19904
      return new fulfillPOForExtBilling_args(this);
19905
    }
19906
 
19907
    @Override
19908
    public void clear() {
19909
      setItemIdIsSet(false);
19910
      this.itemId = 0;
19911
      setQuantityIsSet(false);
19912
      this.quantity = 0;
19913
    }
19914
 
19915
    public long getItemId() {
19916
      return this.itemId;
19917
    }
19918
 
19919
    public void setItemId(long itemId) {
19920
      this.itemId = itemId;
19921
      setItemIdIsSet(true);
19922
    }
19923
 
19924
    public void unsetItemId() {
19925
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
19926
    }
19927
 
19928
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
19929
    public boolean isSetItemId() {
19930
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
19931
    }
19932
 
19933
    public void setItemIdIsSet(boolean value) {
19934
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
19935
    }
19936
 
19937
    public long getQuantity() {
19938
      return this.quantity;
19939
    }
19940
 
19941
    public void setQuantity(long quantity) {
19942
      this.quantity = quantity;
19943
      setQuantityIsSet(true);
19944
    }
19945
 
19946
    public void unsetQuantity() {
19947
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
19948
    }
19949
 
19950
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
19951
    public boolean isSetQuantity() {
19952
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
19953
    }
19954
 
19955
    public void setQuantityIsSet(boolean value) {
19956
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
19957
    }
19958
 
19959
    public void setFieldValue(_Fields field, Object value) {
19960
      switch (field) {
19961
      case ITEM_ID:
19962
        if (value == null) {
19963
          unsetItemId();
19964
        } else {
19965
          setItemId((Long)value);
19966
        }
19967
        break;
19968
 
19969
      case QUANTITY:
19970
        if (value == null) {
19971
          unsetQuantity();
19972
        } else {
19973
          setQuantity((Long)value);
19974
        }
19975
        break;
19976
 
19977
      }
19978
    }
19979
 
19980
    public Object getFieldValue(_Fields field) {
19981
      switch (field) {
19982
      case ITEM_ID:
19983
        return Long.valueOf(getItemId());
19984
 
19985
      case QUANTITY:
19986
        return Long.valueOf(getQuantity());
19987
 
19988
      }
19989
      throw new IllegalStateException();
19990
    }
19991
 
19992
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19993
    public boolean isSet(_Fields field) {
19994
      if (field == null) {
19995
        throw new IllegalArgumentException();
19996
      }
19997
 
19998
      switch (field) {
19999
      case ITEM_ID:
20000
        return isSetItemId();
20001
      case QUANTITY:
20002
        return isSetQuantity();
20003
      }
20004
      throw new IllegalStateException();
20005
    }
20006
 
20007
    @Override
20008
    public boolean equals(Object that) {
20009
      if (that == null)
20010
        return false;
20011
      if (that instanceof fulfillPOForExtBilling_args)
20012
        return this.equals((fulfillPOForExtBilling_args)that);
20013
      return false;
20014
    }
20015
 
20016
    public boolean equals(fulfillPOForExtBilling_args that) {
20017
      if (that == null)
20018
        return false;
20019
 
20020
      boolean this_present_itemId = true;
20021
      boolean that_present_itemId = true;
20022
      if (this_present_itemId || that_present_itemId) {
20023
        if (!(this_present_itemId && that_present_itemId))
20024
          return false;
20025
        if (this.itemId != that.itemId)
20026
          return false;
20027
      }
20028
 
20029
      boolean this_present_quantity = true;
20030
      boolean that_present_quantity = true;
20031
      if (this_present_quantity || that_present_quantity) {
20032
        if (!(this_present_quantity && that_present_quantity))
20033
          return false;
20034
        if (this.quantity != that.quantity)
20035
          return false;
20036
      }
20037
 
20038
      return true;
20039
    }
20040
 
20041
    @Override
20042
    public int hashCode() {
20043
      return 0;
20044
    }
20045
 
20046
    public int compareTo(fulfillPOForExtBilling_args other) {
20047
      if (!getClass().equals(other.getClass())) {
20048
        return getClass().getName().compareTo(other.getClass().getName());
20049
      }
20050
 
20051
      int lastComparison = 0;
20052
      fulfillPOForExtBilling_args typedOther = (fulfillPOForExtBilling_args)other;
20053
 
20054
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
20055
      if (lastComparison != 0) {
20056
        return lastComparison;
20057
      }
20058
      if (isSetItemId()) {
20059
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
20060
        if (lastComparison != 0) {
20061
          return lastComparison;
20062
        }
20063
      }
20064
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
20065
      if (lastComparison != 0) {
20066
        return lastComparison;
20067
      }
20068
      if (isSetQuantity()) {
20069
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
20070
        if (lastComparison != 0) {
20071
          return lastComparison;
20072
        }
20073
      }
20074
      return 0;
20075
    }
20076
 
20077
    public _Fields fieldForId(int fieldId) {
20078
      return _Fields.findByThriftId(fieldId);
20079
    }
20080
 
20081
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20082
      org.apache.thrift.protocol.TField field;
20083
      iprot.readStructBegin();
20084
      while (true)
20085
      {
20086
        field = iprot.readFieldBegin();
20087
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20088
          break;
20089
        }
20090
        switch (field.id) {
20091
          case 1: // ITEM_ID
20092
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20093
              this.itemId = iprot.readI64();
20094
              setItemIdIsSet(true);
20095
            } else { 
20096
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20097
            }
20098
            break;
20099
          case 2: // QUANTITY
20100
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20101
              this.quantity = iprot.readI64();
20102
              setQuantityIsSet(true);
20103
            } else { 
20104
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20105
            }
20106
            break;
20107
          default:
20108
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20109
        }
20110
        iprot.readFieldEnd();
20111
      }
20112
      iprot.readStructEnd();
20113
      validate();
20114
    }
20115
 
20116
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20117
      validate();
20118
 
20119
      oprot.writeStructBegin(STRUCT_DESC);
20120
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
20121
      oprot.writeI64(this.itemId);
20122
      oprot.writeFieldEnd();
20123
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
20124
      oprot.writeI64(this.quantity);
20125
      oprot.writeFieldEnd();
20126
      oprot.writeFieldStop();
20127
      oprot.writeStructEnd();
20128
    }
20129
 
20130
    @Override
20131
    public String toString() {
20132
      StringBuilder sb = new StringBuilder("fulfillPOForExtBilling_args(");
20133
      boolean first = true;
20134
 
20135
      sb.append("itemId:");
20136
      sb.append(this.itemId);
20137
      first = false;
20138
      if (!first) sb.append(", ");
20139
      sb.append("quantity:");
20140
      sb.append(this.quantity);
20141
      first = false;
20142
      sb.append(")");
20143
      return sb.toString();
20144
    }
20145
 
20146
    public void validate() throws org.apache.thrift.TException {
20147
      // check for required fields
20148
    }
20149
 
20150
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20151
      try {
20152
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20153
      } catch (org.apache.thrift.TException te) {
20154
        throw new java.io.IOException(te);
20155
      }
20156
    }
20157
 
20158
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20159
      try {
20160
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
20161
        __isset_bit_vector = new BitSet(1);
20162
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20163
      } catch (org.apache.thrift.TException te) {
20164
        throw new java.io.IOException(te);
20165
      }
20166
    }
20167
 
20168
  }
20169
 
20170
  public static class fulfillPOForExtBilling_result implements org.apache.thrift.TBase<fulfillPOForExtBilling_result, fulfillPOForExtBilling_result._Fields>, java.io.Serializable, Cloneable   {
20171
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPOForExtBilling_result");
20172
 
20173
 
20174
 
20175
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20176
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20177
;
20178
 
20179
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20180
 
20181
      static {
20182
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20183
          byName.put(field.getFieldName(), field);
20184
        }
20185
      }
20186
 
20187
      /**
20188
       * Find the _Fields constant that matches fieldId, or null if its not found.
20189
       */
20190
      public static _Fields findByThriftId(int fieldId) {
20191
        switch(fieldId) {
20192
          default:
20193
            return null;
20194
        }
20195
      }
20196
 
20197
      /**
20198
       * Find the _Fields constant that matches fieldId, throwing an exception
20199
       * if it is not found.
20200
       */
20201
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20202
        _Fields fields = findByThriftId(fieldId);
20203
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20204
        return fields;
20205
      }
20206
 
20207
      /**
20208
       * Find the _Fields constant that matches name, or null if its not found.
20209
       */
20210
      public static _Fields findByName(String name) {
20211
        return byName.get(name);
20212
      }
20213
 
20214
      private final short _thriftId;
20215
      private final String _fieldName;
20216
 
20217
      _Fields(short thriftId, String fieldName) {
20218
        _thriftId = thriftId;
20219
        _fieldName = fieldName;
20220
      }
20221
 
20222
      public short getThriftFieldId() {
20223
        return _thriftId;
20224
      }
20225
 
20226
      public String getFieldName() {
20227
        return _fieldName;
20228
      }
20229
    }
20230
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20231
    static {
20232
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20233
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20234
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPOForExtBilling_result.class, metaDataMap);
20235
    }
20236
 
20237
    public fulfillPOForExtBilling_result() {
20238
    }
20239
 
20240
    /**
20241
     * Performs a deep copy on <i>other</i>.
20242
     */
20243
    public fulfillPOForExtBilling_result(fulfillPOForExtBilling_result other) {
20244
    }
20245
 
20246
    public fulfillPOForExtBilling_result deepCopy() {
20247
      return new fulfillPOForExtBilling_result(this);
20248
    }
20249
 
20250
    @Override
20251
    public void clear() {
20252
    }
20253
 
20254
    public void setFieldValue(_Fields field, Object value) {
20255
      switch (field) {
20256
      }
20257
    }
20258
 
20259
    public Object getFieldValue(_Fields field) {
20260
      switch (field) {
20261
      }
20262
      throw new IllegalStateException();
20263
    }
20264
 
20265
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20266
    public boolean isSet(_Fields field) {
20267
      if (field == null) {
20268
        throw new IllegalArgumentException();
20269
      }
20270
 
20271
      switch (field) {
20272
      }
20273
      throw new IllegalStateException();
20274
    }
20275
 
20276
    @Override
20277
    public boolean equals(Object that) {
20278
      if (that == null)
20279
        return false;
20280
      if (that instanceof fulfillPOForExtBilling_result)
20281
        return this.equals((fulfillPOForExtBilling_result)that);
20282
      return false;
20283
    }
20284
 
20285
    public boolean equals(fulfillPOForExtBilling_result that) {
20286
      if (that == null)
20287
        return false;
20288
 
20289
      return true;
20290
    }
20291
 
20292
    @Override
20293
    public int hashCode() {
20294
      return 0;
20295
    }
20296
 
20297
    public int compareTo(fulfillPOForExtBilling_result other) {
20298
      if (!getClass().equals(other.getClass())) {
20299
        return getClass().getName().compareTo(other.getClass().getName());
20300
      }
20301
 
20302
      int lastComparison = 0;
20303
      fulfillPOForExtBilling_result typedOther = (fulfillPOForExtBilling_result)other;
20304
 
20305
      return 0;
20306
    }
20307
 
20308
    public _Fields fieldForId(int fieldId) {
20309
      return _Fields.findByThriftId(fieldId);
20310
    }
20311
 
20312
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20313
      org.apache.thrift.protocol.TField field;
20314
      iprot.readStructBegin();
20315
      while (true)
20316
      {
20317
        field = iprot.readFieldBegin();
20318
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20319
          break;
20320
        }
20321
        switch (field.id) {
20322
          default:
20323
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20324
        }
20325
        iprot.readFieldEnd();
20326
      }
20327
      iprot.readStructEnd();
20328
      validate();
20329
    }
20330
 
20331
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20332
      oprot.writeStructBegin(STRUCT_DESC);
20333
 
20334
      oprot.writeFieldStop();
20335
      oprot.writeStructEnd();
20336
    }
20337
 
20338
    @Override
20339
    public String toString() {
20340
      StringBuilder sb = new StringBuilder("fulfillPOForExtBilling_result(");
20341
      boolean first = true;
20342
 
20343
      sb.append(")");
20344
      return sb.toString();
20345
    }
20346
 
20347
    public void validate() throws org.apache.thrift.TException {
20348
      // check for required fields
20349
    }
20350
 
20351
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20352
      try {
20353
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20354
      } catch (org.apache.thrift.TException te) {
20355
        throw new java.io.IOException(te);
20356
      }
20357
    }
20358
 
20359
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20360
      try {
20361
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20362
      } catch (org.apache.thrift.TException te) {
20363
        throw new java.io.IOException(te);
20364
      }
20365
    }
20366
 
20367
  }
20368
 
7410 amar.kumar 20369
  public static class closePO_args implements org.apache.thrift.TBase<closePO_args, closePO_args._Fields>, java.io.Serializable, Cloneable   {
20370
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePO_args");
20371
 
20372
    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);
20373
 
20374
    private long poId; // required
20375
 
20376
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20377
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20378
      PO_ID((short)1, "poId");
20379
 
20380
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20381
 
20382
      static {
20383
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20384
          byName.put(field.getFieldName(), field);
20385
        }
20386
      }
20387
 
20388
      /**
20389
       * Find the _Fields constant that matches fieldId, or null if its not found.
20390
       */
20391
      public static _Fields findByThriftId(int fieldId) {
20392
        switch(fieldId) {
20393
          case 1: // PO_ID
20394
            return PO_ID;
20395
          default:
20396
            return null;
20397
        }
20398
      }
20399
 
20400
      /**
20401
       * Find the _Fields constant that matches fieldId, throwing an exception
20402
       * if it is not found.
20403
       */
20404
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20405
        _Fields fields = findByThriftId(fieldId);
20406
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20407
        return fields;
20408
      }
20409
 
20410
      /**
20411
       * Find the _Fields constant that matches name, or null if its not found.
20412
       */
20413
      public static _Fields findByName(String name) {
20414
        return byName.get(name);
20415
      }
20416
 
20417
      private final short _thriftId;
20418
      private final String _fieldName;
20419
 
20420
      _Fields(short thriftId, String fieldName) {
20421
        _thriftId = thriftId;
20422
        _fieldName = fieldName;
20423
      }
20424
 
20425
      public short getThriftFieldId() {
20426
        return _thriftId;
20427
      }
20428
 
20429
      public String getFieldName() {
20430
        return _fieldName;
20431
      }
20432
    }
20433
 
20434
    // isset id assignments
20435
    private static final int __POID_ISSET_ID = 0;
20436
    private BitSet __isset_bit_vector = new BitSet(1);
20437
 
20438
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20439
    static {
20440
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20441
      tmpMap.put(_Fields.PO_ID, new org.apache.thrift.meta_data.FieldMetaData("poId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20442
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
20443
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20444
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePO_args.class, metaDataMap);
20445
    }
20446
 
20447
    public closePO_args() {
20448
    }
20449
 
20450
    public closePO_args(
20451
      long poId)
20452
    {
20453
      this();
20454
      this.poId = poId;
20455
      setPoIdIsSet(true);
20456
    }
20457
 
20458
    /**
20459
     * Performs a deep copy on <i>other</i>.
20460
     */
20461
    public closePO_args(closePO_args other) {
20462
      __isset_bit_vector.clear();
20463
      __isset_bit_vector.or(other.__isset_bit_vector);
20464
      this.poId = other.poId;
20465
    }
20466
 
20467
    public closePO_args deepCopy() {
20468
      return new closePO_args(this);
20469
    }
20470
 
20471
    @Override
20472
    public void clear() {
20473
      setPoIdIsSet(false);
20474
      this.poId = 0;
20475
    }
20476
 
20477
    public long getPoId() {
20478
      return this.poId;
20479
    }
20480
 
20481
    public void setPoId(long poId) {
20482
      this.poId = poId;
20483
      setPoIdIsSet(true);
20484
    }
20485
 
20486
    public void unsetPoId() {
20487
      __isset_bit_vector.clear(__POID_ISSET_ID);
20488
    }
20489
 
20490
    /** Returns true if field poId is set (has been assigned a value) and false otherwise */
20491
    public boolean isSetPoId() {
20492
      return __isset_bit_vector.get(__POID_ISSET_ID);
20493
    }
20494
 
20495
    public void setPoIdIsSet(boolean value) {
20496
      __isset_bit_vector.set(__POID_ISSET_ID, value);
20497
    }
20498
 
20499
    public void setFieldValue(_Fields field, Object value) {
20500
      switch (field) {
20501
      case PO_ID:
20502
        if (value == null) {
20503
          unsetPoId();
20504
        } else {
20505
          setPoId((Long)value);
20506
        }
20507
        break;
20508
 
20509
      }
20510
    }
20511
 
20512
    public Object getFieldValue(_Fields field) {
20513
      switch (field) {
20514
      case PO_ID:
20515
        return Long.valueOf(getPoId());
20516
 
20517
      }
20518
      throw new IllegalStateException();
20519
    }
20520
 
20521
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20522
    public boolean isSet(_Fields field) {
20523
      if (field == null) {
20524
        throw new IllegalArgumentException();
20525
      }
20526
 
20527
      switch (field) {
20528
      case PO_ID:
20529
        return isSetPoId();
20530
      }
20531
      throw new IllegalStateException();
20532
    }
20533
 
20534
    @Override
20535
    public boolean equals(Object that) {
20536
      if (that == null)
20537
        return false;
20538
      if (that instanceof closePO_args)
20539
        return this.equals((closePO_args)that);
20540
      return false;
20541
    }
20542
 
20543
    public boolean equals(closePO_args that) {
20544
      if (that == null)
20545
        return false;
20546
 
20547
      boolean this_present_poId = true;
20548
      boolean that_present_poId = true;
20549
      if (this_present_poId || that_present_poId) {
20550
        if (!(this_present_poId && that_present_poId))
20551
          return false;
20552
        if (this.poId != that.poId)
20553
          return false;
20554
      }
20555
 
20556
      return true;
20557
    }
20558
 
20559
    @Override
20560
    public int hashCode() {
20561
      return 0;
20562
    }
20563
 
20564
    public int compareTo(closePO_args other) {
20565
      if (!getClass().equals(other.getClass())) {
20566
        return getClass().getName().compareTo(other.getClass().getName());
20567
      }
20568
 
20569
      int lastComparison = 0;
20570
      closePO_args typedOther = (closePO_args)other;
20571
 
20572
      lastComparison = Boolean.valueOf(isSetPoId()).compareTo(typedOther.isSetPoId());
20573
      if (lastComparison != 0) {
20574
        return lastComparison;
20575
      }
20576
      if (isSetPoId()) {
20577
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.poId, typedOther.poId);
20578
        if (lastComparison != 0) {
20579
          return lastComparison;
20580
        }
20581
      }
20582
      return 0;
20583
    }
20584
 
20585
    public _Fields fieldForId(int fieldId) {
20586
      return _Fields.findByThriftId(fieldId);
20587
    }
20588
 
20589
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20590
      org.apache.thrift.protocol.TField field;
20591
      iprot.readStructBegin();
20592
      while (true)
20593
      {
20594
        field = iprot.readFieldBegin();
20595
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20596
          break;
20597
        }
20598
        switch (field.id) {
20599
          case 1: // PO_ID
20600
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20601
              this.poId = iprot.readI64();
20602
              setPoIdIsSet(true);
20603
            } else { 
20604
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20605
            }
20606
            break;
20607
          default:
20608
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20609
        }
20610
        iprot.readFieldEnd();
20611
      }
20612
      iprot.readStructEnd();
20613
      validate();
20614
    }
20615
 
20616
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20617
      validate();
20618
 
20619
      oprot.writeStructBegin(STRUCT_DESC);
20620
      oprot.writeFieldBegin(PO_ID_FIELD_DESC);
20621
      oprot.writeI64(this.poId);
20622
      oprot.writeFieldEnd();
20623
      oprot.writeFieldStop();
20624
      oprot.writeStructEnd();
20625
    }
20626
 
20627
    @Override
20628
    public String toString() {
20629
      StringBuilder sb = new StringBuilder("closePO_args(");
20630
      boolean first = true;
20631
 
20632
      sb.append("poId:");
20633
      sb.append(this.poId);
20634
      first = false;
20635
      sb.append(")");
20636
      return sb.toString();
20637
    }
20638
 
20639
    public void validate() throws org.apache.thrift.TException {
20640
      // check for required fields
20641
    }
20642
 
20643
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20644
      try {
20645
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20646
      } catch (org.apache.thrift.TException te) {
20647
        throw new java.io.IOException(te);
20648
      }
20649
    }
20650
 
20651
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20652
      try {
20653
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20654
      } catch (org.apache.thrift.TException te) {
20655
        throw new java.io.IOException(te);
20656
      }
20657
    }
20658
 
20659
  }
20660
 
20661
  public static class closePO_result implements org.apache.thrift.TBase<closePO_result, closePO_result._Fields>, java.io.Serializable, Cloneable   {
20662
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePO_result");
20663
 
20664
    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);
20665
 
20666
    private PurchaseServiceException e; // required
20667
 
20668
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20669
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20670
      E((short)1, "e");
20671
 
20672
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20673
 
20674
      static {
20675
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20676
          byName.put(field.getFieldName(), field);
20677
        }
20678
      }
20679
 
20680
      /**
20681
       * Find the _Fields constant that matches fieldId, or null if its not found.
20682
       */
20683
      public static _Fields findByThriftId(int fieldId) {
20684
        switch(fieldId) {
20685
          case 1: // E
20686
            return E;
20687
          default:
20688
            return null;
20689
        }
20690
      }
20691
 
20692
      /**
20693
       * Find the _Fields constant that matches fieldId, throwing an exception
20694
       * if it is not found.
20695
       */
20696
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20697
        _Fields fields = findByThriftId(fieldId);
20698
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20699
        return fields;
20700
      }
20701
 
20702
      /**
20703
       * Find the _Fields constant that matches name, or null if its not found.
20704
       */
20705
      public static _Fields findByName(String name) {
20706
        return byName.get(name);
20707
      }
20708
 
20709
      private final short _thriftId;
20710
      private final String _fieldName;
20711
 
20712
      _Fields(short thriftId, String fieldName) {
20713
        _thriftId = thriftId;
20714
        _fieldName = fieldName;
20715
      }
20716
 
20717
      public short getThriftFieldId() {
20718
        return _thriftId;
20719
      }
20720
 
20721
      public String getFieldName() {
20722
        return _fieldName;
20723
      }
20724
    }
20725
 
20726
    // isset id assignments
20727
 
20728
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20729
    static {
20730
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20731
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20732
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
20733
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20734
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePO_result.class, metaDataMap);
20735
    }
20736
 
20737
    public closePO_result() {
20738
    }
20739
 
20740
    public closePO_result(
20741
      PurchaseServiceException e)
20742
    {
20743
      this();
20744
      this.e = e;
20745
    }
20746
 
20747
    /**
20748
     * Performs a deep copy on <i>other</i>.
20749
     */
20750
    public closePO_result(closePO_result other) {
20751
      if (other.isSetE()) {
20752
        this.e = new PurchaseServiceException(other.e);
20753
      }
20754
    }
20755
 
20756
    public closePO_result deepCopy() {
20757
      return new closePO_result(this);
20758
    }
20759
 
20760
    @Override
20761
    public void clear() {
20762
      this.e = null;
20763
    }
20764
 
20765
    public PurchaseServiceException getE() {
20766
      return this.e;
20767
    }
20768
 
20769
    public void setE(PurchaseServiceException e) {
20770
      this.e = e;
20771
    }
20772
 
20773
    public void unsetE() {
20774
      this.e = null;
20775
    }
20776
 
20777
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
20778
    public boolean isSetE() {
20779
      return this.e != null;
20780
    }
20781
 
20782
    public void setEIsSet(boolean value) {
20783
      if (!value) {
20784
        this.e = null;
20785
      }
20786
    }
20787
 
20788
    public void setFieldValue(_Fields field, Object value) {
20789
      switch (field) {
20790
      case E:
20791
        if (value == null) {
20792
          unsetE();
20793
        } else {
20794
          setE((PurchaseServiceException)value);
20795
        }
20796
        break;
20797
 
20798
      }
20799
    }
20800
 
20801
    public Object getFieldValue(_Fields field) {
20802
      switch (field) {
20803
      case E:
20804
        return getE();
20805
 
20806
      }
20807
      throw new IllegalStateException();
20808
    }
20809
 
20810
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20811
    public boolean isSet(_Fields field) {
20812
      if (field == null) {
20813
        throw new IllegalArgumentException();
20814
      }
20815
 
20816
      switch (field) {
20817
      case E:
20818
        return isSetE();
20819
      }
20820
      throw new IllegalStateException();
20821
    }
20822
 
20823
    @Override
20824
    public boolean equals(Object that) {
20825
      if (that == null)
20826
        return false;
20827
      if (that instanceof closePO_result)
20828
        return this.equals((closePO_result)that);
20829
      return false;
20830
    }
20831
 
20832
    public boolean equals(closePO_result that) {
20833
      if (that == null)
20834
        return false;
20835
 
20836
      boolean this_present_e = true && this.isSetE();
20837
      boolean that_present_e = true && that.isSetE();
20838
      if (this_present_e || that_present_e) {
20839
        if (!(this_present_e && that_present_e))
20840
          return false;
20841
        if (!this.e.equals(that.e))
20842
          return false;
20843
      }
20844
 
20845
      return true;
20846
    }
20847
 
20848
    @Override
20849
    public int hashCode() {
20850
      return 0;
20851
    }
20852
 
20853
    public int compareTo(closePO_result other) {
20854
      if (!getClass().equals(other.getClass())) {
20855
        return getClass().getName().compareTo(other.getClass().getName());
20856
      }
20857
 
20858
      int lastComparison = 0;
20859
      closePO_result typedOther = (closePO_result)other;
20860
 
20861
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
20862
      if (lastComparison != 0) {
20863
        return lastComparison;
20864
      }
20865
      if (isSetE()) {
20866
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
20867
        if (lastComparison != 0) {
20868
          return lastComparison;
20869
        }
20870
      }
20871
      return 0;
20872
    }
20873
 
20874
    public _Fields fieldForId(int fieldId) {
20875
      return _Fields.findByThriftId(fieldId);
20876
    }
20877
 
20878
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20879
      org.apache.thrift.protocol.TField field;
20880
      iprot.readStructBegin();
20881
      while (true)
20882
      {
20883
        field = iprot.readFieldBegin();
20884
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20885
          break;
20886
        }
20887
        switch (field.id) {
20888
          case 1: // E
20889
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
20890
              this.e = new PurchaseServiceException();
20891
              this.e.read(iprot);
20892
            } else { 
20893
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20894
            }
20895
            break;
20896
          default:
20897
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20898
        }
20899
        iprot.readFieldEnd();
20900
      }
20901
      iprot.readStructEnd();
20902
      validate();
20903
    }
20904
 
20905
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20906
      oprot.writeStructBegin(STRUCT_DESC);
20907
 
20908
      if (this.isSetE()) {
20909
        oprot.writeFieldBegin(E_FIELD_DESC);
20910
        this.e.write(oprot);
20911
        oprot.writeFieldEnd();
20912
      }
20913
      oprot.writeFieldStop();
20914
      oprot.writeStructEnd();
20915
    }
20916
 
20917
    @Override
20918
    public String toString() {
20919
      StringBuilder sb = new StringBuilder("closePO_result(");
20920
      boolean first = true;
20921
 
20922
      sb.append("e:");
20923
      if (this.e == null) {
20924
        sb.append("null");
20925
      } else {
20926
        sb.append(this.e);
20927
      }
20928
      first = false;
20929
      sb.append(")");
20930
      return sb.toString();
20931
    }
20932
 
20933
    public void validate() throws org.apache.thrift.TException {
20934
      // check for required fields
20935
    }
20936
 
20937
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20938
      try {
20939
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20940
      } catch (org.apache.thrift.TException te) {
20941
        throw new java.io.IOException(te);
20942
      }
20943
    }
20944
 
20945
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20946
      try {
20947
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20948
      } catch (org.apache.thrift.TException te) {
20949
        throw new java.io.IOException(te);
20950
      }
20951
    }
20952
 
20953
  }
20954
 
20955
  public static class isInvoiceReceived_args implements org.apache.thrift.TBase<isInvoiceReceived_args, isInvoiceReceived_args._Fields>, java.io.Serializable, Cloneable   {
20956
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isInvoiceReceived_args");
20957
 
20958
    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);
20959
    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);
20960
 
20961
    private String invoiceNumber; // required
20962
    private long supplierId; // required
20963
 
20964
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20965
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20966
      INVOICE_NUMBER((short)1, "invoiceNumber"),
20967
      SUPPLIER_ID((short)2, "supplierId");
20968
 
20969
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20970
 
20971
      static {
20972
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20973
          byName.put(field.getFieldName(), field);
20974
        }
20975
      }
20976
 
20977
      /**
20978
       * Find the _Fields constant that matches fieldId, or null if its not found.
20979
       */
20980
      public static _Fields findByThriftId(int fieldId) {
20981
        switch(fieldId) {
20982
          case 1: // INVOICE_NUMBER
20983
            return INVOICE_NUMBER;
20984
          case 2: // SUPPLIER_ID
20985
            return SUPPLIER_ID;
20986
          default:
20987
            return null;
20988
        }
20989
      }
20990
 
20991
      /**
20992
       * Find the _Fields constant that matches fieldId, throwing an exception
20993
       * if it is not found.
20994
       */
20995
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20996
        _Fields fields = findByThriftId(fieldId);
20997
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20998
        return fields;
20999
      }
21000
 
21001
      /**
21002
       * Find the _Fields constant that matches name, or null if its not found.
21003
       */
21004
      public static _Fields findByName(String name) {
21005
        return byName.get(name);
21006
      }
21007
 
21008
      private final short _thriftId;
21009
      private final String _fieldName;
21010
 
21011
      _Fields(short thriftId, String fieldName) {
21012
        _thriftId = thriftId;
21013
        _fieldName = fieldName;
21014
      }
21015
 
21016
      public short getThriftFieldId() {
21017
        return _thriftId;
21018
      }
21019
 
21020
      public String getFieldName() {
21021
        return _fieldName;
21022
      }
21023
    }
21024
 
21025
    // isset id assignments
21026
    private static final int __SUPPLIERID_ISSET_ID = 0;
21027
    private BitSet __isset_bit_vector = new BitSet(1);
21028
 
21029
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21030
    static {
21031
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
21032
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21033
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
21034
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21035
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
21036
      metaDataMap = Collections.unmodifiableMap(tmpMap);
21037
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isInvoiceReceived_args.class, metaDataMap);
21038
    }
21039
 
21040
    public isInvoiceReceived_args() {
21041
    }
21042
 
21043
    public isInvoiceReceived_args(
21044
      String invoiceNumber,
21045
      long supplierId)
21046
    {
21047
      this();
21048
      this.invoiceNumber = invoiceNumber;
21049
      this.supplierId = supplierId;
21050
      setSupplierIdIsSet(true);
21051
    }
21052
 
21053
    /**
21054
     * Performs a deep copy on <i>other</i>.
21055
     */
21056
    public isInvoiceReceived_args(isInvoiceReceived_args other) {
21057
      __isset_bit_vector.clear();
21058
      __isset_bit_vector.or(other.__isset_bit_vector);
21059
      if (other.isSetInvoiceNumber()) {
21060
        this.invoiceNumber = other.invoiceNumber;
21061
      }
21062
      this.supplierId = other.supplierId;
21063
    }
21064
 
21065
    public isInvoiceReceived_args deepCopy() {
21066
      return new isInvoiceReceived_args(this);
21067
    }
21068
 
21069
    @Override
21070
    public void clear() {
21071
      this.invoiceNumber = null;
21072
      setSupplierIdIsSet(false);
21073
      this.supplierId = 0;
21074
    }
21075
 
21076
    public String getInvoiceNumber() {
21077
      return this.invoiceNumber;
21078
    }
21079
 
21080
    public void setInvoiceNumber(String invoiceNumber) {
21081
      this.invoiceNumber = invoiceNumber;
21082
    }
21083
 
21084
    public void unsetInvoiceNumber() {
21085
      this.invoiceNumber = null;
21086
    }
21087
 
21088
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
21089
    public boolean isSetInvoiceNumber() {
21090
      return this.invoiceNumber != null;
21091
    }
21092
 
21093
    public void setInvoiceNumberIsSet(boolean value) {
21094
      if (!value) {
21095
        this.invoiceNumber = null;
21096
      }
21097
    }
21098
 
21099
    public long getSupplierId() {
21100
      return this.supplierId;
21101
    }
21102
 
21103
    public void setSupplierId(long supplierId) {
21104
      this.supplierId = supplierId;
21105
      setSupplierIdIsSet(true);
21106
    }
21107
 
21108
    public void unsetSupplierId() {
21109
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
21110
    }
21111
 
21112
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
21113
    public boolean isSetSupplierId() {
21114
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
21115
    }
21116
 
21117
    public void setSupplierIdIsSet(boolean value) {
21118
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
21119
    }
21120
 
21121
    public void setFieldValue(_Fields field, Object value) {
21122
      switch (field) {
21123
      case INVOICE_NUMBER:
21124
        if (value == null) {
21125
          unsetInvoiceNumber();
21126
        } else {
21127
          setInvoiceNumber((String)value);
21128
        }
21129
        break;
21130
 
21131
      case SUPPLIER_ID:
21132
        if (value == null) {
21133
          unsetSupplierId();
21134
        } else {
21135
          setSupplierId((Long)value);
21136
        }
21137
        break;
21138
 
21139
      }
21140
    }
21141
 
21142
    public Object getFieldValue(_Fields field) {
21143
      switch (field) {
21144
      case INVOICE_NUMBER:
21145
        return getInvoiceNumber();
21146
 
21147
      case SUPPLIER_ID:
21148
        return Long.valueOf(getSupplierId());
21149
 
21150
      }
21151
      throw new IllegalStateException();
21152
    }
21153
 
21154
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21155
    public boolean isSet(_Fields field) {
21156
      if (field == null) {
21157
        throw new IllegalArgumentException();
21158
      }
21159
 
21160
      switch (field) {
21161
      case INVOICE_NUMBER:
21162
        return isSetInvoiceNumber();
21163
      case SUPPLIER_ID:
21164
        return isSetSupplierId();
21165
      }
21166
      throw new IllegalStateException();
21167
    }
21168
 
21169
    @Override
21170
    public boolean equals(Object that) {
21171
      if (that == null)
21172
        return false;
21173
      if (that instanceof isInvoiceReceived_args)
21174
        return this.equals((isInvoiceReceived_args)that);
21175
      return false;
21176
    }
21177
 
21178
    public boolean equals(isInvoiceReceived_args that) {
21179
      if (that == null)
21180
        return false;
21181
 
21182
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
21183
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
21184
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
21185
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
21186
          return false;
21187
        if (!this.invoiceNumber.equals(that.invoiceNumber))
21188
          return false;
21189
      }
21190
 
21191
      boolean this_present_supplierId = true;
21192
      boolean that_present_supplierId = true;
21193
      if (this_present_supplierId || that_present_supplierId) {
21194
        if (!(this_present_supplierId && that_present_supplierId))
21195
          return false;
21196
        if (this.supplierId != that.supplierId)
21197
          return false;
21198
      }
21199
 
21200
      return true;
21201
    }
21202
 
21203
    @Override
21204
    public int hashCode() {
21205
      return 0;
21206
    }
21207
 
21208
    public int compareTo(isInvoiceReceived_args other) {
21209
      if (!getClass().equals(other.getClass())) {
21210
        return getClass().getName().compareTo(other.getClass().getName());
21211
      }
21212
 
21213
      int lastComparison = 0;
21214
      isInvoiceReceived_args typedOther = (isInvoiceReceived_args)other;
21215
 
21216
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
21217
      if (lastComparison != 0) {
21218
        return lastComparison;
21219
      }
21220
      if (isSetInvoiceNumber()) {
21221
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
21222
        if (lastComparison != 0) {
21223
          return lastComparison;
21224
        }
21225
      }
21226
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
21227
      if (lastComparison != 0) {
21228
        return lastComparison;
21229
      }
21230
      if (isSetSupplierId()) {
21231
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
21232
        if (lastComparison != 0) {
21233
          return lastComparison;
21234
        }
21235
      }
21236
      return 0;
21237
    }
21238
 
21239
    public _Fields fieldForId(int fieldId) {
21240
      return _Fields.findByThriftId(fieldId);
21241
    }
21242
 
21243
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
21244
      org.apache.thrift.protocol.TField field;
21245
      iprot.readStructBegin();
21246
      while (true)
21247
      {
21248
        field = iprot.readFieldBegin();
21249
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
21250
          break;
21251
        }
21252
        switch (field.id) {
21253
          case 1: // INVOICE_NUMBER
21254
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
21255
              this.invoiceNumber = iprot.readString();
21256
            } else { 
21257
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21258
            }
21259
            break;
21260
          case 2: // SUPPLIER_ID
21261
            if (field.type == org.apache.thrift.protocol.TType.I64) {
21262
              this.supplierId = iprot.readI64();
21263
              setSupplierIdIsSet(true);
21264
            } else { 
21265
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21266
            }
21267
            break;
21268
          default:
21269
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21270
        }
21271
        iprot.readFieldEnd();
21272
      }
21273
      iprot.readStructEnd();
21274
      validate();
21275
    }
21276
 
21277
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
21278
      validate();
21279
 
21280
      oprot.writeStructBegin(STRUCT_DESC);
21281
      if (this.invoiceNumber != null) {
21282
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
21283
        oprot.writeString(this.invoiceNumber);
21284
        oprot.writeFieldEnd();
21285
      }
21286
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
21287
      oprot.writeI64(this.supplierId);
21288
      oprot.writeFieldEnd();
21289
      oprot.writeFieldStop();
21290
      oprot.writeStructEnd();
21291
    }
21292
 
21293
    @Override
21294
    public String toString() {
21295
      StringBuilder sb = new StringBuilder("isInvoiceReceived_args(");
21296
      boolean first = true;
21297
 
21298
      sb.append("invoiceNumber:");
21299
      if (this.invoiceNumber == null) {
21300
        sb.append("null");
21301
      } else {
21302
        sb.append(this.invoiceNumber);
21303
      }
21304
      first = false;
21305
      if (!first) sb.append(", ");
21306
      sb.append("supplierId:");
21307
      sb.append(this.supplierId);
21308
      first = false;
21309
      sb.append(")");
21310
      return sb.toString();
21311
    }
21312
 
21313
    public void validate() throws org.apache.thrift.TException {
21314
      // check for required fields
21315
    }
21316
 
21317
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21318
      try {
21319
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21320
      } catch (org.apache.thrift.TException te) {
21321
        throw new java.io.IOException(te);
21322
      }
21323
    }
21324
 
21325
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
21326
      try {
21327
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
21328
      } catch (org.apache.thrift.TException te) {
21329
        throw new java.io.IOException(te);
21330
      }
21331
    }
21332
 
21333
  }
21334
 
21335
  public static class isInvoiceReceived_result implements org.apache.thrift.TBase<isInvoiceReceived_result, isInvoiceReceived_result._Fields>, java.io.Serializable, Cloneable   {
21336
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isInvoiceReceived_result");
21337
 
21338
    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);
21339
 
21340
    private boolean success; // 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
      SUCCESS((short)0, "success");
21345
 
21346
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21347
 
21348
      static {
21349
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21350
          byName.put(field.getFieldName(), field);
21351
        }
21352
      }
21353
 
21354
      /**
21355
       * Find the _Fields constant that matches fieldId, or null if its not found.
21356
       */
21357
      public static _Fields findByThriftId(int fieldId) {
21358
        switch(fieldId) {
21359
          case 0: // SUCCESS
21360
            return SUCCESS;
21361
          default:
21362
            return null;
21363
        }
21364
      }
21365
 
21366
      /**
21367
       * Find the _Fields constant that matches fieldId, throwing an exception
21368
       * if it is not found.
21369
       */
21370
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21371
        _Fields fields = findByThriftId(fieldId);
21372
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21373
        return fields;
21374
      }
21375
 
21376
      /**
21377
       * Find the _Fields constant that matches name, or null if its not found.
21378
       */
21379
      public static _Fields findByName(String name) {
21380
        return byName.get(name);
21381
      }
21382
 
21383
      private final short _thriftId;
21384
      private final String _fieldName;
21385
 
21386
      _Fields(short thriftId, String fieldName) {
21387
        _thriftId = thriftId;
21388
        _fieldName = fieldName;
21389
      }
21390
 
21391
      public short getThriftFieldId() {
21392
        return _thriftId;
21393
      }
21394
 
21395
      public String getFieldName() {
21396
        return _fieldName;
21397
      }
21398
    }
21399
 
21400
    // isset id assignments
21401
    private static final int __SUCCESS_ISSET_ID = 0;
21402
    private BitSet __isset_bit_vector = new BitSet(1);
21403
 
21404
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21405
    static {
21406
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
21407
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21408
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
21409
      metaDataMap = Collections.unmodifiableMap(tmpMap);
21410
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isInvoiceReceived_result.class, metaDataMap);
21411
    }
21412
 
21413
    public isInvoiceReceived_result() {
21414
    }
21415
 
21416
    public isInvoiceReceived_result(
21417
      boolean success)
21418
    {
21419
      this();
21420
      this.success = success;
21421
      setSuccessIsSet(true);
21422
    }
21423
 
21424
    /**
21425
     * Performs a deep copy on <i>other</i>.
21426
     */
21427
    public isInvoiceReceived_result(isInvoiceReceived_result other) {
21428
      __isset_bit_vector.clear();
21429
      __isset_bit_vector.or(other.__isset_bit_vector);
21430
      this.success = other.success;
21431
    }
21432
 
21433
    public isInvoiceReceived_result deepCopy() {
21434
      return new isInvoiceReceived_result(this);
21435
    }
21436
 
21437
    @Override
21438
    public void clear() {
21439
      setSuccessIsSet(false);
21440
      this.success = false;
21441
    }
21442
 
21443
    public boolean isSuccess() {
21444
      return this.success;
21445
    }
21446
 
21447
    public void setSuccess(boolean success) {
21448
      this.success = success;
21449
      setSuccessIsSet(true);
21450
    }
21451
 
21452
    public void unsetSuccess() {
21453
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
21454
    }
21455
 
21456
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
21457
    public boolean isSetSuccess() {
21458
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
21459
    }
21460
 
21461
    public void setSuccessIsSet(boolean value) {
21462
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
21463
    }
21464
 
21465
    public void setFieldValue(_Fields field, Object value) {
21466
      switch (field) {
21467
      case SUCCESS:
21468
        if (value == null) {
21469
          unsetSuccess();
21470
        } else {
21471
          setSuccess((Boolean)value);
21472
        }
21473
        break;
21474
 
21475
      }
21476
    }
21477
 
21478
    public Object getFieldValue(_Fields field) {
21479
      switch (field) {
21480
      case SUCCESS:
21481
        return Boolean.valueOf(isSuccess());
21482
 
21483
      }
21484
      throw new IllegalStateException();
21485
    }
21486
 
21487
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21488
    public boolean isSet(_Fields field) {
21489
      if (field == null) {
21490
        throw new IllegalArgumentException();
21491
      }
21492
 
21493
      switch (field) {
21494
      case SUCCESS:
21495
        return isSetSuccess();
21496
      }
21497
      throw new IllegalStateException();
21498
    }
21499
 
21500
    @Override
21501
    public boolean equals(Object that) {
21502
      if (that == null)
21503
        return false;
21504
      if (that instanceof isInvoiceReceived_result)
21505
        return this.equals((isInvoiceReceived_result)that);
21506
      return false;
21507
    }
21508
 
21509
    public boolean equals(isInvoiceReceived_result that) {
21510
      if (that == null)
21511
        return false;
21512
 
21513
      boolean this_present_success = true;
21514
      boolean that_present_success = true;
21515
      if (this_present_success || that_present_success) {
21516
        if (!(this_present_success && that_present_success))
21517
          return false;
21518
        if (this.success != that.success)
21519
          return false;
21520
      }
21521
 
21522
      return true;
21523
    }
21524
 
21525
    @Override
21526
    public int hashCode() {
21527
      return 0;
21528
    }
21529
 
21530
    public int compareTo(isInvoiceReceived_result other) {
21531
      if (!getClass().equals(other.getClass())) {
21532
        return getClass().getName().compareTo(other.getClass().getName());
21533
      }
21534
 
21535
      int lastComparison = 0;
21536
      isInvoiceReceived_result typedOther = (isInvoiceReceived_result)other;
21537
 
21538
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
21539
      if (lastComparison != 0) {
21540
        return lastComparison;
21541
      }
21542
      if (isSetSuccess()) {
21543
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
21544
        if (lastComparison != 0) {
21545
          return lastComparison;
21546
        }
21547
      }
21548
      return 0;
21549
    }
21550
 
21551
    public _Fields fieldForId(int fieldId) {
21552
      return _Fields.findByThriftId(fieldId);
21553
    }
21554
 
21555
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
21556
      org.apache.thrift.protocol.TField field;
21557
      iprot.readStructBegin();
21558
      while (true)
21559
      {
21560
        field = iprot.readFieldBegin();
21561
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
21562
          break;
21563
        }
21564
        switch (field.id) {
21565
          case 0: // SUCCESS
21566
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
21567
              this.success = iprot.readBool();
21568
              setSuccessIsSet(true);
21569
            } else { 
21570
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21571
            }
21572
            break;
21573
          default:
21574
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21575
        }
21576
        iprot.readFieldEnd();
21577
      }
21578
      iprot.readStructEnd();
21579
      validate();
21580
    }
21581
 
21582
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
21583
      oprot.writeStructBegin(STRUCT_DESC);
21584
 
21585
      if (this.isSetSuccess()) {
21586
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21587
        oprot.writeBool(this.success);
21588
        oprot.writeFieldEnd();
21589
      }
21590
      oprot.writeFieldStop();
21591
      oprot.writeStructEnd();
21592
    }
21593
 
21594
    @Override
21595
    public String toString() {
21596
      StringBuilder sb = new StringBuilder("isInvoiceReceived_result(");
21597
      boolean first = true;
21598
 
21599
      sb.append("success:");
21600
      sb.append(this.success);
21601
      first = false;
21602
      sb.append(")");
21603
      return sb.toString();
21604
    }
21605
 
21606
    public void validate() throws org.apache.thrift.TException {
21607
      // check for required fields
21608
    }
21609
 
21610
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21611
      try {
21612
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21613
      } catch (org.apache.thrift.TException te) {
21614
        throw new java.io.IOException(te);
21615
      }
21616
    }
21617
 
21618
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
21619
      try {
21620
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
21621
      } catch (org.apache.thrift.TException te) {
21622
        throw new java.io.IOException(te);
21623
      }
21624
    }
21625
 
21626
  }
21627
 
9829 amar.kumar 21628
  public static class changeWarehouseForPO_args implements org.apache.thrift.TBase<changeWarehouseForPO_args, changeWarehouseForPO_args._Fields>, java.io.Serializable, Cloneable   {
21629
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changeWarehouseForPO_args");
21630
 
21631
    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);
21632
    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);
21633
 
21634
    private long id; // required
21635
    private long warehouseId; // required
21636
 
21637
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21638
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
21639
      ID((short)1, "id"),
21640
      WAREHOUSE_ID((short)2, "warehouseId");
21641
 
21642
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21643
 
21644
      static {
21645
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21646
          byName.put(field.getFieldName(), field);
21647
        }
21648
      }
21649
 
21650
      /**
21651
       * Find the _Fields constant that matches fieldId, or null if its not found.
21652
       */
21653
      public static _Fields findByThriftId(int fieldId) {
21654
        switch(fieldId) {
21655
          case 1: // ID
21656
            return ID;
21657
          case 2: // WAREHOUSE_ID
21658
            return WAREHOUSE_ID;
21659
          default:
21660
            return null;
21661
        }
21662
      }
21663
 
21664
      /**
21665
       * Find the _Fields constant that matches fieldId, throwing an exception
21666
       * if it is not found.
21667
       */
21668
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21669
        _Fields fields = findByThriftId(fieldId);
21670
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21671
        return fields;
21672
      }
21673
 
21674
      /**
21675
       * Find the _Fields constant that matches name, or null if its not found.
21676
       */
21677
      public static _Fields findByName(String name) {
21678
        return byName.get(name);
21679
      }
21680
 
21681
      private final short _thriftId;
21682
      private final String _fieldName;
21683
 
21684
      _Fields(short thriftId, String fieldName) {
21685
        _thriftId = thriftId;
21686
        _fieldName = fieldName;
21687
      }
21688
 
21689
      public short getThriftFieldId() {
21690
        return _thriftId;
21691
      }
21692
 
21693
      public String getFieldName() {
21694
        return _fieldName;
21695
      }
21696
    }
21697
 
21698
    // isset id assignments
21699
    private static final int __ID_ISSET_ID = 0;
21700
    private static final int __WAREHOUSEID_ISSET_ID = 1;
21701
    private BitSet __isset_bit_vector = new BitSet(2);
21702
 
21703
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21704
    static {
21705
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
21706
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21707
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
21708
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21709
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
21710
      metaDataMap = Collections.unmodifiableMap(tmpMap);
21711
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changeWarehouseForPO_args.class, metaDataMap);
21712
    }
21713
 
21714
    public changeWarehouseForPO_args() {
21715
    }
21716
 
21717
    public changeWarehouseForPO_args(
21718
      long id,
21719
      long warehouseId)
21720
    {
21721
      this();
21722
      this.id = id;
21723
      setIdIsSet(true);
21724
      this.warehouseId = warehouseId;
21725
      setWarehouseIdIsSet(true);
21726
    }
21727
 
21728
    /**
21729
     * Performs a deep copy on <i>other</i>.
21730
     */
21731
    public changeWarehouseForPO_args(changeWarehouseForPO_args other) {
21732
      __isset_bit_vector.clear();
21733
      __isset_bit_vector.or(other.__isset_bit_vector);
21734
      this.id = other.id;
21735
      this.warehouseId = other.warehouseId;
21736
    }
21737
 
21738
    public changeWarehouseForPO_args deepCopy() {
21739
      return new changeWarehouseForPO_args(this);
21740
    }
21741
 
21742
    @Override
21743
    public void clear() {
21744
      setIdIsSet(false);
21745
      this.id = 0;
21746
      setWarehouseIdIsSet(false);
21747
      this.warehouseId = 0;
21748
    }
21749
 
21750
    public long getId() {
21751
      return this.id;
21752
    }
21753
 
21754
    public void setId(long id) {
21755
      this.id = id;
21756
      setIdIsSet(true);
21757
    }
21758
 
21759
    public void unsetId() {
21760
      __isset_bit_vector.clear(__ID_ISSET_ID);
21761
    }
21762
 
21763
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
21764
    public boolean isSetId() {
21765
      return __isset_bit_vector.get(__ID_ISSET_ID);
21766
    }
21767
 
21768
    public void setIdIsSet(boolean value) {
21769
      __isset_bit_vector.set(__ID_ISSET_ID, value);
21770
    }
21771
 
21772
    public long getWarehouseId() {
21773
      return this.warehouseId;
21774
    }
21775
 
21776
    public void setWarehouseId(long warehouseId) {
21777
      this.warehouseId = warehouseId;
21778
      setWarehouseIdIsSet(true);
21779
    }
21780
 
21781
    public void unsetWarehouseId() {
21782
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
21783
    }
21784
 
21785
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
21786
    public boolean isSetWarehouseId() {
21787
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
21788
    }
21789
 
21790
    public void setWarehouseIdIsSet(boolean value) {
21791
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
21792
    }
21793
 
21794
    public void setFieldValue(_Fields field, Object value) {
21795
      switch (field) {
21796
      case ID:
21797
        if (value == null) {
21798
          unsetId();
21799
        } else {
21800
          setId((Long)value);
21801
        }
21802
        break;
21803
 
21804
      case WAREHOUSE_ID:
21805
        if (value == null) {
21806
          unsetWarehouseId();
21807
        } else {
21808
          setWarehouseId((Long)value);
21809
        }
21810
        break;
21811
 
21812
      }
21813
    }
21814
 
21815
    public Object getFieldValue(_Fields field) {
21816
      switch (field) {
21817
      case ID:
21818
        return Long.valueOf(getId());
21819
 
21820
      case WAREHOUSE_ID:
21821
        return Long.valueOf(getWarehouseId());
21822
 
21823
      }
21824
      throw new IllegalStateException();
21825
    }
21826
 
21827
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21828
    public boolean isSet(_Fields field) {
21829
      if (field == null) {
21830
        throw new IllegalArgumentException();
21831
      }
21832
 
21833
      switch (field) {
21834
      case ID:
21835
        return isSetId();
21836
      case WAREHOUSE_ID:
21837
        return isSetWarehouseId();
21838
      }
21839
      throw new IllegalStateException();
21840
    }
21841
 
21842
    @Override
21843
    public boolean equals(Object that) {
21844
      if (that == null)
21845
        return false;
21846
      if (that instanceof changeWarehouseForPO_args)
21847
        return this.equals((changeWarehouseForPO_args)that);
21848
      return false;
21849
    }
21850
 
21851
    public boolean equals(changeWarehouseForPO_args that) {
21852
      if (that == null)
21853
        return false;
21854
 
21855
      boolean this_present_id = true;
21856
      boolean that_present_id = true;
21857
      if (this_present_id || that_present_id) {
21858
        if (!(this_present_id && that_present_id))
21859
          return false;
21860
        if (this.id != that.id)
21861
          return false;
21862
      }
21863
 
21864
      boolean this_present_warehouseId = true;
21865
      boolean that_present_warehouseId = true;
21866
      if (this_present_warehouseId || that_present_warehouseId) {
21867
        if (!(this_present_warehouseId && that_present_warehouseId))
21868
          return false;
21869
        if (this.warehouseId != that.warehouseId)
21870
          return false;
21871
      }
21872
 
21873
      return true;
21874
    }
21875
 
21876
    @Override
21877
    public int hashCode() {
21878
      return 0;
21879
    }
21880
 
21881
    public int compareTo(changeWarehouseForPO_args other) {
21882
      if (!getClass().equals(other.getClass())) {
21883
        return getClass().getName().compareTo(other.getClass().getName());
21884
      }
21885
 
21886
      int lastComparison = 0;
21887
      changeWarehouseForPO_args typedOther = (changeWarehouseForPO_args)other;
21888
 
21889
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
21890
      if (lastComparison != 0) {
21891
        return lastComparison;
21892
      }
21893
      if (isSetId()) {
21894
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
21895
        if (lastComparison != 0) {
21896
          return lastComparison;
21897
        }
21898
      }
21899
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
21900
      if (lastComparison != 0) {
21901
        return lastComparison;
21902
      }
21903
      if (isSetWarehouseId()) {
21904
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
21905
        if (lastComparison != 0) {
21906
          return lastComparison;
21907
        }
21908
      }
21909
      return 0;
21910
    }
21911
 
21912
    public _Fields fieldForId(int fieldId) {
21913
      return _Fields.findByThriftId(fieldId);
21914
    }
21915
 
21916
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
21917
      org.apache.thrift.protocol.TField field;
21918
      iprot.readStructBegin();
21919
      while (true)
21920
      {
21921
        field = iprot.readFieldBegin();
21922
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
21923
          break;
21924
        }
21925
        switch (field.id) {
21926
          case 1: // ID
21927
            if (field.type == org.apache.thrift.protocol.TType.I64) {
21928
              this.id = iprot.readI64();
21929
              setIdIsSet(true);
21930
            } else { 
21931
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21932
            }
21933
            break;
21934
          case 2: // WAREHOUSE_ID
21935
            if (field.type == org.apache.thrift.protocol.TType.I64) {
21936
              this.warehouseId = iprot.readI64();
21937
              setWarehouseIdIsSet(true);
21938
            } else { 
21939
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21940
            }
21941
            break;
21942
          default:
21943
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21944
        }
21945
        iprot.readFieldEnd();
21946
      }
21947
      iprot.readStructEnd();
21948
      validate();
21949
    }
21950
 
21951
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
21952
      validate();
21953
 
21954
      oprot.writeStructBegin(STRUCT_DESC);
21955
      oprot.writeFieldBegin(ID_FIELD_DESC);
21956
      oprot.writeI64(this.id);
21957
      oprot.writeFieldEnd();
21958
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
21959
      oprot.writeI64(this.warehouseId);
21960
      oprot.writeFieldEnd();
21961
      oprot.writeFieldStop();
21962
      oprot.writeStructEnd();
21963
    }
21964
 
21965
    @Override
21966
    public String toString() {
21967
      StringBuilder sb = new StringBuilder("changeWarehouseForPO_args(");
21968
      boolean first = true;
21969
 
21970
      sb.append("id:");
21971
      sb.append(this.id);
21972
      first = false;
21973
      if (!first) sb.append(", ");
21974
      sb.append("warehouseId:");
21975
      sb.append(this.warehouseId);
21976
      first = false;
21977
      sb.append(")");
21978
      return sb.toString();
21979
    }
21980
 
21981
    public void validate() throws org.apache.thrift.TException {
21982
      // check for required fields
21983
    }
21984
 
21985
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21986
      try {
21987
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21988
      } catch (org.apache.thrift.TException te) {
21989
        throw new java.io.IOException(te);
21990
      }
21991
    }
21992
 
21993
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
21994
      try {
21995
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
21996
      } catch (org.apache.thrift.TException te) {
21997
        throw new java.io.IOException(te);
21998
      }
21999
    }
22000
 
22001
  }
22002
 
22003
  public static class changeWarehouseForPO_result implements org.apache.thrift.TBase<changeWarehouseForPO_result, changeWarehouseForPO_result._Fields>, java.io.Serializable, Cloneable   {
22004
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changeWarehouseForPO_result");
22005
 
22006
    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);
22007
 
22008
    private PurchaseServiceException e; // required
22009
 
22010
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22011
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
22012
      E((short)1, "e");
22013
 
22014
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22015
 
22016
      static {
22017
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22018
          byName.put(field.getFieldName(), field);
22019
        }
22020
      }
22021
 
22022
      /**
22023
       * Find the _Fields constant that matches fieldId, or null if its not found.
22024
       */
22025
      public static _Fields findByThriftId(int fieldId) {
22026
        switch(fieldId) {
22027
          case 1: // E
22028
            return E;
22029
          default:
22030
            return null;
22031
        }
22032
      }
22033
 
22034
      /**
22035
       * Find the _Fields constant that matches fieldId, throwing an exception
22036
       * if it is not found.
22037
       */
22038
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22039
        _Fields fields = findByThriftId(fieldId);
22040
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22041
        return fields;
22042
      }
22043
 
22044
      /**
22045
       * Find the _Fields constant that matches name, or null if its not found.
22046
       */
22047
      public static _Fields findByName(String name) {
22048
        return byName.get(name);
22049
      }
22050
 
22051
      private final short _thriftId;
22052
      private final String _fieldName;
22053
 
22054
      _Fields(short thriftId, String fieldName) {
22055
        _thriftId = thriftId;
22056
        _fieldName = fieldName;
22057
      }
22058
 
22059
      public short getThriftFieldId() {
22060
        return _thriftId;
22061
      }
22062
 
22063
      public String getFieldName() {
22064
        return _fieldName;
22065
      }
22066
    }
22067
 
22068
    // isset id assignments
22069
 
22070
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
22071
    static {
22072
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
22073
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22074
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
22075
      metaDataMap = Collections.unmodifiableMap(tmpMap);
22076
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changeWarehouseForPO_result.class, metaDataMap);
22077
    }
22078
 
22079
    public changeWarehouseForPO_result() {
22080
    }
22081
 
22082
    public changeWarehouseForPO_result(
22083
      PurchaseServiceException e)
22084
    {
22085
      this();
22086
      this.e = e;
22087
    }
22088
 
22089
    /**
22090
     * Performs a deep copy on <i>other</i>.
22091
     */
22092
    public changeWarehouseForPO_result(changeWarehouseForPO_result other) {
22093
      if (other.isSetE()) {
22094
        this.e = new PurchaseServiceException(other.e);
22095
      }
22096
    }
22097
 
22098
    public changeWarehouseForPO_result deepCopy() {
22099
      return new changeWarehouseForPO_result(this);
22100
    }
22101
 
22102
    @Override
22103
    public void clear() {
22104
      this.e = null;
22105
    }
22106
 
22107
    public PurchaseServiceException getE() {
22108
      return this.e;
22109
    }
22110
 
22111
    public void setE(PurchaseServiceException e) {
22112
      this.e = e;
22113
    }
22114
 
22115
    public void unsetE() {
22116
      this.e = null;
22117
    }
22118
 
22119
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
22120
    public boolean isSetE() {
22121
      return this.e != null;
22122
    }
22123
 
22124
    public void setEIsSet(boolean value) {
22125
      if (!value) {
22126
        this.e = null;
22127
      }
22128
    }
22129
 
22130
    public void setFieldValue(_Fields field, Object value) {
22131
      switch (field) {
22132
      case E:
22133
        if (value == null) {
22134
          unsetE();
22135
        } else {
22136
          setE((PurchaseServiceException)value);
22137
        }
22138
        break;
22139
 
22140
      }
22141
    }
22142
 
22143
    public Object getFieldValue(_Fields field) {
22144
      switch (field) {
22145
      case E:
22146
        return getE();
22147
 
22148
      }
22149
      throw new IllegalStateException();
22150
    }
22151
 
22152
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
22153
    public boolean isSet(_Fields field) {
22154
      if (field == null) {
22155
        throw new IllegalArgumentException();
22156
      }
22157
 
22158
      switch (field) {
22159
      case E:
22160
        return isSetE();
22161
      }
22162
      throw new IllegalStateException();
22163
    }
22164
 
22165
    @Override
22166
    public boolean equals(Object that) {
22167
      if (that == null)
22168
        return false;
22169
      if (that instanceof changeWarehouseForPO_result)
22170
        return this.equals((changeWarehouseForPO_result)that);
22171
      return false;
22172
    }
22173
 
22174
    public boolean equals(changeWarehouseForPO_result that) {
22175
      if (that == null)
22176
        return false;
22177
 
22178
      boolean this_present_e = true && this.isSetE();
22179
      boolean that_present_e = true && that.isSetE();
22180
      if (this_present_e || that_present_e) {
22181
        if (!(this_present_e && that_present_e))
22182
          return false;
22183
        if (!this.e.equals(that.e))
22184
          return false;
22185
      }
22186
 
22187
      return true;
22188
    }
22189
 
22190
    @Override
22191
    public int hashCode() {
22192
      return 0;
22193
    }
22194
 
22195
    public int compareTo(changeWarehouseForPO_result other) {
22196
      if (!getClass().equals(other.getClass())) {
22197
        return getClass().getName().compareTo(other.getClass().getName());
22198
      }
22199
 
22200
      int lastComparison = 0;
22201
      changeWarehouseForPO_result typedOther = (changeWarehouseForPO_result)other;
22202
 
22203
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
22204
      if (lastComparison != 0) {
22205
        return lastComparison;
22206
      }
22207
      if (isSetE()) {
22208
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
22209
        if (lastComparison != 0) {
22210
          return lastComparison;
22211
        }
22212
      }
22213
      return 0;
22214
    }
22215
 
22216
    public _Fields fieldForId(int fieldId) {
22217
      return _Fields.findByThriftId(fieldId);
22218
    }
22219
 
22220
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
22221
      org.apache.thrift.protocol.TField field;
22222
      iprot.readStructBegin();
22223
      while (true)
22224
      {
22225
        field = iprot.readFieldBegin();
22226
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
22227
          break;
22228
        }
22229
        switch (field.id) {
22230
          case 1: // E
22231
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
22232
              this.e = new PurchaseServiceException();
22233
              this.e.read(iprot);
22234
            } else { 
22235
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22236
            }
22237
            break;
22238
          default:
22239
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22240
        }
22241
        iprot.readFieldEnd();
22242
      }
22243
      iprot.readStructEnd();
22244
      validate();
22245
    }
22246
 
22247
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
22248
      oprot.writeStructBegin(STRUCT_DESC);
22249
 
22250
      if (this.isSetE()) {
22251
        oprot.writeFieldBegin(E_FIELD_DESC);
22252
        this.e.write(oprot);
22253
        oprot.writeFieldEnd();
22254
      }
22255
      oprot.writeFieldStop();
22256
      oprot.writeStructEnd();
22257
    }
22258
 
22259
    @Override
22260
    public String toString() {
22261
      StringBuilder sb = new StringBuilder("changeWarehouseForPO_result(");
22262
      boolean first = true;
22263
 
22264
      sb.append("e:");
22265
      if (this.e == null) {
22266
        sb.append("null");
22267
      } else {
22268
        sb.append(this.e);
22269
      }
22270
      first = false;
22271
      sb.append(")");
22272
      return sb.toString();
22273
    }
22274
 
22275
    public void validate() throws org.apache.thrift.TException {
22276
      // check for required fields
22277
    }
22278
 
22279
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
22280
      try {
22281
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
22282
      } catch (org.apache.thrift.TException te) {
22283
        throw new java.io.IOException(te);
22284
      }
22285
    }
22286
 
22287
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
22288
      try {
22289
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
22290
      } catch (org.apache.thrift.TException te) {
22291
        throw new java.io.IOException(te);
22292
      }
22293
    }
22294
 
22295
  }
22296
 
9925 amar.kumar 22297
  public static class changePOStatus_args implements org.apache.thrift.TBase<changePOStatus_args, changePOStatus_args._Fields>, java.io.Serializable, Cloneable   {
22298
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changePOStatus_args");
22299
 
22300
    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);
22301
    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);
22302
 
22303
    private long id; // required
22304
    private POStatus poStatus; // required
22305
 
22306
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22307
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
22308
      ID((short)1, "id"),
22309
      /**
22310
       * 
22311
       * @see POStatus
22312
       */
22313
      PO_STATUS((short)2, "poStatus");
22314
 
22315
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22316
 
22317
      static {
22318
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22319
          byName.put(field.getFieldName(), field);
22320
        }
22321
      }
22322
 
22323
      /**
22324
       * Find the _Fields constant that matches fieldId, or null if its not found.
22325
       */
22326
      public static _Fields findByThriftId(int fieldId) {
22327
        switch(fieldId) {
22328
          case 1: // ID
22329
            return ID;
22330
          case 2: // PO_STATUS
22331
            return PO_STATUS;
22332
          default:
22333
            return null;
22334
        }
22335
      }
22336
 
22337
      /**
22338
       * Find the _Fields constant that matches fieldId, throwing an exception
22339
       * if it is not found.
22340
       */
22341
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22342
        _Fields fields = findByThriftId(fieldId);
22343
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22344
        return fields;
22345
      }
22346
 
22347
      /**
22348
       * Find the _Fields constant that matches name, or null if its not found.
22349
       */
22350
      public static _Fields findByName(String name) {
22351
        return byName.get(name);
22352
      }
22353
 
22354
      private final short _thriftId;
22355
      private final String _fieldName;
22356
 
22357
      _Fields(short thriftId, String fieldName) {
22358
        _thriftId = thriftId;
22359
        _fieldName = fieldName;
22360
      }
22361
 
22362
      public short getThriftFieldId() {
22363
        return _thriftId;
22364
      }
22365
 
22366
      public String getFieldName() {
22367
        return _fieldName;
22368
      }
22369
    }
22370
 
22371
    // isset id assignments
22372
    private static final int __ID_ISSET_ID = 0;
22373
    private BitSet __isset_bit_vector = new BitSet(1);
22374
 
22375
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
22376
    static {
22377
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
22378
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22379
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
22380
      tmpMap.put(_Fields.PO_STATUS, new org.apache.thrift.meta_data.FieldMetaData("poStatus", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22381
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, POStatus.class)));
22382
      metaDataMap = Collections.unmodifiableMap(tmpMap);
22383
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changePOStatus_args.class, metaDataMap);
22384
    }
22385
 
22386
    public changePOStatus_args() {
22387
    }
22388
 
22389
    public changePOStatus_args(
22390
      long id,
22391
      POStatus poStatus)
22392
    {
22393
      this();
22394
      this.id = id;
22395
      setIdIsSet(true);
22396
      this.poStatus = poStatus;
22397
    }
22398
 
22399
    /**
22400
     * Performs a deep copy on <i>other</i>.
22401
     */
22402
    public changePOStatus_args(changePOStatus_args other) {
22403
      __isset_bit_vector.clear();
22404
      __isset_bit_vector.or(other.__isset_bit_vector);
22405
      this.id = other.id;
22406
      if (other.isSetPoStatus()) {
22407
        this.poStatus = other.poStatus;
22408
      }
22409
    }
22410
 
22411
    public changePOStatus_args deepCopy() {
22412
      return new changePOStatus_args(this);
22413
    }
22414
 
22415
    @Override
22416
    public void clear() {
22417
      setIdIsSet(false);
22418
      this.id = 0;
22419
      this.poStatus = null;
22420
    }
22421
 
22422
    public long getId() {
22423
      return this.id;
22424
    }
22425
 
22426
    public void setId(long id) {
22427
      this.id = id;
22428
      setIdIsSet(true);
22429
    }
22430
 
22431
    public void unsetId() {
22432
      __isset_bit_vector.clear(__ID_ISSET_ID);
22433
    }
22434
 
22435
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
22436
    public boolean isSetId() {
22437
      return __isset_bit_vector.get(__ID_ISSET_ID);
22438
    }
22439
 
22440
    public void setIdIsSet(boolean value) {
22441
      __isset_bit_vector.set(__ID_ISSET_ID, value);
22442
    }
22443
 
22444
    /**
22445
     * 
22446
     * @see POStatus
22447
     */
22448
    public POStatus getPoStatus() {
22449
      return this.poStatus;
22450
    }
22451
 
22452
    /**
22453
     * 
22454
     * @see POStatus
22455
     */
22456
    public void setPoStatus(POStatus poStatus) {
22457
      this.poStatus = poStatus;
22458
    }
22459
 
22460
    public void unsetPoStatus() {
22461
      this.poStatus = null;
22462
    }
22463
 
22464
    /** Returns true if field poStatus is set (has been assigned a value) and false otherwise */
22465
    public boolean isSetPoStatus() {
22466
      return this.poStatus != null;
22467
    }
22468
 
22469
    public void setPoStatusIsSet(boolean value) {
22470
      if (!value) {
22471
        this.poStatus = null;
22472
      }
22473
    }
22474
 
22475
    public void setFieldValue(_Fields field, Object value) {
22476
      switch (field) {
22477
      case ID:
22478
        if (value == null) {
22479
          unsetId();
22480
        } else {
22481
          setId((Long)value);
22482
        }
22483
        break;
22484
 
22485
      case PO_STATUS:
22486
        if (value == null) {
22487
          unsetPoStatus();
22488
        } else {
22489
          setPoStatus((POStatus)value);
22490
        }
22491
        break;
22492
 
22493
      }
22494
    }
22495
 
22496
    public Object getFieldValue(_Fields field) {
22497
      switch (field) {
22498
      case ID:
22499
        return Long.valueOf(getId());
22500
 
22501
      case PO_STATUS:
22502
        return getPoStatus();
22503
 
22504
      }
22505
      throw new IllegalStateException();
22506
    }
22507
 
22508
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
22509
    public boolean isSet(_Fields field) {
22510
      if (field == null) {
22511
        throw new IllegalArgumentException();
22512
      }
22513
 
22514
      switch (field) {
22515
      case ID:
22516
        return isSetId();
22517
      case PO_STATUS:
22518
        return isSetPoStatus();
22519
      }
22520
      throw new IllegalStateException();
22521
    }
22522
 
22523
    @Override
22524
    public boolean equals(Object that) {
22525
      if (that == null)
22526
        return false;
22527
      if (that instanceof changePOStatus_args)
22528
        return this.equals((changePOStatus_args)that);
22529
      return false;
22530
    }
22531
 
22532
    public boolean equals(changePOStatus_args that) {
22533
      if (that == null)
22534
        return false;
22535
 
22536
      boolean this_present_id = true;
22537
      boolean that_present_id = true;
22538
      if (this_present_id || that_present_id) {
22539
        if (!(this_present_id && that_present_id))
22540
          return false;
22541
        if (this.id != that.id)
22542
          return false;
22543
      }
22544
 
22545
      boolean this_present_poStatus = true && this.isSetPoStatus();
22546
      boolean that_present_poStatus = true && that.isSetPoStatus();
22547
      if (this_present_poStatus || that_present_poStatus) {
22548
        if (!(this_present_poStatus && that_present_poStatus))
22549
          return false;
22550
        if (!this.poStatus.equals(that.poStatus))
22551
          return false;
22552
      }
22553
 
22554
      return true;
22555
    }
22556
 
22557
    @Override
22558
    public int hashCode() {
22559
      return 0;
22560
    }
22561
 
22562
    public int compareTo(changePOStatus_args other) {
22563
      if (!getClass().equals(other.getClass())) {
22564
        return getClass().getName().compareTo(other.getClass().getName());
22565
      }
22566
 
22567
      int lastComparison = 0;
22568
      changePOStatus_args typedOther = (changePOStatus_args)other;
22569
 
22570
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
22571
      if (lastComparison != 0) {
22572
        return lastComparison;
22573
      }
22574
      if (isSetId()) {
22575
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
22576
        if (lastComparison != 0) {
22577
          return lastComparison;
22578
        }
22579
      }
22580
      lastComparison = Boolean.valueOf(isSetPoStatus()).compareTo(typedOther.isSetPoStatus());
22581
      if (lastComparison != 0) {
22582
        return lastComparison;
22583
      }
22584
      if (isSetPoStatus()) {
22585
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.poStatus, typedOther.poStatus);
22586
        if (lastComparison != 0) {
22587
          return lastComparison;
22588
        }
22589
      }
22590
      return 0;
22591
    }
22592
 
22593
    public _Fields fieldForId(int fieldId) {
22594
      return _Fields.findByThriftId(fieldId);
22595
    }
22596
 
22597
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
22598
      org.apache.thrift.protocol.TField field;
22599
      iprot.readStructBegin();
22600
      while (true)
22601
      {
22602
        field = iprot.readFieldBegin();
22603
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
22604
          break;
22605
        }
22606
        switch (field.id) {
22607
          case 1: // ID
22608
            if (field.type == org.apache.thrift.protocol.TType.I64) {
22609
              this.id = iprot.readI64();
22610
              setIdIsSet(true);
22611
            } else { 
22612
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22613
            }
22614
            break;
22615
          case 2: // PO_STATUS
22616
            if (field.type == org.apache.thrift.protocol.TType.I32) {
22617
              this.poStatus = POStatus.findByValue(iprot.readI32());
22618
            } else { 
22619
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22620
            }
22621
            break;
22622
          default:
22623
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22624
        }
22625
        iprot.readFieldEnd();
22626
      }
22627
      iprot.readStructEnd();
22628
      validate();
22629
    }
22630
 
22631
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
22632
      validate();
22633
 
22634
      oprot.writeStructBegin(STRUCT_DESC);
22635
      oprot.writeFieldBegin(ID_FIELD_DESC);
22636
      oprot.writeI64(this.id);
22637
      oprot.writeFieldEnd();
22638
      if (this.poStatus != null) {
22639
        oprot.writeFieldBegin(PO_STATUS_FIELD_DESC);
22640
        oprot.writeI32(this.poStatus.getValue());
22641
        oprot.writeFieldEnd();
22642
      }
22643
      oprot.writeFieldStop();
22644
      oprot.writeStructEnd();
22645
    }
22646
 
22647
    @Override
22648
    public String toString() {
22649
      StringBuilder sb = new StringBuilder("changePOStatus_args(");
22650
      boolean first = true;
22651
 
22652
      sb.append("id:");
22653
      sb.append(this.id);
22654
      first = false;
22655
      if (!first) sb.append(", ");
22656
      sb.append("poStatus:");
22657
      if (this.poStatus == null) {
22658
        sb.append("null");
22659
      } else {
22660
        sb.append(this.poStatus);
22661
      }
22662
      first = false;
22663
      sb.append(")");
22664
      return sb.toString();
22665
    }
22666
 
22667
    public void validate() throws org.apache.thrift.TException {
22668
      // check for required fields
22669
    }
22670
 
22671
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
22672
      try {
22673
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
22674
      } catch (org.apache.thrift.TException te) {
22675
        throw new java.io.IOException(te);
22676
      }
22677
    }
22678
 
22679
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
22680
      try {
22681
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
22682
        __isset_bit_vector = new BitSet(1);
22683
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
22684
      } catch (org.apache.thrift.TException te) {
22685
        throw new java.io.IOException(te);
22686
      }
22687
    }
22688
 
22689
  }
22690
 
22691
  public static class changePOStatus_result implements org.apache.thrift.TBase<changePOStatus_result, changePOStatus_result._Fields>, java.io.Serializable, Cloneable   {
22692
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changePOStatus_result");
22693
 
22694
    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);
22695
 
22696
    private PurchaseServiceException e; // required
22697
 
22698
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22699
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
22700
      E((short)1, "e");
22701
 
22702
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22703
 
22704
      static {
22705
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22706
          byName.put(field.getFieldName(), field);
22707
        }
22708
      }
22709
 
22710
      /**
22711
       * Find the _Fields constant that matches fieldId, or null if its not found.
22712
       */
22713
      public static _Fields findByThriftId(int fieldId) {
22714
        switch(fieldId) {
22715
          case 1: // E
22716
            return E;
22717
          default:
22718
            return null;
22719
        }
22720
      }
22721
 
22722
      /**
22723
       * Find the _Fields constant that matches fieldId, throwing an exception
22724
       * if it is not found.
22725
       */
22726
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22727
        _Fields fields = findByThriftId(fieldId);
22728
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22729
        return fields;
22730
      }
22731
 
22732
      /**
22733
       * Find the _Fields constant that matches name, or null if its not found.
22734
       */
22735
      public static _Fields findByName(String name) {
22736
        return byName.get(name);
22737
      }
22738
 
22739
      private final short _thriftId;
22740
      private final String _fieldName;
22741
 
22742
      _Fields(short thriftId, String fieldName) {
22743
        _thriftId = thriftId;
22744
        _fieldName = fieldName;
22745
      }
22746
 
22747
      public short getThriftFieldId() {
22748
        return _thriftId;
22749
      }
22750
 
22751
      public String getFieldName() {
22752
        return _fieldName;
22753
      }
22754
    }
22755
 
22756
    // isset id assignments
22757
 
22758
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
22759
    static {
22760
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
22761
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22762
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
22763
      metaDataMap = Collections.unmodifiableMap(tmpMap);
22764
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changePOStatus_result.class, metaDataMap);
22765
    }
22766
 
22767
    public changePOStatus_result() {
22768
    }
22769
 
22770
    public changePOStatus_result(
22771
      PurchaseServiceException e)
22772
    {
22773
      this();
22774
      this.e = e;
22775
    }
22776
 
22777
    /**
22778
     * Performs a deep copy on <i>other</i>.
22779
     */
22780
    public changePOStatus_result(changePOStatus_result other) {
22781
      if (other.isSetE()) {
22782
        this.e = new PurchaseServiceException(other.e);
22783
      }
22784
    }
22785
 
22786
    public changePOStatus_result deepCopy() {
22787
      return new changePOStatus_result(this);
22788
    }
22789
 
22790
    @Override
22791
    public void clear() {
22792
      this.e = null;
22793
    }
22794
 
22795
    public PurchaseServiceException getE() {
22796
      return this.e;
22797
    }
22798
 
22799
    public void setE(PurchaseServiceException e) {
22800
      this.e = e;
22801
    }
22802
 
22803
    public void unsetE() {
22804
      this.e = null;
22805
    }
22806
 
22807
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
22808
    public boolean isSetE() {
22809
      return this.e != null;
22810
    }
22811
 
22812
    public void setEIsSet(boolean value) {
22813
      if (!value) {
22814
        this.e = null;
22815
      }
22816
    }
22817
 
22818
    public void setFieldValue(_Fields field, Object value) {
22819
      switch (field) {
22820
      case E:
22821
        if (value == null) {
22822
          unsetE();
22823
        } else {
22824
          setE((PurchaseServiceException)value);
22825
        }
22826
        break;
22827
 
22828
      }
22829
    }
22830
 
22831
    public Object getFieldValue(_Fields field) {
22832
      switch (field) {
22833
      case E:
22834
        return getE();
22835
 
22836
      }
22837
      throw new IllegalStateException();
22838
    }
22839
 
22840
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
22841
    public boolean isSet(_Fields field) {
22842
      if (field == null) {
22843
        throw new IllegalArgumentException();
22844
      }
22845
 
22846
      switch (field) {
22847
      case E:
22848
        return isSetE();
22849
      }
22850
      throw new IllegalStateException();
22851
    }
22852
 
22853
    @Override
22854
    public boolean equals(Object that) {
22855
      if (that == null)
22856
        return false;
22857
      if (that instanceof changePOStatus_result)
22858
        return this.equals((changePOStatus_result)that);
22859
      return false;
22860
    }
22861
 
22862
    public boolean equals(changePOStatus_result that) {
22863
      if (that == null)
22864
        return false;
22865
 
22866
      boolean this_present_e = true && this.isSetE();
22867
      boolean that_present_e = true && that.isSetE();
22868
      if (this_present_e || that_present_e) {
22869
        if (!(this_present_e && that_present_e))
22870
          return false;
22871
        if (!this.e.equals(that.e))
22872
          return false;
22873
      }
22874
 
22875
      return true;
22876
    }
22877
 
22878
    @Override
22879
    public int hashCode() {
22880
      return 0;
22881
    }
22882
 
22883
    public int compareTo(changePOStatus_result other) {
22884
      if (!getClass().equals(other.getClass())) {
22885
        return getClass().getName().compareTo(other.getClass().getName());
22886
      }
22887
 
22888
      int lastComparison = 0;
22889
      changePOStatus_result typedOther = (changePOStatus_result)other;
22890
 
22891
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
22892
      if (lastComparison != 0) {
22893
        return lastComparison;
22894
      }
22895
      if (isSetE()) {
22896
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
22897
        if (lastComparison != 0) {
22898
          return lastComparison;
22899
        }
22900
      }
22901
      return 0;
22902
    }
22903
 
22904
    public _Fields fieldForId(int fieldId) {
22905
      return _Fields.findByThriftId(fieldId);
22906
    }
22907
 
22908
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
22909
      org.apache.thrift.protocol.TField field;
22910
      iprot.readStructBegin();
22911
      while (true)
22912
      {
22913
        field = iprot.readFieldBegin();
22914
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
22915
          break;
22916
        }
22917
        switch (field.id) {
22918
          case 1: // E
22919
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
22920
              this.e = new PurchaseServiceException();
22921
              this.e.read(iprot);
22922
            } else { 
22923
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22924
            }
22925
            break;
22926
          default:
22927
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22928
        }
22929
        iprot.readFieldEnd();
22930
      }
22931
      iprot.readStructEnd();
22932
      validate();
22933
    }
22934
 
22935
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
22936
      oprot.writeStructBegin(STRUCT_DESC);
22937
 
22938
      if (this.isSetE()) {
22939
        oprot.writeFieldBegin(E_FIELD_DESC);
22940
        this.e.write(oprot);
22941
        oprot.writeFieldEnd();
22942
      }
22943
      oprot.writeFieldStop();
22944
      oprot.writeStructEnd();
22945
    }
22946
 
22947
    @Override
22948
    public String toString() {
22949
      StringBuilder sb = new StringBuilder("changePOStatus_result(");
22950
      boolean first = true;
22951
 
22952
      sb.append("e:");
22953
      if (this.e == null) {
22954
        sb.append("null");
22955
      } else {
22956
        sb.append(this.e);
22957
      }
22958
      first = false;
22959
      sb.append(")");
22960
      return sb.toString();
22961
    }
22962
 
22963
    public void validate() throws org.apache.thrift.TException {
22964
      // check for required fields
22965
    }
22966
 
22967
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
22968
      try {
22969
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
22970
      } catch (org.apache.thrift.TException te) {
22971
        throw new java.io.IOException(te);
22972
      }
22973
    }
22974
 
22975
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
22976
      try {
22977
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
22978
      } catch (org.apache.thrift.TException te) {
22979
        throw new java.io.IOException(te);
22980
      }
22981
    }
22982
 
22983
  }
22984
 
11751 manish.sha 22985
  public static class getPurchaseReturn_args implements org.apache.thrift.TBase<getPurchaseReturn_args, getPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
22986
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseReturn_args");
22987
 
22988
    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);
22989
 
22990
    private long id; // required
22991
 
22992
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22993
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
22994
      ID((short)1, "id");
22995
 
22996
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22997
 
22998
      static {
22999
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23000
          byName.put(field.getFieldName(), field);
23001
        }
23002
      }
23003
 
23004
      /**
23005
       * Find the _Fields constant that matches fieldId, or null if its not found.
23006
       */
23007
      public static _Fields findByThriftId(int fieldId) {
23008
        switch(fieldId) {
23009
          case 1: // ID
23010
            return ID;
23011
          default:
23012
            return null;
23013
        }
23014
      }
23015
 
23016
      /**
23017
       * Find the _Fields constant that matches fieldId, throwing an exception
23018
       * if it is not found.
23019
       */
23020
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23021
        _Fields fields = findByThriftId(fieldId);
23022
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23023
        return fields;
23024
      }
23025
 
23026
      /**
23027
       * Find the _Fields constant that matches name, or null if its not found.
23028
       */
23029
      public static _Fields findByName(String name) {
23030
        return byName.get(name);
23031
      }
23032
 
23033
      private final short _thriftId;
23034
      private final String _fieldName;
23035
 
23036
      _Fields(short thriftId, String fieldName) {
23037
        _thriftId = thriftId;
23038
        _fieldName = fieldName;
23039
      }
23040
 
23041
      public short getThriftFieldId() {
23042
        return _thriftId;
23043
      }
23044
 
23045
      public String getFieldName() {
23046
        return _fieldName;
23047
      }
23048
    }
23049
 
23050
    // isset id assignments
23051
    private static final int __ID_ISSET_ID = 0;
23052
    private BitSet __isset_bit_vector = new BitSet(1);
23053
 
23054
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
23055
    static {
23056
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
23057
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23058
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
23059
      metaDataMap = Collections.unmodifiableMap(tmpMap);
23060
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseReturn_args.class, metaDataMap);
23061
    }
23062
 
23063
    public getPurchaseReturn_args() {
23064
    }
23065
 
23066
    public getPurchaseReturn_args(
23067
      long id)
23068
    {
23069
      this();
23070
      this.id = id;
23071
      setIdIsSet(true);
23072
    }
23073
 
23074
    /**
23075
     * Performs a deep copy on <i>other</i>.
23076
     */
23077
    public getPurchaseReturn_args(getPurchaseReturn_args other) {
23078
      __isset_bit_vector.clear();
23079
      __isset_bit_vector.or(other.__isset_bit_vector);
23080
      this.id = other.id;
23081
    }
23082
 
23083
    public getPurchaseReturn_args deepCopy() {
23084
      return new getPurchaseReturn_args(this);
23085
    }
23086
 
23087
    @Override
23088
    public void clear() {
23089
      setIdIsSet(false);
23090
      this.id = 0;
23091
    }
23092
 
23093
    public long getId() {
23094
      return this.id;
23095
    }
23096
 
23097
    public void setId(long id) {
23098
      this.id = id;
23099
      setIdIsSet(true);
23100
    }
23101
 
23102
    public void unsetId() {
23103
      __isset_bit_vector.clear(__ID_ISSET_ID);
23104
    }
23105
 
23106
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
23107
    public boolean isSetId() {
23108
      return __isset_bit_vector.get(__ID_ISSET_ID);
23109
    }
23110
 
23111
    public void setIdIsSet(boolean value) {
23112
      __isset_bit_vector.set(__ID_ISSET_ID, value);
23113
    }
23114
 
23115
    public void setFieldValue(_Fields field, Object value) {
23116
      switch (field) {
23117
      case ID:
23118
        if (value == null) {
23119
          unsetId();
23120
        } else {
23121
          setId((Long)value);
23122
        }
23123
        break;
23124
 
23125
      }
23126
    }
23127
 
23128
    public Object getFieldValue(_Fields field) {
23129
      switch (field) {
23130
      case ID:
23131
        return Long.valueOf(getId());
23132
 
23133
      }
23134
      throw new IllegalStateException();
23135
    }
23136
 
23137
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
23138
    public boolean isSet(_Fields field) {
23139
      if (field == null) {
23140
        throw new IllegalArgumentException();
23141
      }
23142
 
23143
      switch (field) {
23144
      case ID:
23145
        return isSetId();
23146
      }
23147
      throw new IllegalStateException();
23148
    }
23149
 
23150
    @Override
23151
    public boolean equals(Object that) {
23152
      if (that == null)
23153
        return false;
23154
      if (that instanceof getPurchaseReturn_args)
23155
        return this.equals((getPurchaseReturn_args)that);
23156
      return false;
23157
    }
23158
 
23159
    public boolean equals(getPurchaseReturn_args that) {
23160
      if (that == null)
23161
        return false;
23162
 
23163
      boolean this_present_id = true;
23164
      boolean that_present_id = true;
23165
      if (this_present_id || that_present_id) {
23166
        if (!(this_present_id && that_present_id))
23167
          return false;
23168
        if (this.id != that.id)
23169
          return false;
23170
      }
23171
 
23172
      return true;
23173
    }
23174
 
23175
    @Override
23176
    public int hashCode() {
23177
      return 0;
23178
    }
23179
 
23180
    public int compareTo(getPurchaseReturn_args other) {
23181
      if (!getClass().equals(other.getClass())) {
23182
        return getClass().getName().compareTo(other.getClass().getName());
23183
      }
23184
 
23185
      int lastComparison = 0;
23186
      getPurchaseReturn_args typedOther = (getPurchaseReturn_args)other;
23187
 
23188
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
23189
      if (lastComparison != 0) {
23190
        return lastComparison;
23191
      }
23192
      if (isSetId()) {
23193
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
23194
        if (lastComparison != 0) {
23195
          return lastComparison;
23196
        }
23197
      }
23198
      return 0;
23199
    }
23200
 
23201
    public _Fields fieldForId(int fieldId) {
23202
      return _Fields.findByThriftId(fieldId);
23203
    }
23204
 
23205
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
23206
      org.apache.thrift.protocol.TField field;
23207
      iprot.readStructBegin();
23208
      while (true)
23209
      {
23210
        field = iprot.readFieldBegin();
23211
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
23212
          break;
23213
        }
23214
        switch (field.id) {
23215
          case 1: // ID
23216
            if (field.type == org.apache.thrift.protocol.TType.I64) {
23217
              this.id = iprot.readI64();
23218
              setIdIsSet(true);
23219
            } else { 
23220
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23221
            }
23222
            break;
23223
          default:
23224
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23225
        }
23226
        iprot.readFieldEnd();
23227
      }
23228
      iprot.readStructEnd();
23229
      validate();
23230
    }
23231
 
23232
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
23233
      validate();
23234
 
23235
      oprot.writeStructBegin(STRUCT_DESC);
23236
      oprot.writeFieldBegin(ID_FIELD_DESC);
23237
      oprot.writeI64(this.id);
23238
      oprot.writeFieldEnd();
23239
      oprot.writeFieldStop();
23240
      oprot.writeStructEnd();
23241
    }
23242
 
23243
    @Override
23244
    public String toString() {
23245
      StringBuilder sb = new StringBuilder("getPurchaseReturn_args(");
23246
      boolean first = true;
23247
 
23248
      sb.append("id:");
23249
      sb.append(this.id);
23250
      first = false;
23251
      sb.append(")");
23252
      return sb.toString();
23253
    }
23254
 
23255
    public void validate() throws org.apache.thrift.TException {
23256
      // check for required fields
23257
    }
23258
 
23259
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
23260
      try {
23261
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
23262
      } catch (org.apache.thrift.TException te) {
23263
        throw new java.io.IOException(te);
23264
      }
23265
    }
23266
 
23267
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
23268
      try {
23269
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
23270
        __isset_bit_vector = new BitSet(1);
23271
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
23272
      } catch (org.apache.thrift.TException te) {
23273
        throw new java.io.IOException(te);
23274
      }
23275
    }
23276
 
23277
  }
23278
 
23279
  public static class getPurchaseReturn_result implements org.apache.thrift.TBase<getPurchaseReturn_result, getPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
23280
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseReturn_result");
23281
 
23282
    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);
23283
    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);
23284
 
23285
    private PurchaseReturn success; // required
23286
    private PurchaseServiceException e; // required
23287
 
23288
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23289
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
23290
      SUCCESS((short)0, "success"),
23291
      E((short)1, "e");
23292
 
23293
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23294
 
23295
      static {
23296
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23297
          byName.put(field.getFieldName(), field);
23298
        }
23299
      }
23300
 
23301
      /**
23302
       * Find the _Fields constant that matches fieldId, or null if its not found.
23303
       */
23304
      public static _Fields findByThriftId(int fieldId) {
23305
        switch(fieldId) {
23306
          case 0: // SUCCESS
23307
            return SUCCESS;
23308
          case 1: // E
23309
            return E;
23310
          default:
23311
            return null;
23312
        }
23313
      }
23314
 
23315
      /**
23316
       * Find the _Fields constant that matches fieldId, throwing an exception
23317
       * if it is not found.
23318
       */
23319
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23320
        _Fields fields = findByThriftId(fieldId);
23321
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23322
        return fields;
23323
      }
23324
 
23325
      /**
23326
       * Find the _Fields constant that matches name, or null if its not found.
23327
       */
23328
      public static _Fields findByName(String name) {
23329
        return byName.get(name);
23330
      }
23331
 
23332
      private final short _thriftId;
23333
      private final String _fieldName;
23334
 
23335
      _Fields(short thriftId, String fieldName) {
23336
        _thriftId = thriftId;
23337
        _fieldName = fieldName;
23338
      }
23339
 
23340
      public short getThriftFieldId() {
23341
        return _thriftId;
23342
      }
23343
 
23344
      public String getFieldName() {
23345
        return _fieldName;
23346
      }
23347
    }
23348
 
23349
    // isset id assignments
23350
 
23351
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
23352
    static {
23353
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
23354
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23355
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class)));
23356
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23357
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
23358
      metaDataMap = Collections.unmodifiableMap(tmpMap);
23359
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseReturn_result.class, metaDataMap);
23360
    }
23361
 
23362
    public getPurchaseReturn_result() {
23363
    }
23364
 
23365
    public getPurchaseReturn_result(
23366
      PurchaseReturn success,
23367
      PurchaseServiceException e)
23368
    {
23369
      this();
23370
      this.success = success;
23371
      this.e = e;
23372
    }
23373
 
23374
    /**
23375
     * Performs a deep copy on <i>other</i>.
23376
     */
23377
    public getPurchaseReturn_result(getPurchaseReturn_result other) {
23378
      if (other.isSetSuccess()) {
23379
        this.success = new PurchaseReturn(other.success);
23380
      }
23381
      if (other.isSetE()) {
23382
        this.e = new PurchaseServiceException(other.e);
23383
      }
23384
    }
23385
 
23386
    public getPurchaseReturn_result deepCopy() {
23387
      return new getPurchaseReturn_result(this);
23388
    }
23389
 
23390
    @Override
23391
    public void clear() {
23392
      this.success = null;
23393
      this.e = null;
23394
    }
23395
 
23396
    public PurchaseReturn getSuccess() {
23397
      return this.success;
23398
    }
23399
 
23400
    public void setSuccess(PurchaseReturn success) {
23401
      this.success = success;
23402
    }
23403
 
23404
    public void unsetSuccess() {
23405
      this.success = null;
23406
    }
23407
 
23408
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
23409
    public boolean isSetSuccess() {
23410
      return this.success != null;
23411
    }
23412
 
23413
    public void setSuccessIsSet(boolean value) {
23414
      if (!value) {
23415
        this.success = null;
23416
      }
23417
    }
23418
 
23419
    public PurchaseServiceException getE() {
23420
      return this.e;
23421
    }
23422
 
23423
    public void setE(PurchaseServiceException e) {
23424
      this.e = e;
23425
    }
23426
 
23427
    public void unsetE() {
23428
      this.e = null;
23429
    }
23430
 
23431
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
23432
    public boolean isSetE() {
23433
      return this.e != null;
23434
    }
23435
 
23436
    public void setEIsSet(boolean value) {
23437
      if (!value) {
23438
        this.e = null;
23439
      }
23440
    }
23441
 
23442
    public void setFieldValue(_Fields field, Object value) {
23443
      switch (field) {
23444
      case SUCCESS:
23445
        if (value == null) {
23446
          unsetSuccess();
23447
        } else {
23448
          setSuccess((PurchaseReturn)value);
23449
        }
23450
        break;
23451
 
23452
      case E:
23453
        if (value == null) {
23454
          unsetE();
23455
        } else {
23456
          setE((PurchaseServiceException)value);
23457
        }
23458
        break;
23459
 
23460
      }
23461
    }
23462
 
23463
    public Object getFieldValue(_Fields field) {
23464
      switch (field) {
23465
      case SUCCESS:
23466
        return getSuccess();
23467
 
23468
      case E:
23469
        return getE();
23470
 
23471
      }
23472
      throw new IllegalStateException();
23473
    }
23474
 
23475
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
23476
    public boolean isSet(_Fields field) {
23477
      if (field == null) {
23478
        throw new IllegalArgumentException();
23479
      }
23480
 
23481
      switch (field) {
23482
      case SUCCESS:
23483
        return isSetSuccess();
23484
      case E:
23485
        return isSetE();
23486
      }
23487
      throw new IllegalStateException();
23488
    }
23489
 
23490
    @Override
23491
    public boolean equals(Object that) {
23492
      if (that == null)
23493
        return false;
23494
      if (that instanceof getPurchaseReturn_result)
23495
        return this.equals((getPurchaseReturn_result)that);
23496
      return false;
23497
    }
23498
 
23499
    public boolean equals(getPurchaseReturn_result that) {
23500
      if (that == null)
23501
        return false;
23502
 
23503
      boolean this_present_success = true && this.isSetSuccess();
23504
      boolean that_present_success = true && that.isSetSuccess();
23505
      if (this_present_success || that_present_success) {
23506
        if (!(this_present_success && that_present_success))
23507
          return false;
23508
        if (!this.success.equals(that.success))
23509
          return false;
23510
      }
23511
 
23512
      boolean this_present_e = true && this.isSetE();
23513
      boolean that_present_e = true && that.isSetE();
23514
      if (this_present_e || that_present_e) {
23515
        if (!(this_present_e && that_present_e))
23516
          return false;
23517
        if (!this.e.equals(that.e))
23518
          return false;
23519
      }
23520
 
23521
      return true;
23522
    }
23523
 
23524
    @Override
23525
    public int hashCode() {
23526
      return 0;
23527
    }
23528
 
23529
    public int compareTo(getPurchaseReturn_result other) {
23530
      if (!getClass().equals(other.getClass())) {
23531
        return getClass().getName().compareTo(other.getClass().getName());
23532
      }
23533
 
23534
      int lastComparison = 0;
23535
      getPurchaseReturn_result typedOther = (getPurchaseReturn_result)other;
23536
 
23537
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
23538
      if (lastComparison != 0) {
23539
        return lastComparison;
23540
      }
23541
      if (isSetSuccess()) {
23542
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
23543
        if (lastComparison != 0) {
23544
          return lastComparison;
23545
        }
23546
      }
23547
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
23548
      if (lastComparison != 0) {
23549
        return lastComparison;
23550
      }
23551
      if (isSetE()) {
23552
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
23553
        if (lastComparison != 0) {
23554
          return lastComparison;
23555
        }
23556
      }
23557
      return 0;
23558
    }
23559
 
23560
    public _Fields fieldForId(int fieldId) {
23561
      return _Fields.findByThriftId(fieldId);
23562
    }
23563
 
23564
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
23565
      org.apache.thrift.protocol.TField field;
23566
      iprot.readStructBegin();
23567
      while (true)
23568
      {
23569
        field = iprot.readFieldBegin();
23570
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
23571
          break;
23572
        }
23573
        switch (field.id) {
23574
          case 0: // SUCCESS
23575
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
23576
              this.success = new PurchaseReturn();
23577
              this.success.read(iprot);
23578
            } else { 
23579
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23580
            }
23581
            break;
23582
          case 1: // E
23583
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
23584
              this.e = new PurchaseServiceException();
23585
              this.e.read(iprot);
23586
            } else { 
23587
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23588
            }
23589
            break;
23590
          default:
23591
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23592
        }
23593
        iprot.readFieldEnd();
23594
      }
23595
      iprot.readStructEnd();
23596
      validate();
23597
    }
23598
 
23599
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
23600
      oprot.writeStructBegin(STRUCT_DESC);
23601
 
23602
      if (this.isSetSuccess()) {
23603
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
23604
        this.success.write(oprot);
23605
        oprot.writeFieldEnd();
23606
      } else if (this.isSetE()) {
23607
        oprot.writeFieldBegin(E_FIELD_DESC);
23608
        this.e.write(oprot);
23609
        oprot.writeFieldEnd();
23610
      }
23611
      oprot.writeFieldStop();
23612
      oprot.writeStructEnd();
23613
    }
23614
 
23615
    @Override
23616
    public String toString() {
23617
      StringBuilder sb = new StringBuilder("getPurchaseReturn_result(");
23618
      boolean first = true;
23619
 
23620
      sb.append("success:");
23621
      if (this.success == null) {
23622
        sb.append("null");
23623
      } else {
23624
        sb.append(this.success);
23625
      }
23626
      first = false;
23627
      if (!first) sb.append(", ");
23628
      sb.append("e:");
23629
      if (this.e == null) {
23630
        sb.append("null");
23631
      } else {
23632
        sb.append(this.e);
23633
      }
23634
      first = false;
23635
      sb.append(")");
23636
      return sb.toString();
23637
    }
23638
 
23639
    public void validate() throws org.apache.thrift.TException {
23640
      // check for required fields
23641
    }
23642
 
23643
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
23644
      try {
23645
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
23646
      } catch (org.apache.thrift.TException te) {
23647
        throw new java.io.IOException(te);
23648
      }
23649
    }
23650
 
23651
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
23652
      try {
23653
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
23654
      } catch (org.apache.thrift.TException te) {
23655
        throw new java.io.IOException(te);
23656
      }
23657
    }
23658
 
23659
  }
23660
 
13600 manish.sha 23661
  public static class markPurchasereturnSettled_args implements org.apache.thrift.TBase<markPurchasereturnSettled_args, markPurchasereturnSettled_args._Fields>, java.io.Serializable, Cloneable   {
23662
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markPurchasereturnSettled_args");
23663
 
23664
    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);
23665
    private static final org.apache.thrift.protocol.TField SETTLEMENT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("settlementType", org.apache.thrift.protocol.TType.I32, (short)2);
23666
    private static final org.apache.thrift.protocol.TField DOCUMENT_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("documentNumber", org.apache.thrift.protocol.TType.STRING, (short)3);
23667
    private static final org.apache.thrift.protocol.TField SETTLEMENT_BY_FIELD_DESC = new org.apache.thrift.protocol.TField("settlementBy", org.apache.thrift.protocol.TType.STRING, (short)4);
23668
    private static final org.apache.thrift.protocol.TField SETTLED_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("settledAmount", org.apache.thrift.protocol.TType.I64, (short)5);
23669
 
23670
    private long id; // required
23671
    private SettlementType settlementType; // required
23672
    private String documentNumber; // required
23673
    private String settlementBy; // required
23674
    private long settledAmount; // required
23675
 
23676
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23677
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
23678
      ID((short)1, "id"),
23679
      /**
23680
       * 
23681
       * @see SettlementType
23682
       */
23683
      SETTLEMENT_TYPE((short)2, "settlementType"),
23684
      DOCUMENT_NUMBER((short)3, "documentNumber"),
23685
      SETTLEMENT_BY((short)4, "settlementBy"),
23686
      SETTLED_AMOUNT((short)5, "settledAmount");
23687
 
23688
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23689
 
23690
      static {
23691
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23692
          byName.put(field.getFieldName(), field);
23693
        }
23694
      }
23695
 
23696
      /**
23697
       * Find the _Fields constant that matches fieldId, or null if its not found.
23698
       */
23699
      public static _Fields findByThriftId(int fieldId) {
23700
        switch(fieldId) {
23701
          case 1: // ID
23702
            return ID;
23703
          case 2: // SETTLEMENT_TYPE
23704
            return SETTLEMENT_TYPE;
23705
          case 3: // DOCUMENT_NUMBER
23706
            return DOCUMENT_NUMBER;
23707
          case 4: // SETTLEMENT_BY
23708
            return SETTLEMENT_BY;
23709
          case 5: // SETTLED_AMOUNT
23710
            return SETTLED_AMOUNT;
23711
          default:
23712
            return null;
23713
        }
23714
      }
23715
 
23716
      /**
23717
       * Find the _Fields constant that matches fieldId, throwing an exception
23718
       * if it is not found.
23719
       */
23720
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23721
        _Fields fields = findByThriftId(fieldId);
23722
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23723
        return fields;
23724
      }
23725
 
23726
      /**
23727
       * Find the _Fields constant that matches name, or null if its not found.
23728
       */
23729
      public static _Fields findByName(String name) {
23730
        return byName.get(name);
23731
      }
23732
 
23733
      private final short _thriftId;
23734
      private final String _fieldName;
23735
 
23736
      _Fields(short thriftId, String fieldName) {
23737
        _thriftId = thriftId;
23738
        _fieldName = fieldName;
23739
      }
23740
 
23741
      public short getThriftFieldId() {
23742
        return _thriftId;
23743
      }
23744
 
23745
      public String getFieldName() {
23746
        return _fieldName;
23747
      }
23748
    }
23749
 
23750
    // isset id assignments
23751
    private static final int __ID_ISSET_ID = 0;
23752
    private static final int __SETTLEDAMOUNT_ISSET_ID = 1;
23753
    private BitSet __isset_bit_vector = new BitSet(2);
23754
 
23755
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
23756
    static {
23757
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
23758
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23759
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
23760
      tmpMap.put(_Fields.SETTLEMENT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("settlementType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23761
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SettlementType.class)));
23762
      tmpMap.put(_Fields.DOCUMENT_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("documentNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23763
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
23764
      tmpMap.put(_Fields.SETTLEMENT_BY, new org.apache.thrift.meta_data.FieldMetaData("settlementBy", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23765
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
23766
      tmpMap.put(_Fields.SETTLED_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("settledAmount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23767
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
23768
      metaDataMap = Collections.unmodifiableMap(tmpMap);
23769
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markPurchasereturnSettled_args.class, metaDataMap);
23770
    }
23771
 
23772
    public markPurchasereturnSettled_args() {
23773
    }
23774
 
23775
    public markPurchasereturnSettled_args(
23776
      long id,
23777
      SettlementType settlementType,
23778
      String documentNumber,
23779
      String settlementBy,
23780
      long settledAmount)
23781
    {
23782
      this();
23783
      this.id = id;
23784
      setIdIsSet(true);
23785
      this.settlementType = settlementType;
23786
      this.documentNumber = documentNumber;
23787
      this.settlementBy = settlementBy;
23788
      this.settledAmount = settledAmount;
23789
      setSettledAmountIsSet(true);
23790
    }
23791
 
23792
    /**
23793
     * Performs a deep copy on <i>other</i>.
23794
     */
23795
    public markPurchasereturnSettled_args(markPurchasereturnSettled_args other) {
23796
      __isset_bit_vector.clear();
23797
      __isset_bit_vector.or(other.__isset_bit_vector);
23798
      this.id = other.id;
23799
      if (other.isSetSettlementType()) {
23800
        this.settlementType = other.settlementType;
23801
      }
23802
      if (other.isSetDocumentNumber()) {
23803
        this.documentNumber = other.documentNumber;
23804
      }
23805
      if (other.isSetSettlementBy()) {
23806
        this.settlementBy = other.settlementBy;
23807
      }
23808
      this.settledAmount = other.settledAmount;
23809
    }
23810
 
23811
    public markPurchasereturnSettled_args deepCopy() {
23812
      return new markPurchasereturnSettled_args(this);
23813
    }
23814
 
23815
    @Override
23816
    public void clear() {
23817
      setIdIsSet(false);
23818
      this.id = 0;
23819
      this.settlementType = null;
23820
      this.documentNumber = null;
23821
      this.settlementBy = null;
23822
      setSettledAmountIsSet(false);
23823
      this.settledAmount = 0;
23824
    }
23825
 
23826
    public long getId() {
23827
      return this.id;
23828
    }
23829
 
23830
    public void setId(long id) {
23831
      this.id = id;
23832
      setIdIsSet(true);
23833
    }
23834
 
23835
    public void unsetId() {
23836
      __isset_bit_vector.clear(__ID_ISSET_ID);
23837
    }
23838
 
23839
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
23840
    public boolean isSetId() {
23841
      return __isset_bit_vector.get(__ID_ISSET_ID);
23842
    }
23843
 
23844
    public void setIdIsSet(boolean value) {
23845
      __isset_bit_vector.set(__ID_ISSET_ID, value);
23846
    }
23847
 
23848
    /**
23849
     * 
23850
     * @see SettlementType
23851
     */
23852
    public SettlementType getSettlementType() {
23853
      return this.settlementType;
23854
    }
23855
 
23856
    /**
23857
     * 
23858
     * @see SettlementType
23859
     */
23860
    public void setSettlementType(SettlementType settlementType) {
23861
      this.settlementType = settlementType;
23862
    }
23863
 
23864
    public void unsetSettlementType() {
23865
      this.settlementType = null;
23866
    }
23867
 
23868
    /** Returns true if field settlementType is set (has been assigned a value) and false otherwise */
23869
    public boolean isSetSettlementType() {
23870
      return this.settlementType != null;
23871
    }
23872
 
23873
    public void setSettlementTypeIsSet(boolean value) {
23874
      if (!value) {
23875
        this.settlementType = null;
23876
      }
23877
    }
23878
 
23879
    public String getDocumentNumber() {
23880
      return this.documentNumber;
23881
    }
23882
 
23883
    public void setDocumentNumber(String documentNumber) {
23884
      this.documentNumber = documentNumber;
23885
    }
23886
 
23887
    public void unsetDocumentNumber() {
23888
      this.documentNumber = null;
23889
    }
23890
 
23891
    /** Returns true if field documentNumber is set (has been assigned a value) and false otherwise */
23892
    public boolean isSetDocumentNumber() {
23893
      return this.documentNumber != null;
23894
    }
23895
 
23896
    public void setDocumentNumberIsSet(boolean value) {
23897
      if (!value) {
23898
        this.documentNumber = null;
23899
      }
23900
    }
23901
 
23902
    public String getSettlementBy() {
23903
      return this.settlementBy;
23904
    }
23905
 
23906
    public void setSettlementBy(String settlementBy) {
23907
      this.settlementBy = settlementBy;
23908
    }
23909
 
23910
    public void unsetSettlementBy() {
23911
      this.settlementBy = null;
23912
    }
23913
 
23914
    /** Returns true if field settlementBy is set (has been assigned a value) and false otherwise */
23915
    public boolean isSetSettlementBy() {
23916
      return this.settlementBy != null;
23917
    }
23918
 
23919
    public void setSettlementByIsSet(boolean value) {
23920
      if (!value) {
23921
        this.settlementBy = null;
23922
      }
23923
    }
23924
 
23925
    public long getSettledAmount() {
23926
      return this.settledAmount;
23927
    }
23928
 
23929
    public void setSettledAmount(long settledAmount) {
23930
      this.settledAmount = settledAmount;
23931
      setSettledAmountIsSet(true);
23932
    }
23933
 
23934
    public void unsetSettledAmount() {
23935
      __isset_bit_vector.clear(__SETTLEDAMOUNT_ISSET_ID);
23936
    }
23937
 
23938
    /** Returns true if field settledAmount is set (has been assigned a value) and false otherwise */
23939
    public boolean isSetSettledAmount() {
23940
      return __isset_bit_vector.get(__SETTLEDAMOUNT_ISSET_ID);
23941
    }
23942
 
23943
    public void setSettledAmountIsSet(boolean value) {
23944
      __isset_bit_vector.set(__SETTLEDAMOUNT_ISSET_ID, value);
23945
    }
23946
 
23947
    public void setFieldValue(_Fields field, Object value) {
23948
      switch (field) {
23949
      case ID:
23950
        if (value == null) {
23951
          unsetId();
23952
        } else {
23953
          setId((Long)value);
23954
        }
23955
        break;
23956
 
23957
      case SETTLEMENT_TYPE:
23958
        if (value == null) {
23959
          unsetSettlementType();
23960
        } else {
23961
          setSettlementType((SettlementType)value);
23962
        }
23963
        break;
23964
 
23965
      case DOCUMENT_NUMBER:
23966
        if (value == null) {
23967
          unsetDocumentNumber();
23968
        } else {
23969
          setDocumentNumber((String)value);
23970
        }
23971
        break;
23972
 
23973
      case SETTLEMENT_BY:
23974
        if (value == null) {
23975
          unsetSettlementBy();
23976
        } else {
23977
          setSettlementBy((String)value);
23978
        }
23979
        break;
23980
 
23981
      case SETTLED_AMOUNT:
23982
        if (value == null) {
23983
          unsetSettledAmount();
23984
        } else {
23985
          setSettledAmount((Long)value);
23986
        }
23987
        break;
23988
 
23989
      }
23990
    }
23991
 
23992
    public Object getFieldValue(_Fields field) {
23993
      switch (field) {
23994
      case ID:
23995
        return Long.valueOf(getId());
23996
 
23997
      case SETTLEMENT_TYPE:
23998
        return getSettlementType();
23999
 
24000
      case DOCUMENT_NUMBER:
24001
        return getDocumentNumber();
24002
 
24003
      case SETTLEMENT_BY:
24004
        return getSettlementBy();
24005
 
24006
      case SETTLED_AMOUNT:
24007
        return Long.valueOf(getSettledAmount());
24008
 
24009
      }
24010
      throw new IllegalStateException();
24011
    }
24012
 
24013
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
24014
    public boolean isSet(_Fields field) {
24015
      if (field == null) {
24016
        throw new IllegalArgumentException();
24017
      }
24018
 
24019
      switch (field) {
24020
      case ID:
24021
        return isSetId();
24022
      case SETTLEMENT_TYPE:
24023
        return isSetSettlementType();
24024
      case DOCUMENT_NUMBER:
24025
        return isSetDocumentNumber();
24026
      case SETTLEMENT_BY:
24027
        return isSetSettlementBy();
24028
      case SETTLED_AMOUNT:
24029
        return isSetSettledAmount();
24030
      }
24031
      throw new IllegalStateException();
24032
    }
24033
 
24034
    @Override
24035
    public boolean equals(Object that) {
24036
      if (that == null)
24037
        return false;
24038
      if (that instanceof markPurchasereturnSettled_args)
24039
        return this.equals((markPurchasereturnSettled_args)that);
24040
      return false;
24041
    }
24042
 
24043
    public boolean equals(markPurchasereturnSettled_args that) {
24044
      if (that == null)
24045
        return false;
24046
 
24047
      boolean this_present_id = true;
24048
      boolean that_present_id = true;
24049
      if (this_present_id || that_present_id) {
24050
        if (!(this_present_id && that_present_id))
24051
          return false;
24052
        if (this.id != that.id)
24053
          return false;
24054
      }
24055
 
24056
      boolean this_present_settlementType = true && this.isSetSettlementType();
24057
      boolean that_present_settlementType = true && that.isSetSettlementType();
24058
      if (this_present_settlementType || that_present_settlementType) {
24059
        if (!(this_present_settlementType && that_present_settlementType))
24060
          return false;
24061
        if (!this.settlementType.equals(that.settlementType))
24062
          return false;
24063
      }
24064
 
24065
      boolean this_present_documentNumber = true && this.isSetDocumentNumber();
24066
      boolean that_present_documentNumber = true && that.isSetDocumentNumber();
24067
      if (this_present_documentNumber || that_present_documentNumber) {
24068
        if (!(this_present_documentNumber && that_present_documentNumber))
24069
          return false;
24070
        if (!this.documentNumber.equals(that.documentNumber))
24071
          return false;
24072
      }
24073
 
24074
      boolean this_present_settlementBy = true && this.isSetSettlementBy();
24075
      boolean that_present_settlementBy = true && that.isSetSettlementBy();
24076
      if (this_present_settlementBy || that_present_settlementBy) {
24077
        if (!(this_present_settlementBy && that_present_settlementBy))
24078
          return false;
24079
        if (!this.settlementBy.equals(that.settlementBy))
24080
          return false;
24081
      }
24082
 
24083
      boolean this_present_settledAmount = true;
24084
      boolean that_present_settledAmount = true;
24085
      if (this_present_settledAmount || that_present_settledAmount) {
24086
        if (!(this_present_settledAmount && that_present_settledAmount))
24087
          return false;
24088
        if (this.settledAmount != that.settledAmount)
24089
          return false;
24090
      }
24091
 
24092
      return true;
24093
    }
24094
 
24095
    @Override
24096
    public int hashCode() {
24097
      return 0;
24098
    }
24099
 
24100
    public int compareTo(markPurchasereturnSettled_args other) {
24101
      if (!getClass().equals(other.getClass())) {
24102
        return getClass().getName().compareTo(other.getClass().getName());
24103
      }
24104
 
24105
      int lastComparison = 0;
24106
      markPurchasereturnSettled_args typedOther = (markPurchasereturnSettled_args)other;
24107
 
24108
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
24109
      if (lastComparison != 0) {
24110
        return lastComparison;
24111
      }
24112
      if (isSetId()) {
24113
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
24114
        if (lastComparison != 0) {
24115
          return lastComparison;
24116
        }
24117
      }
24118
      lastComparison = Boolean.valueOf(isSetSettlementType()).compareTo(typedOther.isSetSettlementType());
24119
      if (lastComparison != 0) {
24120
        return lastComparison;
24121
      }
24122
      if (isSetSettlementType()) {
24123
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.settlementType, typedOther.settlementType);
24124
        if (lastComparison != 0) {
24125
          return lastComparison;
24126
        }
24127
      }
24128
      lastComparison = Boolean.valueOf(isSetDocumentNumber()).compareTo(typedOther.isSetDocumentNumber());
24129
      if (lastComparison != 0) {
24130
        return lastComparison;
24131
      }
24132
      if (isSetDocumentNumber()) {
24133
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.documentNumber, typedOther.documentNumber);
24134
        if (lastComparison != 0) {
24135
          return lastComparison;
24136
        }
24137
      }
24138
      lastComparison = Boolean.valueOf(isSetSettlementBy()).compareTo(typedOther.isSetSettlementBy());
24139
      if (lastComparison != 0) {
24140
        return lastComparison;
24141
      }
24142
      if (isSetSettlementBy()) {
24143
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.settlementBy, typedOther.settlementBy);
24144
        if (lastComparison != 0) {
24145
          return lastComparison;
24146
        }
24147
      }
24148
      lastComparison = Boolean.valueOf(isSetSettledAmount()).compareTo(typedOther.isSetSettledAmount());
24149
      if (lastComparison != 0) {
24150
        return lastComparison;
24151
      }
24152
      if (isSetSettledAmount()) {
24153
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.settledAmount, typedOther.settledAmount);
24154
        if (lastComparison != 0) {
24155
          return lastComparison;
24156
        }
24157
      }
24158
      return 0;
24159
    }
24160
 
24161
    public _Fields fieldForId(int fieldId) {
24162
      return _Fields.findByThriftId(fieldId);
24163
    }
24164
 
24165
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
24166
      org.apache.thrift.protocol.TField field;
24167
      iprot.readStructBegin();
24168
      while (true)
24169
      {
24170
        field = iprot.readFieldBegin();
24171
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
24172
          break;
24173
        }
24174
        switch (field.id) {
24175
          case 1: // ID
24176
            if (field.type == org.apache.thrift.protocol.TType.I64) {
24177
              this.id = iprot.readI64();
24178
              setIdIsSet(true);
24179
            } else { 
24180
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24181
            }
24182
            break;
24183
          case 2: // SETTLEMENT_TYPE
24184
            if (field.type == org.apache.thrift.protocol.TType.I32) {
24185
              this.settlementType = SettlementType.findByValue(iprot.readI32());
24186
            } else { 
24187
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24188
            }
24189
            break;
24190
          case 3: // DOCUMENT_NUMBER
24191
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
24192
              this.documentNumber = iprot.readString();
24193
            } else { 
24194
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24195
            }
24196
            break;
24197
          case 4: // SETTLEMENT_BY
24198
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
24199
              this.settlementBy = iprot.readString();
24200
            } else { 
24201
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24202
            }
24203
            break;
24204
          case 5: // SETTLED_AMOUNT
24205
            if (field.type == org.apache.thrift.protocol.TType.I64) {
24206
              this.settledAmount = iprot.readI64();
24207
              setSettledAmountIsSet(true);
24208
            } else { 
24209
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24210
            }
24211
            break;
24212
          default:
24213
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24214
        }
24215
        iprot.readFieldEnd();
24216
      }
24217
      iprot.readStructEnd();
24218
      validate();
24219
    }
24220
 
24221
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
24222
      validate();
24223
 
24224
      oprot.writeStructBegin(STRUCT_DESC);
24225
      oprot.writeFieldBegin(ID_FIELD_DESC);
24226
      oprot.writeI64(this.id);
24227
      oprot.writeFieldEnd();
24228
      if (this.settlementType != null) {
24229
        oprot.writeFieldBegin(SETTLEMENT_TYPE_FIELD_DESC);
24230
        oprot.writeI32(this.settlementType.getValue());
24231
        oprot.writeFieldEnd();
24232
      }
24233
      if (this.documentNumber != null) {
24234
        oprot.writeFieldBegin(DOCUMENT_NUMBER_FIELD_DESC);
24235
        oprot.writeString(this.documentNumber);
24236
        oprot.writeFieldEnd();
24237
      }
24238
      if (this.settlementBy != null) {
24239
        oprot.writeFieldBegin(SETTLEMENT_BY_FIELD_DESC);
24240
        oprot.writeString(this.settlementBy);
24241
        oprot.writeFieldEnd();
24242
      }
24243
      oprot.writeFieldBegin(SETTLED_AMOUNT_FIELD_DESC);
24244
      oprot.writeI64(this.settledAmount);
24245
      oprot.writeFieldEnd();
24246
      oprot.writeFieldStop();
24247
      oprot.writeStructEnd();
24248
    }
24249
 
24250
    @Override
24251
    public String toString() {
24252
      StringBuilder sb = new StringBuilder("markPurchasereturnSettled_args(");
24253
      boolean first = true;
24254
 
24255
      sb.append("id:");
24256
      sb.append(this.id);
24257
      first = false;
24258
      if (!first) sb.append(", ");
24259
      sb.append("settlementType:");
24260
      if (this.settlementType == null) {
24261
        sb.append("null");
24262
      } else {
24263
        sb.append(this.settlementType);
24264
      }
24265
      first = false;
24266
      if (!first) sb.append(", ");
24267
      sb.append("documentNumber:");
24268
      if (this.documentNumber == null) {
24269
        sb.append("null");
24270
      } else {
24271
        sb.append(this.documentNumber);
24272
      }
24273
      first = false;
24274
      if (!first) sb.append(", ");
24275
      sb.append("settlementBy:");
24276
      if (this.settlementBy == null) {
24277
        sb.append("null");
24278
      } else {
24279
        sb.append(this.settlementBy);
24280
      }
24281
      first = false;
24282
      if (!first) sb.append(", ");
24283
      sb.append("settledAmount:");
24284
      sb.append(this.settledAmount);
24285
      first = false;
24286
      sb.append(")");
24287
      return sb.toString();
24288
    }
24289
 
24290
    public void validate() throws org.apache.thrift.TException {
24291
      // check for required fields
24292
    }
24293
 
24294
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
24295
      try {
24296
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
24297
      } catch (org.apache.thrift.TException te) {
24298
        throw new java.io.IOException(te);
24299
      }
24300
    }
24301
 
24302
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
24303
      try {
24304
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
24305
        __isset_bit_vector = new BitSet(1);
24306
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
24307
      } catch (org.apache.thrift.TException te) {
24308
        throw new java.io.IOException(te);
24309
      }
24310
    }
24311
 
24312
  }
24313
 
24314
  public static class markPurchasereturnSettled_result implements org.apache.thrift.TBase<markPurchasereturnSettled_result, markPurchasereturnSettled_result._Fields>, java.io.Serializable, Cloneable   {
24315
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markPurchasereturnSettled_result");
24316
 
24317
    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);
24318
    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);
24319
 
24320
    private boolean success; // required
24321
    private PurchaseServiceException e; // required
24322
 
24323
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24324
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
24325
      SUCCESS((short)0, "success"),
24326
      E((short)1, "e");
24327
 
24328
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24329
 
24330
      static {
24331
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24332
          byName.put(field.getFieldName(), field);
24333
        }
24334
      }
24335
 
24336
      /**
24337
       * Find the _Fields constant that matches fieldId, or null if its not found.
24338
       */
24339
      public static _Fields findByThriftId(int fieldId) {
24340
        switch(fieldId) {
24341
          case 0: // SUCCESS
24342
            return SUCCESS;
24343
          case 1: // E
24344
            return E;
24345
          default:
24346
            return null;
24347
        }
24348
      }
24349
 
24350
      /**
24351
       * Find the _Fields constant that matches fieldId, throwing an exception
24352
       * if it is not found.
24353
       */
24354
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24355
        _Fields fields = findByThriftId(fieldId);
24356
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24357
        return fields;
24358
      }
24359
 
24360
      /**
24361
       * Find the _Fields constant that matches name, or null if its not found.
24362
       */
24363
      public static _Fields findByName(String name) {
24364
        return byName.get(name);
24365
      }
24366
 
24367
      private final short _thriftId;
24368
      private final String _fieldName;
24369
 
24370
      _Fields(short thriftId, String fieldName) {
24371
        _thriftId = thriftId;
24372
        _fieldName = fieldName;
24373
      }
24374
 
24375
      public short getThriftFieldId() {
24376
        return _thriftId;
24377
      }
24378
 
24379
      public String getFieldName() {
24380
        return _fieldName;
24381
      }
24382
    }
24383
 
24384
    // isset id assignments
24385
    private static final int __SUCCESS_ISSET_ID = 0;
24386
    private BitSet __isset_bit_vector = new BitSet(1);
24387
 
24388
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
24389
    static {
24390
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
24391
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
24392
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
24393
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
24394
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
24395
      metaDataMap = Collections.unmodifiableMap(tmpMap);
24396
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markPurchasereturnSettled_result.class, metaDataMap);
24397
    }
24398
 
24399
    public markPurchasereturnSettled_result() {
24400
    }
24401
 
24402
    public markPurchasereturnSettled_result(
24403
      boolean success,
24404
      PurchaseServiceException e)
24405
    {
24406
      this();
24407
      this.success = success;
24408
      setSuccessIsSet(true);
24409
      this.e = e;
24410
    }
24411
 
24412
    /**
24413
     * Performs a deep copy on <i>other</i>.
24414
     */
24415
    public markPurchasereturnSettled_result(markPurchasereturnSettled_result other) {
24416
      __isset_bit_vector.clear();
24417
      __isset_bit_vector.or(other.__isset_bit_vector);
24418
      this.success = other.success;
24419
      if (other.isSetE()) {
24420
        this.e = new PurchaseServiceException(other.e);
24421
      }
24422
    }
24423
 
24424
    public markPurchasereturnSettled_result deepCopy() {
24425
      return new markPurchasereturnSettled_result(this);
24426
    }
24427
 
24428
    @Override
24429
    public void clear() {
24430
      setSuccessIsSet(false);
24431
      this.success = false;
24432
      this.e = null;
24433
    }
24434
 
24435
    public boolean isSuccess() {
24436
      return this.success;
24437
    }
24438
 
24439
    public void setSuccess(boolean success) {
24440
      this.success = success;
24441
      setSuccessIsSet(true);
24442
    }
24443
 
24444
    public void unsetSuccess() {
24445
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
24446
    }
24447
 
24448
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
24449
    public boolean isSetSuccess() {
24450
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
24451
    }
24452
 
24453
    public void setSuccessIsSet(boolean value) {
24454
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
24455
    }
24456
 
24457
    public PurchaseServiceException getE() {
24458
      return this.e;
24459
    }
24460
 
24461
    public void setE(PurchaseServiceException e) {
24462
      this.e = e;
24463
    }
24464
 
24465
    public void unsetE() {
24466
      this.e = null;
24467
    }
24468
 
24469
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
24470
    public boolean isSetE() {
24471
      return this.e != null;
24472
    }
24473
 
24474
    public void setEIsSet(boolean value) {
24475
      if (!value) {
24476
        this.e = null;
24477
      }
24478
    }
24479
 
24480
    public void setFieldValue(_Fields field, Object value) {
24481
      switch (field) {
24482
      case SUCCESS:
24483
        if (value == null) {
24484
          unsetSuccess();
24485
        } else {
24486
          setSuccess((Boolean)value);
24487
        }
24488
        break;
24489
 
24490
      case E:
24491
        if (value == null) {
24492
          unsetE();
24493
        } else {
24494
          setE((PurchaseServiceException)value);
24495
        }
24496
        break;
24497
 
24498
      }
24499
    }
24500
 
24501
    public Object getFieldValue(_Fields field) {
24502
      switch (field) {
24503
      case SUCCESS:
24504
        return Boolean.valueOf(isSuccess());
24505
 
24506
      case E:
24507
        return getE();
24508
 
24509
      }
24510
      throw new IllegalStateException();
24511
    }
24512
 
24513
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
24514
    public boolean isSet(_Fields field) {
24515
      if (field == null) {
24516
        throw new IllegalArgumentException();
24517
      }
24518
 
24519
      switch (field) {
24520
      case SUCCESS:
24521
        return isSetSuccess();
24522
      case E:
24523
        return isSetE();
24524
      }
24525
      throw new IllegalStateException();
24526
    }
24527
 
24528
    @Override
24529
    public boolean equals(Object that) {
24530
      if (that == null)
24531
        return false;
24532
      if (that instanceof markPurchasereturnSettled_result)
24533
        return this.equals((markPurchasereturnSettled_result)that);
24534
      return false;
24535
    }
24536
 
24537
    public boolean equals(markPurchasereturnSettled_result that) {
24538
      if (that == null)
24539
        return false;
24540
 
24541
      boolean this_present_success = true;
24542
      boolean that_present_success = true;
24543
      if (this_present_success || that_present_success) {
24544
        if (!(this_present_success && that_present_success))
24545
          return false;
24546
        if (this.success != that.success)
24547
          return false;
24548
      }
24549
 
24550
      boolean this_present_e = true && this.isSetE();
24551
      boolean that_present_e = true && that.isSetE();
24552
      if (this_present_e || that_present_e) {
24553
        if (!(this_present_e && that_present_e))
24554
          return false;
24555
        if (!this.e.equals(that.e))
24556
          return false;
24557
      }
24558
 
24559
      return true;
24560
    }
24561
 
24562
    @Override
24563
    public int hashCode() {
24564
      return 0;
24565
    }
24566
 
24567
    public int compareTo(markPurchasereturnSettled_result other) {
24568
      if (!getClass().equals(other.getClass())) {
24569
        return getClass().getName().compareTo(other.getClass().getName());
24570
      }
24571
 
24572
      int lastComparison = 0;
24573
      markPurchasereturnSettled_result typedOther = (markPurchasereturnSettled_result)other;
24574
 
24575
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
24576
      if (lastComparison != 0) {
24577
        return lastComparison;
24578
      }
24579
      if (isSetSuccess()) {
24580
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
24581
        if (lastComparison != 0) {
24582
          return lastComparison;
24583
        }
24584
      }
24585
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
24586
      if (lastComparison != 0) {
24587
        return lastComparison;
24588
      }
24589
      if (isSetE()) {
24590
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
24591
        if (lastComparison != 0) {
24592
          return lastComparison;
24593
        }
24594
      }
24595
      return 0;
24596
    }
24597
 
24598
    public _Fields fieldForId(int fieldId) {
24599
      return _Fields.findByThriftId(fieldId);
24600
    }
24601
 
24602
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
24603
      org.apache.thrift.protocol.TField field;
24604
      iprot.readStructBegin();
24605
      while (true)
24606
      {
24607
        field = iprot.readFieldBegin();
24608
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
24609
          break;
24610
        }
24611
        switch (field.id) {
24612
          case 0: // SUCCESS
24613
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
24614
              this.success = iprot.readBool();
24615
              setSuccessIsSet(true);
24616
            } else { 
24617
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24618
            }
24619
            break;
24620
          case 1: // E
24621
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
24622
              this.e = new PurchaseServiceException();
24623
              this.e.read(iprot);
24624
            } else { 
24625
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24626
            }
24627
            break;
24628
          default:
24629
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24630
        }
24631
        iprot.readFieldEnd();
24632
      }
24633
      iprot.readStructEnd();
24634
      validate();
24635
    }
24636
 
24637
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
24638
      oprot.writeStructBegin(STRUCT_DESC);
24639
 
24640
      if (this.isSetSuccess()) {
24641
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
24642
        oprot.writeBool(this.success);
24643
        oprot.writeFieldEnd();
24644
      } else if (this.isSetE()) {
24645
        oprot.writeFieldBegin(E_FIELD_DESC);
24646
        this.e.write(oprot);
24647
        oprot.writeFieldEnd();
24648
      }
24649
      oprot.writeFieldStop();
24650
      oprot.writeStructEnd();
24651
    }
24652
 
24653
    @Override
24654
    public String toString() {
24655
      StringBuilder sb = new StringBuilder("markPurchasereturnSettled_result(");
24656
      boolean first = true;
24657
 
24658
      sb.append("success:");
24659
      sb.append(this.success);
24660
      first = false;
24661
      if (!first) sb.append(", ");
24662
      sb.append("e:");
24663
      if (this.e == null) {
24664
        sb.append("null");
24665
      } else {
24666
        sb.append(this.e);
24667
      }
24668
      first = false;
24669
      sb.append(")");
24670
      return sb.toString();
24671
    }
24672
 
24673
    public void validate() throws org.apache.thrift.TException {
24674
      // check for required fields
24675
    }
24676
 
24677
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
24678
      try {
24679
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
24680
      } catch (org.apache.thrift.TException te) {
24681
        throw new java.io.IOException(te);
24682
      }
24683
    }
24684
 
24685
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
24686
      try {
24687
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
24688
      } catch (org.apache.thrift.TException te) {
24689
        throw new java.io.IOException(te);
24690
      }
24691
    }
24692
 
24693
  }
24694
 
24695
  public static class getPrSettlementsForPurchaseReturn_args implements org.apache.thrift.TBase<getPrSettlementsForPurchaseReturn_args, getPrSettlementsForPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
24696
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPrSettlementsForPurchaseReturn_args");
24697
 
24698
    private static final org.apache.thrift.protocol.TField PURCHASE_RETURN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseReturnId", org.apache.thrift.protocol.TType.I64, (short)1);
24699
 
24700
    private long purchaseReturnId; // required
24701
 
24702
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24703
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
24704
      PURCHASE_RETURN_ID((short)1, "purchaseReturnId");
24705
 
24706
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24707
 
24708
      static {
24709
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24710
          byName.put(field.getFieldName(), field);
24711
        }
24712
      }
24713
 
24714
      /**
24715
       * Find the _Fields constant that matches fieldId, or null if its not found.
24716
       */
24717
      public static _Fields findByThriftId(int fieldId) {
24718
        switch(fieldId) {
24719
          case 1: // PURCHASE_RETURN_ID
24720
            return PURCHASE_RETURN_ID;
24721
          default:
24722
            return null;
24723
        }
24724
      }
24725
 
24726
      /**
24727
       * Find the _Fields constant that matches fieldId, throwing an exception
24728
       * if it is not found.
24729
       */
24730
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24731
        _Fields fields = findByThriftId(fieldId);
24732
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24733
        return fields;
24734
      }
24735
 
24736
      /**
24737
       * Find the _Fields constant that matches name, or null if its not found.
24738
       */
24739
      public static _Fields findByName(String name) {
24740
        return byName.get(name);
24741
      }
24742
 
24743
      private final short _thriftId;
24744
      private final String _fieldName;
24745
 
24746
      _Fields(short thriftId, String fieldName) {
24747
        _thriftId = thriftId;
24748
        _fieldName = fieldName;
24749
      }
24750
 
24751
      public short getThriftFieldId() {
24752
        return _thriftId;
24753
      }
24754
 
24755
      public String getFieldName() {
24756
        return _fieldName;
24757
      }
24758
    }
24759
 
24760
    // isset id assignments
24761
    private static final int __PURCHASERETURNID_ISSET_ID = 0;
24762
    private BitSet __isset_bit_vector = new BitSet(1);
24763
 
24764
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
24765
    static {
24766
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
24767
      tmpMap.put(_Fields.PURCHASE_RETURN_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseReturnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
24768
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
24769
      metaDataMap = Collections.unmodifiableMap(tmpMap);
24770
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPrSettlementsForPurchaseReturn_args.class, metaDataMap);
24771
    }
24772
 
24773
    public getPrSettlementsForPurchaseReturn_args() {
24774
    }
24775
 
24776
    public getPrSettlementsForPurchaseReturn_args(
24777
      long purchaseReturnId)
24778
    {
24779
      this();
24780
      this.purchaseReturnId = purchaseReturnId;
24781
      setPurchaseReturnIdIsSet(true);
24782
    }
24783
 
24784
    /**
24785
     * Performs a deep copy on <i>other</i>.
24786
     */
24787
    public getPrSettlementsForPurchaseReturn_args(getPrSettlementsForPurchaseReturn_args other) {
24788
      __isset_bit_vector.clear();
24789
      __isset_bit_vector.or(other.__isset_bit_vector);
24790
      this.purchaseReturnId = other.purchaseReturnId;
24791
    }
24792
 
24793
    public getPrSettlementsForPurchaseReturn_args deepCopy() {
24794
      return new getPrSettlementsForPurchaseReturn_args(this);
24795
    }
24796
 
24797
    @Override
24798
    public void clear() {
24799
      setPurchaseReturnIdIsSet(false);
24800
      this.purchaseReturnId = 0;
24801
    }
24802
 
24803
    public long getPurchaseReturnId() {
24804
      return this.purchaseReturnId;
24805
    }
24806
 
24807
    public void setPurchaseReturnId(long purchaseReturnId) {
24808
      this.purchaseReturnId = purchaseReturnId;
24809
      setPurchaseReturnIdIsSet(true);
24810
    }
24811
 
24812
    public void unsetPurchaseReturnId() {
24813
      __isset_bit_vector.clear(__PURCHASERETURNID_ISSET_ID);
24814
    }
24815
 
24816
    /** Returns true if field purchaseReturnId is set (has been assigned a value) and false otherwise */
24817
    public boolean isSetPurchaseReturnId() {
24818
      return __isset_bit_vector.get(__PURCHASERETURNID_ISSET_ID);
24819
    }
24820
 
24821
    public void setPurchaseReturnIdIsSet(boolean value) {
24822
      __isset_bit_vector.set(__PURCHASERETURNID_ISSET_ID, value);
24823
    }
24824
 
24825
    public void setFieldValue(_Fields field, Object value) {
24826
      switch (field) {
24827
      case PURCHASE_RETURN_ID:
24828
        if (value == null) {
24829
          unsetPurchaseReturnId();
24830
        } else {
24831
          setPurchaseReturnId((Long)value);
24832
        }
24833
        break;
24834
 
24835
      }
24836
    }
24837
 
24838
    public Object getFieldValue(_Fields field) {
24839
      switch (field) {
24840
      case PURCHASE_RETURN_ID:
24841
        return Long.valueOf(getPurchaseReturnId());
24842
 
24843
      }
24844
      throw new IllegalStateException();
24845
    }
24846
 
24847
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
24848
    public boolean isSet(_Fields field) {
24849
      if (field == null) {
24850
        throw new IllegalArgumentException();
24851
      }
24852
 
24853
      switch (field) {
24854
      case PURCHASE_RETURN_ID:
24855
        return isSetPurchaseReturnId();
24856
      }
24857
      throw new IllegalStateException();
24858
    }
24859
 
24860
    @Override
24861
    public boolean equals(Object that) {
24862
      if (that == null)
24863
        return false;
24864
      if (that instanceof getPrSettlementsForPurchaseReturn_args)
24865
        return this.equals((getPrSettlementsForPurchaseReturn_args)that);
24866
      return false;
24867
    }
24868
 
24869
    public boolean equals(getPrSettlementsForPurchaseReturn_args that) {
24870
      if (that == null)
24871
        return false;
24872
 
24873
      boolean this_present_purchaseReturnId = true;
24874
      boolean that_present_purchaseReturnId = true;
24875
      if (this_present_purchaseReturnId || that_present_purchaseReturnId) {
24876
        if (!(this_present_purchaseReturnId && that_present_purchaseReturnId))
24877
          return false;
24878
        if (this.purchaseReturnId != that.purchaseReturnId)
24879
          return false;
24880
      }
24881
 
24882
      return true;
24883
    }
24884
 
24885
    @Override
24886
    public int hashCode() {
24887
      return 0;
24888
    }
24889
 
24890
    public int compareTo(getPrSettlementsForPurchaseReturn_args other) {
24891
      if (!getClass().equals(other.getClass())) {
24892
        return getClass().getName().compareTo(other.getClass().getName());
24893
      }
24894
 
24895
      int lastComparison = 0;
24896
      getPrSettlementsForPurchaseReturn_args typedOther = (getPrSettlementsForPurchaseReturn_args)other;
24897
 
24898
      lastComparison = Boolean.valueOf(isSetPurchaseReturnId()).compareTo(typedOther.isSetPurchaseReturnId());
24899
      if (lastComparison != 0) {
24900
        return lastComparison;
24901
      }
24902
      if (isSetPurchaseReturnId()) {
24903
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseReturnId, typedOther.purchaseReturnId);
24904
        if (lastComparison != 0) {
24905
          return lastComparison;
24906
        }
24907
      }
24908
      return 0;
24909
    }
24910
 
24911
    public _Fields fieldForId(int fieldId) {
24912
      return _Fields.findByThriftId(fieldId);
24913
    }
24914
 
24915
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
24916
      org.apache.thrift.protocol.TField field;
24917
      iprot.readStructBegin();
24918
      while (true)
24919
      {
24920
        field = iprot.readFieldBegin();
24921
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
24922
          break;
24923
        }
24924
        switch (field.id) {
24925
          case 1: // PURCHASE_RETURN_ID
24926
            if (field.type == org.apache.thrift.protocol.TType.I64) {
24927
              this.purchaseReturnId = iprot.readI64();
24928
              setPurchaseReturnIdIsSet(true);
24929
            } else { 
24930
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24931
            }
24932
            break;
24933
          default:
24934
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24935
        }
24936
        iprot.readFieldEnd();
24937
      }
24938
      iprot.readStructEnd();
24939
      validate();
24940
    }
24941
 
24942
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
24943
      validate();
24944
 
24945
      oprot.writeStructBegin(STRUCT_DESC);
24946
      oprot.writeFieldBegin(PURCHASE_RETURN_ID_FIELD_DESC);
24947
      oprot.writeI64(this.purchaseReturnId);
24948
      oprot.writeFieldEnd();
24949
      oprot.writeFieldStop();
24950
      oprot.writeStructEnd();
24951
    }
24952
 
24953
    @Override
24954
    public String toString() {
24955
      StringBuilder sb = new StringBuilder("getPrSettlementsForPurchaseReturn_args(");
24956
      boolean first = true;
24957
 
24958
      sb.append("purchaseReturnId:");
24959
      sb.append(this.purchaseReturnId);
24960
      first = false;
24961
      sb.append(")");
24962
      return sb.toString();
24963
    }
24964
 
24965
    public void validate() throws org.apache.thrift.TException {
24966
      // check for required fields
24967
    }
24968
 
24969
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
24970
      try {
24971
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
24972
      } catch (org.apache.thrift.TException te) {
24973
        throw new java.io.IOException(te);
24974
      }
24975
    }
24976
 
24977
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
24978
      try {
24979
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
24980
        __isset_bit_vector = new BitSet(1);
24981
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
24982
      } catch (org.apache.thrift.TException te) {
24983
        throw new java.io.IOException(te);
24984
      }
24985
    }
24986
 
24987
  }
24988
 
24989
  public static class getPrSettlementsForPurchaseReturn_result implements org.apache.thrift.TBase<getPrSettlementsForPurchaseReturn_result, getPrSettlementsForPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
24990
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPrSettlementsForPurchaseReturn_result");
24991
 
24992
    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);
24993
    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);
24994
 
24995
    private List<PurchaseReturnSettlement> success; // required
24996
    private PurchaseServiceException e; // required
24997
 
24998
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24999
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
25000
      SUCCESS((short)0, "success"),
25001
      E((short)1, "e");
25002
 
25003
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25004
 
25005
      static {
25006
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25007
          byName.put(field.getFieldName(), field);
25008
        }
25009
      }
25010
 
25011
      /**
25012
       * Find the _Fields constant that matches fieldId, or null if its not found.
25013
       */
25014
      public static _Fields findByThriftId(int fieldId) {
25015
        switch(fieldId) {
25016
          case 0: // SUCCESS
25017
            return SUCCESS;
25018
          case 1: // E
25019
            return E;
25020
          default:
25021
            return null;
25022
        }
25023
      }
25024
 
25025
      /**
25026
       * Find the _Fields constant that matches fieldId, throwing an exception
25027
       * if it is not found.
25028
       */
25029
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25030
        _Fields fields = findByThriftId(fieldId);
25031
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25032
        return fields;
25033
      }
25034
 
25035
      /**
25036
       * Find the _Fields constant that matches name, or null if its not found.
25037
       */
25038
      public static _Fields findByName(String name) {
25039
        return byName.get(name);
25040
      }
25041
 
25042
      private final short _thriftId;
25043
      private final String _fieldName;
25044
 
25045
      _Fields(short thriftId, String fieldName) {
25046
        _thriftId = thriftId;
25047
        _fieldName = fieldName;
25048
      }
25049
 
25050
      public short getThriftFieldId() {
25051
        return _thriftId;
25052
      }
25053
 
25054
      public String getFieldName() {
25055
        return _fieldName;
25056
      }
25057
    }
25058
 
25059
    // isset id assignments
25060
 
25061
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
25062
    static {
25063
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
25064
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
25065
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
25066
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturnSettlement.class))));
25067
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
25068
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
25069
      metaDataMap = Collections.unmodifiableMap(tmpMap);
25070
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPrSettlementsForPurchaseReturn_result.class, metaDataMap);
25071
    }
25072
 
25073
    public getPrSettlementsForPurchaseReturn_result() {
25074
    }
25075
 
25076
    public getPrSettlementsForPurchaseReturn_result(
25077
      List<PurchaseReturnSettlement> success,
25078
      PurchaseServiceException e)
25079
    {
25080
      this();
25081
      this.success = success;
25082
      this.e = e;
25083
    }
25084
 
25085
    /**
25086
     * Performs a deep copy on <i>other</i>.
25087
     */
25088
    public getPrSettlementsForPurchaseReturn_result(getPrSettlementsForPurchaseReturn_result other) {
25089
      if (other.isSetSuccess()) {
25090
        List<PurchaseReturnSettlement> __this__success = new ArrayList<PurchaseReturnSettlement>();
25091
        for (PurchaseReturnSettlement other_element : other.success) {
25092
          __this__success.add(new PurchaseReturnSettlement(other_element));
25093
        }
25094
        this.success = __this__success;
25095
      }
25096
      if (other.isSetE()) {
25097
        this.e = new PurchaseServiceException(other.e);
25098
      }
25099
    }
25100
 
25101
    public getPrSettlementsForPurchaseReturn_result deepCopy() {
25102
      return new getPrSettlementsForPurchaseReturn_result(this);
25103
    }
25104
 
25105
    @Override
25106
    public void clear() {
25107
      this.success = null;
25108
      this.e = null;
25109
    }
25110
 
25111
    public int getSuccessSize() {
25112
      return (this.success == null) ? 0 : this.success.size();
25113
    }
25114
 
25115
    public java.util.Iterator<PurchaseReturnSettlement> getSuccessIterator() {
25116
      return (this.success == null) ? null : this.success.iterator();
25117
    }
25118
 
25119
    public void addToSuccess(PurchaseReturnSettlement elem) {
25120
      if (this.success == null) {
25121
        this.success = new ArrayList<PurchaseReturnSettlement>();
25122
      }
25123
      this.success.add(elem);
25124
    }
25125
 
25126
    public List<PurchaseReturnSettlement> getSuccess() {
25127
      return this.success;
25128
    }
25129
 
25130
    public void setSuccess(List<PurchaseReturnSettlement> success) {
25131
      this.success = success;
25132
    }
25133
 
25134
    public void unsetSuccess() {
25135
      this.success = null;
25136
    }
25137
 
25138
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
25139
    public boolean isSetSuccess() {
25140
      return this.success != null;
25141
    }
25142
 
25143
    public void setSuccessIsSet(boolean value) {
25144
      if (!value) {
25145
        this.success = null;
25146
      }
25147
    }
25148
 
25149
    public PurchaseServiceException getE() {
25150
      return this.e;
25151
    }
25152
 
25153
    public void setE(PurchaseServiceException e) {
25154
      this.e = e;
25155
    }
25156
 
25157
    public void unsetE() {
25158
      this.e = null;
25159
    }
25160
 
25161
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
25162
    public boolean isSetE() {
25163
      return this.e != null;
25164
    }
25165
 
25166
    public void setEIsSet(boolean value) {
25167
      if (!value) {
25168
        this.e = null;
25169
      }
25170
    }
25171
 
25172
    public void setFieldValue(_Fields field, Object value) {
25173
      switch (field) {
25174
      case SUCCESS:
25175
        if (value == null) {
25176
          unsetSuccess();
25177
        } else {
25178
          setSuccess((List<PurchaseReturnSettlement>)value);
25179
        }
25180
        break;
25181
 
25182
      case E:
25183
        if (value == null) {
25184
          unsetE();
25185
        } else {
25186
          setE((PurchaseServiceException)value);
25187
        }
25188
        break;
25189
 
25190
      }
25191
    }
25192
 
25193
    public Object getFieldValue(_Fields field) {
25194
      switch (field) {
25195
      case SUCCESS:
25196
        return getSuccess();
25197
 
25198
      case E:
25199
        return getE();
25200
 
25201
      }
25202
      throw new IllegalStateException();
25203
    }
25204
 
25205
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
25206
    public boolean isSet(_Fields field) {
25207
      if (field == null) {
25208
        throw new IllegalArgumentException();
25209
      }
25210
 
25211
      switch (field) {
25212
      case SUCCESS:
25213
        return isSetSuccess();
25214
      case E:
25215
        return isSetE();
25216
      }
25217
      throw new IllegalStateException();
25218
    }
25219
 
25220
    @Override
25221
    public boolean equals(Object that) {
25222
      if (that == null)
25223
        return false;
25224
      if (that instanceof getPrSettlementsForPurchaseReturn_result)
25225
        return this.equals((getPrSettlementsForPurchaseReturn_result)that);
25226
      return false;
25227
    }
25228
 
25229
    public boolean equals(getPrSettlementsForPurchaseReturn_result that) {
25230
      if (that == null)
25231
        return false;
25232
 
25233
      boolean this_present_success = true && this.isSetSuccess();
25234
      boolean that_present_success = true && that.isSetSuccess();
25235
      if (this_present_success || that_present_success) {
25236
        if (!(this_present_success && that_present_success))
25237
          return false;
25238
        if (!this.success.equals(that.success))
25239
          return false;
25240
      }
25241
 
25242
      boolean this_present_e = true && this.isSetE();
25243
      boolean that_present_e = true && that.isSetE();
25244
      if (this_present_e || that_present_e) {
25245
        if (!(this_present_e && that_present_e))
25246
          return false;
25247
        if (!this.e.equals(that.e))
25248
          return false;
25249
      }
25250
 
25251
      return true;
25252
    }
25253
 
25254
    @Override
25255
    public int hashCode() {
25256
      return 0;
25257
    }
25258
 
25259
    public int compareTo(getPrSettlementsForPurchaseReturn_result other) {
25260
      if (!getClass().equals(other.getClass())) {
25261
        return getClass().getName().compareTo(other.getClass().getName());
25262
      }
25263
 
25264
      int lastComparison = 0;
25265
      getPrSettlementsForPurchaseReturn_result typedOther = (getPrSettlementsForPurchaseReturn_result)other;
25266
 
25267
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
25268
      if (lastComparison != 0) {
25269
        return lastComparison;
25270
      }
25271
      if (isSetSuccess()) {
25272
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
25273
        if (lastComparison != 0) {
25274
          return lastComparison;
25275
        }
25276
      }
25277
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
25278
      if (lastComparison != 0) {
25279
        return lastComparison;
25280
      }
25281
      if (isSetE()) {
25282
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
25283
        if (lastComparison != 0) {
25284
          return lastComparison;
25285
        }
25286
      }
25287
      return 0;
25288
    }
25289
 
25290
    public _Fields fieldForId(int fieldId) {
25291
      return _Fields.findByThriftId(fieldId);
25292
    }
25293
 
25294
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
25295
      org.apache.thrift.protocol.TField field;
25296
      iprot.readStructBegin();
25297
      while (true)
25298
      {
25299
        field = iprot.readFieldBegin();
25300
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
25301
          break;
25302
        }
25303
        switch (field.id) {
25304
          case 0: // SUCCESS
25305
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
25306
              {
21847 amit.gupta 25307
                org.apache.thrift.protocol.TList _list44 = iprot.readListBegin();
25308
                this.success = new ArrayList<PurchaseReturnSettlement>(_list44.size);
25309
                for (int _i45 = 0; _i45 < _list44.size; ++_i45)
13600 manish.sha 25310
                {
21847 amit.gupta 25311
                  PurchaseReturnSettlement _elem46; // required
25312
                  _elem46 = new PurchaseReturnSettlement();
25313
                  _elem46.read(iprot);
25314
                  this.success.add(_elem46);
13600 manish.sha 25315
                }
25316
                iprot.readListEnd();
25317
              }
25318
            } else { 
25319
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
25320
            }
25321
            break;
25322
          case 1: // E
25323
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
25324
              this.e = new PurchaseServiceException();
25325
              this.e.read(iprot);
25326
            } else { 
25327
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
25328
            }
25329
            break;
25330
          default:
25331
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
25332
        }
25333
        iprot.readFieldEnd();
25334
      }
25335
      iprot.readStructEnd();
25336
      validate();
25337
    }
25338
 
25339
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
25340
      oprot.writeStructBegin(STRUCT_DESC);
25341
 
25342
      if (this.isSetSuccess()) {
25343
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
25344
        {
25345
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
21847 amit.gupta 25346
          for (PurchaseReturnSettlement _iter47 : this.success)
13600 manish.sha 25347
          {
21847 amit.gupta 25348
            _iter47.write(oprot);
13600 manish.sha 25349
          }
25350
          oprot.writeListEnd();
25351
        }
25352
        oprot.writeFieldEnd();
25353
      } else if (this.isSetE()) {
25354
        oprot.writeFieldBegin(E_FIELD_DESC);
25355
        this.e.write(oprot);
25356
        oprot.writeFieldEnd();
25357
      }
25358
      oprot.writeFieldStop();
25359
      oprot.writeStructEnd();
25360
    }
25361
 
25362
    @Override
25363
    public String toString() {
25364
      StringBuilder sb = new StringBuilder("getPrSettlementsForPurchaseReturn_result(");
25365
      boolean first = true;
25366
 
25367
      sb.append("success:");
25368
      if (this.success == null) {
25369
        sb.append("null");
25370
      } else {
25371
        sb.append(this.success);
25372
      }
25373
      first = false;
25374
      if (!first) sb.append(", ");
25375
      sb.append("e:");
25376
      if (this.e == null) {
25377
        sb.append("null");
25378
      } else {
25379
        sb.append(this.e);
25380
      }
25381
      first = false;
25382
      sb.append(")");
25383
      return sb.toString();
25384
    }
25385
 
25386
    public void validate() throws org.apache.thrift.TException {
25387
      // check for required fields
25388
    }
25389
 
25390
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
25391
      try {
25392
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
25393
      } catch (org.apache.thrift.TException te) {
25394
        throw new java.io.IOException(te);
25395
      }
25396
    }
25397
 
25398
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
25399
      try {
25400
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
25401
      } catch (org.apache.thrift.TException te) {
25402
        throw new java.io.IOException(te);
25403
      }
25404
    }
25405
 
25406
  }
25407
 
25408
  public static class updatePurchaseReturn_args implements org.apache.thrift.TBase<updatePurchaseReturn_args, updatePurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
25409
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseReturn_args");
25410
 
25411
    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);
25412
 
25413
    private PurchaseReturn purchaseReturn; // required
25414
 
25415
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25416
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
25417
      PURCHASE_RETURN((short)1, "purchaseReturn");
25418
 
25419
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25420
 
25421
      static {
25422
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25423
          byName.put(field.getFieldName(), field);
25424
        }
25425
      }
25426
 
25427
      /**
25428
       * Find the _Fields constant that matches fieldId, or null if its not found.
25429
       */
25430
      public static _Fields findByThriftId(int fieldId) {
25431
        switch(fieldId) {
25432
          case 1: // PURCHASE_RETURN
25433
            return PURCHASE_RETURN;
25434
          default:
25435
            return null;
25436
        }
25437
      }
25438
 
25439
      /**
25440
       * Find the _Fields constant that matches fieldId, throwing an exception
25441
       * if it is not found.
25442
       */
25443
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25444
        _Fields fields = findByThriftId(fieldId);
25445
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25446
        return fields;
25447
      }
25448
 
25449
      /**
25450
       * Find the _Fields constant that matches name, or null if its not found.
25451
       */
25452
      public static _Fields findByName(String name) {
25453
        return byName.get(name);
25454
      }
25455
 
25456
      private final short _thriftId;
25457
      private final String _fieldName;
25458
 
25459
      _Fields(short thriftId, String fieldName) {
25460
        _thriftId = thriftId;
25461
        _fieldName = fieldName;
25462
      }
25463
 
25464
      public short getThriftFieldId() {
25465
        return _thriftId;
25466
      }
25467
 
25468
      public String getFieldName() {
25469
        return _fieldName;
25470
      }
25471
    }
25472
 
25473
    // isset id assignments
25474
 
25475
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
25476
    static {
25477
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
25478
      tmpMap.put(_Fields.PURCHASE_RETURN, new org.apache.thrift.meta_data.FieldMetaData("purchaseReturn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
25479
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class)));
25480
      metaDataMap = Collections.unmodifiableMap(tmpMap);
25481
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseReturn_args.class, metaDataMap);
25482
    }
25483
 
25484
    public updatePurchaseReturn_args() {
25485
    }
25486
 
25487
    public updatePurchaseReturn_args(
25488
      PurchaseReturn purchaseReturn)
25489
    {
25490
      this();
25491
      this.purchaseReturn = purchaseReturn;
25492
    }
25493
 
25494
    /**
25495
     * Performs a deep copy on <i>other</i>.
25496
     */
25497
    public updatePurchaseReturn_args(updatePurchaseReturn_args other) {
25498
      if (other.isSetPurchaseReturn()) {
25499
        this.purchaseReturn = new PurchaseReturn(other.purchaseReturn);
25500
      }
25501
    }
25502
 
25503
    public updatePurchaseReturn_args deepCopy() {
25504
      return new updatePurchaseReturn_args(this);
25505
    }
25506
 
25507
    @Override
25508
    public void clear() {
25509
      this.purchaseReturn = null;
25510
    }
25511
 
25512
    public PurchaseReturn getPurchaseReturn() {
25513
      return this.purchaseReturn;
25514
    }
25515
 
25516
    public void setPurchaseReturn(PurchaseReturn purchaseReturn) {
25517
      this.purchaseReturn = purchaseReturn;
25518
    }
25519
 
25520
    public void unsetPurchaseReturn() {
25521
      this.purchaseReturn = null;
25522
    }
25523
 
25524
    /** Returns true if field purchaseReturn is set (has been assigned a value) and false otherwise */
25525
    public boolean isSetPurchaseReturn() {
25526
      return this.purchaseReturn != null;
25527
    }
25528
 
25529
    public void setPurchaseReturnIsSet(boolean value) {
25530
      if (!value) {
25531
        this.purchaseReturn = null;
25532
      }
25533
    }
25534
 
25535
    public void setFieldValue(_Fields field, Object value) {
25536
      switch (field) {
25537
      case PURCHASE_RETURN:
25538
        if (value == null) {
25539
          unsetPurchaseReturn();
25540
        } else {
25541
          setPurchaseReturn((PurchaseReturn)value);
25542
        }
25543
        break;
25544
 
25545
      }
25546
    }
25547
 
25548
    public Object getFieldValue(_Fields field) {
25549
      switch (field) {
25550
      case PURCHASE_RETURN:
25551
        return getPurchaseReturn();
25552
 
25553
      }
25554
      throw new IllegalStateException();
25555
    }
25556
 
25557
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
25558
    public boolean isSet(_Fields field) {
25559
      if (field == null) {
25560
        throw new IllegalArgumentException();
25561
      }
25562
 
25563
      switch (field) {
25564
      case PURCHASE_RETURN:
25565
        return isSetPurchaseReturn();
25566
      }
25567
      throw new IllegalStateException();
25568
    }
25569
 
25570
    @Override
25571
    public boolean equals(Object that) {
25572
      if (that == null)
25573
        return false;
25574
      if (that instanceof updatePurchaseReturn_args)
25575
        return this.equals((updatePurchaseReturn_args)that);
25576
      return false;
25577
    }
25578
 
25579
    public boolean equals(updatePurchaseReturn_args that) {
25580
      if (that == null)
25581
        return false;
25582
 
25583
      boolean this_present_purchaseReturn = true && this.isSetPurchaseReturn();
25584
      boolean that_present_purchaseReturn = true && that.isSetPurchaseReturn();
25585
      if (this_present_purchaseReturn || that_present_purchaseReturn) {
25586
        if (!(this_present_purchaseReturn && that_present_purchaseReturn))
25587
          return false;
25588
        if (!this.purchaseReturn.equals(that.purchaseReturn))
25589
          return false;
25590
      }
25591
 
25592
      return true;
25593
    }
25594
 
25595
    @Override
25596
    public int hashCode() {
25597
      return 0;
25598
    }
25599
 
25600
    public int compareTo(updatePurchaseReturn_args other) {
25601
      if (!getClass().equals(other.getClass())) {
25602
        return getClass().getName().compareTo(other.getClass().getName());
25603
      }
25604
 
25605
      int lastComparison = 0;
25606
      updatePurchaseReturn_args typedOther = (updatePurchaseReturn_args)other;
25607
 
25608
      lastComparison = Boolean.valueOf(isSetPurchaseReturn()).compareTo(typedOther.isSetPurchaseReturn());
25609
      if (lastComparison != 0) {
25610
        return lastComparison;
25611
      }
25612
      if (isSetPurchaseReturn()) {
25613
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseReturn, typedOther.purchaseReturn);
25614
        if (lastComparison != 0) {
25615
          return lastComparison;
25616
        }
25617
      }
25618
      return 0;
25619
    }
25620
 
25621
    public _Fields fieldForId(int fieldId) {
25622
      return _Fields.findByThriftId(fieldId);
25623
    }
25624
 
25625
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
25626
      org.apache.thrift.protocol.TField field;
25627
      iprot.readStructBegin();
25628
      while (true)
25629
      {
25630
        field = iprot.readFieldBegin();
25631
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
25632
          break;
25633
        }
25634
        switch (field.id) {
25635
          case 1: // PURCHASE_RETURN
25636
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
25637
              this.purchaseReturn = new PurchaseReturn();
25638
              this.purchaseReturn.read(iprot);
25639
            } else { 
25640
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
25641
            }
25642
            break;
25643
          default:
25644
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
25645
        }
25646
        iprot.readFieldEnd();
25647
      }
25648
      iprot.readStructEnd();
25649
      validate();
25650
    }
25651
 
25652
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
25653
      validate();
25654
 
25655
      oprot.writeStructBegin(STRUCT_DESC);
25656
      if (this.purchaseReturn != null) {
25657
        oprot.writeFieldBegin(PURCHASE_RETURN_FIELD_DESC);
25658
        this.purchaseReturn.write(oprot);
25659
        oprot.writeFieldEnd();
25660
      }
25661
      oprot.writeFieldStop();
25662
      oprot.writeStructEnd();
25663
    }
25664
 
25665
    @Override
25666
    public String toString() {
25667
      StringBuilder sb = new StringBuilder("updatePurchaseReturn_args(");
25668
      boolean first = true;
25669
 
25670
      sb.append("purchaseReturn:");
25671
      if (this.purchaseReturn == null) {
25672
        sb.append("null");
25673
      } else {
25674
        sb.append(this.purchaseReturn);
25675
      }
25676
      first = false;
25677
      sb.append(")");
25678
      return sb.toString();
25679
    }
25680
 
25681
    public void validate() throws org.apache.thrift.TException {
25682
      // check for required fields
25683
    }
25684
 
25685
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
25686
      try {
25687
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
25688
      } catch (org.apache.thrift.TException te) {
25689
        throw new java.io.IOException(te);
25690
      }
25691
    }
25692
 
25693
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
25694
      try {
25695
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
25696
      } catch (org.apache.thrift.TException te) {
25697
        throw new java.io.IOException(te);
25698
      }
25699
    }
25700
 
25701
  }
25702
 
25703
  public static class updatePurchaseReturn_result implements org.apache.thrift.TBase<updatePurchaseReturn_result, updatePurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
25704
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseReturn_result");
25705
 
25706
    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);
25707
 
25708
    private PurchaseServiceException e; // required
25709
 
25710
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25711
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
25712
      E((short)1, "e");
25713
 
25714
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25715
 
25716
      static {
25717
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25718
          byName.put(field.getFieldName(), field);
25719
        }
25720
      }
25721
 
25722
      /**
25723
       * Find the _Fields constant that matches fieldId, or null if its not found.
25724
       */
25725
      public static _Fields findByThriftId(int fieldId) {
25726
        switch(fieldId) {
25727
          case 1: // E
25728
            return E;
25729
          default:
25730
            return null;
25731
        }
25732
      }
25733
 
25734
      /**
25735
       * Find the _Fields constant that matches fieldId, throwing an exception
25736
       * if it is not found.
25737
       */
25738
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25739
        _Fields fields = findByThriftId(fieldId);
25740
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25741
        return fields;
25742
      }
25743
 
25744
      /**
25745
       * Find the _Fields constant that matches name, or null if its not found.
25746
       */
25747
      public static _Fields findByName(String name) {
25748
        return byName.get(name);
25749
      }
25750
 
25751
      private final short _thriftId;
25752
      private final String _fieldName;
25753
 
25754
      _Fields(short thriftId, String fieldName) {
25755
        _thriftId = thriftId;
25756
        _fieldName = fieldName;
25757
      }
25758
 
25759
      public short getThriftFieldId() {
25760
        return _thriftId;
25761
      }
25762
 
25763
      public String getFieldName() {
25764
        return _fieldName;
25765
      }
25766
    }
25767
 
25768
    // isset id assignments
25769
 
25770
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
25771
    static {
25772
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
25773
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
25774
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
25775
      metaDataMap = Collections.unmodifiableMap(tmpMap);
25776
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseReturn_result.class, metaDataMap);
25777
    }
25778
 
25779
    public updatePurchaseReturn_result() {
25780
    }
25781
 
25782
    public updatePurchaseReturn_result(
25783
      PurchaseServiceException e)
25784
    {
25785
      this();
25786
      this.e = e;
25787
    }
25788
 
25789
    /**
25790
     * Performs a deep copy on <i>other</i>.
25791
     */
25792
    public updatePurchaseReturn_result(updatePurchaseReturn_result other) {
25793
      if (other.isSetE()) {
25794
        this.e = new PurchaseServiceException(other.e);
25795
      }
25796
    }
25797
 
25798
    public updatePurchaseReturn_result deepCopy() {
25799
      return new updatePurchaseReturn_result(this);
25800
    }
25801
 
25802
    @Override
25803
    public void clear() {
25804
      this.e = null;
25805
    }
25806
 
25807
    public PurchaseServiceException getE() {
25808
      return this.e;
25809
    }
25810
 
25811
    public void setE(PurchaseServiceException e) {
25812
      this.e = e;
25813
    }
25814
 
25815
    public void unsetE() {
25816
      this.e = null;
25817
    }
25818
 
25819
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
25820
    public boolean isSetE() {
25821
      return this.e != null;
25822
    }
25823
 
25824
    public void setEIsSet(boolean value) {
25825
      if (!value) {
25826
        this.e = null;
25827
      }
25828
    }
25829
 
25830
    public void setFieldValue(_Fields field, Object value) {
25831
      switch (field) {
25832
      case E:
25833
        if (value == null) {
25834
          unsetE();
25835
        } else {
25836
          setE((PurchaseServiceException)value);
25837
        }
25838
        break;
25839
 
25840
      }
25841
    }
25842
 
25843
    public Object getFieldValue(_Fields field) {
25844
      switch (field) {
25845
      case E:
25846
        return getE();
25847
 
25848
      }
25849
      throw new IllegalStateException();
25850
    }
25851
 
25852
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
25853
    public boolean isSet(_Fields field) {
25854
      if (field == null) {
25855
        throw new IllegalArgumentException();
25856
      }
25857
 
25858
      switch (field) {
25859
      case E:
25860
        return isSetE();
25861
      }
25862
      throw new IllegalStateException();
25863
    }
25864
 
25865
    @Override
25866
    public boolean equals(Object that) {
25867
      if (that == null)
25868
        return false;
25869
      if (that instanceof updatePurchaseReturn_result)
25870
        return this.equals((updatePurchaseReturn_result)that);
25871
      return false;
25872
    }
25873
 
25874
    public boolean equals(updatePurchaseReturn_result that) {
25875
      if (that == null)
25876
        return false;
25877
 
25878
      boolean this_present_e = true && this.isSetE();
25879
      boolean that_present_e = true && that.isSetE();
25880
      if (this_present_e || that_present_e) {
25881
        if (!(this_present_e && that_present_e))
25882
          return false;
25883
        if (!this.e.equals(that.e))
25884
          return false;
25885
      }
25886
 
25887
      return true;
25888
    }
25889
 
25890
    @Override
25891
    public int hashCode() {
25892
      return 0;
25893
    }
25894
 
25895
    public int compareTo(updatePurchaseReturn_result other) {
25896
      if (!getClass().equals(other.getClass())) {
25897
        return getClass().getName().compareTo(other.getClass().getName());
25898
      }
25899
 
25900
      int lastComparison = 0;
25901
      updatePurchaseReturn_result typedOther = (updatePurchaseReturn_result)other;
25902
 
25903
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
25904
      if (lastComparison != 0) {
25905
        return lastComparison;
25906
      }
25907
      if (isSetE()) {
25908
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
25909
        if (lastComparison != 0) {
25910
          return lastComparison;
25911
        }
25912
      }
25913
      return 0;
25914
    }
25915
 
25916
    public _Fields fieldForId(int fieldId) {
25917
      return _Fields.findByThriftId(fieldId);
25918
    }
25919
 
25920
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
25921
      org.apache.thrift.protocol.TField field;
25922
      iprot.readStructBegin();
25923
      while (true)
25924
      {
25925
        field = iprot.readFieldBegin();
25926
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
25927
          break;
25928
        }
25929
        switch (field.id) {
25930
          case 1: // E
25931
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
25932
              this.e = new PurchaseServiceException();
25933
              this.e.read(iprot);
25934
            } else { 
25935
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
25936
            }
25937
            break;
25938
          default:
25939
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
25940
        }
25941
        iprot.readFieldEnd();
25942
      }
25943
      iprot.readStructEnd();
25944
      validate();
25945
    }
25946
 
25947
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
25948
      oprot.writeStructBegin(STRUCT_DESC);
25949
 
25950
      if (this.isSetE()) {
25951
        oprot.writeFieldBegin(E_FIELD_DESC);
25952
        this.e.write(oprot);
25953
        oprot.writeFieldEnd();
25954
      }
25955
      oprot.writeFieldStop();
25956
      oprot.writeStructEnd();
25957
    }
25958
 
25959
    @Override
25960
    public String toString() {
25961
      StringBuilder sb = new StringBuilder("updatePurchaseReturn_result(");
25962
      boolean first = true;
25963
 
25964
      sb.append("e:");
25965
      if (this.e == null) {
25966
        sb.append("null");
25967
      } else {
25968
        sb.append(this.e);
25969
      }
25970
      first = false;
25971
      sb.append(")");
25972
      return sb.toString();
25973
    }
25974
 
25975
    public void validate() throws org.apache.thrift.TException {
25976
      // check for required fields
25977
    }
25978
 
25979
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
25980
      try {
25981
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
25982
      } catch (org.apache.thrift.TException te) {
25983
        throw new java.io.IOException(te);
25984
      }
25985
    }
25986
 
25987
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
25988
      try {
25989
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
25990
      } catch (org.apache.thrift.TException te) {
25991
        throw new java.io.IOException(te);
25992
      }
25993
    }
25994
 
25995
  }
25996
 
4496 mandeep.dh 25997
}