Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
4496 mandeep.dh 1
/**
2
 * Autogenerated by Thrift Compiler (0.7.0)
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.purchase;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
18
import java.nio.ByteBuffer;
19
import java.util.Arrays;
20
import org.slf4j.Logger;
21
import org.slf4j.LoggerFactory;
22
 
23
public class PurchaseService {
24
 
25
  public interface Iface extends in.shop2020.generic.GenericService.Iface {
26
 
27
    /**
28
     * Creates a purchase order based on the data in the given purchase order object.
29
     * This method populates a nummber of missing fields
30
     * 
31
     * @param purchaseOrder
32
     */
33
    public long createPurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException;
34
 
35
    /**
36
     * Returns the purchase order with the given id. Throws an exception if there is no such purchase order.
37
     * 
38
     * @param id
39
     */
40
    public PurchaseOrder getPurchaseOrder(long id) throws PurchaseServiceException, org.apache.thrift.TException;
41
 
42
    /**
43
     * Returns a list of all the purchase orders in the given state
44
     * 
45
     * @param status
46
     */
47
    public List<PurchaseOrder> getAllPurchaseOrders(POStatus status) throws PurchaseServiceException, org.apache.thrift.TException;
48
 
49
    /**
50
     * Returns the supplier with the given order id. Throws an exception if there is no such supplier.
51
     * 
52
     * @param id
53
     */
54
    public Supplier getSupplier(long id) throws PurchaseServiceException, org.apache.thrift.TException;
55
 
56
    /**
57
     * Creates a purchase for the given purchase order.
58
     * Throws an exception if no more purchases are allowed against the given purchase order.
59
     * 
60
     * @param purchaseOrderId
61
     * @param invoiceNumber
62
     * @param freightCharges
11801 manish.sha 63
     * @param purchaseComments
4496 mandeep.dh 64
     */
11801 manish.sha 65
    public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments) throws PurchaseServiceException, org.apache.thrift.TException;
4496 mandeep.dh 66
 
67
    /**
68
     * Marks a purchase as complete and updates the receivedOn time.
69
     * Throws an exception if no such purchase exists.
70
     * 
71
     * @param purchaseId
72
     */
73
    public long closePurchase(long purchaseId) throws PurchaseServiceException, org.apache.thrift.TException;
74
 
75
    /**
76
     * Returns all open or closed purchases for the given purchase order. Throws an exception if no such purchase order exists
77
     * 
78
     * @param purchaseOrderId
79
     * @param open
80
     */
81
    public List<Purchase> getAllPurchases(long purchaseOrderId, boolean open) throws PurchaseServiceException, org.apache.thrift.TException;
82
 
83
    /**
6385 amar.kumar 84
     * Returns all purchases for the given purchase order. Throws an exception if no such purchase order exists
85
     * 
86
     * @param purchaseOrderId
87
     */
88
    public List<Purchase> getPurchasesForPO(long purchaseOrderId) throws PurchaseServiceException, org.apache.thrift.TException;
89
 
90
    /**
4555 mandeep.dh 91
     * Returns the purchase order object for a given purchase
4496 mandeep.dh 92
     * 
93
     * @param purchaseId
94
     */
4555 mandeep.dh 95
    public PurchaseOrder getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException;
4496 mandeep.dh 96
 
4754 mandeep.dh 97
    /**
98
     * Creates purchase order objects from pending orders
99
     * 
100
     * @param warehouseId
101
     */
102
    public List<PurchaseOrder> getPendingPurchaseOrders(long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException;
103
 
104
    /**
105
     * Returns all the valid suppliers
106
     */
107
    public List<Supplier> getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException;
108
 
109
    /**
110
     * Fulfills a given purchase order with an item.
111
     * 
112
     * @param purchaseOrderId
113
     * @param itemId
114
     * @param quantity
115
     */
116
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException;
117
 
118
    /**
119
     * Amends a PO as per the new lineitems passed
120
     * 
121
     * @param purchaseOrder
122
     */
123
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException;
124
 
5185 mandeep.dh 125
    /**
126
     * Fulfills a given purchase id with an item and its quantity.
127
     * 
128
     * @param purchaseId
129
     * @param itemId
130
     * @param quantity
131
     */
132
    public void unFulfillPO(long purchaseId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException;
133
 
5443 mandeep.dh 134
    /**
5530 mandeep.dh 135
     * Fetches all invoices after a given date
5443 mandeep.dh 136
     * 
137
     * @param date
138
     */
139
    public List<Invoice> getInvoices(long date) throws org.apache.thrift.TException;
140
 
141
    /**
7410 amar.kumar 142
     * Fetches all invoices after a given date
143
     * 
144
     * @param warehouseId
145
     * @param supplierId
146
     * @param date
147
     */
148
    public List<Invoice> getInvoicesForWarehouse(long warehouseId, long supplierId, long date) throws org.apache.thrift.TException;
149
 
150
    /**
5443 mandeep.dh 151
     * Creates an invoice object
152
     * 
153
     * @param invoice
154
     */
155
    public void createInvoice(Invoice invoice) throws PurchaseServiceException, org.apache.thrift.TException;
156
 
5591 mandeep.dh 157
    /**
158
     * Creates a supplier
159
     * 
160
     * @param supplier
161
     */
162
    public Supplier addSupplier(Supplier supplier) throws org.apache.thrift.TException;
163
 
164
    /**
165
     * Updates a supplier
166
     * 
167
     * @param supplier
168
     */
169
    public void updateSupplier(Supplier supplier) throws org.apache.thrift.TException;
170
 
6467 amar.kumar 171
    /**
172
     * Create a new Purchase Return
173
     * 
174
     * @param purchaseReturn
175
     */
176
    public long createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException;
177
 
178
    /**
179
     * Create a new Purchase Return
180
     * 
181
     * @param id
182
     */
183
    public void settlePurchaseReturn(long id) throws org.apache.thrift.TException;
184
 
185
    /**
186
     * Create a new Purchase Return
187
     */
188
    public List<PurchaseReturn> getUnsettledPurchaseReturns() throws org.apache.thrift.TException;
189
 
6630 amar.kumar 190
    /**
191
     * Get invoice with given supplierId and invoiceNumber
192
     * 
193
     * @param invoiceNumber
194
     * @param supplierId
195
     */
196
    public List<PurchaseReturn> getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException;
197
 
6762 amar.kumar 198
    /**
199
     *  * Inserts new Invoice/LineItem/Purchase Entries for Billed Product done through Our External Billing
200
     * *
201
     * 
202
     * @param invoiceNumber
203
     * @param unitPrice
7672 rajveer 204
     * @param nlc
6762 amar.kumar 205
     * @param itemId
206
     */
7672 rajveer 207
    public long createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId) throws org.apache.thrift.TException;
6762 amar.kumar 208
 
209
    public void fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException;
210
 
7410 amar.kumar 211
    /**
212
     * Marks a purchase order as closedcomplete and updates the receivedOn time.
213
     * 
214
     * @param poId
215
     */
216
    public void closePO(long poId) throws PurchaseServiceException, org.apache.thrift.TException;
217
 
218
    /**
219
     * Check if invoice is already received with given supplierId and invoiceNumber
220
     * 
221
     * @param invoiceNumber
222
     * @param supplierId
223
     */
224
    public boolean isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException;
225
 
9829 amar.kumar 226
    /**
227
     * Change warehouseId of PO if no items have been received yet for the PO
228
     * 
229
     * @param id
230
     * @param warehouseId
231
     */
232
    public void changeWarehouseForPO(long id, long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException;
233
 
9925 amar.kumar 234
    /**
235
     * Change status of PO
236
     * 
237
     * @param id
238
     * @param poStatus
239
     */
240
    public void changePOStatus(long id, POStatus poStatus) throws PurchaseServiceException, org.apache.thrift.TException;
241
 
11751 manish.sha 242
    /**
243
     * Get Purchase Return from Id
244
     * 
245
     * @param id
246
     */
247
    public PurchaseReturn getPurchaseReturn(long id) throws PurchaseServiceException, org.apache.thrift.TException;
248
 
13600 manish.sha 249
    public boolean markPurchasereturnSettled(long id, SettlementType settlementType, String documentNumber, String settlementBy, long settledAmount) throws PurchaseServiceException, org.apache.thrift.TException;
250
 
251
    public List<PurchaseReturnSettlement> getPrSettlementsForPurchaseReturn(long purchaseReturnId) throws PurchaseServiceException, org.apache.thrift.TException;
252
 
253
    public void updatePurchaseReturn(PurchaseReturn purchaseReturn) throws PurchaseServiceException, org.apache.thrift.TException;
254
 
4496 mandeep.dh 255
  }
256
 
257
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
258
 
259
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
260
 
261
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
262
 
263
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
264
 
265
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSupplier_call> resultHandler) throws org.apache.thrift.TException;
266
 
11801 manish.sha 267
    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 268
 
269
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePurchase_call> resultHandler) throws org.apache.thrift.TException;
270
 
271
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchases_call> resultHandler) throws org.apache.thrift.TException;
272
 
6385 amar.kumar 273
    public void getPurchasesForPO(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchasesForPO_call> resultHandler) throws org.apache.thrift.TException;
274
 
4555 mandeep.dh 275
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException;
4496 mandeep.dh 276
 
4754 mandeep.dh 277
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
278
 
279
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuppliers_call> resultHandler) throws org.apache.thrift.TException;
280
 
281
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fulfillPO_call> resultHandler) throws org.apache.thrift.TException;
282
 
283
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
284
 
5185 mandeep.dh 285
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.unFulfillPO_call> resultHandler) throws org.apache.thrift.TException;
286
 
5443 mandeep.dh 287
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoices_call> resultHandler) throws org.apache.thrift.TException;
288
 
7410 amar.kumar 289
    public void getInvoicesForWarehouse(long warehouseId, long supplierId, long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoicesForWarehouse_call> resultHandler) throws org.apache.thrift.TException;
290
 
5443 mandeep.dh 291
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createInvoice_call> resultHandler) throws org.apache.thrift.TException;
292
 
5591 mandeep.dh 293
    public void addSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addSupplier_call> resultHandler) throws org.apache.thrift.TException;
294
 
295
    public void updateSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateSupplier_call> resultHandler) throws org.apache.thrift.TException;
296
 
6467 amar.kumar 297
    public void createPurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
298
 
299
    public void settlePurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.settlePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
300
 
301
    public void getUnsettledPurchaseReturns(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUnsettledPurchaseReturns_call> resultHandler) throws org.apache.thrift.TException;
302
 
6630 amar.kumar 303
    public void getInvoice(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoice_call> resultHandler) throws org.apache.thrift.TException;
304
 
7672 rajveer 305
    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 306
 
307
    public void fulfillPOForExtBilling(long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fulfillPOForExtBilling_call> resultHandler) throws org.apache.thrift.TException;
308
 
7410 amar.kumar 309
    public void closePO(long poId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePO_call> resultHandler) throws org.apache.thrift.TException;
310
 
311
    public void isInvoiceReceived(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.isInvoiceReceived_call> resultHandler) throws org.apache.thrift.TException;
312
 
9829 amar.kumar 313
    public void changeWarehouseForPO(long id, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.changeWarehouseForPO_call> resultHandler) throws org.apache.thrift.TException;
314
 
9925 amar.kumar 315
    public void changePOStatus(long id, POStatus poStatus, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.changePOStatus_call> resultHandler) throws org.apache.thrift.TException;
316
 
11751 manish.sha 317
    public void getPurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
318
 
13600 manish.sha 319
    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;
320
 
321
    public void getPrSettlementsForPurchaseReturn(long purchaseReturnId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPrSettlementsForPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
322
 
323
    public void updatePurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updatePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
324
 
4496 mandeep.dh 325
  }
326
 
327
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
328
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
329
      public Factory() {}
330
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
331
        return new Client(prot);
332
      }
333
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
334
        return new Client(iprot, oprot);
335
      }
336
    }
337
 
338
    public Client(org.apache.thrift.protocol.TProtocol prot)
339
    {
340
      super(prot, prot);
341
    }
342
 
343
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
344
      super(iprot, oprot);
345
    }
346
 
347
    public long createPurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
348
    {
349
      send_createPurchaseOrder(purchaseOrder);
350
      return recv_createPurchaseOrder();
351
    }
352
 
353
    public void send_createPurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
354
    {
355
      createPurchaseOrder_args args = new createPurchaseOrder_args();
356
      args.setPurchaseOrder(purchaseOrder);
357
      sendBase("createPurchaseOrder", args);
358
    }
359
 
360
    public long recv_createPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
361
    {
362
      createPurchaseOrder_result result = new createPurchaseOrder_result();
363
      receiveBase(result, "createPurchaseOrder");
364
      if (result.isSetSuccess()) {
365
        return result.success;
366
      }
367
      if (result.e != null) {
368
        throw result.e;
369
      }
370
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseOrder failed: unknown result");
371
    }
372
 
373
    public PurchaseOrder getPurchaseOrder(long id) throws PurchaseServiceException, org.apache.thrift.TException
374
    {
375
      send_getPurchaseOrder(id);
376
      return recv_getPurchaseOrder();
377
    }
378
 
379
    public void send_getPurchaseOrder(long id) throws org.apache.thrift.TException
380
    {
381
      getPurchaseOrder_args args = new getPurchaseOrder_args();
382
      args.setId(id);
383
      sendBase("getPurchaseOrder", args);
384
    }
385
 
386
    public PurchaseOrder recv_getPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
387
    {
388
      getPurchaseOrder_result result = new getPurchaseOrder_result();
389
      receiveBase(result, "getPurchaseOrder");
390
      if (result.isSetSuccess()) {
391
        return result.success;
392
      }
393
      if (result.e != null) {
394
        throw result.e;
395
      }
396
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrder failed: unknown result");
397
    }
398
 
399
    public List<PurchaseOrder> getAllPurchaseOrders(POStatus status) throws PurchaseServiceException, org.apache.thrift.TException
400
    {
401
      send_getAllPurchaseOrders(status);
402
      return recv_getAllPurchaseOrders();
403
    }
404
 
405
    public void send_getAllPurchaseOrders(POStatus status) throws org.apache.thrift.TException
406
    {
407
      getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
408
      args.setStatus(status);
409
      sendBase("getAllPurchaseOrders", args);
410
    }
411
 
412
    public List<PurchaseOrder> recv_getAllPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
413
    {
414
      getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
415
      receiveBase(result, "getAllPurchaseOrders");
416
      if (result.isSetSuccess()) {
417
        return result.success;
418
      }
419
      if (result.e != null) {
420
        throw result.e;
421
      }
422
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchaseOrders failed: unknown result");
423
    }
424
 
425
    public Supplier getSupplier(long id) throws PurchaseServiceException, org.apache.thrift.TException
426
    {
427
      send_getSupplier(id);
428
      return recv_getSupplier();
429
    }
430
 
431
    public void send_getSupplier(long id) throws org.apache.thrift.TException
432
    {
433
      getSupplier_args args = new getSupplier_args();
434
      args.setId(id);
435
      sendBase("getSupplier", args);
436
    }
437
 
438
    public Supplier recv_getSupplier() throws PurchaseServiceException, org.apache.thrift.TException
439
    {
440
      getSupplier_result result = new getSupplier_result();
441
      receiveBase(result, "getSupplier");
442
      if (result.isSetSuccess()) {
443
        return result.success;
444
      }
445
      if (result.e != null) {
446
        throw result.e;
447
      }
448
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSupplier failed: unknown result");
449
    }
450
 
11801 manish.sha 451
    public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments) throws PurchaseServiceException, org.apache.thrift.TException
4496 mandeep.dh 452
    {
11801 manish.sha 453
      send_startPurchase(purchaseOrderId, invoiceNumber, freightCharges, purchaseComments);
4496 mandeep.dh 454
      return recv_startPurchase();
455
    }
456
 
11801 manish.sha 457
    public void send_startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments) throws org.apache.thrift.TException
4496 mandeep.dh 458
    {
459
      startPurchase_args args = new startPurchase_args();
460
      args.setPurchaseOrderId(purchaseOrderId);
461
      args.setInvoiceNumber(invoiceNumber);
462
      args.setFreightCharges(freightCharges);
11801 manish.sha 463
      args.setPurchaseComments(purchaseComments);
4496 mandeep.dh 464
      sendBase("startPurchase", args);
465
    }
466
 
467
    public long recv_startPurchase() throws PurchaseServiceException, org.apache.thrift.TException
468
    {
469
      startPurchase_result result = new startPurchase_result();
470
      receiveBase(result, "startPurchase");
471
      if (result.isSetSuccess()) {
472
        return result.success;
473
      }
474
      if (result.e != null) {
475
        throw result.e;
476
      }
477
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startPurchase failed: unknown result");
478
    }
479
 
480
    public long closePurchase(long purchaseId) throws PurchaseServiceException, org.apache.thrift.TException
481
    {
482
      send_closePurchase(purchaseId);
483
      return recv_closePurchase();
484
    }
485
 
486
    public void send_closePurchase(long purchaseId) throws org.apache.thrift.TException
487
    {
488
      closePurchase_args args = new closePurchase_args();
489
      args.setPurchaseId(purchaseId);
490
      sendBase("closePurchase", args);
491
    }
492
 
493
    public long recv_closePurchase() throws PurchaseServiceException, org.apache.thrift.TException
494
    {
495
      closePurchase_result result = new closePurchase_result();
496
      receiveBase(result, "closePurchase");
497
      if (result.isSetSuccess()) {
498
        return result.success;
499
      }
500
      if (result.e != null) {
501
        throw result.e;
502
      }
503
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "closePurchase failed: unknown result");
504
    }
505
 
506
    public List<Purchase> getAllPurchases(long purchaseOrderId, boolean open) throws PurchaseServiceException, org.apache.thrift.TException
507
    {
508
      send_getAllPurchases(purchaseOrderId, open);
509
      return recv_getAllPurchases();
510
    }
511
 
512
    public void send_getAllPurchases(long purchaseOrderId, boolean open) throws org.apache.thrift.TException
513
    {
514
      getAllPurchases_args args = new getAllPurchases_args();
515
      args.setPurchaseOrderId(purchaseOrderId);
516
      args.setOpen(open);
517
      sendBase("getAllPurchases", args);
518
    }
519
 
520
    public List<Purchase> recv_getAllPurchases() throws PurchaseServiceException, org.apache.thrift.TException
521
    {
522
      getAllPurchases_result result = new getAllPurchases_result();
523
      receiveBase(result, "getAllPurchases");
524
      if (result.isSetSuccess()) {
525
        return result.success;
526
      }
527
      if (result.e != null) {
528
        throw result.e;
529
      }
530
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchases failed: unknown result");
531
    }
532
 
6385 amar.kumar 533
    public List<Purchase> getPurchasesForPO(long purchaseOrderId) throws PurchaseServiceException, org.apache.thrift.TException
534
    {
535
      send_getPurchasesForPO(purchaseOrderId);
536
      return recv_getPurchasesForPO();
537
    }
538
 
539
    public void send_getPurchasesForPO(long purchaseOrderId) throws org.apache.thrift.TException
540
    {
541
      getPurchasesForPO_args args = new getPurchasesForPO_args();
542
      args.setPurchaseOrderId(purchaseOrderId);
543
      sendBase("getPurchasesForPO", args);
544
    }
545
 
546
    public List<Purchase> recv_getPurchasesForPO() throws PurchaseServiceException, org.apache.thrift.TException
547
    {
548
      getPurchasesForPO_result result = new getPurchasesForPO_result();
549
      receiveBase(result, "getPurchasesForPO");
550
      if (result.isSetSuccess()) {
551
        return result.success;
552
      }
553
      if (result.e != null) {
554
        throw result.e;
555
      }
556
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchasesForPO failed: unknown result");
557
    }
558
 
4555 mandeep.dh 559
    public PurchaseOrder getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 560
    {
4555 mandeep.dh 561
      send_getPurchaseOrderForPurchase(purchaseId);
562
      return recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 563
    }
564
 
4555 mandeep.dh 565
    public void send_getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 566
    {
4555 mandeep.dh 567
      getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 568
      args.setPurchaseId(purchaseId);
4555 mandeep.dh 569
      sendBase("getPurchaseOrderForPurchase", args);
4496 mandeep.dh 570
    }
571
 
4555 mandeep.dh 572
    public PurchaseOrder recv_getPurchaseOrderForPurchase() throws org.apache.thrift.TException
4496 mandeep.dh 573
    {
4555 mandeep.dh 574
      getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
575
      receiveBase(result, "getPurchaseOrderForPurchase");
4496 mandeep.dh 576
      if (result.isSetSuccess()) {
577
        return result.success;
578
      }
4555 mandeep.dh 579
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrderForPurchase failed: unknown result");
4496 mandeep.dh 580
    }
581
 
4754 mandeep.dh 582
    public List<PurchaseOrder> getPendingPurchaseOrders(long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException
583
    {
584
      send_getPendingPurchaseOrders(warehouseId);
585
      return recv_getPendingPurchaseOrders();
586
    }
587
 
588
    public void send_getPendingPurchaseOrders(long warehouseId) throws org.apache.thrift.TException
589
    {
590
      getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
591
      args.setWarehouseId(warehouseId);
592
      sendBase("getPendingPurchaseOrders", args);
593
    }
594
 
595
    public List<PurchaseOrder> recv_getPendingPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
596
    {
597
      getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
598
      receiveBase(result, "getPendingPurchaseOrders");
599
      if (result.isSetSuccess()) {
600
        return result.success;
601
      }
602
      if (result.e != null) {
603
        throw result.e;
604
      }
605
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPendingPurchaseOrders failed: unknown result");
606
    }
607
 
608
    public List<Supplier> getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
609
    {
610
      send_getSuppliers();
611
      return recv_getSuppliers();
612
    }
613
 
614
    public void send_getSuppliers() throws org.apache.thrift.TException
615
    {
616
      getSuppliers_args args = new getSuppliers_args();
617
      sendBase("getSuppliers", args);
618
    }
619
 
620
    public List<Supplier> recv_getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
621
    {
622
      getSuppliers_result result = new getSuppliers_result();
623
      receiveBase(result, "getSuppliers");
624
      if (result.isSetSuccess()) {
625
        return result.success;
626
      }
627
      if (result.e != null) {
628
        throw result.e;
629
      }
630
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSuppliers failed: unknown result");
631
    }
632
 
633
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
634
    {
635
      send_fulfillPO(purchaseOrderId, itemId, quantity);
636
      recv_fulfillPO();
637
    }
638
 
639
    public void send_fulfillPO(long purchaseOrderId, long itemId, long quantity) throws org.apache.thrift.TException
640
    {
641
      fulfillPO_args args = new fulfillPO_args();
642
      args.setPurchaseOrderId(purchaseOrderId);
643
      args.setItemId(itemId);
644
      args.setQuantity(quantity);
645
      sendBase("fulfillPO", args);
646
    }
647
 
648
    public void recv_fulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
649
    {
650
      fulfillPO_result result = new fulfillPO_result();
651
      receiveBase(result, "fulfillPO");
652
      if (result.e != null) {
653
        throw result.e;
654
      }
655
      return;
656
    }
657
 
658
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
659
    {
660
      send_updatePurchaseOrder(purchaseOrder);
661
      recv_updatePurchaseOrder();
662
    }
663
 
664
    public void send_updatePurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
665
    {
666
      updatePurchaseOrder_args args = new updatePurchaseOrder_args();
667
      args.setPurchaseOrder(purchaseOrder);
668
      sendBase("updatePurchaseOrder", args);
669
    }
670
 
671
    public void recv_updatePurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
672
    {
673
      updatePurchaseOrder_result result = new updatePurchaseOrder_result();
674
      receiveBase(result, "updatePurchaseOrder");
675
      if (result.e != null) {
676
        throw result.e;
677
      }
678
      return;
679
    }
680
 
5185 mandeep.dh 681
    public void unFulfillPO(long purchaseId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
682
    {
683
      send_unFulfillPO(purchaseId, itemId, quantity);
684
      recv_unFulfillPO();
685
    }
686
 
687
    public void send_unFulfillPO(long purchaseId, long itemId, long quantity) throws org.apache.thrift.TException
688
    {
689
      unFulfillPO_args args = new unFulfillPO_args();
690
      args.setPurchaseId(purchaseId);
691
      args.setItemId(itemId);
692
      args.setQuantity(quantity);
693
      sendBase("unFulfillPO", args);
694
    }
695
 
696
    public void recv_unFulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
697
    {
698
      unFulfillPO_result result = new unFulfillPO_result();
699
      receiveBase(result, "unFulfillPO");
700
      if (result.e != null) {
701
        throw result.e;
702
      }
703
      return;
704
    }
705
 
5443 mandeep.dh 706
    public List<Invoice> getInvoices(long date) throws org.apache.thrift.TException
707
    {
708
      send_getInvoices(date);
709
      return recv_getInvoices();
710
    }
711
 
712
    public void send_getInvoices(long date) throws org.apache.thrift.TException
713
    {
714
      getInvoices_args args = new getInvoices_args();
715
      args.setDate(date);
716
      sendBase("getInvoices", args);
717
    }
718
 
719
    public List<Invoice> recv_getInvoices() throws org.apache.thrift.TException
720
    {
721
      getInvoices_result result = new getInvoices_result();
722
      receiveBase(result, "getInvoices");
723
      if (result.isSetSuccess()) {
724
        return result.success;
725
      }
726
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoices failed: unknown result");
727
    }
728
 
7410 amar.kumar 729
    public List<Invoice> getInvoicesForWarehouse(long warehouseId, long supplierId, long date) throws org.apache.thrift.TException
730
    {
731
      send_getInvoicesForWarehouse(warehouseId, supplierId, date);
732
      return recv_getInvoicesForWarehouse();
733
    }
734
 
735
    public void send_getInvoicesForWarehouse(long warehouseId, long supplierId, long date) throws org.apache.thrift.TException
736
    {
737
      getInvoicesForWarehouse_args args = new getInvoicesForWarehouse_args();
738
      args.setWarehouseId(warehouseId);
739
      args.setSupplierId(supplierId);
740
      args.setDate(date);
741
      sendBase("getInvoicesForWarehouse", args);
742
    }
743
 
744
    public List<Invoice> recv_getInvoicesForWarehouse() throws org.apache.thrift.TException
745
    {
746
      getInvoicesForWarehouse_result result = new getInvoicesForWarehouse_result();
747
      receiveBase(result, "getInvoicesForWarehouse");
748
      if (result.isSetSuccess()) {
749
        return result.success;
750
      }
751
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoicesForWarehouse failed: unknown result");
752
    }
753
 
5443 mandeep.dh 754
    public void createInvoice(Invoice invoice) throws PurchaseServiceException, org.apache.thrift.TException
755
    {
756
      send_createInvoice(invoice);
757
      recv_createInvoice();
758
    }
759
 
760
    public void send_createInvoice(Invoice invoice) throws org.apache.thrift.TException
761
    {
762
      createInvoice_args args = new createInvoice_args();
763
      args.setInvoice(invoice);
764
      sendBase("createInvoice", args);
765
    }
766
 
767
    public void recv_createInvoice() throws PurchaseServiceException, org.apache.thrift.TException
768
    {
769
      createInvoice_result result = new createInvoice_result();
770
      receiveBase(result, "createInvoice");
771
      if (result.e != null) {
772
        throw result.e;
773
      }
774
      return;
775
    }
776
 
5591 mandeep.dh 777
    public Supplier addSupplier(Supplier supplier) throws org.apache.thrift.TException
778
    {
779
      send_addSupplier(supplier);
780
      return recv_addSupplier();
781
    }
782
 
783
    public void send_addSupplier(Supplier supplier) throws org.apache.thrift.TException
784
    {
785
      addSupplier_args args = new addSupplier_args();
786
      args.setSupplier(supplier);
787
      sendBase("addSupplier", args);
788
    }
789
 
790
    public Supplier recv_addSupplier() throws org.apache.thrift.TException
791
    {
792
      addSupplier_result result = new addSupplier_result();
793
      receiveBase(result, "addSupplier");
794
      if (result.isSetSuccess()) {
795
        return result.success;
796
      }
797
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addSupplier failed: unknown result");
798
    }
799
 
800
    public void updateSupplier(Supplier supplier) throws org.apache.thrift.TException
801
    {
802
      send_updateSupplier(supplier);
803
      recv_updateSupplier();
804
    }
805
 
806
    public void send_updateSupplier(Supplier supplier) throws org.apache.thrift.TException
807
    {
808
      updateSupplier_args args = new updateSupplier_args();
809
      args.setSupplier(supplier);
810
      sendBase("updateSupplier", args);
811
    }
812
 
813
    public void recv_updateSupplier() throws org.apache.thrift.TException
814
    {
815
      updateSupplier_result result = new updateSupplier_result();
816
      receiveBase(result, "updateSupplier");
817
      return;
818
    }
819
 
6467 amar.kumar 820
    public long createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
821
    {
822
      send_createPurchaseReturn(purchaseReturn);
823
      return recv_createPurchaseReturn();
824
    }
825
 
826
    public void send_createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
827
    {
828
      createPurchaseReturn_args args = new createPurchaseReturn_args();
829
      args.setPurchaseReturn(purchaseReturn);
830
      sendBase("createPurchaseReturn", args);
831
    }
832
 
833
    public long recv_createPurchaseReturn() throws org.apache.thrift.TException
834
    {
835
      createPurchaseReturn_result result = new createPurchaseReturn_result();
836
      receiveBase(result, "createPurchaseReturn");
837
      if (result.isSetSuccess()) {
838
        return result.success;
839
      }
840
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseReturn failed: unknown result");
841
    }
842
 
843
    public void settlePurchaseReturn(long id) throws org.apache.thrift.TException
844
    {
845
      send_settlePurchaseReturn(id);
846
      recv_settlePurchaseReturn();
847
    }
848
 
849
    public void send_settlePurchaseReturn(long id) throws org.apache.thrift.TException
850
    {
851
      settlePurchaseReturn_args args = new settlePurchaseReturn_args();
852
      args.setId(id);
853
      sendBase("settlePurchaseReturn", args);
854
    }
855
 
856
    public void recv_settlePurchaseReturn() throws org.apache.thrift.TException
857
    {
858
      settlePurchaseReturn_result result = new settlePurchaseReturn_result();
859
      receiveBase(result, "settlePurchaseReturn");
860
      return;
861
    }
862
 
863
    public List<PurchaseReturn> getUnsettledPurchaseReturns() throws org.apache.thrift.TException
864
    {
865
      send_getUnsettledPurchaseReturns();
866
      return recv_getUnsettledPurchaseReturns();
867
    }
868
 
869
    public void send_getUnsettledPurchaseReturns() throws org.apache.thrift.TException
870
    {
871
      getUnsettledPurchaseReturns_args args = new getUnsettledPurchaseReturns_args();
872
      sendBase("getUnsettledPurchaseReturns", args);
873
    }
874
 
875
    public List<PurchaseReturn> recv_getUnsettledPurchaseReturns() throws org.apache.thrift.TException
876
    {
877
      getUnsettledPurchaseReturns_result result = new getUnsettledPurchaseReturns_result();
878
      receiveBase(result, "getUnsettledPurchaseReturns");
879
      if (result.isSetSuccess()) {
880
        return result.success;
881
      }
882
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUnsettledPurchaseReturns failed: unknown result");
883
    }
884
 
6630 amar.kumar 885
    public List<PurchaseReturn> getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
886
    {
887
      send_getInvoice(invoiceNumber, supplierId);
888
      return recv_getInvoice();
889
    }
890
 
891
    public void send_getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
892
    {
893
      getInvoice_args args = new getInvoice_args();
894
      args.setInvoiceNumber(invoiceNumber);
895
      args.setSupplierId(supplierId);
896
      sendBase("getInvoice", args);
897
    }
898
 
899
    public List<PurchaseReturn> recv_getInvoice() throws org.apache.thrift.TException
900
    {
901
      getInvoice_result result = new getInvoice_result();
902
      receiveBase(result, "getInvoice");
903
      if (result.isSetSuccess()) {
904
        return result.success;
905
      }
906
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoice failed: unknown result");
907
    }
908
 
7672 rajveer 909
    public long createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId) throws org.apache.thrift.TException
6762 amar.kumar 910
    {
7672 rajveer 911
      send_createPurchaseForOurExtBilling(invoiceNumber, unitPrice, nlc, itemId);
6762 amar.kumar 912
      return recv_createPurchaseForOurExtBilling();
913
    }
914
 
7672 rajveer 915
    public void send_createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId) throws org.apache.thrift.TException
6762 amar.kumar 916
    {
917
      createPurchaseForOurExtBilling_args args = new createPurchaseForOurExtBilling_args();
918
      args.setInvoiceNumber(invoiceNumber);
919
      args.setUnitPrice(unitPrice);
7672 rajveer 920
      args.setNlc(nlc);
6762 amar.kumar 921
      args.setItemId(itemId);
922
      sendBase("createPurchaseForOurExtBilling", args);
923
    }
924
 
925
    public long recv_createPurchaseForOurExtBilling() throws org.apache.thrift.TException
926
    {
927
      createPurchaseForOurExtBilling_result result = new createPurchaseForOurExtBilling_result();
928
      receiveBase(result, "createPurchaseForOurExtBilling");
929
      if (result.isSetSuccess()) {
930
        return result.success;
931
      }
932
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseForOurExtBilling failed: unknown result");
933
    }
934
 
935
    public void fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException
936
    {
937
      send_fulfillPOForExtBilling(itemId, quantity);
938
      recv_fulfillPOForExtBilling();
939
    }
940
 
941
    public void send_fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException
942
    {
943
      fulfillPOForExtBilling_args args = new fulfillPOForExtBilling_args();
944
      args.setItemId(itemId);
945
      args.setQuantity(quantity);
946
      sendBase("fulfillPOForExtBilling", args);
947
    }
948
 
949
    public void recv_fulfillPOForExtBilling() throws org.apache.thrift.TException
950
    {
951
      fulfillPOForExtBilling_result result = new fulfillPOForExtBilling_result();
952
      receiveBase(result, "fulfillPOForExtBilling");
953
      return;
954
    }
955
 
7410 amar.kumar 956
    public void closePO(long poId) throws PurchaseServiceException, org.apache.thrift.TException
957
    {
958
      send_closePO(poId);
959
      recv_closePO();
960
    }
961
 
962
    public void send_closePO(long poId) throws org.apache.thrift.TException
963
    {
964
      closePO_args args = new closePO_args();
965
      args.setPoId(poId);
966
      sendBase("closePO", args);
967
    }
968
 
969
    public void recv_closePO() throws PurchaseServiceException, org.apache.thrift.TException
970
    {
971
      closePO_result result = new closePO_result();
972
      receiveBase(result, "closePO");
973
      if (result.e != null) {
974
        throw result.e;
975
      }
976
      return;
977
    }
978
 
979
    public boolean isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
980
    {
981
      send_isInvoiceReceived(invoiceNumber, supplierId);
982
      return recv_isInvoiceReceived();
983
    }
984
 
985
    public void send_isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
986
    {
987
      isInvoiceReceived_args args = new isInvoiceReceived_args();
988
      args.setInvoiceNumber(invoiceNumber);
989
      args.setSupplierId(supplierId);
990
      sendBase("isInvoiceReceived", args);
991
    }
992
 
993
    public boolean recv_isInvoiceReceived() throws org.apache.thrift.TException
994
    {
995
      isInvoiceReceived_result result = new isInvoiceReceived_result();
996
      receiveBase(result, "isInvoiceReceived");
997
      if (result.isSetSuccess()) {
998
        return result.success;
999
      }
1000
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isInvoiceReceived failed: unknown result");
1001
    }
1002
 
9829 amar.kumar 1003
    public void changeWarehouseForPO(long id, long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException
1004
    {
1005
      send_changeWarehouseForPO(id, warehouseId);
1006
      recv_changeWarehouseForPO();
1007
    }
1008
 
1009
    public void send_changeWarehouseForPO(long id, long warehouseId) throws org.apache.thrift.TException
1010
    {
1011
      changeWarehouseForPO_args args = new changeWarehouseForPO_args();
1012
      args.setId(id);
1013
      args.setWarehouseId(warehouseId);
1014
      sendBase("changeWarehouseForPO", args);
1015
    }
1016
 
1017
    public void recv_changeWarehouseForPO() throws PurchaseServiceException, org.apache.thrift.TException
1018
    {
1019
      changeWarehouseForPO_result result = new changeWarehouseForPO_result();
1020
      receiveBase(result, "changeWarehouseForPO");
1021
      if (result.e != null) {
1022
        throw result.e;
1023
      }
1024
      return;
1025
    }
1026
 
9925 amar.kumar 1027
    public void changePOStatus(long id, POStatus poStatus) throws PurchaseServiceException, org.apache.thrift.TException
1028
    {
1029
      send_changePOStatus(id, poStatus);
1030
      recv_changePOStatus();
1031
    }
1032
 
1033
    public void send_changePOStatus(long id, POStatus poStatus) throws org.apache.thrift.TException
1034
    {
1035
      changePOStatus_args args = new changePOStatus_args();
1036
      args.setId(id);
1037
      args.setPoStatus(poStatus);
1038
      sendBase("changePOStatus", args);
1039
    }
1040
 
1041
    public void recv_changePOStatus() throws PurchaseServiceException, org.apache.thrift.TException
1042
    {
1043
      changePOStatus_result result = new changePOStatus_result();
1044
      receiveBase(result, "changePOStatus");
1045
      if (result.e != null) {
1046
        throw result.e;
1047
      }
1048
      return;
1049
    }
1050
 
11751 manish.sha 1051
    public PurchaseReturn getPurchaseReturn(long id) throws PurchaseServiceException, org.apache.thrift.TException
1052
    {
1053
      send_getPurchaseReturn(id);
1054
      return recv_getPurchaseReturn();
1055
    }
1056
 
1057
    public void send_getPurchaseReturn(long id) throws org.apache.thrift.TException
1058
    {
1059
      getPurchaseReturn_args args = new getPurchaseReturn_args();
1060
      args.setId(id);
1061
      sendBase("getPurchaseReturn", args);
1062
    }
1063
 
1064
    public PurchaseReturn recv_getPurchaseReturn() throws PurchaseServiceException, org.apache.thrift.TException
1065
    {
1066
      getPurchaseReturn_result result = new getPurchaseReturn_result();
1067
      receiveBase(result, "getPurchaseReturn");
1068
      if (result.isSetSuccess()) {
1069
        return result.success;
1070
      }
1071
      if (result.e != null) {
1072
        throw result.e;
1073
      }
1074
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseReturn failed: unknown result");
1075
    }
1076
 
13600 manish.sha 1077
    public boolean markPurchasereturnSettled(long id, SettlementType settlementType, String documentNumber, String settlementBy, long settledAmount) throws PurchaseServiceException, org.apache.thrift.TException
1078
    {
1079
      send_markPurchasereturnSettled(id, settlementType, documentNumber, settlementBy, settledAmount);
1080
      return recv_markPurchasereturnSettled();
1081
    }
1082
 
1083
    public void send_markPurchasereturnSettled(long id, SettlementType settlementType, String documentNumber, String settlementBy, long settledAmount) throws org.apache.thrift.TException
1084
    {
1085
      markPurchasereturnSettled_args args = new markPurchasereturnSettled_args();
1086
      args.setId(id);
1087
      args.setSettlementType(settlementType);
1088
      args.setDocumentNumber(documentNumber);
1089
      args.setSettlementBy(settlementBy);
1090
      args.setSettledAmount(settledAmount);
1091
      sendBase("markPurchasereturnSettled", args);
1092
    }
1093
 
1094
    public boolean recv_markPurchasereturnSettled() throws PurchaseServiceException, org.apache.thrift.TException
1095
    {
1096
      markPurchasereturnSettled_result result = new markPurchasereturnSettled_result();
1097
      receiveBase(result, "markPurchasereturnSettled");
1098
      if (result.isSetSuccess()) {
1099
        return result.success;
1100
      }
1101
      if (result.e != null) {
1102
        throw result.e;
1103
      }
1104
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "markPurchasereturnSettled failed: unknown result");
1105
    }
1106
 
1107
    public List<PurchaseReturnSettlement> getPrSettlementsForPurchaseReturn(long purchaseReturnId) throws PurchaseServiceException, org.apache.thrift.TException
1108
    {
1109
      send_getPrSettlementsForPurchaseReturn(purchaseReturnId);
1110
      return recv_getPrSettlementsForPurchaseReturn();
1111
    }
1112
 
1113
    public void send_getPrSettlementsForPurchaseReturn(long purchaseReturnId) throws org.apache.thrift.TException
1114
    {
1115
      getPrSettlementsForPurchaseReturn_args args = new getPrSettlementsForPurchaseReturn_args();
1116
      args.setPurchaseReturnId(purchaseReturnId);
1117
      sendBase("getPrSettlementsForPurchaseReturn", args);
1118
    }
1119
 
1120
    public List<PurchaseReturnSettlement> recv_getPrSettlementsForPurchaseReturn() throws PurchaseServiceException, org.apache.thrift.TException
1121
    {
1122
      getPrSettlementsForPurchaseReturn_result result = new getPrSettlementsForPurchaseReturn_result();
1123
      receiveBase(result, "getPrSettlementsForPurchaseReturn");
1124
      if (result.isSetSuccess()) {
1125
        return result.success;
1126
      }
1127
      if (result.e != null) {
1128
        throw result.e;
1129
      }
1130
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPrSettlementsForPurchaseReturn failed: unknown result");
1131
    }
1132
 
1133
    public void updatePurchaseReturn(PurchaseReturn purchaseReturn) throws PurchaseServiceException, org.apache.thrift.TException
1134
    {
1135
      send_updatePurchaseReturn(purchaseReturn);
1136
      recv_updatePurchaseReturn();
1137
    }
1138
 
1139
    public void send_updatePurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
1140
    {
1141
      updatePurchaseReturn_args args = new updatePurchaseReturn_args();
1142
      args.setPurchaseReturn(purchaseReturn);
1143
      sendBase("updatePurchaseReturn", args);
1144
    }
1145
 
1146
    public void recv_updatePurchaseReturn() throws PurchaseServiceException, org.apache.thrift.TException
1147
    {
1148
      updatePurchaseReturn_result result = new updatePurchaseReturn_result();
1149
      receiveBase(result, "updatePurchaseReturn");
1150
      if (result.e != null) {
1151
        throw result.e;
1152
      }
1153
      return;
1154
    }
1155
 
4496 mandeep.dh 1156
  }
1157
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
1158
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
1159
      private org.apache.thrift.async.TAsyncClientManager clientManager;
1160
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
1161
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
1162
        this.clientManager = clientManager;
1163
        this.protocolFactory = protocolFactory;
1164
      }
1165
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
1166
        return new AsyncClient(protocolFactory, clientManager, transport);
1167
      }
1168
    }
1169
 
1170
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
1171
      super(protocolFactory, clientManager, transport);
1172
    }
1173
 
1174
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1175
      checkReady();
1176
      createPurchaseOrder_call method_call = new createPurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
1177
      this.___currentMethod = method_call;
1178
      ___manager.call(method_call);
1179
    }
1180
 
1181
    public static class createPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1182
      private PurchaseOrder purchaseOrder;
1183
      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 {
1184
        super(client, protocolFactory, transport, resultHandler, false);
1185
        this.purchaseOrder = purchaseOrder;
1186
      }
1187
 
1188
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1189
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1190
        createPurchaseOrder_args args = new createPurchaseOrder_args();
1191
        args.setPurchaseOrder(purchaseOrder);
1192
        args.write(prot);
1193
        prot.writeMessageEnd();
1194
      }
1195
 
1196
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1197
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1198
          throw new IllegalStateException("Method call not finished!");
1199
        }
1200
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1201
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1202
        return (new Client(prot)).recv_createPurchaseOrder();
1203
      }
1204
    }
1205
 
1206
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1207
      checkReady();
1208
      getPurchaseOrder_call method_call = new getPurchaseOrder_call(id, resultHandler, this, ___protocolFactory, ___transport);
1209
      this.___currentMethod = method_call;
1210
      ___manager.call(method_call);
1211
    }
1212
 
1213
    public static class getPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1214
      private long id;
1215
      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 {
1216
        super(client, protocolFactory, transport, resultHandler, false);
1217
        this.id = id;
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("getPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1222
        getPurchaseOrder_args args = new getPurchaseOrder_args();
1223
        args.setId(id);
1224
        args.write(prot);
1225
        prot.writeMessageEnd();
1226
      }
1227
 
1228
      public PurchaseOrder 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_getPurchaseOrder();
1235
      }
1236
    }
1237
 
1238
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
1239
      checkReady();
1240
      getAllPurchaseOrders_call method_call = new getAllPurchaseOrders_call(status, resultHandler, this, ___protocolFactory, ___transport);
1241
      this.___currentMethod = method_call;
1242
      ___manager.call(method_call);
1243
    }
1244
 
1245
    public static class getAllPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
1246
      private POStatus status;
1247
      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 {
1248
        super(client, protocolFactory, transport, resultHandler, false);
1249
        this.status = status;
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("getAllPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
1254
        getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
1255
        args.setStatus(status);
1256
        args.write(prot);
1257
        prot.writeMessageEnd();
1258
      }
1259
 
1260
      public List<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_getAllPurchaseOrders();
1267
      }
1268
    }
1269
 
1270
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<getSupplier_call> resultHandler) throws org.apache.thrift.TException {
1271
      checkReady();
1272
      getSupplier_call method_call = new getSupplier_call(id, resultHandler, this, ___protocolFactory, ___transport);
1273
      this.___currentMethod = method_call;
1274
      ___manager.call(method_call);
1275
    }
1276
 
1277
    public static class getSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1278
      private long id;
1279
      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 {
1280
        super(client, protocolFactory, transport, resultHandler, false);
1281
        this.id = id;
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("getSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1286
        getSupplier_args args = new getSupplier_args();
1287
        args.setId(id);
1288
        args.write(prot);
1289
        prot.writeMessageEnd();
1290
      }
1291
 
1292
      public Supplier 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_getSupplier();
1299
      }
1300
    }
1301
 
11801 manish.sha 1302
    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 1303
      checkReady();
11801 manish.sha 1304
      startPurchase_call method_call = new startPurchase_call(purchaseOrderId, invoiceNumber, freightCharges, purchaseComments, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 1305
      this.___currentMethod = method_call;
1306
      ___manager.call(method_call);
1307
    }
1308
 
1309
    public static class startPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
1310
      private long purchaseOrderId;
1311
      private String invoiceNumber;
1312
      private double freightCharges;
11801 manish.sha 1313
      private String purchaseComments;
1314
      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 1315
        super(client, protocolFactory, transport, resultHandler, false);
1316
        this.purchaseOrderId = purchaseOrderId;
1317
        this.invoiceNumber = invoiceNumber;
1318
        this.freightCharges = freightCharges;
11801 manish.sha 1319
        this.purchaseComments = purchaseComments;
4496 mandeep.dh 1320
      }
1321
 
1322
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1323
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1324
        startPurchase_args args = new startPurchase_args();
1325
        args.setPurchaseOrderId(purchaseOrderId);
1326
        args.setInvoiceNumber(invoiceNumber);
1327
        args.setFreightCharges(freightCharges);
11801 manish.sha 1328
        args.setPurchaseComments(purchaseComments);
4496 mandeep.dh 1329
        args.write(prot);
1330
        prot.writeMessageEnd();
1331
      }
1332
 
1333
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1334
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1335
          throw new IllegalStateException("Method call not finished!");
1336
        }
1337
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1338
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1339
        return (new Client(prot)).recv_startPurchase();
1340
      }
1341
    }
1342
 
1343
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<closePurchase_call> resultHandler) throws org.apache.thrift.TException {
1344
      checkReady();
1345
      closePurchase_call method_call = new closePurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
1346
      this.___currentMethod = method_call;
1347
      ___manager.call(method_call);
1348
    }
1349
 
1350
    public static class closePurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
1351
      private long purchaseId;
1352
      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 {
1353
        super(client, protocolFactory, transport, resultHandler, false);
1354
        this.purchaseId = purchaseId;
1355
      }
1356
 
1357
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1358
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closePurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1359
        closePurchase_args args = new closePurchase_args();
1360
        args.setPurchaseId(purchaseId);
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_closePurchase();
1372
      }
1373
    }
1374
 
1375
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<getAllPurchases_call> resultHandler) throws org.apache.thrift.TException {
1376
      checkReady();
1377
      getAllPurchases_call method_call = new getAllPurchases_call(purchaseOrderId, open, resultHandler, this, ___protocolFactory, ___transport);
1378
      this.___currentMethod = method_call;
1379
      ___manager.call(method_call);
1380
    }
1381
 
1382
    public static class getAllPurchases_call extends org.apache.thrift.async.TAsyncMethodCall {
1383
      private long purchaseOrderId;
1384
      private boolean open;
1385
      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 {
1386
        super(client, protocolFactory, transport, resultHandler, false);
1387
        this.purchaseOrderId = purchaseOrderId;
1388
        this.open = open;
1389
      }
1390
 
1391
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1392
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPurchases", org.apache.thrift.protocol.TMessageType.CALL, 0));
1393
        getAllPurchases_args args = new getAllPurchases_args();
1394
        args.setPurchaseOrderId(purchaseOrderId);
1395
        args.setOpen(open);
1396
        args.write(prot);
1397
        prot.writeMessageEnd();
1398
      }
1399
 
1400
      public List<Purchase> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1401
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1402
          throw new IllegalStateException("Method call not finished!");
1403
        }
1404
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1405
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1406
        return (new Client(prot)).recv_getAllPurchases();
1407
      }
1408
    }
1409
 
6385 amar.kumar 1410
    public void getPurchasesForPO(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<getPurchasesForPO_call> resultHandler) throws org.apache.thrift.TException {
1411
      checkReady();
1412
      getPurchasesForPO_call method_call = new getPurchasesForPO_call(purchaseOrderId, resultHandler, this, ___protocolFactory, ___transport);
1413
      this.___currentMethod = method_call;
1414
      ___manager.call(method_call);
1415
    }
1416
 
1417
    public static class getPurchasesForPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1418
      private long purchaseOrderId;
1419
      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 {
1420
        super(client, protocolFactory, transport, resultHandler, false);
1421
        this.purchaseOrderId = purchaseOrderId;
1422
      }
1423
 
1424
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1425
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchasesForPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1426
        getPurchasesForPO_args args = new getPurchasesForPO_args();
1427
        args.setPurchaseOrderId(purchaseOrderId);
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_getPurchasesForPO();
1439
      }
1440
    }
1441
 
4555 mandeep.dh 1442
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException {
4496 mandeep.dh 1443
      checkReady();
4555 mandeep.dh 1444
      getPurchaseOrderForPurchase_call method_call = new getPurchaseOrderForPurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 1445
      this.___currentMethod = method_call;
1446
      ___manager.call(method_call);
1447
    }
1448
 
4555 mandeep.dh 1449
    public static class getPurchaseOrderForPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
4496 mandeep.dh 1450
      private long purchaseId;
4555 mandeep.dh 1451
      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 1452
        super(client, protocolFactory, transport, resultHandler, false);
1453
        this.purchaseId = purchaseId;
1454
      }
1455
 
1456
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4555 mandeep.dh 1457
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrderForPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1458
        getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 1459
        args.setPurchaseId(purchaseId);
1460
        args.write(prot);
1461
        prot.writeMessageEnd();
1462
      }
1463
 
4555 mandeep.dh 1464
      public PurchaseOrder getResult() throws org.apache.thrift.TException {
4496 mandeep.dh 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);
4555 mandeep.dh 1470
        return (new Client(prot)).recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 1471
      }
1472
    }
1473
 
4754 mandeep.dh 1474
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
1475
      checkReady();
1476
      getPendingPurchaseOrders_call method_call = new getPendingPurchaseOrders_call(warehouseId, resultHandler, this, ___protocolFactory, ___transport);
1477
      this.___currentMethod = method_call;
1478
      ___manager.call(method_call);
1479
    }
1480
 
1481
    public static class getPendingPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
1482
      private long warehouseId;
1483
      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 {
1484
        super(client, protocolFactory, transport, resultHandler, false);
1485
        this.warehouseId = warehouseId;
1486
      }
1487
 
1488
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1489
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPendingPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
1490
        getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
1491
        args.setWarehouseId(warehouseId);
1492
        args.write(prot);
1493
        prot.writeMessageEnd();
1494
      }
1495
 
1496
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
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);
1502
        return (new Client(prot)).recv_getPendingPurchaseOrders();
1503
      }
1504
    }
1505
 
1506
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<getSuppliers_call> resultHandler) throws org.apache.thrift.TException {
1507
      checkReady();
1508
      getSuppliers_call method_call = new getSuppliers_call(resultHandler, this, ___protocolFactory, ___transport);
1509
      this.___currentMethod = method_call;
1510
      ___manager.call(method_call);
1511
    }
1512
 
1513
    public static class getSuppliers_call extends org.apache.thrift.async.TAsyncMethodCall {
1514
      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 {
1515
        super(client, protocolFactory, transport, resultHandler, false);
1516
      }
1517
 
1518
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1519
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSuppliers", org.apache.thrift.protocol.TMessageType.CALL, 0));
1520
        getSuppliers_args args = new getSuppliers_args();
1521
        args.write(prot);
1522
        prot.writeMessageEnd();
1523
      }
1524
 
1525
      public List<Supplier> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1526
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1527
          throw new IllegalStateException("Method call not finished!");
1528
        }
1529
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1530
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1531
        return (new Client(prot)).recv_getSuppliers();
1532
      }
1533
    }
1534
 
1535
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPO_call> resultHandler) throws org.apache.thrift.TException {
1536
      checkReady();
1537
      fulfillPO_call method_call = new fulfillPO_call(purchaseOrderId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1538
      this.___currentMethod = method_call;
1539
      ___manager.call(method_call);
1540
    }
1541
 
1542
    public static class fulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1543
      private long purchaseOrderId;
1544
      private long itemId;
1545
      private long quantity;
1546
      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 {
1547
        super(client, protocolFactory, transport, resultHandler, false);
1548
        this.purchaseOrderId = purchaseOrderId;
1549
        this.itemId = itemId;
1550
        this.quantity = quantity;
1551
      }
1552
 
1553
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1554
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1555
        fulfillPO_args args = new fulfillPO_args();
1556
        args.setPurchaseOrderId(purchaseOrderId);
1557
        args.setItemId(itemId);
1558
        args.setQuantity(quantity);
1559
        args.write(prot);
1560
        prot.writeMessageEnd();
1561
      }
1562
 
1563
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1564
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1565
          throw new IllegalStateException("Method call not finished!");
1566
        }
1567
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1568
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1569
        (new Client(prot)).recv_fulfillPO();
1570
      }
1571
    }
1572
 
1573
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1574
      checkReady();
1575
      updatePurchaseOrder_call method_call = new updatePurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
1576
      this.___currentMethod = method_call;
1577
      ___manager.call(method_call);
1578
    }
1579
 
1580
    public static class updatePurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1581
      private PurchaseOrder purchaseOrder;
1582
      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 {
1583
        super(client, protocolFactory, transport, resultHandler, false);
1584
        this.purchaseOrder = purchaseOrder;
1585
      }
1586
 
1587
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1588
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updatePurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1589
        updatePurchaseOrder_args args = new updatePurchaseOrder_args();
1590
        args.setPurchaseOrder(purchaseOrder);
1591
        args.write(prot);
1592
        prot.writeMessageEnd();
1593
      }
1594
 
1595
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1596
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1597
          throw new IllegalStateException("Method call not finished!");
1598
        }
1599
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1600
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1601
        (new Client(prot)).recv_updatePurchaseOrder();
1602
      }
1603
    }
1604
 
5185 mandeep.dh 1605
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<unFulfillPO_call> resultHandler) throws org.apache.thrift.TException {
1606
      checkReady();
1607
      unFulfillPO_call method_call = new unFulfillPO_call(purchaseId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1608
      this.___currentMethod = method_call;
1609
      ___manager.call(method_call);
1610
    }
1611
 
1612
    public static class unFulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1613
      private long purchaseId;
1614
      private long itemId;
1615
      private long quantity;
1616
      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 {
1617
        super(client, protocolFactory, transport, resultHandler, false);
1618
        this.purchaseId = purchaseId;
1619
        this.itemId = itemId;
1620
        this.quantity = quantity;
1621
      }
1622
 
1623
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1624
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unFulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1625
        unFulfillPO_args args = new unFulfillPO_args();
1626
        args.setPurchaseId(purchaseId);
1627
        args.setItemId(itemId);
1628
        args.setQuantity(quantity);
1629
        args.write(prot);
1630
        prot.writeMessageEnd();
1631
      }
1632
 
1633
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1634
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1635
          throw new IllegalStateException("Method call not finished!");
1636
        }
1637
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1638
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1639
        (new Client(prot)).recv_unFulfillPO();
1640
      }
1641
    }
1642
 
5443 mandeep.dh 1643
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<getInvoices_call> resultHandler) throws org.apache.thrift.TException {
1644
      checkReady();
1645
      getInvoices_call method_call = new getInvoices_call(date, resultHandler, this, ___protocolFactory, ___transport);
1646
      this.___currentMethod = method_call;
1647
      ___manager.call(method_call);
1648
    }
1649
 
1650
    public static class getInvoices_call extends org.apache.thrift.async.TAsyncMethodCall {
1651
      private long date;
1652
      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 {
1653
        super(client, protocolFactory, transport, resultHandler, false);
1654
        this.date = date;
1655
      }
1656
 
1657
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1658
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoices", org.apache.thrift.protocol.TMessageType.CALL, 0));
1659
        getInvoices_args args = new getInvoices_args();
1660
        args.setDate(date);
1661
        args.write(prot);
1662
        prot.writeMessageEnd();
1663
      }
1664
 
1665
      public List<Invoice> getResult() throws org.apache.thrift.TException {
1666
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1667
          throw new IllegalStateException("Method call not finished!");
1668
        }
1669
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1670
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1671
        return (new Client(prot)).recv_getInvoices();
1672
      }
1673
    }
1674
 
7410 amar.kumar 1675
    public void getInvoicesForWarehouse(long warehouseId, long supplierId, long date, org.apache.thrift.async.AsyncMethodCallback<getInvoicesForWarehouse_call> resultHandler) throws org.apache.thrift.TException {
1676
      checkReady();
1677
      getInvoicesForWarehouse_call method_call = new getInvoicesForWarehouse_call(warehouseId, supplierId, date, resultHandler, this, ___protocolFactory, ___transport);
1678
      this.___currentMethod = method_call;
1679
      ___manager.call(method_call);
1680
    }
1681
 
1682
    public static class getInvoicesForWarehouse_call extends org.apache.thrift.async.TAsyncMethodCall {
1683
      private long warehouseId;
1684
      private long supplierId;
1685
      private long date;
1686
      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 {
1687
        super(client, protocolFactory, transport, resultHandler, false);
1688
        this.warehouseId = warehouseId;
1689
        this.supplierId = supplierId;
1690
        this.date = date;
1691
      }
1692
 
1693
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1694
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoicesForWarehouse", org.apache.thrift.protocol.TMessageType.CALL, 0));
1695
        getInvoicesForWarehouse_args args = new getInvoicesForWarehouse_args();
1696
        args.setWarehouseId(warehouseId);
1697
        args.setSupplierId(supplierId);
1698
        args.setDate(date);
1699
        args.write(prot);
1700
        prot.writeMessageEnd();
1701
      }
1702
 
1703
      public List<Invoice> getResult() throws org.apache.thrift.TException {
1704
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1705
          throw new IllegalStateException("Method call not finished!");
1706
        }
1707
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1708
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1709
        return (new Client(prot)).recv_getInvoicesForWarehouse();
1710
      }
1711
    }
1712
 
5443 mandeep.dh 1713
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<createInvoice_call> resultHandler) throws org.apache.thrift.TException {
1714
      checkReady();
1715
      createInvoice_call method_call = new createInvoice_call(invoice, resultHandler, this, ___protocolFactory, ___transport);
1716
      this.___currentMethod = method_call;
1717
      ___manager.call(method_call);
1718
    }
1719
 
1720
    public static class createInvoice_call extends org.apache.thrift.async.TAsyncMethodCall {
1721
      private Invoice invoice;
1722
      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 {
1723
        super(client, protocolFactory, transport, resultHandler, false);
1724
        this.invoice = invoice;
1725
      }
1726
 
1727
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1728
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createInvoice", org.apache.thrift.protocol.TMessageType.CALL, 0));
1729
        createInvoice_args args = new createInvoice_args();
1730
        args.setInvoice(invoice);
1731
        args.write(prot);
1732
        prot.writeMessageEnd();
1733
      }
1734
 
1735
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1736
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1737
          throw new IllegalStateException("Method call not finished!");
1738
        }
1739
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1740
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1741
        (new Client(prot)).recv_createInvoice();
1742
      }
1743
    }
1744
 
5591 mandeep.dh 1745
    public void addSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<addSupplier_call> resultHandler) throws org.apache.thrift.TException {
1746
      checkReady();
1747
      addSupplier_call method_call = new addSupplier_call(supplier, resultHandler, this, ___protocolFactory, ___transport);
1748
      this.___currentMethod = method_call;
1749
      ___manager.call(method_call);
1750
    }
1751
 
1752
    public static class addSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1753
      private Supplier supplier;
1754
      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 {
1755
        super(client, protocolFactory, transport, resultHandler, false);
1756
        this.supplier = supplier;
1757
      }
1758
 
1759
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1760
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1761
        addSupplier_args args = new addSupplier_args();
1762
        args.setSupplier(supplier);
1763
        args.write(prot);
1764
        prot.writeMessageEnd();
1765
      }
1766
 
1767
      public Supplier getResult() throws org.apache.thrift.TException {
1768
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1769
          throw new IllegalStateException("Method call not finished!");
1770
        }
1771
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1772
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1773
        return (new Client(prot)).recv_addSupplier();
1774
      }
1775
    }
1776
 
1777
    public void updateSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<updateSupplier_call> resultHandler) throws org.apache.thrift.TException {
1778
      checkReady();
1779
      updateSupplier_call method_call = new updateSupplier_call(supplier, resultHandler, this, ___protocolFactory, ___transport);
1780
      this.___currentMethod = method_call;
1781
      ___manager.call(method_call);
1782
    }
1783
 
1784
    public static class updateSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1785
      private Supplier supplier;
1786
      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 {
1787
        super(client, protocolFactory, transport, resultHandler, false);
1788
        this.supplier = supplier;
1789
      }
1790
 
1791
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1792
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1793
        updateSupplier_args args = new updateSupplier_args();
1794
        args.setSupplier(supplier);
1795
        args.write(prot);
1796
        prot.writeMessageEnd();
1797
      }
1798
 
1799
      public void getResult() throws org.apache.thrift.TException {
1800
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1801
          throw new IllegalStateException("Method call not finished!");
1802
        }
1803
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1804
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1805
        (new Client(prot)).recv_updateSupplier();
1806
      }
1807
    }
1808
 
6467 amar.kumar 1809
    public void createPurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<createPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1810
      checkReady();
1811
      createPurchaseReturn_call method_call = new createPurchaseReturn_call(purchaseReturn, resultHandler, this, ___protocolFactory, ___transport);
1812
      this.___currentMethod = method_call;
1813
      ___manager.call(method_call);
1814
    }
1815
 
1816
    public static class createPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1817
      private PurchaseReturn purchaseReturn;
1818
      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 {
1819
        super(client, protocolFactory, transport, resultHandler, false);
1820
        this.purchaseReturn = purchaseReturn;
1821
      }
1822
 
1823
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1824
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1825
        createPurchaseReturn_args args = new createPurchaseReturn_args();
1826
        args.setPurchaseReturn(purchaseReturn);
1827
        args.write(prot);
1828
        prot.writeMessageEnd();
1829
      }
1830
 
1831
      public long getResult() throws org.apache.thrift.TException {
1832
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1833
          throw new IllegalStateException("Method call not finished!");
1834
        }
1835
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1836
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1837
        return (new Client(prot)).recv_createPurchaseReturn();
1838
      }
1839
    }
1840
 
1841
    public void settlePurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<settlePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1842
      checkReady();
1843
      settlePurchaseReturn_call method_call = new settlePurchaseReturn_call(id, resultHandler, this, ___protocolFactory, ___transport);
1844
      this.___currentMethod = method_call;
1845
      ___manager.call(method_call);
1846
    }
1847
 
1848
    public static class settlePurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1849
      private long id;
1850
      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 {
1851
        super(client, protocolFactory, transport, resultHandler, false);
1852
        this.id = id;
1853
      }
1854
 
1855
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1856
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("settlePurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1857
        settlePurchaseReturn_args args = new settlePurchaseReturn_args();
1858
        args.setId(id);
1859
        args.write(prot);
1860
        prot.writeMessageEnd();
1861
      }
1862
 
1863
      public void getResult() throws org.apache.thrift.TException {
1864
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1865
          throw new IllegalStateException("Method call not finished!");
1866
        }
1867
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1868
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1869
        (new Client(prot)).recv_settlePurchaseReturn();
1870
      }
1871
    }
1872
 
1873
    public void getUnsettledPurchaseReturns(org.apache.thrift.async.AsyncMethodCallback<getUnsettledPurchaseReturns_call> resultHandler) throws org.apache.thrift.TException {
1874
      checkReady();
1875
      getUnsettledPurchaseReturns_call method_call = new getUnsettledPurchaseReturns_call(resultHandler, this, ___protocolFactory, ___transport);
1876
      this.___currentMethod = method_call;
1877
      ___manager.call(method_call);
1878
    }
1879
 
1880
    public static class getUnsettledPurchaseReturns_call extends org.apache.thrift.async.TAsyncMethodCall {
1881
      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 {
1882
        super(client, protocolFactory, transport, resultHandler, false);
1883
      }
1884
 
1885
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1886
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUnsettledPurchaseReturns", org.apache.thrift.protocol.TMessageType.CALL, 0));
1887
        getUnsettledPurchaseReturns_args args = new getUnsettledPurchaseReturns_args();
1888
        args.write(prot);
1889
        prot.writeMessageEnd();
1890
      }
1891
 
1892
      public List<PurchaseReturn> 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_getUnsettledPurchaseReturns();
1899
      }
1900
    }
1901
 
6630 amar.kumar 1902
    public void getInvoice(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<getInvoice_call> resultHandler) throws org.apache.thrift.TException {
1903
      checkReady();
1904
      getInvoice_call method_call = new getInvoice_call(invoiceNumber, supplierId, resultHandler, this, ___protocolFactory, ___transport);
1905
      this.___currentMethod = method_call;
1906
      ___manager.call(method_call);
1907
    }
1908
 
1909
    public static class getInvoice_call extends org.apache.thrift.async.TAsyncMethodCall {
1910
      private String invoiceNumber;
1911
      private long supplierId;
1912
      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 {
1913
        super(client, protocolFactory, transport, resultHandler, false);
1914
        this.invoiceNumber = invoiceNumber;
1915
        this.supplierId = supplierId;
1916
      }
1917
 
1918
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1919
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoice", org.apache.thrift.protocol.TMessageType.CALL, 0));
1920
        getInvoice_args args = new getInvoice_args();
1921
        args.setInvoiceNumber(invoiceNumber);
1922
        args.setSupplierId(supplierId);
1923
        args.write(prot);
1924
        prot.writeMessageEnd();
1925
      }
1926
 
1927
      public List<PurchaseReturn> getResult() throws org.apache.thrift.TException {
1928
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1929
          throw new IllegalStateException("Method call not finished!");
1930
        }
1931
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1932
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1933
        return (new Client(prot)).recv_getInvoice();
1934
      }
1935
    }
1936
 
7672 rajveer 1937
    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 1938
      checkReady();
7672 rajveer 1939
      createPurchaseForOurExtBilling_call method_call = new createPurchaseForOurExtBilling_call(invoiceNumber, unitPrice, nlc, itemId, resultHandler, this, ___protocolFactory, ___transport);
6762 amar.kumar 1940
      this.___currentMethod = method_call;
1941
      ___manager.call(method_call);
1942
    }
1943
 
1944
    public static class createPurchaseForOurExtBilling_call extends org.apache.thrift.async.TAsyncMethodCall {
1945
      private String invoiceNumber;
1946
      private double unitPrice;
7672 rajveer 1947
      private double nlc;
6762 amar.kumar 1948
      private long itemId;
7672 rajveer 1949
      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 1950
        super(client, protocolFactory, transport, resultHandler, false);
1951
        this.invoiceNumber = invoiceNumber;
1952
        this.unitPrice = unitPrice;
7672 rajveer 1953
        this.nlc = nlc;
6762 amar.kumar 1954
        this.itemId = itemId;
1955
      }
1956
 
1957
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1958
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseForOurExtBilling", org.apache.thrift.protocol.TMessageType.CALL, 0));
1959
        createPurchaseForOurExtBilling_args args = new createPurchaseForOurExtBilling_args();
1960
        args.setInvoiceNumber(invoiceNumber);
1961
        args.setUnitPrice(unitPrice);
7672 rajveer 1962
        args.setNlc(nlc);
6762 amar.kumar 1963
        args.setItemId(itemId);
1964
        args.write(prot);
1965
        prot.writeMessageEnd();
1966
      }
1967
 
1968
      public long getResult() throws org.apache.thrift.TException {
1969
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1970
          throw new IllegalStateException("Method call not finished!");
1971
        }
1972
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1973
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1974
        return (new Client(prot)).recv_createPurchaseForOurExtBilling();
1975
      }
1976
    }
1977
 
1978
    public void fulfillPOForExtBilling(long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPOForExtBilling_call> resultHandler) throws org.apache.thrift.TException {
1979
      checkReady();
1980
      fulfillPOForExtBilling_call method_call = new fulfillPOForExtBilling_call(itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1981
      this.___currentMethod = method_call;
1982
      ___manager.call(method_call);
1983
    }
1984
 
1985
    public static class fulfillPOForExtBilling_call extends org.apache.thrift.async.TAsyncMethodCall {
1986
      private long itemId;
1987
      private long quantity;
1988
      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 {
1989
        super(client, protocolFactory, transport, resultHandler, false);
1990
        this.itemId = itemId;
1991
        this.quantity = quantity;
1992
      }
1993
 
1994
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1995
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fulfillPOForExtBilling", org.apache.thrift.protocol.TMessageType.CALL, 0));
1996
        fulfillPOForExtBilling_args args = new fulfillPOForExtBilling_args();
1997
        args.setItemId(itemId);
1998
        args.setQuantity(quantity);
1999
        args.write(prot);
2000
        prot.writeMessageEnd();
2001
      }
2002
 
2003
      public void getResult() throws org.apache.thrift.TException {
2004
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2005
          throw new IllegalStateException("Method call not finished!");
2006
        }
2007
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2008
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2009
        (new Client(prot)).recv_fulfillPOForExtBilling();
2010
      }
2011
    }
2012
 
7410 amar.kumar 2013
    public void closePO(long poId, org.apache.thrift.async.AsyncMethodCallback<closePO_call> resultHandler) throws org.apache.thrift.TException {
2014
      checkReady();
2015
      closePO_call method_call = new closePO_call(poId, resultHandler, this, ___protocolFactory, ___transport);
2016
      this.___currentMethod = method_call;
2017
      ___manager.call(method_call);
2018
    }
2019
 
2020
    public static class closePO_call extends org.apache.thrift.async.TAsyncMethodCall {
2021
      private long poId;
2022
      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 {
2023
        super(client, protocolFactory, transport, resultHandler, false);
2024
        this.poId = poId;
2025
      }
2026
 
2027
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2028
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closePO", org.apache.thrift.protocol.TMessageType.CALL, 0));
2029
        closePO_args args = new closePO_args();
2030
        args.setPoId(poId);
2031
        args.write(prot);
2032
        prot.writeMessageEnd();
2033
      }
2034
 
2035
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2036
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2037
          throw new IllegalStateException("Method call not finished!");
2038
        }
2039
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2040
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2041
        (new Client(prot)).recv_closePO();
2042
      }
2043
    }
2044
 
2045
    public void isInvoiceReceived(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<isInvoiceReceived_call> resultHandler) throws org.apache.thrift.TException {
2046
      checkReady();
2047
      isInvoiceReceived_call method_call = new isInvoiceReceived_call(invoiceNumber, supplierId, resultHandler, this, ___protocolFactory, ___transport);
2048
      this.___currentMethod = method_call;
2049
      ___manager.call(method_call);
2050
    }
2051
 
2052
    public static class isInvoiceReceived_call extends org.apache.thrift.async.TAsyncMethodCall {
2053
      private String invoiceNumber;
2054
      private long supplierId;
2055
      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 {
2056
        super(client, protocolFactory, transport, resultHandler, false);
2057
        this.invoiceNumber = invoiceNumber;
2058
        this.supplierId = supplierId;
2059
      }
2060
 
2061
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2062
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isInvoiceReceived", org.apache.thrift.protocol.TMessageType.CALL, 0));
2063
        isInvoiceReceived_args args = new isInvoiceReceived_args();
2064
        args.setInvoiceNumber(invoiceNumber);
2065
        args.setSupplierId(supplierId);
2066
        args.write(prot);
2067
        prot.writeMessageEnd();
2068
      }
2069
 
2070
      public boolean getResult() throws org.apache.thrift.TException {
2071
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2072
          throw new IllegalStateException("Method call not finished!");
2073
        }
2074
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2075
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2076
        return (new Client(prot)).recv_isInvoiceReceived();
2077
      }
2078
    }
2079
 
9829 amar.kumar 2080
    public void changeWarehouseForPO(long id, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<changeWarehouseForPO_call> resultHandler) throws org.apache.thrift.TException {
2081
      checkReady();
2082
      changeWarehouseForPO_call method_call = new changeWarehouseForPO_call(id, warehouseId, resultHandler, this, ___protocolFactory, ___transport);
2083
      this.___currentMethod = method_call;
2084
      ___manager.call(method_call);
2085
    }
2086
 
2087
    public static class changeWarehouseForPO_call extends org.apache.thrift.async.TAsyncMethodCall {
2088
      private long id;
2089
      private long warehouseId;
2090
      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 {
2091
        super(client, protocolFactory, transport, resultHandler, false);
2092
        this.id = id;
2093
        this.warehouseId = warehouseId;
2094
      }
2095
 
2096
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2097
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("changeWarehouseForPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
2098
        changeWarehouseForPO_args args = new changeWarehouseForPO_args();
2099
        args.setId(id);
2100
        args.setWarehouseId(warehouseId);
2101
        args.write(prot);
2102
        prot.writeMessageEnd();
2103
      }
2104
 
2105
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2106
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2107
          throw new IllegalStateException("Method call not finished!");
2108
        }
2109
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2110
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2111
        (new Client(prot)).recv_changeWarehouseForPO();
2112
      }
2113
    }
2114
 
9925 amar.kumar 2115
    public void changePOStatus(long id, POStatus poStatus, org.apache.thrift.async.AsyncMethodCallback<changePOStatus_call> resultHandler) throws org.apache.thrift.TException {
2116
      checkReady();
2117
      changePOStatus_call method_call = new changePOStatus_call(id, poStatus, resultHandler, this, ___protocolFactory, ___transport);
2118
      this.___currentMethod = method_call;
2119
      ___manager.call(method_call);
2120
    }
2121
 
2122
    public static class changePOStatus_call extends org.apache.thrift.async.TAsyncMethodCall {
2123
      private long id;
2124
      private POStatus poStatus;
2125
      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 {
2126
        super(client, protocolFactory, transport, resultHandler, false);
2127
        this.id = id;
2128
        this.poStatus = poStatus;
2129
      }
2130
 
2131
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2132
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("changePOStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
2133
        changePOStatus_args args = new changePOStatus_args();
2134
        args.setId(id);
2135
        args.setPoStatus(poStatus);
2136
        args.write(prot);
2137
        prot.writeMessageEnd();
2138
      }
2139
 
2140
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2141
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2142
          throw new IllegalStateException("Method call not finished!");
2143
        }
2144
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2145
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2146
        (new Client(prot)).recv_changePOStatus();
2147
      }
2148
    }
2149
 
11751 manish.sha 2150
    public void getPurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
2151
      checkReady();
2152
      getPurchaseReturn_call method_call = new getPurchaseReturn_call(id, resultHandler, this, ___protocolFactory, ___transport);
2153
      this.___currentMethod = method_call;
2154
      ___manager.call(method_call);
2155
    }
2156
 
2157
    public static class getPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
2158
      private long id;
2159
      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 {
2160
        super(client, protocolFactory, transport, resultHandler, false);
2161
        this.id = id;
2162
      }
2163
 
2164
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2165
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
2166
        getPurchaseReturn_args args = new getPurchaseReturn_args();
2167
        args.setId(id);
2168
        args.write(prot);
2169
        prot.writeMessageEnd();
2170
      }
2171
 
2172
      public PurchaseReturn getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2173
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2174
          throw new IllegalStateException("Method call not finished!");
2175
        }
2176
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2177
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2178
        return (new Client(prot)).recv_getPurchaseReturn();
2179
      }
2180
    }
2181
 
13600 manish.sha 2182
    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 {
2183
      checkReady();
2184
      markPurchasereturnSettled_call method_call = new markPurchasereturnSettled_call(id, settlementType, documentNumber, settlementBy, settledAmount, resultHandler, this, ___protocolFactory, ___transport);
2185
      this.___currentMethod = method_call;
2186
      ___manager.call(method_call);
2187
    }
2188
 
2189
    public static class markPurchasereturnSettled_call extends org.apache.thrift.async.TAsyncMethodCall {
2190
      private long id;
2191
      private SettlementType settlementType;
2192
      private String documentNumber;
2193
      private String settlementBy;
2194
      private long settledAmount;
2195
      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 {
2196
        super(client, protocolFactory, transport, resultHandler, false);
2197
        this.id = id;
2198
        this.settlementType = settlementType;
2199
        this.documentNumber = documentNumber;
2200
        this.settlementBy = settlementBy;
2201
        this.settledAmount = settledAmount;
2202
      }
2203
 
2204
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2205
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("markPurchasereturnSettled", org.apache.thrift.protocol.TMessageType.CALL, 0));
2206
        markPurchasereturnSettled_args args = new markPurchasereturnSettled_args();
2207
        args.setId(id);
2208
        args.setSettlementType(settlementType);
2209
        args.setDocumentNumber(documentNumber);
2210
        args.setSettlementBy(settlementBy);
2211
        args.setSettledAmount(settledAmount);
2212
        args.write(prot);
2213
        prot.writeMessageEnd();
2214
      }
2215
 
2216
      public boolean getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2217
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2218
          throw new IllegalStateException("Method call not finished!");
2219
        }
2220
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2221
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2222
        return (new Client(prot)).recv_markPurchasereturnSettled();
2223
      }
2224
    }
2225
 
2226
    public void getPrSettlementsForPurchaseReturn(long purchaseReturnId, org.apache.thrift.async.AsyncMethodCallback<getPrSettlementsForPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
2227
      checkReady();
2228
      getPrSettlementsForPurchaseReturn_call method_call = new getPrSettlementsForPurchaseReturn_call(purchaseReturnId, resultHandler, this, ___protocolFactory, ___transport);
2229
      this.___currentMethod = method_call;
2230
      ___manager.call(method_call);
2231
    }
2232
 
2233
    public static class getPrSettlementsForPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
2234
      private long purchaseReturnId;
2235
      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 {
2236
        super(client, protocolFactory, transport, resultHandler, false);
2237
        this.purchaseReturnId = purchaseReturnId;
2238
      }
2239
 
2240
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2241
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPrSettlementsForPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
2242
        getPrSettlementsForPurchaseReturn_args args = new getPrSettlementsForPurchaseReturn_args();
2243
        args.setPurchaseReturnId(purchaseReturnId);
2244
        args.write(prot);
2245
        prot.writeMessageEnd();
2246
      }
2247
 
2248
      public List<PurchaseReturnSettlement> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2249
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2250
          throw new IllegalStateException("Method call not finished!");
2251
        }
2252
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2253
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2254
        return (new Client(prot)).recv_getPrSettlementsForPurchaseReturn();
2255
      }
2256
    }
2257
 
2258
    public void updatePurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<updatePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
2259
      checkReady();
2260
      updatePurchaseReturn_call method_call = new updatePurchaseReturn_call(purchaseReturn, resultHandler, this, ___protocolFactory, ___transport);
2261
      this.___currentMethod = method_call;
2262
      ___manager.call(method_call);
2263
    }
2264
 
2265
    public static class updatePurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
2266
      private PurchaseReturn purchaseReturn;
2267
      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 {
2268
        super(client, protocolFactory, transport, resultHandler, false);
2269
        this.purchaseReturn = purchaseReturn;
2270
      }
2271
 
2272
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2273
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updatePurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
2274
        updatePurchaseReturn_args args = new updatePurchaseReturn_args();
2275
        args.setPurchaseReturn(purchaseReturn);
2276
        args.write(prot);
2277
        prot.writeMessageEnd();
2278
      }
2279
 
2280
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2281
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2282
          throw new IllegalStateException("Method call not finished!");
2283
        }
2284
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2285
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2286
        (new Client(prot)).recv_updatePurchaseReturn();
2287
      }
2288
    }
2289
 
4496 mandeep.dh 2290
  }
2291
 
2292
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
2293
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
2294
    public Processor(I iface) {
2295
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
2296
    }
2297
 
2298
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
2299
      super(iface, getProcessMap(processMap));
2300
    }
2301
 
2302
    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) {
2303
      processMap.put("createPurchaseOrder", new createPurchaseOrder());
2304
      processMap.put("getPurchaseOrder", new getPurchaseOrder());
2305
      processMap.put("getAllPurchaseOrders", new getAllPurchaseOrders());
2306
      processMap.put("getSupplier", new getSupplier());
2307
      processMap.put("startPurchase", new startPurchase());
2308
      processMap.put("closePurchase", new closePurchase());
2309
      processMap.put("getAllPurchases", new getAllPurchases());
6385 amar.kumar 2310
      processMap.put("getPurchasesForPO", new getPurchasesForPO());
4555 mandeep.dh 2311
      processMap.put("getPurchaseOrderForPurchase", new getPurchaseOrderForPurchase());
4754 mandeep.dh 2312
      processMap.put("getPendingPurchaseOrders", new getPendingPurchaseOrders());
2313
      processMap.put("getSuppliers", new getSuppliers());
2314
      processMap.put("fulfillPO", new fulfillPO());
2315
      processMap.put("updatePurchaseOrder", new updatePurchaseOrder());
5185 mandeep.dh 2316
      processMap.put("unFulfillPO", new unFulfillPO());
5443 mandeep.dh 2317
      processMap.put("getInvoices", new getInvoices());
7410 amar.kumar 2318
      processMap.put("getInvoicesForWarehouse", new getInvoicesForWarehouse());
5443 mandeep.dh 2319
      processMap.put("createInvoice", new createInvoice());
5591 mandeep.dh 2320
      processMap.put("addSupplier", new addSupplier());
2321
      processMap.put("updateSupplier", new updateSupplier());
6467 amar.kumar 2322
      processMap.put("createPurchaseReturn", new createPurchaseReturn());
2323
      processMap.put("settlePurchaseReturn", new settlePurchaseReturn());
2324
      processMap.put("getUnsettledPurchaseReturns", new getUnsettledPurchaseReturns());
6630 amar.kumar 2325
      processMap.put("getInvoice", new getInvoice());
6762 amar.kumar 2326
      processMap.put("createPurchaseForOurExtBilling", new createPurchaseForOurExtBilling());
2327
      processMap.put("fulfillPOForExtBilling", new fulfillPOForExtBilling());
7410 amar.kumar 2328
      processMap.put("closePO", new closePO());
2329
      processMap.put("isInvoiceReceived", new isInvoiceReceived());
9829 amar.kumar 2330
      processMap.put("changeWarehouseForPO", new changeWarehouseForPO());
9925 amar.kumar 2331
      processMap.put("changePOStatus", new changePOStatus());
11751 manish.sha 2332
      processMap.put("getPurchaseReturn", new getPurchaseReturn());
13600 manish.sha 2333
      processMap.put("markPurchasereturnSettled", new markPurchasereturnSettled());
2334
      processMap.put("getPrSettlementsForPurchaseReturn", new getPrSettlementsForPurchaseReturn());
2335
      processMap.put("updatePurchaseReturn", new updatePurchaseReturn());
4496 mandeep.dh 2336
      return processMap;
2337
    }
2338
 
2339
    private static class createPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseOrder_args> {
2340
      public createPurchaseOrder() {
2341
        super("createPurchaseOrder");
2342
      }
2343
 
2344
      protected createPurchaseOrder_args getEmptyArgsInstance() {
2345
        return new createPurchaseOrder_args();
2346
      }
2347
 
2348
      protected createPurchaseOrder_result getResult(I iface, createPurchaseOrder_args args) throws org.apache.thrift.TException {
2349
        createPurchaseOrder_result result = new createPurchaseOrder_result();
2350
        try {
2351
          result.success = iface.createPurchaseOrder(args.purchaseOrder);
2352
          result.setSuccessIsSet(true);
2353
        } catch (PurchaseServiceException e) {
2354
          result.e = e;
2355
        }
2356
        return result;
2357
      }
2358
    }
2359
 
2360
    private static class getPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrder_args> {
2361
      public getPurchaseOrder() {
2362
        super("getPurchaseOrder");
2363
      }
2364
 
2365
      protected getPurchaseOrder_args getEmptyArgsInstance() {
2366
        return new getPurchaseOrder_args();
2367
      }
2368
 
2369
      protected getPurchaseOrder_result getResult(I iface, getPurchaseOrder_args args) throws org.apache.thrift.TException {
2370
        getPurchaseOrder_result result = new getPurchaseOrder_result();
2371
        try {
2372
          result.success = iface.getPurchaseOrder(args.id);
2373
        } catch (PurchaseServiceException e) {
2374
          result.e = e;
2375
        }
2376
        return result;
2377
      }
2378
    }
2379
 
2380
    private static class getAllPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchaseOrders_args> {
2381
      public getAllPurchaseOrders() {
2382
        super("getAllPurchaseOrders");
2383
      }
2384
 
2385
      protected getAllPurchaseOrders_args getEmptyArgsInstance() {
2386
        return new getAllPurchaseOrders_args();
2387
      }
2388
 
2389
      protected getAllPurchaseOrders_result getResult(I iface, getAllPurchaseOrders_args args) throws org.apache.thrift.TException {
2390
        getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
2391
        try {
2392
          result.success = iface.getAllPurchaseOrders(args.status);
2393
        } catch (PurchaseServiceException e) {
2394
          result.e = e;
2395
        }
2396
        return result;
2397
      }
2398
    }
2399
 
2400
    private static class getSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSupplier_args> {
2401
      public getSupplier() {
2402
        super("getSupplier");
2403
      }
2404
 
2405
      protected getSupplier_args getEmptyArgsInstance() {
2406
        return new getSupplier_args();
2407
      }
2408
 
2409
      protected getSupplier_result getResult(I iface, getSupplier_args args) throws org.apache.thrift.TException {
2410
        getSupplier_result result = new getSupplier_result();
2411
        try {
2412
          result.success = iface.getSupplier(args.id);
2413
        } catch (PurchaseServiceException e) {
2414
          result.e = e;
2415
        }
2416
        return result;
2417
      }
2418
    }
2419
 
2420
    private static class startPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startPurchase_args> {
2421
      public startPurchase() {
2422
        super("startPurchase");
2423
      }
2424
 
2425
      protected startPurchase_args getEmptyArgsInstance() {
2426
        return new startPurchase_args();
2427
      }
2428
 
2429
      protected startPurchase_result getResult(I iface, startPurchase_args args) throws org.apache.thrift.TException {
2430
        startPurchase_result result = new startPurchase_result();
2431
        try {
11801 manish.sha 2432
          result.success = iface.startPurchase(args.purchaseOrderId, args.invoiceNumber, args.freightCharges, args.purchaseComments);
4496 mandeep.dh 2433
          result.setSuccessIsSet(true);
2434
        } catch (PurchaseServiceException e) {
2435
          result.e = e;
2436
        }
2437
        return result;
2438
      }
2439
    }
2440
 
2441
    private static class closePurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closePurchase_args> {
2442
      public closePurchase() {
2443
        super("closePurchase");
2444
      }
2445
 
2446
      protected closePurchase_args getEmptyArgsInstance() {
2447
        return new closePurchase_args();
2448
      }
2449
 
2450
      protected closePurchase_result getResult(I iface, closePurchase_args args) throws org.apache.thrift.TException {
2451
        closePurchase_result result = new closePurchase_result();
2452
        try {
2453
          result.success = iface.closePurchase(args.purchaseId);
2454
          result.setSuccessIsSet(true);
2455
        } catch (PurchaseServiceException e) {
2456
          result.e = e;
2457
        }
2458
        return result;
2459
      }
2460
    }
2461
 
2462
    private static class getAllPurchases<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchases_args> {
2463
      public getAllPurchases() {
2464
        super("getAllPurchases");
2465
      }
2466
 
2467
      protected getAllPurchases_args getEmptyArgsInstance() {
2468
        return new getAllPurchases_args();
2469
      }
2470
 
2471
      protected getAllPurchases_result getResult(I iface, getAllPurchases_args args) throws org.apache.thrift.TException {
2472
        getAllPurchases_result result = new getAllPurchases_result();
2473
        try {
2474
          result.success = iface.getAllPurchases(args.purchaseOrderId, args.open);
2475
        } catch (PurchaseServiceException e) {
2476
          result.e = e;
2477
        }
2478
        return result;
2479
      }
2480
    }
2481
 
6385 amar.kumar 2482
    private static class getPurchasesForPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchasesForPO_args> {
2483
      public getPurchasesForPO() {
2484
        super("getPurchasesForPO");
2485
      }
2486
 
2487
      protected getPurchasesForPO_args getEmptyArgsInstance() {
2488
        return new getPurchasesForPO_args();
2489
      }
2490
 
2491
      protected getPurchasesForPO_result getResult(I iface, getPurchasesForPO_args args) throws org.apache.thrift.TException {
2492
        getPurchasesForPO_result result = new getPurchasesForPO_result();
2493
        try {
2494
          result.success = iface.getPurchasesForPO(args.purchaseOrderId);
2495
        } catch (PurchaseServiceException e) {
2496
          result.e = e;
2497
        }
2498
        return result;
2499
      }
2500
    }
2501
 
4555 mandeep.dh 2502
    private static class getPurchaseOrderForPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrderForPurchase_args> {
2503
      public getPurchaseOrderForPurchase() {
2504
        super("getPurchaseOrderForPurchase");
4496 mandeep.dh 2505
      }
2506
 
4555 mandeep.dh 2507
      protected getPurchaseOrderForPurchase_args getEmptyArgsInstance() {
2508
        return new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 2509
      }
2510
 
4555 mandeep.dh 2511
      protected getPurchaseOrderForPurchase_result getResult(I iface, getPurchaseOrderForPurchase_args args) throws org.apache.thrift.TException {
2512
        getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
2513
        result.success = iface.getPurchaseOrderForPurchase(args.purchaseId);
4496 mandeep.dh 2514
        return result;
2515
      }
2516
    }
2517
 
4754 mandeep.dh 2518
    private static class getPendingPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPendingPurchaseOrders_args> {
2519
      public getPendingPurchaseOrders() {
2520
        super("getPendingPurchaseOrders");
2521
      }
2522
 
2523
      protected getPendingPurchaseOrders_args getEmptyArgsInstance() {
2524
        return new getPendingPurchaseOrders_args();
2525
      }
2526
 
2527
      protected getPendingPurchaseOrders_result getResult(I iface, getPendingPurchaseOrders_args args) throws org.apache.thrift.TException {
2528
        getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
2529
        try {
2530
          result.success = iface.getPendingPurchaseOrders(args.warehouseId);
2531
        } catch (PurchaseServiceException e) {
2532
          result.e = e;
2533
        }
2534
        return result;
2535
      }
2536
    }
2537
 
2538
    private static class getSuppliers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSuppliers_args> {
2539
      public getSuppliers() {
2540
        super("getSuppliers");
2541
      }
2542
 
2543
      protected getSuppliers_args getEmptyArgsInstance() {
2544
        return new getSuppliers_args();
2545
      }
2546
 
2547
      protected getSuppliers_result getResult(I iface, getSuppliers_args args) throws org.apache.thrift.TException {
2548
        getSuppliers_result result = new getSuppliers_result();
2549
        try {
2550
          result.success = iface.getSuppliers();
2551
        } catch (PurchaseServiceException e) {
2552
          result.e = e;
2553
        }
2554
        return result;
2555
      }
2556
    }
2557
 
2558
    private static class fulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fulfillPO_args> {
2559
      public fulfillPO() {
2560
        super("fulfillPO");
2561
      }
2562
 
2563
      protected fulfillPO_args getEmptyArgsInstance() {
2564
        return new fulfillPO_args();
2565
      }
2566
 
2567
      protected fulfillPO_result getResult(I iface, fulfillPO_args args) throws org.apache.thrift.TException {
2568
        fulfillPO_result result = new fulfillPO_result();
2569
        try {
2570
          iface.fulfillPO(args.purchaseOrderId, args.itemId, args.quantity);
2571
        } catch (PurchaseServiceException e) {
2572
          result.e = e;
2573
        }
2574
        return result;
2575
      }
2576
    }
2577
 
2578
    private static class updatePurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updatePurchaseOrder_args> {
2579
      public updatePurchaseOrder() {
2580
        super("updatePurchaseOrder");
2581
      }
2582
 
2583
      protected updatePurchaseOrder_args getEmptyArgsInstance() {
2584
        return new updatePurchaseOrder_args();
2585
      }
2586
 
2587
      protected updatePurchaseOrder_result getResult(I iface, updatePurchaseOrder_args args) throws org.apache.thrift.TException {
2588
        updatePurchaseOrder_result result = new updatePurchaseOrder_result();
2589
        try {
2590
          iface.updatePurchaseOrder(args.purchaseOrder);
2591
        } catch (PurchaseServiceException e) {
2592
          result.e = e;
2593
        }
2594
        return result;
2595
      }
2596
    }
2597
 
5185 mandeep.dh 2598
    private static class unFulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, unFulfillPO_args> {
2599
      public unFulfillPO() {
2600
        super("unFulfillPO");
2601
      }
2602
 
2603
      protected unFulfillPO_args getEmptyArgsInstance() {
2604
        return new unFulfillPO_args();
2605
      }
2606
 
2607
      protected unFulfillPO_result getResult(I iface, unFulfillPO_args args) throws org.apache.thrift.TException {
2608
        unFulfillPO_result result = new unFulfillPO_result();
2609
        try {
2610
          iface.unFulfillPO(args.purchaseId, args.itemId, args.quantity);
2611
        } catch (PurchaseServiceException e) {
2612
          result.e = e;
2613
        }
2614
        return result;
2615
      }
2616
    }
2617
 
5443 mandeep.dh 2618
    private static class getInvoices<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoices_args> {
2619
      public getInvoices() {
2620
        super("getInvoices");
2621
      }
2622
 
2623
      protected getInvoices_args getEmptyArgsInstance() {
2624
        return new getInvoices_args();
2625
      }
2626
 
2627
      protected getInvoices_result getResult(I iface, getInvoices_args args) throws org.apache.thrift.TException {
2628
        getInvoices_result result = new getInvoices_result();
2629
        result.success = iface.getInvoices(args.date);
2630
        return result;
2631
      }
2632
    }
2633
 
7410 amar.kumar 2634
    private static class getInvoicesForWarehouse<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoicesForWarehouse_args> {
2635
      public getInvoicesForWarehouse() {
2636
        super("getInvoicesForWarehouse");
2637
      }
2638
 
2639
      protected getInvoicesForWarehouse_args getEmptyArgsInstance() {
2640
        return new getInvoicesForWarehouse_args();
2641
      }
2642
 
2643
      protected getInvoicesForWarehouse_result getResult(I iface, getInvoicesForWarehouse_args args) throws org.apache.thrift.TException {
2644
        getInvoicesForWarehouse_result result = new getInvoicesForWarehouse_result();
2645
        result.success = iface.getInvoicesForWarehouse(args.warehouseId, args.supplierId, args.date);
2646
        return result;
2647
      }
2648
    }
2649
 
5443 mandeep.dh 2650
    private static class createInvoice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createInvoice_args> {
2651
      public createInvoice() {
2652
        super("createInvoice");
2653
      }
2654
 
2655
      protected createInvoice_args getEmptyArgsInstance() {
2656
        return new createInvoice_args();
2657
      }
2658
 
2659
      protected createInvoice_result getResult(I iface, createInvoice_args args) throws org.apache.thrift.TException {
2660
        createInvoice_result result = new createInvoice_result();
2661
        try {
2662
          iface.createInvoice(args.invoice);
2663
        } catch (PurchaseServiceException e) {
2664
          result.e = e;
2665
        }
2666
        return result;
2667
      }
2668
    }
2669
 
5591 mandeep.dh 2670
    private static class addSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addSupplier_args> {
2671
      public addSupplier() {
2672
        super("addSupplier");
2673
      }
2674
 
2675
      protected addSupplier_args getEmptyArgsInstance() {
2676
        return new addSupplier_args();
2677
      }
2678
 
2679
      protected addSupplier_result getResult(I iface, addSupplier_args args) throws org.apache.thrift.TException {
2680
        addSupplier_result result = new addSupplier_result();
2681
        result.success = iface.addSupplier(args.supplier);
2682
        return result;
2683
      }
2684
    }
2685
 
2686
    private static class updateSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateSupplier_args> {
2687
      public updateSupplier() {
2688
        super("updateSupplier");
2689
      }
2690
 
2691
      protected updateSupplier_args getEmptyArgsInstance() {
2692
        return new updateSupplier_args();
2693
      }
2694
 
2695
      protected updateSupplier_result getResult(I iface, updateSupplier_args args) throws org.apache.thrift.TException {
2696
        updateSupplier_result result = new updateSupplier_result();
2697
        iface.updateSupplier(args.supplier);
2698
        return result;
2699
      }
2700
    }
2701
 
6467 amar.kumar 2702
    private static class createPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseReturn_args> {
2703
      public createPurchaseReturn() {
2704
        super("createPurchaseReturn");
2705
      }
2706
 
2707
      protected createPurchaseReturn_args getEmptyArgsInstance() {
2708
        return new createPurchaseReturn_args();
2709
      }
2710
 
2711
      protected createPurchaseReturn_result getResult(I iface, createPurchaseReturn_args args) throws org.apache.thrift.TException {
2712
        createPurchaseReturn_result result = new createPurchaseReturn_result();
2713
        result.success = iface.createPurchaseReturn(args.purchaseReturn);
2714
        result.setSuccessIsSet(true);
2715
        return result;
2716
      }
2717
    }
2718
 
2719
    private static class settlePurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, settlePurchaseReturn_args> {
2720
      public settlePurchaseReturn() {
2721
        super("settlePurchaseReturn");
2722
      }
2723
 
2724
      protected settlePurchaseReturn_args getEmptyArgsInstance() {
2725
        return new settlePurchaseReturn_args();
2726
      }
2727
 
2728
      protected settlePurchaseReturn_result getResult(I iface, settlePurchaseReturn_args args) throws org.apache.thrift.TException {
2729
        settlePurchaseReturn_result result = new settlePurchaseReturn_result();
2730
        iface.settlePurchaseReturn(args.id);
2731
        return result;
2732
      }
2733
    }
2734
 
2735
    private static class getUnsettledPurchaseReturns<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUnsettledPurchaseReturns_args> {
2736
      public getUnsettledPurchaseReturns() {
2737
        super("getUnsettledPurchaseReturns");
2738
      }
2739
 
2740
      protected getUnsettledPurchaseReturns_args getEmptyArgsInstance() {
2741
        return new getUnsettledPurchaseReturns_args();
2742
      }
2743
 
2744
      protected getUnsettledPurchaseReturns_result getResult(I iface, getUnsettledPurchaseReturns_args args) throws org.apache.thrift.TException {
2745
        getUnsettledPurchaseReturns_result result = new getUnsettledPurchaseReturns_result();
2746
        result.success = iface.getUnsettledPurchaseReturns();
2747
        return result;
2748
      }
2749
    }
2750
 
6630 amar.kumar 2751
    private static class getInvoice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoice_args> {
2752
      public getInvoice() {
2753
        super("getInvoice");
2754
      }
2755
 
2756
      protected getInvoice_args getEmptyArgsInstance() {
2757
        return new getInvoice_args();
2758
      }
2759
 
2760
      protected getInvoice_result getResult(I iface, getInvoice_args args) throws org.apache.thrift.TException {
2761
        getInvoice_result result = new getInvoice_result();
2762
        result.success = iface.getInvoice(args.invoiceNumber, args.supplierId);
2763
        return result;
2764
      }
2765
    }
2766
 
6762 amar.kumar 2767
    private static class createPurchaseForOurExtBilling<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseForOurExtBilling_args> {
2768
      public createPurchaseForOurExtBilling() {
2769
        super("createPurchaseForOurExtBilling");
2770
      }
2771
 
2772
      protected createPurchaseForOurExtBilling_args getEmptyArgsInstance() {
2773
        return new createPurchaseForOurExtBilling_args();
2774
      }
2775
 
2776
      protected createPurchaseForOurExtBilling_result getResult(I iface, createPurchaseForOurExtBilling_args args) throws org.apache.thrift.TException {
2777
        createPurchaseForOurExtBilling_result result = new createPurchaseForOurExtBilling_result();
7672 rajveer 2778
        result.success = iface.createPurchaseForOurExtBilling(args.invoiceNumber, args.unitPrice, args.nlc, args.itemId);
6762 amar.kumar 2779
        result.setSuccessIsSet(true);
2780
        return result;
2781
      }
2782
    }
2783
 
2784
    private static class fulfillPOForExtBilling<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fulfillPOForExtBilling_args> {
2785
      public fulfillPOForExtBilling() {
2786
        super("fulfillPOForExtBilling");
2787
      }
2788
 
2789
      protected fulfillPOForExtBilling_args getEmptyArgsInstance() {
2790
        return new fulfillPOForExtBilling_args();
2791
      }
2792
 
2793
      protected fulfillPOForExtBilling_result getResult(I iface, fulfillPOForExtBilling_args args) throws org.apache.thrift.TException {
2794
        fulfillPOForExtBilling_result result = new fulfillPOForExtBilling_result();
2795
        iface.fulfillPOForExtBilling(args.itemId, args.quantity);
2796
        return result;
2797
      }
2798
    }
2799
 
7410 amar.kumar 2800
    private static class closePO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closePO_args> {
2801
      public closePO() {
2802
        super("closePO");
2803
      }
2804
 
2805
      protected closePO_args getEmptyArgsInstance() {
2806
        return new closePO_args();
2807
      }
2808
 
2809
      protected closePO_result getResult(I iface, closePO_args args) throws org.apache.thrift.TException {
2810
        closePO_result result = new closePO_result();
2811
        try {
2812
          iface.closePO(args.poId);
2813
        } catch (PurchaseServiceException e) {
2814
          result.e = e;
2815
        }
2816
        return result;
2817
      }
2818
    }
2819
 
2820
    private static class isInvoiceReceived<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isInvoiceReceived_args> {
2821
      public isInvoiceReceived() {
2822
        super("isInvoiceReceived");
2823
      }
2824
 
2825
      protected isInvoiceReceived_args getEmptyArgsInstance() {
2826
        return new isInvoiceReceived_args();
2827
      }
2828
 
2829
      protected isInvoiceReceived_result getResult(I iface, isInvoiceReceived_args args) throws org.apache.thrift.TException {
2830
        isInvoiceReceived_result result = new isInvoiceReceived_result();
2831
        result.success = iface.isInvoiceReceived(args.invoiceNumber, args.supplierId);
2832
        result.setSuccessIsSet(true);
2833
        return result;
2834
      }
2835
    }
2836
 
9829 amar.kumar 2837
    private static class changeWarehouseForPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, changeWarehouseForPO_args> {
2838
      public changeWarehouseForPO() {
2839
        super("changeWarehouseForPO");
2840
      }
2841
 
2842
      protected changeWarehouseForPO_args getEmptyArgsInstance() {
2843
        return new changeWarehouseForPO_args();
2844
      }
2845
 
2846
      protected changeWarehouseForPO_result getResult(I iface, changeWarehouseForPO_args args) throws org.apache.thrift.TException {
2847
        changeWarehouseForPO_result result = new changeWarehouseForPO_result();
2848
        try {
2849
          iface.changeWarehouseForPO(args.id, args.warehouseId);
2850
        } catch (PurchaseServiceException e) {
2851
          result.e = e;
2852
        }
2853
        return result;
2854
      }
2855
    }
2856
 
9925 amar.kumar 2857
    private static class changePOStatus<I extends Iface> extends org.apache.thrift.ProcessFunction<I, changePOStatus_args> {
2858
      public changePOStatus() {
2859
        super("changePOStatus");
2860
      }
2861
 
2862
      protected changePOStatus_args getEmptyArgsInstance() {
2863
        return new changePOStatus_args();
2864
      }
2865
 
2866
      protected changePOStatus_result getResult(I iface, changePOStatus_args args) throws org.apache.thrift.TException {
2867
        changePOStatus_result result = new changePOStatus_result();
2868
        try {
2869
          iface.changePOStatus(args.id, args.poStatus);
2870
        } catch (PurchaseServiceException e) {
2871
          result.e = e;
2872
        }
2873
        return result;
2874
      }
2875
    }
2876
 
11751 manish.sha 2877
    private static class getPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseReturn_args> {
2878
      public getPurchaseReturn() {
2879
        super("getPurchaseReturn");
2880
      }
2881
 
2882
      protected getPurchaseReturn_args getEmptyArgsInstance() {
2883
        return new getPurchaseReturn_args();
2884
      }
2885
 
2886
      protected getPurchaseReturn_result getResult(I iface, getPurchaseReturn_args args) throws org.apache.thrift.TException {
2887
        getPurchaseReturn_result result = new getPurchaseReturn_result();
2888
        try {
2889
          result.success = iface.getPurchaseReturn(args.id);
2890
        } catch (PurchaseServiceException e) {
2891
          result.e = e;
2892
        }
2893
        return result;
2894
      }
2895
    }
2896
 
13600 manish.sha 2897
    private static class markPurchasereturnSettled<I extends Iface> extends org.apache.thrift.ProcessFunction<I, markPurchasereturnSettled_args> {
2898
      public markPurchasereturnSettled() {
2899
        super("markPurchasereturnSettled");
2900
      }
2901
 
2902
      protected markPurchasereturnSettled_args getEmptyArgsInstance() {
2903
        return new markPurchasereturnSettled_args();
2904
      }
2905
 
2906
      protected markPurchasereturnSettled_result getResult(I iface, markPurchasereturnSettled_args args) throws org.apache.thrift.TException {
2907
        markPurchasereturnSettled_result result = new markPurchasereturnSettled_result();
2908
        try {
2909
          result.success = iface.markPurchasereturnSettled(args.id, args.settlementType, args.documentNumber, args.settlementBy, args.settledAmount);
2910
          result.setSuccessIsSet(true);
2911
        } catch (PurchaseServiceException e) {
2912
          result.e = e;
2913
        }
2914
        return result;
2915
      }
2916
    }
2917
 
2918
    private static class getPrSettlementsForPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPrSettlementsForPurchaseReturn_args> {
2919
      public getPrSettlementsForPurchaseReturn() {
2920
        super("getPrSettlementsForPurchaseReturn");
2921
      }
2922
 
2923
      protected getPrSettlementsForPurchaseReturn_args getEmptyArgsInstance() {
2924
        return new getPrSettlementsForPurchaseReturn_args();
2925
      }
2926
 
2927
      protected getPrSettlementsForPurchaseReturn_result getResult(I iface, getPrSettlementsForPurchaseReturn_args args) throws org.apache.thrift.TException {
2928
        getPrSettlementsForPurchaseReturn_result result = new getPrSettlementsForPurchaseReturn_result();
2929
        try {
2930
          result.success = iface.getPrSettlementsForPurchaseReturn(args.purchaseReturnId);
2931
        } catch (PurchaseServiceException e) {
2932
          result.e = e;
2933
        }
2934
        return result;
2935
      }
2936
    }
2937
 
2938
    private static class updatePurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updatePurchaseReturn_args> {
2939
      public updatePurchaseReturn() {
2940
        super("updatePurchaseReturn");
2941
      }
2942
 
2943
      protected updatePurchaseReturn_args getEmptyArgsInstance() {
2944
        return new updatePurchaseReturn_args();
2945
      }
2946
 
2947
      protected updatePurchaseReturn_result getResult(I iface, updatePurchaseReturn_args args) throws org.apache.thrift.TException {
2948
        updatePurchaseReturn_result result = new updatePurchaseReturn_result();
2949
        try {
2950
          iface.updatePurchaseReturn(args.purchaseReturn);
2951
        } catch (PurchaseServiceException e) {
2952
          result.e = e;
2953
        }
2954
        return result;
2955
      }
2956
    }
2957
 
4496 mandeep.dh 2958
  }
2959
 
2960
  public static class createPurchaseOrder_args implements org.apache.thrift.TBase<createPurchaseOrder_args, createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
2961
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_args");
2962
 
2963
    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);
2964
 
2965
    private PurchaseOrder purchaseOrder; // required
2966
 
2967
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2968
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2969
      PURCHASE_ORDER((short)1, "purchaseOrder");
2970
 
2971
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2972
 
2973
      static {
2974
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2975
          byName.put(field.getFieldName(), field);
2976
        }
2977
      }
2978
 
2979
      /**
2980
       * Find the _Fields constant that matches fieldId, or null if its not found.
2981
       */
2982
      public static _Fields findByThriftId(int fieldId) {
2983
        switch(fieldId) {
2984
          case 1: // PURCHASE_ORDER
2985
            return PURCHASE_ORDER;
2986
          default:
2987
            return null;
2988
        }
2989
      }
2990
 
2991
      /**
2992
       * Find the _Fields constant that matches fieldId, throwing an exception
2993
       * if it is not found.
2994
       */
2995
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2996
        _Fields fields = findByThriftId(fieldId);
2997
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2998
        return fields;
2999
      }
3000
 
3001
      /**
3002
       * Find the _Fields constant that matches name, or null if its not found.
3003
       */
3004
      public static _Fields findByName(String name) {
3005
        return byName.get(name);
3006
      }
3007
 
3008
      private final short _thriftId;
3009
      private final String _fieldName;
3010
 
3011
      _Fields(short thriftId, String fieldName) {
3012
        _thriftId = thriftId;
3013
        _fieldName = fieldName;
3014
      }
3015
 
3016
      public short getThriftFieldId() {
3017
        return _thriftId;
3018
      }
3019
 
3020
      public String getFieldName() {
3021
        return _fieldName;
3022
      }
3023
    }
3024
 
3025
    // isset id assignments
3026
 
3027
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3028
    static {
3029
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3030
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3031
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
3032
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3033
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_args.class, metaDataMap);
3034
    }
3035
 
3036
    public createPurchaseOrder_args() {
3037
    }
3038
 
3039
    public createPurchaseOrder_args(
3040
      PurchaseOrder purchaseOrder)
3041
    {
3042
      this();
3043
      this.purchaseOrder = purchaseOrder;
3044
    }
3045
 
3046
    /**
3047
     * Performs a deep copy on <i>other</i>.
3048
     */
3049
    public createPurchaseOrder_args(createPurchaseOrder_args other) {
3050
      if (other.isSetPurchaseOrder()) {
3051
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
3052
      }
3053
    }
3054
 
3055
    public createPurchaseOrder_args deepCopy() {
3056
      return new createPurchaseOrder_args(this);
3057
    }
3058
 
3059
    @Override
3060
    public void clear() {
3061
      this.purchaseOrder = null;
3062
    }
3063
 
3064
    public PurchaseOrder getPurchaseOrder() {
3065
      return this.purchaseOrder;
3066
    }
3067
 
3068
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
3069
      this.purchaseOrder = purchaseOrder;
3070
    }
3071
 
3072
    public void unsetPurchaseOrder() {
3073
      this.purchaseOrder = null;
3074
    }
3075
 
3076
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
3077
    public boolean isSetPurchaseOrder() {
3078
      return this.purchaseOrder != null;
3079
    }
3080
 
3081
    public void setPurchaseOrderIsSet(boolean value) {
3082
      if (!value) {
3083
        this.purchaseOrder = null;
3084
      }
3085
    }
3086
 
3087
    public void setFieldValue(_Fields field, Object value) {
3088
      switch (field) {
3089
      case PURCHASE_ORDER:
3090
        if (value == null) {
3091
          unsetPurchaseOrder();
3092
        } else {
3093
          setPurchaseOrder((PurchaseOrder)value);
3094
        }
3095
        break;
3096
 
3097
      }
3098
    }
3099
 
3100
    public Object getFieldValue(_Fields field) {
3101
      switch (field) {
3102
      case PURCHASE_ORDER:
3103
        return getPurchaseOrder();
3104
 
3105
      }
3106
      throw new IllegalStateException();
3107
    }
3108
 
3109
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3110
    public boolean isSet(_Fields field) {
3111
      if (field == null) {
3112
        throw new IllegalArgumentException();
3113
      }
3114
 
3115
      switch (field) {
3116
      case PURCHASE_ORDER:
3117
        return isSetPurchaseOrder();
3118
      }
3119
      throw new IllegalStateException();
3120
    }
3121
 
3122
    @Override
3123
    public boolean equals(Object that) {
3124
      if (that == null)
3125
        return false;
3126
      if (that instanceof createPurchaseOrder_args)
3127
        return this.equals((createPurchaseOrder_args)that);
3128
      return false;
3129
    }
3130
 
3131
    public boolean equals(createPurchaseOrder_args that) {
3132
      if (that == null)
3133
        return false;
3134
 
3135
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
3136
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
3137
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
3138
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
3139
          return false;
3140
        if (!this.purchaseOrder.equals(that.purchaseOrder))
3141
          return false;
3142
      }
3143
 
3144
      return true;
3145
    }
3146
 
3147
    @Override
3148
    public int hashCode() {
3149
      return 0;
3150
    }
3151
 
3152
    public int compareTo(createPurchaseOrder_args other) {
3153
      if (!getClass().equals(other.getClass())) {
3154
        return getClass().getName().compareTo(other.getClass().getName());
3155
      }
3156
 
3157
      int lastComparison = 0;
3158
      createPurchaseOrder_args typedOther = (createPurchaseOrder_args)other;
3159
 
3160
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
3161
      if (lastComparison != 0) {
3162
        return lastComparison;
3163
      }
3164
      if (isSetPurchaseOrder()) {
3165
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
3166
        if (lastComparison != 0) {
3167
          return lastComparison;
3168
        }
3169
      }
3170
      return 0;
3171
    }
3172
 
3173
    public _Fields fieldForId(int fieldId) {
3174
      return _Fields.findByThriftId(fieldId);
3175
    }
3176
 
3177
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3178
      org.apache.thrift.protocol.TField field;
3179
      iprot.readStructBegin();
3180
      while (true)
3181
      {
3182
        field = iprot.readFieldBegin();
3183
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3184
          break;
3185
        }
3186
        switch (field.id) {
3187
          case 1: // PURCHASE_ORDER
3188
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3189
              this.purchaseOrder = new PurchaseOrder();
3190
              this.purchaseOrder.read(iprot);
3191
            } else { 
3192
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3193
            }
3194
            break;
3195
          default:
3196
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3197
        }
3198
        iprot.readFieldEnd();
3199
      }
3200
      iprot.readStructEnd();
3201
      validate();
3202
    }
3203
 
3204
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3205
      validate();
3206
 
3207
      oprot.writeStructBegin(STRUCT_DESC);
3208
      if (this.purchaseOrder != null) {
3209
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
3210
        this.purchaseOrder.write(oprot);
3211
        oprot.writeFieldEnd();
3212
      }
3213
      oprot.writeFieldStop();
3214
      oprot.writeStructEnd();
3215
    }
3216
 
3217
    @Override
3218
    public String toString() {
3219
      StringBuilder sb = new StringBuilder("createPurchaseOrder_args(");
3220
      boolean first = true;
3221
 
3222
      sb.append("purchaseOrder:");
3223
      if (this.purchaseOrder == null) {
3224
        sb.append("null");
3225
      } else {
3226
        sb.append(this.purchaseOrder);
3227
      }
3228
      first = false;
3229
      sb.append(")");
3230
      return sb.toString();
3231
    }
3232
 
3233
    public void validate() throws org.apache.thrift.TException {
3234
      // check for required fields
3235
    }
3236
 
3237
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3238
      try {
3239
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3240
      } catch (org.apache.thrift.TException te) {
3241
        throw new java.io.IOException(te);
3242
      }
3243
    }
3244
 
3245
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3246
      try {
3247
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3248
      } catch (org.apache.thrift.TException te) {
3249
        throw new java.io.IOException(te);
3250
      }
3251
    }
3252
 
3253
  }
3254
 
3255
  public static class createPurchaseOrder_result implements org.apache.thrift.TBase<createPurchaseOrder_result, createPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
3256
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_result");
3257
 
3258
    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);
3259
    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);
3260
 
3261
    private long success; // required
3262
    private PurchaseServiceException e; // required
3263
 
3264
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3265
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3266
      SUCCESS((short)0, "success"),
3267
      E((short)1, "e");
3268
 
3269
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3270
 
3271
      static {
3272
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3273
          byName.put(field.getFieldName(), field);
3274
        }
3275
      }
3276
 
3277
      /**
3278
       * Find the _Fields constant that matches fieldId, or null if its not found.
3279
       */
3280
      public static _Fields findByThriftId(int fieldId) {
3281
        switch(fieldId) {
3282
          case 0: // SUCCESS
3283
            return SUCCESS;
3284
          case 1: // E
3285
            return E;
3286
          default:
3287
            return null;
3288
        }
3289
      }
3290
 
3291
      /**
3292
       * Find the _Fields constant that matches fieldId, throwing an exception
3293
       * if it is not found.
3294
       */
3295
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3296
        _Fields fields = findByThriftId(fieldId);
3297
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3298
        return fields;
3299
      }
3300
 
3301
      /**
3302
       * Find the _Fields constant that matches name, or null if its not found.
3303
       */
3304
      public static _Fields findByName(String name) {
3305
        return byName.get(name);
3306
      }
3307
 
3308
      private final short _thriftId;
3309
      private final String _fieldName;
3310
 
3311
      _Fields(short thriftId, String fieldName) {
3312
        _thriftId = thriftId;
3313
        _fieldName = fieldName;
3314
      }
3315
 
3316
      public short getThriftFieldId() {
3317
        return _thriftId;
3318
      }
3319
 
3320
      public String getFieldName() {
3321
        return _fieldName;
3322
      }
3323
    }
3324
 
3325
    // isset id assignments
3326
    private static final int __SUCCESS_ISSET_ID = 0;
3327
    private BitSet __isset_bit_vector = new BitSet(1);
3328
 
3329
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3330
    static {
3331
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3332
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3333
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3334
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3335
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3336
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3337
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_result.class, metaDataMap);
3338
    }
3339
 
3340
    public createPurchaseOrder_result() {
3341
    }
3342
 
3343
    public createPurchaseOrder_result(
3344
      long success,
3345
      PurchaseServiceException e)
3346
    {
3347
      this();
3348
      this.success = success;
3349
      setSuccessIsSet(true);
3350
      this.e = e;
3351
    }
3352
 
3353
    /**
3354
     * Performs a deep copy on <i>other</i>.
3355
     */
3356
    public createPurchaseOrder_result(createPurchaseOrder_result other) {
3357
      __isset_bit_vector.clear();
3358
      __isset_bit_vector.or(other.__isset_bit_vector);
3359
      this.success = other.success;
3360
      if (other.isSetE()) {
3361
        this.e = new PurchaseServiceException(other.e);
3362
      }
3363
    }
3364
 
3365
    public createPurchaseOrder_result deepCopy() {
3366
      return new createPurchaseOrder_result(this);
3367
    }
3368
 
3369
    @Override
3370
    public void clear() {
3371
      setSuccessIsSet(false);
3372
      this.success = 0;
3373
      this.e = null;
3374
    }
3375
 
3376
    public long getSuccess() {
3377
      return this.success;
3378
    }
3379
 
3380
    public void setSuccess(long success) {
3381
      this.success = success;
3382
      setSuccessIsSet(true);
3383
    }
3384
 
3385
    public void unsetSuccess() {
3386
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
3387
    }
3388
 
3389
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
3390
    public boolean isSetSuccess() {
3391
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
3392
    }
3393
 
3394
    public void setSuccessIsSet(boolean value) {
3395
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
3396
    }
3397
 
3398
    public PurchaseServiceException getE() {
3399
      return this.e;
3400
    }
3401
 
3402
    public void setE(PurchaseServiceException e) {
3403
      this.e = e;
3404
    }
3405
 
3406
    public void unsetE() {
3407
      this.e = null;
3408
    }
3409
 
3410
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
3411
    public boolean isSetE() {
3412
      return this.e != null;
3413
    }
3414
 
3415
    public void setEIsSet(boolean value) {
3416
      if (!value) {
3417
        this.e = null;
3418
      }
3419
    }
3420
 
3421
    public void setFieldValue(_Fields field, Object value) {
3422
      switch (field) {
3423
      case SUCCESS:
3424
        if (value == null) {
3425
          unsetSuccess();
3426
        } else {
3427
          setSuccess((Long)value);
3428
        }
3429
        break;
3430
 
3431
      case E:
3432
        if (value == null) {
3433
          unsetE();
3434
        } else {
3435
          setE((PurchaseServiceException)value);
3436
        }
3437
        break;
3438
 
3439
      }
3440
    }
3441
 
3442
    public Object getFieldValue(_Fields field) {
3443
      switch (field) {
3444
      case SUCCESS:
3445
        return Long.valueOf(getSuccess());
3446
 
3447
      case E:
3448
        return getE();
3449
 
3450
      }
3451
      throw new IllegalStateException();
3452
    }
3453
 
3454
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3455
    public boolean isSet(_Fields field) {
3456
      if (field == null) {
3457
        throw new IllegalArgumentException();
3458
      }
3459
 
3460
      switch (field) {
3461
      case SUCCESS:
3462
        return isSetSuccess();
3463
      case E:
3464
        return isSetE();
3465
      }
3466
      throw new IllegalStateException();
3467
    }
3468
 
3469
    @Override
3470
    public boolean equals(Object that) {
3471
      if (that == null)
3472
        return false;
3473
      if (that instanceof createPurchaseOrder_result)
3474
        return this.equals((createPurchaseOrder_result)that);
3475
      return false;
3476
    }
3477
 
3478
    public boolean equals(createPurchaseOrder_result that) {
3479
      if (that == null)
3480
        return false;
3481
 
3482
      boolean this_present_success = true;
3483
      boolean that_present_success = true;
3484
      if (this_present_success || that_present_success) {
3485
        if (!(this_present_success && that_present_success))
3486
          return false;
3487
        if (this.success != that.success)
3488
          return false;
3489
      }
3490
 
3491
      boolean this_present_e = true && this.isSetE();
3492
      boolean that_present_e = true && that.isSetE();
3493
      if (this_present_e || that_present_e) {
3494
        if (!(this_present_e && that_present_e))
3495
          return false;
3496
        if (!this.e.equals(that.e))
3497
          return false;
3498
      }
3499
 
3500
      return true;
3501
    }
3502
 
3503
    @Override
3504
    public int hashCode() {
3505
      return 0;
3506
    }
3507
 
3508
    public int compareTo(createPurchaseOrder_result other) {
3509
      if (!getClass().equals(other.getClass())) {
3510
        return getClass().getName().compareTo(other.getClass().getName());
3511
      }
3512
 
3513
      int lastComparison = 0;
3514
      createPurchaseOrder_result typedOther = (createPurchaseOrder_result)other;
3515
 
3516
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3517
      if (lastComparison != 0) {
3518
        return lastComparison;
3519
      }
3520
      if (isSetSuccess()) {
3521
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3522
        if (lastComparison != 0) {
3523
          return lastComparison;
3524
        }
3525
      }
3526
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
3527
      if (lastComparison != 0) {
3528
        return lastComparison;
3529
      }
3530
      if (isSetE()) {
3531
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
3532
        if (lastComparison != 0) {
3533
          return lastComparison;
3534
        }
3535
      }
3536
      return 0;
3537
    }
3538
 
3539
    public _Fields fieldForId(int fieldId) {
3540
      return _Fields.findByThriftId(fieldId);
3541
    }
3542
 
3543
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3544
      org.apache.thrift.protocol.TField field;
3545
      iprot.readStructBegin();
3546
      while (true)
3547
      {
3548
        field = iprot.readFieldBegin();
3549
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3550
          break;
3551
        }
3552
        switch (field.id) {
3553
          case 0: // SUCCESS
3554
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3555
              this.success = iprot.readI64();
3556
              setSuccessIsSet(true);
3557
            } else { 
3558
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3559
            }
3560
            break;
3561
          case 1: // E
3562
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3563
              this.e = new PurchaseServiceException();
3564
              this.e.read(iprot);
3565
            } else { 
3566
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3567
            }
3568
            break;
3569
          default:
3570
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3571
        }
3572
        iprot.readFieldEnd();
3573
      }
3574
      iprot.readStructEnd();
3575
      validate();
3576
    }
3577
 
3578
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3579
      oprot.writeStructBegin(STRUCT_DESC);
3580
 
3581
      if (this.isSetSuccess()) {
3582
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3583
        oprot.writeI64(this.success);
3584
        oprot.writeFieldEnd();
3585
      } else if (this.isSetE()) {
3586
        oprot.writeFieldBegin(E_FIELD_DESC);
3587
        this.e.write(oprot);
3588
        oprot.writeFieldEnd();
3589
      }
3590
      oprot.writeFieldStop();
3591
      oprot.writeStructEnd();
3592
    }
3593
 
3594
    @Override
3595
    public String toString() {
3596
      StringBuilder sb = new StringBuilder("createPurchaseOrder_result(");
3597
      boolean first = true;
3598
 
3599
      sb.append("success:");
3600
      sb.append(this.success);
3601
      first = false;
3602
      if (!first) sb.append(", ");
3603
      sb.append("e:");
3604
      if (this.e == null) {
3605
        sb.append("null");
3606
      } else {
3607
        sb.append(this.e);
3608
      }
3609
      first = false;
3610
      sb.append(")");
3611
      return sb.toString();
3612
    }
3613
 
3614
    public void validate() throws org.apache.thrift.TException {
3615
      // check for required fields
3616
    }
3617
 
3618
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3619
      try {
3620
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3621
      } catch (org.apache.thrift.TException te) {
3622
        throw new java.io.IOException(te);
3623
      }
3624
    }
3625
 
3626
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3627
      try {
3628
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3629
      } catch (org.apache.thrift.TException te) {
3630
        throw new java.io.IOException(te);
3631
      }
3632
    }
3633
 
3634
  }
3635
 
3636
  public static class getPurchaseOrder_args implements org.apache.thrift.TBase<getPurchaseOrder_args, getPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
3637
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_args");
3638
 
3639
    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);
3640
 
3641
    private long id; // required
3642
 
3643
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3644
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3645
      ID((short)1, "id");
3646
 
3647
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3648
 
3649
      static {
3650
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3651
          byName.put(field.getFieldName(), field);
3652
        }
3653
      }
3654
 
3655
      /**
3656
       * Find the _Fields constant that matches fieldId, or null if its not found.
3657
       */
3658
      public static _Fields findByThriftId(int fieldId) {
3659
        switch(fieldId) {
3660
          case 1: // ID
3661
            return ID;
3662
          default:
3663
            return null;
3664
        }
3665
      }
3666
 
3667
      /**
3668
       * Find the _Fields constant that matches fieldId, throwing an exception
3669
       * if it is not found.
3670
       */
3671
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3672
        _Fields fields = findByThriftId(fieldId);
3673
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3674
        return fields;
3675
      }
3676
 
3677
      /**
3678
       * Find the _Fields constant that matches name, or null if its not found.
3679
       */
3680
      public static _Fields findByName(String name) {
3681
        return byName.get(name);
3682
      }
3683
 
3684
      private final short _thriftId;
3685
      private final String _fieldName;
3686
 
3687
      _Fields(short thriftId, String fieldName) {
3688
        _thriftId = thriftId;
3689
        _fieldName = fieldName;
3690
      }
3691
 
3692
      public short getThriftFieldId() {
3693
        return _thriftId;
3694
      }
3695
 
3696
      public String getFieldName() {
3697
        return _fieldName;
3698
      }
3699
    }
3700
 
3701
    // isset id assignments
3702
    private static final int __ID_ISSET_ID = 0;
3703
    private BitSet __isset_bit_vector = new BitSet(1);
3704
 
3705
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3706
    static {
3707
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3708
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3709
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3710
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3711
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_args.class, metaDataMap);
3712
    }
3713
 
3714
    public getPurchaseOrder_args() {
3715
    }
3716
 
3717
    public getPurchaseOrder_args(
3718
      long id)
3719
    {
3720
      this();
3721
      this.id = id;
3722
      setIdIsSet(true);
3723
    }
3724
 
3725
    /**
3726
     * Performs a deep copy on <i>other</i>.
3727
     */
3728
    public getPurchaseOrder_args(getPurchaseOrder_args other) {
3729
      __isset_bit_vector.clear();
3730
      __isset_bit_vector.or(other.__isset_bit_vector);
3731
      this.id = other.id;
3732
    }
3733
 
3734
    public getPurchaseOrder_args deepCopy() {
3735
      return new getPurchaseOrder_args(this);
3736
    }
3737
 
3738
    @Override
3739
    public void clear() {
3740
      setIdIsSet(false);
3741
      this.id = 0;
3742
    }
3743
 
3744
    public long getId() {
3745
      return this.id;
3746
    }
3747
 
3748
    public void setId(long id) {
3749
      this.id = id;
3750
      setIdIsSet(true);
3751
    }
3752
 
3753
    public void unsetId() {
3754
      __isset_bit_vector.clear(__ID_ISSET_ID);
3755
    }
3756
 
3757
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
3758
    public boolean isSetId() {
3759
      return __isset_bit_vector.get(__ID_ISSET_ID);
3760
    }
3761
 
3762
    public void setIdIsSet(boolean value) {
3763
      __isset_bit_vector.set(__ID_ISSET_ID, value);
3764
    }
3765
 
3766
    public void setFieldValue(_Fields field, Object value) {
3767
      switch (field) {
3768
      case ID:
3769
        if (value == null) {
3770
          unsetId();
3771
        } else {
3772
          setId((Long)value);
3773
        }
3774
        break;
3775
 
3776
      }
3777
    }
3778
 
3779
    public Object getFieldValue(_Fields field) {
3780
      switch (field) {
3781
      case ID:
3782
        return Long.valueOf(getId());
3783
 
3784
      }
3785
      throw new IllegalStateException();
3786
    }
3787
 
3788
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3789
    public boolean isSet(_Fields field) {
3790
      if (field == null) {
3791
        throw new IllegalArgumentException();
3792
      }
3793
 
3794
      switch (field) {
3795
      case ID:
3796
        return isSetId();
3797
      }
3798
      throw new IllegalStateException();
3799
    }
3800
 
3801
    @Override
3802
    public boolean equals(Object that) {
3803
      if (that == null)
3804
        return false;
3805
      if (that instanceof getPurchaseOrder_args)
3806
        return this.equals((getPurchaseOrder_args)that);
3807
      return false;
3808
    }
3809
 
3810
    public boolean equals(getPurchaseOrder_args that) {
3811
      if (that == null)
3812
        return false;
3813
 
3814
      boolean this_present_id = true;
3815
      boolean that_present_id = true;
3816
      if (this_present_id || that_present_id) {
3817
        if (!(this_present_id && that_present_id))
3818
          return false;
3819
        if (this.id != that.id)
3820
          return false;
3821
      }
3822
 
3823
      return true;
3824
    }
3825
 
3826
    @Override
3827
    public int hashCode() {
3828
      return 0;
3829
    }
3830
 
3831
    public int compareTo(getPurchaseOrder_args other) {
3832
      if (!getClass().equals(other.getClass())) {
3833
        return getClass().getName().compareTo(other.getClass().getName());
3834
      }
3835
 
3836
      int lastComparison = 0;
3837
      getPurchaseOrder_args typedOther = (getPurchaseOrder_args)other;
3838
 
3839
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
3840
      if (lastComparison != 0) {
3841
        return lastComparison;
3842
      }
3843
      if (isSetId()) {
3844
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
3845
        if (lastComparison != 0) {
3846
          return lastComparison;
3847
        }
3848
      }
3849
      return 0;
3850
    }
3851
 
3852
    public _Fields fieldForId(int fieldId) {
3853
      return _Fields.findByThriftId(fieldId);
3854
    }
3855
 
3856
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3857
      org.apache.thrift.protocol.TField field;
3858
      iprot.readStructBegin();
3859
      while (true)
3860
      {
3861
        field = iprot.readFieldBegin();
3862
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3863
          break;
3864
        }
3865
        switch (field.id) {
3866
          case 1: // ID
3867
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3868
              this.id = iprot.readI64();
3869
              setIdIsSet(true);
3870
            } else { 
3871
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3872
            }
3873
            break;
3874
          default:
3875
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3876
        }
3877
        iprot.readFieldEnd();
3878
      }
3879
      iprot.readStructEnd();
3880
      validate();
3881
    }
3882
 
3883
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3884
      validate();
3885
 
3886
      oprot.writeStructBegin(STRUCT_DESC);
3887
      oprot.writeFieldBegin(ID_FIELD_DESC);
3888
      oprot.writeI64(this.id);
3889
      oprot.writeFieldEnd();
3890
      oprot.writeFieldStop();
3891
      oprot.writeStructEnd();
3892
    }
3893
 
3894
    @Override
3895
    public String toString() {
3896
      StringBuilder sb = new StringBuilder("getPurchaseOrder_args(");
3897
      boolean first = true;
3898
 
3899
      sb.append("id:");
3900
      sb.append(this.id);
3901
      first = false;
3902
      sb.append(")");
3903
      return sb.toString();
3904
    }
3905
 
3906
    public void validate() throws org.apache.thrift.TException {
3907
      // check for required fields
3908
    }
3909
 
3910
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3911
      try {
3912
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3913
      } catch (org.apache.thrift.TException te) {
3914
        throw new java.io.IOException(te);
3915
      }
3916
    }
3917
 
3918
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3919
      try {
3920
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3921
      } catch (org.apache.thrift.TException te) {
3922
        throw new java.io.IOException(te);
3923
      }
3924
    }
3925
 
3926
  }
3927
 
3928
  public static class getPurchaseOrder_result implements org.apache.thrift.TBase<getPurchaseOrder_result, getPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
3929
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_result");
3930
 
3931
    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);
3932
    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);
3933
 
3934
    private PurchaseOrder success; // required
3935
    private PurchaseServiceException e; // required
3936
 
3937
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3938
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3939
      SUCCESS((short)0, "success"),
3940
      E((short)1, "e");
3941
 
3942
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3943
 
3944
      static {
3945
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3946
          byName.put(field.getFieldName(), field);
3947
        }
3948
      }
3949
 
3950
      /**
3951
       * Find the _Fields constant that matches fieldId, or null if its not found.
3952
       */
3953
      public static _Fields findByThriftId(int fieldId) {
3954
        switch(fieldId) {
3955
          case 0: // SUCCESS
3956
            return SUCCESS;
3957
          case 1: // E
3958
            return E;
3959
          default:
3960
            return null;
3961
        }
3962
      }
3963
 
3964
      /**
3965
       * Find the _Fields constant that matches fieldId, throwing an exception
3966
       * if it is not found.
3967
       */
3968
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3969
        _Fields fields = findByThriftId(fieldId);
3970
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3971
        return fields;
3972
      }
3973
 
3974
      /**
3975
       * Find the _Fields constant that matches name, or null if its not found.
3976
       */
3977
      public static _Fields findByName(String name) {
3978
        return byName.get(name);
3979
      }
3980
 
3981
      private final short _thriftId;
3982
      private final String _fieldName;
3983
 
3984
      _Fields(short thriftId, String fieldName) {
3985
        _thriftId = thriftId;
3986
        _fieldName = fieldName;
3987
      }
3988
 
3989
      public short getThriftFieldId() {
3990
        return _thriftId;
3991
      }
3992
 
3993
      public String getFieldName() {
3994
        return _fieldName;
3995
      }
3996
    }
3997
 
3998
    // isset id assignments
3999
 
4000
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4001
    static {
4002
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4003
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4004
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
4005
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4006
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4007
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4008
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_result.class, metaDataMap);
4009
    }
4010
 
4011
    public getPurchaseOrder_result() {
4012
    }
4013
 
4014
    public getPurchaseOrder_result(
4015
      PurchaseOrder success,
4016
      PurchaseServiceException e)
4017
    {
4018
      this();
4019
      this.success = success;
4020
      this.e = e;
4021
    }
4022
 
4023
    /**
4024
     * Performs a deep copy on <i>other</i>.
4025
     */
4026
    public getPurchaseOrder_result(getPurchaseOrder_result other) {
4027
      if (other.isSetSuccess()) {
4028
        this.success = new PurchaseOrder(other.success);
4029
      }
4030
      if (other.isSetE()) {
4031
        this.e = new PurchaseServiceException(other.e);
4032
      }
4033
    }
4034
 
4035
    public getPurchaseOrder_result deepCopy() {
4036
      return new getPurchaseOrder_result(this);
4037
    }
4038
 
4039
    @Override
4040
    public void clear() {
4041
      this.success = null;
4042
      this.e = null;
4043
    }
4044
 
4045
    public PurchaseOrder getSuccess() {
4046
      return this.success;
4047
    }
4048
 
4049
    public void setSuccess(PurchaseOrder success) {
4050
      this.success = success;
4051
    }
4052
 
4053
    public void unsetSuccess() {
4054
      this.success = null;
4055
    }
4056
 
4057
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
4058
    public boolean isSetSuccess() {
4059
      return this.success != null;
4060
    }
4061
 
4062
    public void setSuccessIsSet(boolean value) {
4063
      if (!value) {
4064
        this.success = null;
4065
      }
4066
    }
4067
 
4068
    public PurchaseServiceException getE() {
4069
      return this.e;
4070
    }
4071
 
4072
    public void setE(PurchaseServiceException e) {
4073
      this.e = e;
4074
    }
4075
 
4076
    public void unsetE() {
4077
      this.e = null;
4078
    }
4079
 
4080
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
4081
    public boolean isSetE() {
4082
      return this.e != null;
4083
    }
4084
 
4085
    public void setEIsSet(boolean value) {
4086
      if (!value) {
4087
        this.e = null;
4088
      }
4089
    }
4090
 
4091
    public void setFieldValue(_Fields field, Object value) {
4092
      switch (field) {
4093
      case SUCCESS:
4094
        if (value == null) {
4095
          unsetSuccess();
4096
        } else {
4097
          setSuccess((PurchaseOrder)value);
4098
        }
4099
        break;
4100
 
4101
      case E:
4102
        if (value == null) {
4103
          unsetE();
4104
        } else {
4105
          setE((PurchaseServiceException)value);
4106
        }
4107
        break;
4108
 
4109
      }
4110
    }
4111
 
4112
    public Object getFieldValue(_Fields field) {
4113
      switch (field) {
4114
      case SUCCESS:
4115
        return getSuccess();
4116
 
4117
      case E:
4118
        return getE();
4119
 
4120
      }
4121
      throw new IllegalStateException();
4122
    }
4123
 
4124
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4125
    public boolean isSet(_Fields field) {
4126
      if (field == null) {
4127
        throw new IllegalArgumentException();
4128
      }
4129
 
4130
      switch (field) {
4131
      case SUCCESS:
4132
        return isSetSuccess();
4133
      case E:
4134
        return isSetE();
4135
      }
4136
      throw new IllegalStateException();
4137
    }
4138
 
4139
    @Override
4140
    public boolean equals(Object that) {
4141
      if (that == null)
4142
        return false;
4143
      if (that instanceof getPurchaseOrder_result)
4144
        return this.equals((getPurchaseOrder_result)that);
4145
      return false;
4146
    }
4147
 
4148
    public boolean equals(getPurchaseOrder_result that) {
4149
      if (that == null)
4150
        return false;
4151
 
4152
      boolean this_present_success = true && this.isSetSuccess();
4153
      boolean that_present_success = true && that.isSetSuccess();
4154
      if (this_present_success || that_present_success) {
4155
        if (!(this_present_success && that_present_success))
4156
          return false;
4157
        if (!this.success.equals(that.success))
4158
          return false;
4159
      }
4160
 
4161
      boolean this_present_e = true && this.isSetE();
4162
      boolean that_present_e = true && that.isSetE();
4163
      if (this_present_e || that_present_e) {
4164
        if (!(this_present_e && that_present_e))
4165
          return false;
4166
        if (!this.e.equals(that.e))
4167
          return false;
4168
      }
4169
 
4170
      return true;
4171
    }
4172
 
4173
    @Override
4174
    public int hashCode() {
4175
      return 0;
4176
    }
4177
 
4178
    public int compareTo(getPurchaseOrder_result other) {
4179
      if (!getClass().equals(other.getClass())) {
4180
        return getClass().getName().compareTo(other.getClass().getName());
4181
      }
4182
 
4183
      int lastComparison = 0;
4184
      getPurchaseOrder_result typedOther = (getPurchaseOrder_result)other;
4185
 
4186
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
4187
      if (lastComparison != 0) {
4188
        return lastComparison;
4189
      }
4190
      if (isSetSuccess()) {
4191
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4192
        if (lastComparison != 0) {
4193
          return lastComparison;
4194
        }
4195
      }
4196
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
4197
      if (lastComparison != 0) {
4198
        return lastComparison;
4199
      }
4200
      if (isSetE()) {
4201
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
4202
        if (lastComparison != 0) {
4203
          return lastComparison;
4204
        }
4205
      }
4206
      return 0;
4207
    }
4208
 
4209
    public _Fields fieldForId(int fieldId) {
4210
      return _Fields.findByThriftId(fieldId);
4211
    }
4212
 
4213
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4214
      org.apache.thrift.protocol.TField field;
4215
      iprot.readStructBegin();
4216
      while (true)
4217
      {
4218
        field = iprot.readFieldBegin();
4219
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4220
          break;
4221
        }
4222
        switch (field.id) {
4223
          case 0: // SUCCESS
4224
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4225
              this.success = new PurchaseOrder();
4226
              this.success.read(iprot);
4227
            } else { 
4228
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4229
            }
4230
            break;
4231
          case 1: // E
4232
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4233
              this.e = new PurchaseServiceException();
4234
              this.e.read(iprot);
4235
            } else { 
4236
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4237
            }
4238
            break;
4239
          default:
4240
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4241
        }
4242
        iprot.readFieldEnd();
4243
      }
4244
      iprot.readStructEnd();
4245
      validate();
4246
    }
4247
 
4248
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4249
      oprot.writeStructBegin(STRUCT_DESC);
4250
 
4251
      if (this.isSetSuccess()) {
4252
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4253
        this.success.write(oprot);
4254
        oprot.writeFieldEnd();
4255
      } else if (this.isSetE()) {
4256
        oprot.writeFieldBegin(E_FIELD_DESC);
4257
        this.e.write(oprot);
4258
        oprot.writeFieldEnd();
4259
      }
4260
      oprot.writeFieldStop();
4261
      oprot.writeStructEnd();
4262
    }
4263
 
4264
    @Override
4265
    public String toString() {
4266
      StringBuilder sb = new StringBuilder("getPurchaseOrder_result(");
4267
      boolean first = true;
4268
 
4269
      sb.append("success:");
4270
      if (this.success == null) {
4271
        sb.append("null");
4272
      } else {
4273
        sb.append(this.success);
4274
      }
4275
      first = false;
4276
      if (!first) sb.append(", ");
4277
      sb.append("e:");
4278
      if (this.e == null) {
4279
        sb.append("null");
4280
      } else {
4281
        sb.append(this.e);
4282
      }
4283
      first = false;
4284
      sb.append(")");
4285
      return sb.toString();
4286
    }
4287
 
4288
    public void validate() throws org.apache.thrift.TException {
4289
      // check for required fields
4290
    }
4291
 
4292
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4293
      try {
4294
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4295
      } catch (org.apache.thrift.TException te) {
4296
        throw new java.io.IOException(te);
4297
      }
4298
    }
4299
 
4300
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4301
      try {
4302
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4303
      } catch (org.apache.thrift.TException te) {
4304
        throw new java.io.IOException(te);
4305
      }
4306
    }
4307
 
4308
  }
4309
 
4310
  public static class getAllPurchaseOrders_args implements org.apache.thrift.TBase<getAllPurchaseOrders_args, getAllPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
4311
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_args");
4312
 
4313
    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);
4314
 
4315
    private POStatus status; // required
4316
 
4317
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4318
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4319
      /**
4320
       * 
4321
       * @see POStatus
4322
       */
4323
      STATUS((short)1, "status");
4324
 
4325
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4326
 
4327
      static {
4328
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4329
          byName.put(field.getFieldName(), field);
4330
        }
4331
      }
4332
 
4333
      /**
4334
       * Find the _Fields constant that matches fieldId, or null if its not found.
4335
       */
4336
      public static _Fields findByThriftId(int fieldId) {
4337
        switch(fieldId) {
4338
          case 1: // STATUS
4339
            return STATUS;
4340
          default:
4341
            return null;
4342
        }
4343
      }
4344
 
4345
      /**
4346
       * Find the _Fields constant that matches fieldId, throwing an exception
4347
       * if it is not found.
4348
       */
4349
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4350
        _Fields fields = findByThriftId(fieldId);
4351
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4352
        return fields;
4353
      }
4354
 
4355
      /**
4356
       * Find the _Fields constant that matches name, or null if its not found.
4357
       */
4358
      public static _Fields findByName(String name) {
4359
        return byName.get(name);
4360
      }
4361
 
4362
      private final short _thriftId;
4363
      private final String _fieldName;
4364
 
4365
      _Fields(short thriftId, String fieldName) {
4366
        _thriftId = thriftId;
4367
        _fieldName = fieldName;
4368
      }
4369
 
4370
      public short getThriftFieldId() {
4371
        return _thriftId;
4372
      }
4373
 
4374
      public String getFieldName() {
4375
        return _fieldName;
4376
      }
4377
    }
4378
 
4379
    // isset id assignments
4380
 
4381
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4382
    static {
4383
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4384
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4385
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, POStatus.class)));
4386
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4387
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_args.class, metaDataMap);
4388
    }
4389
 
4390
    public getAllPurchaseOrders_args() {
4391
    }
4392
 
4393
    public getAllPurchaseOrders_args(
4394
      POStatus status)
4395
    {
4396
      this();
4397
      this.status = status;
4398
    }
4399
 
4400
    /**
4401
     * Performs a deep copy on <i>other</i>.
4402
     */
4403
    public getAllPurchaseOrders_args(getAllPurchaseOrders_args other) {
4404
      if (other.isSetStatus()) {
4405
        this.status = other.status;
4406
      }
4407
    }
4408
 
4409
    public getAllPurchaseOrders_args deepCopy() {
4410
      return new getAllPurchaseOrders_args(this);
4411
    }
4412
 
4413
    @Override
4414
    public void clear() {
4415
      this.status = null;
4416
    }
4417
 
4418
    /**
4419
     * 
4420
     * @see POStatus
4421
     */
4422
    public POStatus getStatus() {
4423
      return this.status;
4424
    }
4425
 
4426
    /**
4427
     * 
4428
     * @see POStatus
4429
     */
4430
    public void setStatus(POStatus status) {
4431
      this.status = status;
4432
    }
4433
 
4434
    public void unsetStatus() {
4435
      this.status = null;
4436
    }
4437
 
4438
    /** Returns true if field status is set (has been assigned a value) and false otherwise */
4439
    public boolean isSetStatus() {
4440
      return this.status != null;
4441
    }
4442
 
4443
    public void setStatusIsSet(boolean value) {
4444
      if (!value) {
4445
        this.status = null;
4446
      }
4447
    }
4448
 
4449
    public void setFieldValue(_Fields field, Object value) {
4450
      switch (field) {
4451
      case STATUS:
4452
        if (value == null) {
4453
          unsetStatus();
4454
        } else {
4455
          setStatus((POStatus)value);
4456
        }
4457
        break;
4458
 
4459
      }
4460
    }
4461
 
4462
    public Object getFieldValue(_Fields field) {
4463
      switch (field) {
4464
      case STATUS:
4465
        return getStatus();
4466
 
4467
      }
4468
      throw new IllegalStateException();
4469
    }
4470
 
4471
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4472
    public boolean isSet(_Fields field) {
4473
      if (field == null) {
4474
        throw new IllegalArgumentException();
4475
      }
4476
 
4477
      switch (field) {
4478
      case STATUS:
4479
        return isSetStatus();
4480
      }
4481
      throw new IllegalStateException();
4482
    }
4483
 
4484
    @Override
4485
    public boolean equals(Object that) {
4486
      if (that == null)
4487
        return false;
4488
      if (that instanceof getAllPurchaseOrders_args)
4489
        return this.equals((getAllPurchaseOrders_args)that);
4490
      return false;
4491
    }
4492
 
4493
    public boolean equals(getAllPurchaseOrders_args that) {
4494
      if (that == null)
4495
        return false;
4496
 
4497
      boolean this_present_status = true && this.isSetStatus();
4498
      boolean that_present_status = true && that.isSetStatus();
4499
      if (this_present_status || that_present_status) {
4500
        if (!(this_present_status && that_present_status))
4501
          return false;
4502
        if (!this.status.equals(that.status))
4503
          return false;
4504
      }
4505
 
4506
      return true;
4507
    }
4508
 
4509
    @Override
4510
    public int hashCode() {
4511
      return 0;
4512
    }
4513
 
4514
    public int compareTo(getAllPurchaseOrders_args other) {
4515
      if (!getClass().equals(other.getClass())) {
4516
        return getClass().getName().compareTo(other.getClass().getName());
4517
      }
4518
 
4519
      int lastComparison = 0;
4520
      getAllPurchaseOrders_args typedOther = (getAllPurchaseOrders_args)other;
4521
 
4522
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
4523
      if (lastComparison != 0) {
4524
        return lastComparison;
4525
      }
4526
      if (isSetStatus()) {
4527
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
4528
        if (lastComparison != 0) {
4529
          return lastComparison;
4530
        }
4531
      }
4532
      return 0;
4533
    }
4534
 
4535
    public _Fields fieldForId(int fieldId) {
4536
      return _Fields.findByThriftId(fieldId);
4537
    }
4538
 
4539
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4540
      org.apache.thrift.protocol.TField field;
4541
      iprot.readStructBegin();
4542
      while (true)
4543
      {
4544
        field = iprot.readFieldBegin();
4545
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4546
          break;
4547
        }
4548
        switch (field.id) {
4549
          case 1: // STATUS
4550
            if (field.type == org.apache.thrift.protocol.TType.I32) {
4551
              this.status = POStatus.findByValue(iprot.readI32());
4552
            } else { 
4553
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4554
            }
4555
            break;
4556
          default:
4557
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4558
        }
4559
        iprot.readFieldEnd();
4560
      }
4561
      iprot.readStructEnd();
4562
      validate();
4563
    }
4564
 
4565
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4566
      validate();
4567
 
4568
      oprot.writeStructBegin(STRUCT_DESC);
4569
      if (this.status != null) {
4570
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4571
        oprot.writeI32(this.status.getValue());
4572
        oprot.writeFieldEnd();
4573
      }
4574
      oprot.writeFieldStop();
4575
      oprot.writeStructEnd();
4576
    }
4577
 
4578
    @Override
4579
    public String toString() {
4580
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_args(");
4581
      boolean first = true;
4582
 
4583
      sb.append("status:");
4584
      if (this.status == null) {
4585
        sb.append("null");
4586
      } else {
4587
        sb.append(this.status);
4588
      }
4589
      first = false;
4590
      sb.append(")");
4591
      return sb.toString();
4592
    }
4593
 
4594
    public void validate() throws org.apache.thrift.TException {
4595
      // check for required fields
4596
    }
4597
 
4598
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4599
      try {
4600
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4601
      } catch (org.apache.thrift.TException te) {
4602
        throw new java.io.IOException(te);
4603
      }
4604
    }
4605
 
4606
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4607
      try {
4608
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4609
      } catch (org.apache.thrift.TException te) {
4610
        throw new java.io.IOException(te);
4611
      }
4612
    }
4613
 
4614
  }
4615
 
4616
  public static class getAllPurchaseOrders_result implements org.apache.thrift.TBase<getAllPurchaseOrders_result, getAllPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
4617
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_result");
4618
 
4619
    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);
4620
    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);
4621
 
4622
    private List<PurchaseOrder> success; // required
4623
    private PurchaseServiceException e; // required
4624
 
4625
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4626
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4627
      SUCCESS((short)0, "success"),
4628
      E((short)1, "e");
4629
 
4630
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4631
 
4632
      static {
4633
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4634
          byName.put(field.getFieldName(), field);
4635
        }
4636
      }
4637
 
4638
      /**
4639
       * Find the _Fields constant that matches fieldId, or null if its not found.
4640
       */
4641
      public static _Fields findByThriftId(int fieldId) {
4642
        switch(fieldId) {
4643
          case 0: // SUCCESS
4644
            return SUCCESS;
4645
          case 1: // E
4646
            return E;
4647
          default:
4648
            return null;
4649
        }
4650
      }
4651
 
4652
      /**
4653
       * Find the _Fields constant that matches fieldId, throwing an exception
4654
       * if it is not found.
4655
       */
4656
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4657
        _Fields fields = findByThriftId(fieldId);
4658
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4659
        return fields;
4660
      }
4661
 
4662
      /**
4663
       * Find the _Fields constant that matches name, or null if its not found.
4664
       */
4665
      public static _Fields findByName(String name) {
4666
        return byName.get(name);
4667
      }
4668
 
4669
      private final short _thriftId;
4670
      private final String _fieldName;
4671
 
4672
      _Fields(short thriftId, String fieldName) {
4673
        _thriftId = thriftId;
4674
        _fieldName = fieldName;
4675
      }
4676
 
4677
      public short getThriftFieldId() {
4678
        return _thriftId;
4679
      }
4680
 
4681
      public String getFieldName() {
4682
        return _fieldName;
4683
      }
4684
    }
4685
 
4686
    // isset id assignments
4687
 
4688
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4689
    static {
4690
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4691
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4692
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
4693
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
4694
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4695
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4696
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4697
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_result.class, metaDataMap);
4698
    }
4699
 
4700
    public getAllPurchaseOrders_result() {
4701
    }
4702
 
4703
    public getAllPurchaseOrders_result(
4704
      List<PurchaseOrder> success,
4705
      PurchaseServiceException e)
4706
    {
4707
      this();
4708
      this.success = success;
4709
      this.e = e;
4710
    }
4711
 
4712
    /**
4713
     * Performs a deep copy on <i>other</i>.
4714
     */
4715
    public getAllPurchaseOrders_result(getAllPurchaseOrders_result other) {
4716
      if (other.isSetSuccess()) {
4717
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
4718
        for (PurchaseOrder other_element : other.success) {
4719
          __this__success.add(new PurchaseOrder(other_element));
4720
        }
4721
        this.success = __this__success;
4722
      }
4723
      if (other.isSetE()) {
4724
        this.e = new PurchaseServiceException(other.e);
4725
      }
4726
    }
4727
 
4728
    public getAllPurchaseOrders_result deepCopy() {
4729
      return new getAllPurchaseOrders_result(this);
4730
    }
4731
 
4732
    @Override
4733
    public void clear() {
4734
      this.success = null;
4735
      this.e = null;
4736
    }
4737
 
4738
    public int getSuccessSize() {
4739
      return (this.success == null) ? 0 : this.success.size();
4740
    }
4741
 
4742
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
4743
      return (this.success == null) ? null : this.success.iterator();
4744
    }
4745
 
4746
    public void addToSuccess(PurchaseOrder elem) {
4747
      if (this.success == null) {
4748
        this.success = new ArrayList<PurchaseOrder>();
4749
      }
4750
      this.success.add(elem);
4751
    }
4752
 
4753
    public List<PurchaseOrder> getSuccess() {
4754
      return this.success;
4755
    }
4756
 
4757
    public void setSuccess(List<PurchaseOrder> success) {
4758
      this.success = success;
4759
    }
4760
 
4761
    public void unsetSuccess() {
4762
      this.success = null;
4763
    }
4764
 
4765
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
4766
    public boolean isSetSuccess() {
4767
      return this.success != null;
4768
    }
4769
 
4770
    public void setSuccessIsSet(boolean value) {
4771
      if (!value) {
4772
        this.success = null;
4773
      }
4774
    }
4775
 
4776
    public PurchaseServiceException getE() {
4777
      return this.e;
4778
    }
4779
 
4780
    public void setE(PurchaseServiceException e) {
4781
      this.e = e;
4782
    }
4783
 
4784
    public void unsetE() {
4785
      this.e = null;
4786
    }
4787
 
4788
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
4789
    public boolean isSetE() {
4790
      return this.e != null;
4791
    }
4792
 
4793
    public void setEIsSet(boolean value) {
4794
      if (!value) {
4795
        this.e = null;
4796
      }
4797
    }
4798
 
4799
    public void setFieldValue(_Fields field, Object value) {
4800
      switch (field) {
4801
      case SUCCESS:
4802
        if (value == null) {
4803
          unsetSuccess();
4804
        } else {
4805
          setSuccess((List<PurchaseOrder>)value);
4806
        }
4807
        break;
4808
 
4809
      case E:
4810
        if (value == null) {
4811
          unsetE();
4812
        } else {
4813
          setE((PurchaseServiceException)value);
4814
        }
4815
        break;
4816
 
4817
      }
4818
    }
4819
 
4820
    public Object getFieldValue(_Fields field) {
4821
      switch (field) {
4822
      case SUCCESS:
4823
        return getSuccess();
4824
 
4825
      case E:
4826
        return getE();
4827
 
4828
      }
4829
      throw new IllegalStateException();
4830
    }
4831
 
4832
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4833
    public boolean isSet(_Fields field) {
4834
      if (field == null) {
4835
        throw new IllegalArgumentException();
4836
      }
4837
 
4838
      switch (field) {
4839
      case SUCCESS:
4840
        return isSetSuccess();
4841
      case E:
4842
        return isSetE();
4843
      }
4844
      throw new IllegalStateException();
4845
    }
4846
 
4847
    @Override
4848
    public boolean equals(Object that) {
4849
      if (that == null)
4850
        return false;
4851
      if (that instanceof getAllPurchaseOrders_result)
4852
        return this.equals((getAllPurchaseOrders_result)that);
4853
      return false;
4854
    }
4855
 
4856
    public boolean equals(getAllPurchaseOrders_result that) {
4857
      if (that == null)
4858
        return false;
4859
 
4860
      boolean this_present_success = true && this.isSetSuccess();
4861
      boolean that_present_success = true && that.isSetSuccess();
4862
      if (this_present_success || that_present_success) {
4863
        if (!(this_present_success && that_present_success))
4864
          return false;
4865
        if (!this.success.equals(that.success))
4866
          return false;
4867
      }
4868
 
4869
      boolean this_present_e = true && this.isSetE();
4870
      boolean that_present_e = true && that.isSetE();
4871
      if (this_present_e || that_present_e) {
4872
        if (!(this_present_e && that_present_e))
4873
          return false;
4874
        if (!this.e.equals(that.e))
4875
          return false;
4876
      }
4877
 
4878
      return true;
4879
    }
4880
 
4881
    @Override
4882
    public int hashCode() {
4883
      return 0;
4884
    }
4885
 
4886
    public int compareTo(getAllPurchaseOrders_result other) {
4887
      if (!getClass().equals(other.getClass())) {
4888
        return getClass().getName().compareTo(other.getClass().getName());
4889
      }
4890
 
4891
      int lastComparison = 0;
4892
      getAllPurchaseOrders_result typedOther = (getAllPurchaseOrders_result)other;
4893
 
4894
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
4895
      if (lastComparison != 0) {
4896
        return lastComparison;
4897
      }
4898
      if (isSetSuccess()) {
4899
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4900
        if (lastComparison != 0) {
4901
          return lastComparison;
4902
        }
4903
      }
4904
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
4905
      if (lastComparison != 0) {
4906
        return lastComparison;
4907
      }
4908
      if (isSetE()) {
4909
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
4910
        if (lastComparison != 0) {
4911
          return lastComparison;
4912
        }
4913
      }
4914
      return 0;
4915
    }
4916
 
4917
    public _Fields fieldForId(int fieldId) {
4918
      return _Fields.findByThriftId(fieldId);
4919
    }
4920
 
4921
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4922
      org.apache.thrift.protocol.TField field;
4923
      iprot.readStructBegin();
4924
      while (true)
4925
      {
4926
        field = iprot.readFieldBegin();
4927
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4928
          break;
4929
        }
4930
        switch (field.id) {
4931
          case 0: // SUCCESS
4932
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
4933
              {
4934
                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
4935
                this.success = new ArrayList<PurchaseOrder>(_list4.size);
4936
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
4937
                {
4938
                  PurchaseOrder _elem6; // required
4939
                  _elem6 = new PurchaseOrder();
4940
                  _elem6.read(iprot);
4941
                  this.success.add(_elem6);
4942
                }
4943
                iprot.readListEnd();
4944
              }
4945
            } else { 
4946
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4947
            }
4948
            break;
4949
          case 1: // E
4950
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4951
              this.e = new PurchaseServiceException();
4952
              this.e.read(iprot);
4953
            } else { 
4954
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4955
            }
4956
            break;
4957
          default:
4958
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4959
        }
4960
        iprot.readFieldEnd();
4961
      }
4962
      iprot.readStructEnd();
4963
      validate();
4964
    }
4965
 
4966
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4967
      oprot.writeStructBegin(STRUCT_DESC);
4968
 
4969
      if (this.isSetSuccess()) {
4970
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4971
        {
4972
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
4973
          for (PurchaseOrder _iter7 : this.success)
4974
          {
4975
            _iter7.write(oprot);
4976
          }
4977
          oprot.writeListEnd();
4978
        }
4979
        oprot.writeFieldEnd();
4980
      } else if (this.isSetE()) {
4981
        oprot.writeFieldBegin(E_FIELD_DESC);
4982
        this.e.write(oprot);
4983
        oprot.writeFieldEnd();
4984
      }
4985
      oprot.writeFieldStop();
4986
      oprot.writeStructEnd();
4987
    }
4988
 
4989
    @Override
4990
    public String toString() {
4991
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_result(");
4992
      boolean first = true;
4993
 
4994
      sb.append("success:");
4995
      if (this.success == null) {
4996
        sb.append("null");
4997
      } else {
4998
        sb.append(this.success);
4999
      }
5000
      first = false;
5001
      if (!first) sb.append(", ");
5002
      sb.append("e:");
5003
      if (this.e == null) {
5004
        sb.append("null");
5005
      } else {
5006
        sb.append(this.e);
5007
      }
5008
      first = false;
5009
      sb.append(")");
5010
      return sb.toString();
5011
    }
5012
 
5013
    public void validate() throws org.apache.thrift.TException {
5014
      // check for required fields
5015
    }
5016
 
5017
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5018
      try {
5019
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5020
      } catch (org.apache.thrift.TException te) {
5021
        throw new java.io.IOException(te);
5022
      }
5023
    }
5024
 
5025
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5026
      try {
5027
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5028
      } catch (org.apache.thrift.TException te) {
5029
        throw new java.io.IOException(te);
5030
      }
5031
    }
5032
 
5033
  }
5034
 
5035
  public static class getSupplier_args implements org.apache.thrift.TBase<getSupplier_args, getSupplier_args._Fields>, java.io.Serializable, Cloneable   {
5036
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_args");
5037
 
5038
    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);
5039
 
5040
    private long id; // required
5041
 
5042
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5043
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5044
      ID((short)1, "id");
5045
 
5046
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5047
 
5048
      static {
5049
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5050
          byName.put(field.getFieldName(), field);
5051
        }
5052
      }
5053
 
5054
      /**
5055
       * Find the _Fields constant that matches fieldId, or null if its not found.
5056
       */
5057
      public static _Fields findByThriftId(int fieldId) {
5058
        switch(fieldId) {
5059
          case 1: // ID
5060
            return ID;
5061
          default:
5062
            return null;
5063
        }
5064
      }
5065
 
5066
      /**
5067
       * Find the _Fields constant that matches fieldId, throwing an exception
5068
       * if it is not found.
5069
       */
5070
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5071
        _Fields fields = findByThriftId(fieldId);
5072
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5073
        return fields;
5074
      }
5075
 
5076
      /**
5077
       * Find the _Fields constant that matches name, or null if its not found.
5078
       */
5079
      public static _Fields findByName(String name) {
5080
        return byName.get(name);
5081
      }
5082
 
5083
      private final short _thriftId;
5084
      private final String _fieldName;
5085
 
5086
      _Fields(short thriftId, String fieldName) {
5087
        _thriftId = thriftId;
5088
        _fieldName = fieldName;
5089
      }
5090
 
5091
      public short getThriftFieldId() {
5092
        return _thriftId;
5093
      }
5094
 
5095
      public String getFieldName() {
5096
        return _fieldName;
5097
      }
5098
    }
5099
 
5100
    // isset id assignments
5101
    private static final int __ID_ISSET_ID = 0;
5102
    private BitSet __isset_bit_vector = new BitSet(1);
5103
 
5104
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5105
    static {
5106
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5107
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5108
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5109
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5110
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_args.class, metaDataMap);
5111
    }
5112
 
5113
    public getSupplier_args() {
5114
    }
5115
 
5116
    public getSupplier_args(
5117
      long id)
5118
    {
5119
      this();
5120
      this.id = id;
5121
      setIdIsSet(true);
5122
    }
5123
 
5124
    /**
5125
     * Performs a deep copy on <i>other</i>.
5126
     */
5127
    public getSupplier_args(getSupplier_args other) {
5128
      __isset_bit_vector.clear();
5129
      __isset_bit_vector.or(other.__isset_bit_vector);
5130
      this.id = other.id;
5131
    }
5132
 
5133
    public getSupplier_args deepCopy() {
5134
      return new getSupplier_args(this);
5135
    }
5136
 
5137
    @Override
5138
    public void clear() {
5139
      setIdIsSet(false);
5140
      this.id = 0;
5141
    }
5142
 
5143
    public long getId() {
5144
      return this.id;
5145
    }
5146
 
5147
    public void setId(long id) {
5148
      this.id = id;
5149
      setIdIsSet(true);
5150
    }
5151
 
5152
    public void unsetId() {
5153
      __isset_bit_vector.clear(__ID_ISSET_ID);
5154
    }
5155
 
5156
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
5157
    public boolean isSetId() {
5158
      return __isset_bit_vector.get(__ID_ISSET_ID);
5159
    }
5160
 
5161
    public void setIdIsSet(boolean value) {
5162
      __isset_bit_vector.set(__ID_ISSET_ID, value);
5163
    }
5164
 
5165
    public void setFieldValue(_Fields field, Object value) {
5166
      switch (field) {
5167
      case ID:
5168
        if (value == null) {
5169
          unsetId();
5170
        } else {
5171
          setId((Long)value);
5172
        }
5173
        break;
5174
 
5175
      }
5176
    }
5177
 
5178
    public Object getFieldValue(_Fields field) {
5179
      switch (field) {
5180
      case ID:
5181
        return Long.valueOf(getId());
5182
 
5183
      }
5184
      throw new IllegalStateException();
5185
    }
5186
 
5187
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5188
    public boolean isSet(_Fields field) {
5189
      if (field == null) {
5190
        throw new IllegalArgumentException();
5191
      }
5192
 
5193
      switch (field) {
5194
      case ID:
5195
        return isSetId();
5196
      }
5197
      throw new IllegalStateException();
5198
    }
5199
 
5200
    @Override
5201
    public boolean equals(Object that) {
5202
      if (that == null)
5203
        return false;
5204
      if (that instanceof getSupplier_args)
5205
        return this.equals((getSupplier_args)that);
5206
      return false;
5207
    }
5208
 
5209
    public boolean equals(getSupplier_args that) {
5210
      if (that == null)
5211
        return false;
5212
 
5213
      boolean this_present_id = true;
5214
      boolean that_present_id = true;
5215
      if (this_present_id || that_present_id) {
5216
        if (!(this_present_id && that_present_id))
5217
          return false;
5218
        if (this.id != that.id)
5219
          return false;
5220
      }
5221
 
5222
      return true;
5223
    }
5224
 
5225
    @Override
5226
    public int hashCode() {
5227
      return 0;
5228
    }
5229
 
5230
    public int compareTo(getSupplier_args other) {
5231
      if (!getClass().equals(other.getClass())) {
5232
        return getClass().getName().compareTo(other.getClass().getName());
5233
      }
5234
 
5235
      int lastComparison = 0;
5236
      getSupplier_args typedOther = (getSupplier_args)other;
5237
 
5238
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
5239
      if (lastComparison != 0) {
5240
        return lastComparison;
5241
      }
5242
      if (isSetId()) {
5243
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
5244
        if (lastComparison != 0) {
5245
          return lastComparison;
5246
        }
5247
      }
5248
      return 0;
5249
    }
5250
 
5251
    public _Fields fieldForId(int fieldId) {
5252
      return _Fields.findByThriftId(fieldId);
5253
    }
5254
 
5255
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5256
      org.apache.thrift.protocol.TField field;
5257
      iprot.readStructBegin();
5258
      while (true)
5259
      {
5260
        field = iprot.readFieldBegin();
5261
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5262
          break;
5263
        }
5264
        switch (field.id) {
5265
          case 1: // ID
5266
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5267
              this.id = iprot.readI64();
5268
              setIdIsSet(true);
5269
            } else { 
5270
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5271
            }
5272
            break;
5273
          default:
5274
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5275
        }
5276
        iprot.readFieldEnd();
5277
      }
5278
      iprot.readStructEnd();
5279
      validate();
5280
    }
5281
 
5282
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5283
      validate();
5284
 
5285
      oprot.writeStructBegin(STRUCT_DESC);
5286
      oprot.writeFieldBegin(ID_FIELD_DESC);
5287
      oprot.writeI64(this.id);
5288
      oprot.writeFieldEnd();
5289
      oprot.writeFieldStop();
5290
      oprot.writeStructEnd();
5291
    }
5292
 
5293
    @Override
5294
    public String toString() {
5295
      StringBuilder sb = new StringBuilder("getSupplier_args(");
5296
      boolean first = true;
5297
 
5298
      sb.append("id:");
5299
      sb.append(this.id);
5300
      first = false;
5301
      sb.append(")");
5302
      return sb.toString();
5303
    }
5304
 
5305
    public void validate() throws org.apache.thrift.TException {
5306
      // check for required fields
5307
    }
5308
 
5309
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5310
      try {
5311
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5312
      } catch (org.apache.thrift.TException te) {
5313
        throw new java.io.IOException(te);
5314
      }
5315
    }
5316
 
5317
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5318
      try {
5319
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
5320
        __isset_bit_vector = new BitSet(1);
5321
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5322
      } catch (org.apache.thrift.TException te) {
5323
        throw new java.io.IOException(te);
5324
      }
5325
    }
5326
 
5327
  }
5328
 
5329
  public static class getSupplier_result implements org.apache.thrift.TBase<getSupplier_result, getSupplier_result._Fields>, java.io.Serializable, Cloneable   {
5330
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_result");
5331
 
5332
    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);
5333
    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);
5334
 
5335
    private Supplier success; // required
5336
    private PurchaseServiceException e; // required
5337
 
5338
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5339
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5340
      SUCCESS((short)0, "success"),
5341
      E((short)1, "e");
5342
 
5343
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5344
 
5345
      static {
5346
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5347
          byName.put(field.getFieldName(), field);
5348
        }
5349
      }
5350
 
5351
      /**
5352
       * Find the _Fields constant that matches fieldId, or null if its not found.
5353
       */
5354
      public static _Fields findByThriftId(int fieldId) {
5355
        switch(fieldId) {
5356
          case 0: // SUCCESS
5357
            return SUCCESS;
5358
          case 1: // E
5359
            return E;
5360
          default:
5361
            return null;
5362
        }
5363
      }
5364
 
5365
      /**
5366
       * Find the _Fields constant that matches fieldId, throwing an exception
5367
       * if it is not found.
5368
       */
5369
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5370
        _Fields fields = findByThriftId(fieldId);
5371
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5372
        return fields;
5373
      }
5374
 
5375
      /**
5376
       * Find the _Fields constant that matches name, or null if its not found.
5377
       */
5378
      public static _Fields findByName(String name) {
5379
        return byName.get(name);
5380
      }
5381
 
5382
      private final short _thriftId;
5383
      private final String _fieldName;
5384
 
5385
      _Fields(short thriftId, String fieldName) {
5386
        _thriftId = thriftId;
5387
        _fieldName = fieldName;
5388
      }
5389
 
5390
      public short getThriftFieldId() {
5391
        return _thriftId;
5392
      }
5393
 
5394
      public String getFieldName() {
5395
        return _fieldName;
5396
      }
5397
    }
5398
 
5399
    // isset id assignments
5400
 
5401
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5402
    static {
5403
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5404
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5405
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
5406
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5407
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5408
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5409
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_result.class, metaDataMap);
5410
    }
5411
 
5412
    public getSupplier_result() {
5413
    }
5414
 
5415
    public getSupplier_result(
5416
      Supplier success,
5417
      PurchaseServiceException e)
5418
    {
5419
      this();
5420
      this.success = success;
5421
      this.e = e;
5422
    }
5423
 
5424
    /**
5425
     * Performs a deep copy on <i>other</i>.
5426
     */
5427
    public getSupplier_result(getSupplier_result other) {
5428
      if (other.isSetSuccess()) {
5429
        this.success = new Supplier(other.success);
5430
      }
5431
      if (other.isSetE()) {
5432
        this.e = new PurchaseServiceException(other.e);
5433
      }
5434
    }
5435
 
5436
    public getSupplier_result deepCopy() {
5437
      return new getSupplier_result(this);
5438
    }
5439
 
5440
    @Override
5441
    public void clear() {
5442
      this.success = null;
5443
      this.e = null;
5444
    }
5445
 
5446
    public Supplier getSuccess() {
5447
      return this.success;
5448
    }
5449
 
5450
    public void setSuccess(Supplier success) {
5451
      this.success = success;
5452
    }
5453
 
5454
    public void unsetSuccess() {
5455
      this.success = null;
5456
    }
5457
 
5458
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5459
    public boolean isSetSuccess() {
5460
      return this.success != null;
5461
    }
5462
 
5463
    public void setSuccessIsSet(boolean value) {
5464
      if (!value) {
5465
        this.success = null;
5466
      }
5467
    }
5468
 
5469
    public PurchaseServiceException getE() {
5470
      return this.e;
5471
    }
5472
 
5473
    public void setE(PurchaseServiceException e) {
5474
      this.e = e;
5475
    }
5476
 
5477
    public void unsetE() {
5478
      this.e = null;
5479
    }
5480
 
5481
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
5482
    public boolean isSetE() {
5483
      return this.e != null;
5484
    }
5485
 
5486
    public void setEIsSet(boolean value) {
5487
      if (!value) {
5488
        this.e = null;
5489
      }
5490
    }
5491
 
5492
    public void setFieldValue(_Fields field, Object value) {
5493
      switch (field) {
5494
      case SUCCESS:
5495
        if (value == null) {
5496
          unsetSuccess();
5497
        } else {
5498
          setSuccess((Supplier)value);
5499
        }
5500
        break;
5501
 
5502
      case E:
5503
        if (value == null) {
5504
          unsetE();
5505
        } else {
5506
          setE((PurchaseServiceException)value);
5507
        }
5508
        break;
5509
 
5510
      }
5511
    }
5512
 
5513
    public Object getFieldValue(_Fields field) {
5514
      switch (field) {
5515
      case SUCCESS:
5516
        return getSuccess();
5517
 
5518
      case E:
5519
        return getE();
5520
 
5521
      }
5522
      throw new IllegalStateException();
5523
    }
5524
 
5525
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5526
    public boolean isSet(_Fields field) {
5527
      if (field == null) {
5528
        throw new IllegalArgumentException();
5529
      }
5530
 
5531
      switch (field) {
5532
      case SUCCESS:
5533
        return isSetSuccess();
5534
      case E:
5535
        return isSetE();
5536
      }
5537
      throw new IllegalStateException();
5538
    }
5539
 
5540
    @Override
5541
    public boolean equals(Object that) {
5542
      if (that == null)
5543
        return false;
5544
      if (that instanceof getSupplier_result)
5545
        return this.equals((getSupplier_result)that);
5546
      return false;
5547
    }
5548
 
5549
    public boolean equals(getSupplier_result that) {
5550
      if (that == null)
5551
        return false;
5552
 
5553
      boolean this_present_success = true && this.isSetSuccess();
5554
      boolean that_present_success = true && that.isSetSuccess();
5555
      if (this_present_success || that_present_success) {
5556
        if (!(this_present_success && that_present_success))
5557
          return false;
5558
        if (!this.success.equals(that.success))
5559
          return false;
5560
      }
5561
 
5562
      boolean this_present_e = true && this.isSetE();
5563
      boolean that_present_e = true && that.isSetE();
5564
      if (this_present_e || that_present_e) {
5565
        if (!(this_present_e && that_present_e))
5566
          return false;
5567
        if (!this.e.equals(that.e))
5568
          return false;
5569
      }
5570
 
5571
      return true;
5572
    }
5573
 
5574
    @Override
5575
    public int hashCode() {
5576
      return 0;
5577
    }
5578
 
5579
    public int compareTo(getSupplier_result other) {
5580
      if (!getClass().equals(other.getClass())) {
5581
        return getClass().getName().compareTo(other.getClass().getName());
5582
      }
5583
 
5584
      int lastComparison = 0;
5585
      getSupplier_result typedOther = (getSupplier_result)other;
5586
 
5587
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5588
      if (lastComparison != 0) {
5589
        return lastComparison;
5590
      }
5591
      if (isSetSuccess()) {
5592
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5593
        if (lastComparison != 0) {
5594
          return lastComparison;
5595
        }
5596
      }
5597
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
5598
      if (lastComparison != 0) {
5599
        return lastComparison;
5600
      }
5601
      if (isSetE()) {
5602
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
5603
        if (lastComparison != 0) {
5604
          return lastComparison;
5605
        }
5606
      }
5607
      return 0;
5608
    }
5609
 
5610
    public _Fields fieldForId(int fieldId) {
5611
      return _Fields.findByThriftId(fieldId);
5612
    }
5613
 
5614
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5615
      org.apache.thrift.protocol.TField field;
5616
      iprot.readStructBegin();
5617
      while (true)
5618
      {
5619
        field = iprot.readFieldBegin();
5620
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5621
          break;
5622
        }
5623
        switch (field.id) {
5624
          case 0: // SUCCESS
5625
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5626
              this.success = new Supplier();
5627
              this.success.read(iprot);
5628
            } else { 
5629
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5630
            }
5631
            break;
5632
          case 1: // E
5633
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5634
              this.e = new PurchaseServiceException();
5635
              this.e.read(iprot);
5636
            } else { 
5637
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5638
            }
5639
            break;
5640
          default:
5641
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5642
        }
5643
        iprot.readFieldEnd();
5644
      }
5645
      iprot.readStructEnd();
5646
      validate();
5647
    }
5648
 
5649
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5650
      oprot.writeStructBegin(STRUCT_DESC);
5651
 
5652
      if (this.isSetSuccess()) {
5653
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5654
        this.success.write(oprot);
5655
        oprot.writeFieldEnd();
5656
      } else if (this.isSetE()) {
5657
        oprot.writeFieldBegin(E_FIELD_DESC);
5658
        this.e.write(oprot);
5659
        oprot.writeFieldEnd();
5660
      }
5661
      oprot.writeFieldStop();
5662
      oprot.writeStructEnd();
5663
    }
5664
 
5665
    @Override
5666
    public String toString() {
5667
      StringBuilder sb = new StringBuilder("getSupplier_result(");
5668
      boolean first = true;
5669
 
5670
      sb.append("success:");
5671
      if (this.success == null) {
5672
        sb.append("null");
5673
      } else {
5674
        sb.append(this.success);
5675
      }
5676
      first = false;
5677
      if (!first) sb.append(", ");
5678
      sb.append("e:");
5679
      if (this.e == null) {
5680
        sb.append("null");
5681
      } else {
5682
        sb.append(this.e);
5683
      }
5684
      first = false;
5685
      sb.append(")");
5686
      return sb.toString();
5687
    }
5688
 
5689
    public void validate() throws org.apache.thrift.TException {
5690
      // check for required fields
5691
    }
5692
 
5693
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5694
      try {
5695
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5696
      } catch (org.apache.thrift.TException te) {
5697
        throw new java.io.IOException(te);
5698
      }
5699
    }
5700
 
5701
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5702
      try {
5703
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5704
      } catch (org.apache.thrift.TException te) {
5705
        throw new java.io.IOException(te);
5706
      }
5707
    }
5708
 
5709
  }
5710
 
5711
  public static class startPurchase_args implements org.apache.thrift.TBase<startPurchase_args, startPurchase_args._Fields>, java.io.Serializable, Cloneable   {
5712
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_args");
5713
 
5714
    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);
5715
    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);
5716
    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 5717
    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 5718
 
5719
    private long purchaseOrderId; // required
5720
    private String invoiceNumber; // required
5721
    private double freightCharges; // required
11801 manish.sha 5722
    private String purchaseComments; // required
4496 mandeep.dh 5723
 
5724
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5725
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5726
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
5727
      INVOICE_NUMBER((short)2, "invoiceNumber"),
11801 manish.sha 5728
      FREIGHT_CHARGES((short)3, "freightCharges"),
5729
      PURCHASE_COMMENTS((short)4, "purchaseComments");
4496 mandeep.dh 5730
 
5731
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5732
 
5733
      static {
5734
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5735
          byName.put(field.getFieldName(), field);
5736
        }
5737
      }
5738
 
5739
      /**
5740
       * Find the _Fields constant that matches fieldId, or null if its not found.
5741
       */
5742
      public static _Fields findByThriftId(int fieldId) {
5743
        switch(fieldId) {
5744
          case 1: // PURCHASE_ORDER_ID
5745
            return PURCHASE_ORDER_ID;
5746
          case 2: // INVOICE_NUMBER
5747
            return INVOICE_NUMBER;
5748
          case 3: // FREIGHT_CHARGES
5749
            return FREIGHT_CHARGES;
11801 manish.sha 5750
          case 4: // PURCHASE_COMMENTS
5751
            return PURCHASE_COMMENTS;
4496 mandeep.dh 5752
          default:
5753
            return null;
5754
        }
5755
      }
5756
 
5757
      /**
5758
       * Find the _Fields constant that matches fieldId, throwing an exception
5759
       * if it is not found.
5760
       */
5761
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5762
        _Fields fields = findByThriftId(fieldId);
5763
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5764
        return fields;
5765
      }
5766
 
5767
      /**
5768
       * Find the _Fields constant that matches name, or null if its not found.
5769
       */
5770
      public static _Fields findByName(String name) {
5771
        return byName.get(name);
5772
      }
5773
 
5774
      private final short _thriftId;
5775
      private final String _fieldName;
5776
 
5777
      _Fields(short thriftId, String fieldName) {
5778
        _thriftId = thriftId;
5779
        _fieldName = fieldName;
5780
      }
5781
 
5782
      public short getThriftFieldId() {
5783
        return _thriftId;
5784
      }
5785
 
5786
      public String getFieldName() {
5787
        return _fieldName;
5788
      }
5789
    }
5790
 
5791
    // isset id assignments
5792
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
5793
    private static final int __FREIGHTCHARGES_ISSET_ID = 1;
5794
    private BitSet __isset_bit_vector = new BitSet(2);
5795
 
5796
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5797
    static {
5798
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5799
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5800
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5801
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5802
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
5803
      tmpMap.put(_Fields.FREIGHT_CHARGES, new org.apache.thrift.meta_data.FieldMetaData("freightCharges", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5804
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
11801 manish.sha 5805
      tmpMap.put(_Fields.PURCHASE_COMMENTS, new org.apache.thrift.meta_data.FieldMetaData("purchaseComments", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5806
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
4496 mandeep.dh 5807
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5808
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_args.class, metaDataMap);
5809
    }
5810
 
5811
    public startPurchase_args() {
5812
    }
5813
 
5814
    public startPurchase_args(
5815
      long purchaseOrderId,
5816
      String invoiceNumber,
11801 manish.sha 5817
      double freightCharges,
5818
      String purchaseComments)
4496 mandeep.dh 5819
    {
5820
      this();
5821
      this.purchaseOrderId = purchaseOrderId;
5822
      setPurchaseOrderIdIsSet(true);
5823
      this.invoiceNumber = invoiceNumber;
5824
      this.freightCharges = freightCharges;
5825
      setFreightChargesIsSet(true);
11801 manish.sha 5826
      this.purchaseComments = purchaseComments;
4496 mandeep.dh 5827
    }
5828
 
5829
    /**
5830
     * Performs a deep copy on <i>other</i>.
5831
     */
5832
    public startPurchase_args(startPurchase_args other) {
5833
      __isset_bit_vector.clear();
5834
      __isset_bit_vector.or(other.__isset_bit_vector);
5835
      this.purchaseOrderId = other.purchaseOrderId;
5836
      if (other.isSetInvoiceNumber()) {
5837
        this.invoiceNumber = other.invoiceNumber;
5838
      }
5839
      this.freightCharges = other.freightCharges;
11801 manish.sha 5840
      if (other.isSetPurchaseComments()) {
5841
        this.purchaseComments = other.purchaseComments;
5842
      }
4496 mandeep.dh 5843
    }
5844
 
5845
    public startPurchase_args deepCopy() {
5846
      return new startPurchase_args(this);
5847
    }
5848
 
5849
    @Override
5850
    public void clear() {
5851
      setPurchaseOrderIdIsSet(false);
5852
      this.purchaseOrderId = 0;
5853
      this.invoiceNumber = null;
5854
      setFreightChargesIsSet(false);
5855
      this.freightCharges = 0.0;
11801 manish.sha 5856
      this.purchaseComments = null;
4496 mandeep.dh 5857
    }
5858
 
5859
    public long getPurchaseOrderId() {
5860
      return this.purchaseOrderId;
5861
    }
5862
 
5863
    public void setPurchaseOrderId(long purchaseOrderId) {
5864
      this.purchaseOrderId = purchaseOrderId;
5865
      setPurchaseOrderIdIsSet(true);
5866
    }
5867
 
5868
    public void unsetPurchaseOrderId() {
5869
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
5870
    }
5871
 
5872
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
5873
    public boolean isSetPurchaseOrderId() {
5874
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
5875
    }
5876
 
5877
    public void setPurchaseOrderIdIsSet(boolean value) {
5878
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
5879
    }
5880
 
5881
    public String getInvoiceNumber() {
5882
      return this.invoiceNumber;
5883
    }
5884
 
5885
    public void setInvoiceNumber(String invoiceNumber) {
5886
      this.invoiceNumber = invoiceNumber;
5887
    }
5888
 
5889
    public void unsetInvoiceNumber() {
5890
      this.invoiceNumber = null;
5891
    }
5892
 
5893
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
5894
    public boolean isSetInvoiceNumber() {
5895
      return this.invoiceNumber != null;
5896
    }
5897
 
5898
    public void setInvoiceNumberIsSet(boolean value) {
5899
      if (!value) {
5900
        this.invoiceNumber = null;
5901
      }
5902
    }
5903
 
5904
    public double getFreightCharges() {
5905
      return this.freightCharges;
5906
    }
5907
 
5908
    public void setFreightCharges(double freightCharges) {
5909
      this.freightCharges = freightCharges;
5910
      setFreightChargesIsSet(true);
5911
    }
5912
 
5913
    public void unsetFreightCharges() {
5914
      __isset_bit_vector.clear(__FREIGHTCHARGES_ISSET_ID);
5915
    }
5916
 
5917
    /** Returns true if field freightCharges is set (has been assigned a value) and false otherwise */
5918
    public boolean isSetFreightCharges() {
5919
      return __isset_bit_vector.get(__FREIGHTCHARGES_ISSET_ID);
5920
    }
5921
 
5922
    public void setFreightChargesIsSet(boolean value) {
5923
      __isset_bit_vector.set(__FREIGHTCHARGES_ISSET_ID, value);
5924
    }
5925
 
11801 manish.sha 5926
    public String getPurchaseComments() {
5927
      return this.purchaseComments;
5928
    }
5929
 
5930
    public void setPurchaseComments(String purchaseComments) {
5931
      this.purchaseComments = purchaseComments;
5932
    }
5933
 
5934
    public void unsetPurchaseComments() {
5935
      this.purchaseComments = null;
5936
    }
5937
 
5938
    /** Returns true if field purchaseComments is set (has been assigned a value) and false otherwise */
5939
    public boolean isSetPurchaseComments() {
5940
      return this.purchaseComments != null;
5941
    }
5942
 
5943
    public void setPurchaseCommentsIsSet(boolean value) {
5944
      if (!value) {
5945
        this.purchaseComments = null;
5946
      }
5947
    }
5948
 
4496 mandeep.dh 5949
    public void setFieldValue(_Fields field, Object value) {
5950
      switch (field) {
5951
      case PURCHASE_ORDER_ID:
5952
        if (value == null) {
5953
          unsetPurchaseOrderId();
5954
        } else {
5955
          setPurchaseOrderId((Long)value);
5956
        }
5957
        break;
5958
 
5959
      case INVOICE_NUMBER:
5960
        if (value == null) {
5961
          unsetInvoiceNumber();
5962
        } else {
5963
          setInvoiceNumber((String)value);
5964
        }
5965
        break;
5966
 
5967
      case FREIGHT_CHARGES:
5968
        if (value == null) {
5969
          unsetFreightCharges();
5970
        } else {
5971
          setFreightCharges((Double)value);
5972
        }
5973
        break;
5974
 
11801 manish.sha 5975
      case PURCHASE_COMMENTS:
5976
        if (value == null) {
5977
          unsetPurchaseComments();
5978
        } else {
5979
          setPurchaseComments((String)value);
5980
        }
5981
        break;
5982
 
4496 mandeep.dh 5983
      }
5984
    }
5985
 
5986
    public Object getFieldValue(_Fields field) {
5987
      switch (field) {
5988
      case PURCHASE_ORDER_ID:
5989
        return Long.valueOf(getPurchaseOrderId());
5990
 
5991
      case INVOICE_NUMBER:
5992
        return getInvoiceNumber();
5993
 
5994
      case FREIGHT_CHARGES:
5995
        return Double.valueOf(getFreightCharges());
5996
 
11801 manish.sha 5997
      case PURCHASE_COMMENTS:
5998
        return getPurchaseComments();
5999
 
4496 mandeep.dh 6000
      }
6001
      throw new IllegalStateException();
6002
    }
6003
 
6004
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6005
    public boolean isSet(_Fields field) {
6006
      if (field == null) {
6007
        throw new IllegalArgumentException();
6008
      }
6009
 
6010
      switch (field) {
6011
      case PURCHASE_ORDER_ID:
6012
        return isSetPurchaseOrderId();
6013
      case INVOICE_NUMBER:
6014
        return isSetInvoiceNumber();
6015
      case FREIGHT_CHARGES:
6016
        return isSetFreightCharges();
11801 manish.sha 6017
      case PURCHASE_COMMENTS:
6018
        return isSetPurchaseComments();
4496 mandeep.dh 6019
      }
6020
      throw new IllegalStateException();
6021
    }
6022
 
6023
    @Override
6024
    public boolean equals(Object that) {
6025
      if (that == null)
6026
        return false;
6027
      if (that instanceof startPurchase_args)
6028
        return this.equals((startPurchase_args)that);
6029
      return false;
6030
    }
6031
 
6032
    public boolean equals(startPurchase_args that) {
6033
      if (that == null)
6034
        return false;
6035
 
6036
      boolean this_present_purchaseOrderId = true;
6037
      boolean that_present_purchaseOrderId = true;
6038
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
6039
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
6040
          return false;
6041
        if (this.purchaseOrderId != that.purchaseOrderId)
6042
          return false;
6043
      }
6044
 
6045
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
6046
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
6047
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
6048
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
6049
          return false;
6050
        if (!this.invoiceNumber.equals(that.invoiceNumber))
6051
          return false;
6052
      }
6053
 
6054
      boolean this_present_freightCharges = true;
6055
      boolean that_present_freightCharges = true;
6056
      if (this_present_freightCharges || that_present_freightCharges) {
6057
        if (!(this_present_freightCharges && that_present_freightCharges))
6058
          return false;
6059
        if (this.freightCharges != that.freightCharges)
6060
          return false;
6061
      }
6062
 
11801 manish.sha 6063
      boolean this_present_purchaseComments = true && this.isSetPurchaseComments();
6064
      boolean that_present_purchaseComments = true && that.isSetPurchaseComments();
6065
      if (this_present_purchaseComments || that_present_purchaseComments) {
6066
        if (!(this_present_purchaseComments && that_present_purchaseComments))
6067
          return false;
6068
        if (!this.purchaseComments.equals(that.purchaseComments))
6069
          return false;
6070
      }
6071
 
4496 mandeep.dh 6072
      return true;
6073
    }
6074
 
6075
    @Override
6076
    public int hashCode() {
6077
      return 0;
6078
    }
6079
 
6080
    public int compareTo(startPurchase_args other) {
6081
      if (!getClass().equals(other.getClass())) {
6082
        return getClass().getName().compareTo(other.getClass().getName());
6083
      }
6084
 
6085
      int lastComparison = 0;
6086
      startPurchase_args typedOther = (startPurchase_args)other;
6087
 
6088
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
6089
      if (lastComparison != 0) {
6090
        return lastComparison;
6091
      }
6092
      if (isSetPurchaseOrderId()) {
6093
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
6094
        if (lastComparison != 0) {
6095
          return lastComparison;
6096
        }
6097
      }
6098
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
6099
      if (lastComparison != 0) {
6100
        return lastComparison;
6101
      }
6102
      if (isSetInvoiceNumber()) {
6103
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
6104
        if (lastComparison != 0) {
6105
          return lastComparison;
6106
        }
6107
      }
6108
      lastComparison = Boolean.valueOf(isSetFreightCharges()).compareTo(typedOther.isSetFreightCharges());
6109
      if (lastComparison != 0) {
6110
        return lastComparison;
6111
      }
6112
      if (isSetFreightCharges()) {
6113
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freightCharges, typedOther.freightCharges);
6114
        if (lastComparison != 0) {
6115
          return lastComparison;
6116
        }
6117
      }
11801 manish.sha 6118
      lastComparison = Boolean.valueOf(isSetPurchaseComments()).compareTo(typedOther.isSetPurchaseComments());
6119
      if (lastComparison != 0) {
6120
        return lastComparison;
6121
      }
6122
      if (isSetPurchaseComments()) {
6123
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseComments, typedOther.purchaseComments);
6124
        if (lastComparison != 0) {
6125
          return lastComparison;
6126
        }
6127
      }
4496 mandeep.dh 6128
      return 0;
6129
    }
6130
 
6131
    public _Fields fieldForId(int fieldId) {
6132
      return _Fields.findByThriftId(fieldId);
6133
    }
6134
 
6135
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6136
      org.apache.thrift.protocol.TField field;
6137
      iprot.readStructBegin();
6138
      while (true)
6139
      {
6140
        field = iprot.readFieldBegin();
6141
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6142
          break;
6143
        }
6144
        switch (field.id) {
6145
          case 1: // PURCHASE_ORDER_ID
6146
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6147
              this.purchaseOrderId = iprot.readI64();
6148
              setPurchaseOrderIdIsSet(true);
6149
            } else { 
6150
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6151
            }
6152
            break;
6153
          case 2: // INVOICE_NUMBER
6154
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
6155
              this.invoiceNumber = iprot.readString();
6156
            } else { 
6157
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6158
            }
6159
            break;
6160
          case 3: // FREIGHT_CHARGES
6161
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
6162
              this.freightCharges = iprot.readDouble();
6163
              setFreightChargesIsSet(true);
6164
            } else { 
6165
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6166
            }
6167
            break;
11801 manish.sha 6168
          case 4: // PURCHASE_COMMENTS
6169
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
6170
              this.purchaseComments = iprot.readString();
6171
            } else { 
6172
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6173
            }
6174
            break;
4496 mandeep.dh 6175
          default:
6176
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6177
        }
6178
        iprot.readFieldEnd();
6179
      }
6180
      iprot.readStructEnd();
6181
      validate();
6182
    }
6183
 
6184
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6185
      validate();
6186
 
6187
      oprot.writeStructBegin(STRUCT_DESC);
6188
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
6189
      oprot.writeI64(this.purchaseOrderId);
6190
      oprot.writeFieldEnd();
6191
      if (this.invoiceNumber != null) {
6192
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
6193
        oprot.writeString(this.invoiceNumber);
6194
        oprot.writeFieldEnd();
6195
      }
6196
      oprot.writeFieldBegin(FREIGHT_CHARGES_FIELD_DESC);
6197
      oprot.writeDouble(this.freightCharges);
6198
      oprot.writeFieldEnd();
11801 manish.sha 6199
      if (this.purchaseComments != null) {
6200
        oprot.writeFieldBegin(PURCHASE_COMMENTS_FIELD_DESC);
6201
        oprot.writeString(this.purchaseComments);
6202
        oprot.writeFieldEnd();
6203
      }
4496 mandeep.dh 6204
      oprot.writeFieldStop();
6205
      oprot.writeStructEnd();
6206
    }
6207
 
6208
    @Override
6209
    public String toString() {
6210
      StringBuilder sb = new StringBuilder("startPurchase_args(");
6211
      boolean first = true;
6212
 
6213
      sb.append("purchaseOrderId:");
6214
      sb.append(this.purchaseOrderId);
6215
      first = false;
6216
      if (!first) sb.append(", ");
6217
      sb.append("invoiceNumber:");
6218
      if (this.invoiceNumber == null) {
6219
        sb.append("null");
6220
      } else {
6221
        sb.append(this.invoiceNumber);
6222
      }
6223
      first = false;
6224
      if (!first) sb.append(", ");
6225
      sb.append("freightCharges:");
6226
      sb.append(this.freightCharges);
6227
      first = false;
11801 manish.sha 6228
      if (!first) sb.append(", ");
6229
      sb.append("purchaseComments:");
6230
      if (this.purchaseComments == null) {
6231
        sb.append("null");
6232
      } else {
6233
        sb.append(this.purchaseComments);
6234
      }
6235
      first = false;
4496 mandeep.dh 6236
      sb.append(")");
6237
      return sb.toString();
6238
    }
6239
 
6240
    public void validate() throws org.apache.thrift.TException {
6241
      // check for required fields
6242
    }
6243
 
6244
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6245
      try {
6246
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6247
      } catch (org.apache.thrift.TException te) {
6248
        throw new java.io.IOException(te);
6249
      }
6250
    }
6251
 
6252
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6253
      try {
6254
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6255
      } catch (org.apache.thrift.TException te) {
6256
        throw new java.io.IOException(te);
6257
      }
6258
    }
6259
 
6260
  }
6261
 
6262
  public static class startPurchase_result implements org.apache.thrift.TBase<startPurchase_result, startPurchase_result._Fields>, java.io.Serializable, Cloneable   {
6263
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_result");
6264
 
6265
    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);
6266
    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);
6267
 
6268
    private long success; // required
6269
    private PurchaseServiceException e; // required
6270
 
6271
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6272
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6273
      SUCCESS((short)0, "success"),
6274
      E((short)1, "e");
6275
 
6276
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6277
 
6278
      static {
6279
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6280
          byName.put(field.getFieldName(), field);
6281
        }
6282
      }
6283
 
6284
      /**
6285
       * Find the _Fields constant that matches fieldId, or null if its not found.
6286
       */
6287
      public static _Fields findByThriftId(int fieldId) {
6288
        switch(fieldId) {
6289
          case 0: // SUCCESS
6290
            return SUCCESS;
6291
          case 1: // E
6292
            return E;
6293
          default:
6294
            return null;
6295
        }
6296
      }
6297
 
6298
      /**
6299
       * Find the _Fields constant that matches fieldId, throwing an exception
6300
       * if it is not found.
6301
       */
6302
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6303
        _Fields fields = findByThriftId(fieldId);
6304
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6305
        return fields;
6306
      }
6307
 
6308
      /**
6309
       * Find the _Fields constant that matches name, or null if its not found.
6310
       */
6311
      public static _Fields findByName(String name) {
6312
        return byName.get(name);
6313
      }
6314
 
6315
      private final short _thriftId;
6316
      private final String _fieldName;
6317
 
6318
      _Fields(short thriftId, String fieldName) {
6319
        _thriftId = thriftId;
6320
        _fieldName = fieldName;
6321
      }
6322
 
6323
      public short getThriftFieldId() {
6324
        return _thriftId;
6325
      }
6326
 
6327
      public String getFieldName() {
6328
        return _fieldName;
6329
      }
6330
    }
6331
 
6332
    // isset id assignments
6333
    private static final int __SUCCESS_ISSET_ID = 0;
6334
    private BitSet __isset_bit_vector = new BitSet(1);
6335
 
6336
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6337
    static {
6338
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6339
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6340
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6341
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6342
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6343
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6344
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_result.class, metaDataMap);
6345
    }
6346
 
6347
    public startPurchase_result() {
6348
    }
6349
 
6350
    public startPurchase_result(
6351
      long success,
6352
      PurchaseServiceException e)
6353
    {
6354
      this();
6355
      this.success = success;
6356
      setSuccessIsSet(true);
6357
      this.e = e;
6358
    }
6359
 
6360
    /**
6361
     * Performs a deep copy on <i>other</i>.
6362
     */
6363
    public startPurchase_result(startPurchase_result other) {
6364
      __isset_bit_vector.clear();
6365
      __isset_bit_vector.or(other.__isset_bit_vector);
6366
      this.success = other.success;
6367
      if (other.isSetE()) {
6368
        this.e = new PurchaseServiceException(other.e);
6369
      }
6370
    }
6371
 
6372
    public startPurchase_result deepCopy() {
6373
      return new startPurchase_result(this);
6374
    }
6375
 
6376
    @Override
6377
    public void clear() {
6378
      setSuccessIsSet(false);
6379
      this.success = 0;
6380
      this.e = null;
6381
    }
6382
 
6383
    public long getSuccess() {
6384
      return this.success;
6385
    }
6386
 
6387
    public void setSuccess(long success) {
6388
      this.success = success;
6389
      setSuccessIsSet(true);
6390
    }
6391
 
6392
    public void unsetSuccess() {
6393
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
6394
    }
6395
 
6396
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
6397
    public boolean isSetSuccess() {
6398
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
6399
    }
6400
 
6401
    public void setSuccessIsSet(boolean value) {
6402
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
6403
    }
6404
 
6405
    public PurchaseServiceException getE() {
6406
      return this.e;
6407
    }
6408
 
6409
    public void setE(PurchaseServiceException e) {
6410
      this.e = e;
6411
    }
6412
 
6413
    public void unsetE() {
6414
      this.e = null;
6415
    }
6416
 
6417
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
6418
    public boolean isSetE() {
6419
      return this.e != null;
6420
    }
6421
 
6422
    public void setEIsSet(boolean value) {
6423
      if (!value) {
6424
        this.e = null;
6425
      }
6426
    }
6427
 
6428
    public void setFieldValue(_Fields field, Object value) {
6429
      switch (field) {
6430
      case SUCCESS:
6431
        if (value == null) {
6432
          unsetSuccess();
6433
        } else {
6434
          setSuccess((Long)value);
6435
        }
6436
        break;
6437
 
6438
      case E:
6439
        if (value == null) {
6440
          unsetE();
6441
        } else {
6442
          setE((PurchaseServiceException)value);
6443
        }
6444
        break;
6445
 
6446
      }
6447
    }
6448
 
6449
    public Object getFieldValue(_Fields field) {
6450
      switch (field) {
6451
      case SUCCESS:
6452
        return Long.valueOf(getSuccess());
6453
 
6454
      case E:
6455
        return getE();
6456
 
6457
      }
6458
      throw new IllegalStateException();
6459
    }
6460
 
6461
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6462
    public boolean isSet(_Fields field) {
6463
      if (field == null) {
6464
        throw new IllegalArgumentException();
6465
      }
6466
 
6467
      switch (field) {
6468
      case SUCCESS:
6469
        return isSetSuccess();
6470
      case E:
6471
        return isSetE();
6472
      }
6473
      throw new IllegalStateException();
6474
    }
6475
 
6476
    @Override
6477
    public boolean equals(Object that) {
6478
      if (that == null)
6479
        return false;
6480
      if (that instanceof startPurchase_result)
6481
        return this.equals((startPurchase_result)that);
6482
      return false;
6483
    }
6484
 
6485
    public boolean equals(startPurchase_result that) {
6486
      if (that == null)
6487
        return false;
6488
 
6489
      boolean this_present_success = true;
6490
      boolean that_present_success = true;
6491
      if (this_present_success || that_present_success) {
6492
        if (!(this_present_success && that_present_success))
6493
          return false;
6494
        if (this.success != that.success)
6495
          return false;
6496
      }
6497
 
6498
      boolean this_present_e = true && this.isSetE();
6499
      boolean that_present_e = true && that.isSetE();
6500
      if (this_present_e || that_present_e) {
6501
        if (!(this_present_e && that_present_e))
6502
          return false;
6503
        if (!this.e.equals(that.e))
6504
          return false;
6505
      }
6506
 
6507
      return true;
6508
    }
6509
 
6510
    @Override
6511
    public int hashCode() {
6512
      return 0;
6513
    }
6514
 
6515
    public int compareTo(startPurchase_result other) {
6516
      if (!getClass().equals(other.getClass())) {
6517
        return getClass().getName().compareTo(other.getClass().getName());
6518
      }
6519
 
6520
      int lastComparison = 0;
6521
      startPurchase_result typedOther = (startPurchase_result)other;
6522
 
6523
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6524
      if (lastComparison != 0) {
6525
        return lastComparison;
6526
      }
6527
      if (isSetSuccess()) {
6528
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6529
        if (lastComparison != 0) {
6530
          return lastComparison;
6531
        }
6532
      }
6533
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
6534
      if (lastComparison != 0) {
6535
        return lastComparison;
6536
      }
6537
      if (isSetE()) {
6538
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
6539
        if (lastComparison != 0) {
6540
          return lastComparison;
6541
        }
6542
      }
6543
      return 0;
6544
    }
6545
 
6546
    public _Fields fieldForId(int fieldId) {
6547
      return _Fields.findByThriftId(fieldId);
6548
    }
6549
 
6550
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6551
      org.apache.thrift.protocol.TField field;
6552
      iprot.readStructBegin();
6553
      while (true)
6554
      {
6555
        field = iprot.readFieldBegin();
6556
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6557
          break;
6558
        }
6559
        switch (field.id) {
6560
          case 0: // SUCCESS
6561
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6562
              this.success = iprot.readI64();
6563
              setSuccessIsSet(true);
6564
            } else { 
6565
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6566
            }
6567
            break;
6568
          case 1: // E
6569
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6570
              this.e = new PurchaseServiceException();
6571
              this.e.read(iprot);
6572
            } else { 
6573
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6574
            }
6575
            break;
6576
          default:
6577
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6578
        }
6579
        iprot.readFieldEnd();
6580
      }
6581
      iprot.readStructEnd();
6582
      validate();
6583
    }
6584
 
6585
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6586
      oprot.writeStructBegin(STRUCT_DESC);
6587
 
6588
      if (this.isSetSuccess()) {
6589
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6590
        oprot.writeI64(this.success);
6591
        oprot.writeFieldEnd();
6592
      } else if (this.isSetE()) {
6593
        oprot.writeFieldBegin(E_FIELD_DESC);
6594
        this.e.write(oprot);
6595
        oprot.writeFieldEnd();
6596
      }
6597
      oprot.writeFieldStop();
6598
      oprot.writeStructEnd();
6599
    }
6600
 
6601
    @Override
6602
    public String toString() {
6603
      StringBuilder sb = new StringBuilder("startPurchase_result(");
6604
      boolean first = true;
6605
 
6606
      sb.append("success:");
6607
      sb.append(this.success);
6608
      first = false;
6609
      if (!first) sb.append(", ");
6610
      sb.append("e:");
6611
      if (this.e == null) {
6612
        sb.append("null");
6613
      } else {
6614
        sb.append(this.e);
6615
      }
6616
      first = false;
6617
      sb.append(")");
6618
      return sb.toString();
6619
    }
6620
 
6621
    public void validate() throws org.apache.thrift.TException {
6622
      // check for required fields
6623
    }
6624
 
6625
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6626
      try {
6627
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6628
      } catch (org.apache.thrift.TException te) {
6629
        throw new java.io.IOException(te);
6630
      }
6631
    }
6632
 
6633
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6634
      try {
6635
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6636
      } catch (org.apache.thrift.TException te) {
6637
        throw new java.io.IOException(te);
6638
      }
6639
    }
6640
 
6641
  }
6642
 
6643
  public static class closePurchase_args implements org.apache.thrift.TBase<closePurchase_args, closePurchase_args._Fields>, java.io.Serializable, Cloneable   {
6644
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_args");
6645
 
6646
    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);
6647
 
6648
    private long purchaseId; // required
6649
 
6650
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6651
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6652
      PURCHASE_ID((short)1, "purchaseId");
6653
 
6654
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6655
 
6656
      static {
6657
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6658
          byName.put(field.getFieldName(), field);
6659
        }
6660
      }
6661
 
6662
      /**
6663
       * Find the _Fields constant that matches fieldId, or null if its not found.
6664
       */
6665
      public static _Fields findByThriftId(int fieldId) {
6666
        switch(fieldId) {
6667
          case 1: // PURCHASE_ID
6668
            return PURCHASE_ID;
6669
          default:
6670
            return null;
6671
        }
6672
      }
6673
 
6674
      /**
6675
       * Find the _Fields constant that matches fieldId, throwing an exception
6676
       * if it is not found.
6677
       */
6678
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6679
        _Fields fields = findByThriftId(fieldId);
6680
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6681
        return fields;
6682
      }
6683
 
6684
      /**
6685
       * Find the _Fields constant that matches name, or null if its not found.
6686
       */
6687
      public static _Fields findByName(String name) {
6688
        return byName.get(name);
6689
      }
6690
 
6691
      private final short _thriftId;
6692
      private final String _fieldName;
6693
 
6694
      _Fields(short thriftId, String fieldName) {
6695
        _thriftId = thriftId;
6696
        _fieldName = fieldName;
6697
      }
6698
 
6699
      public short getThriftFieldId() {
6700
        return _thriftId;
6701
      }
6702
 
6703
      public String getFieldName() {
6704
        return _fieldName;
6705
      }
6706
    }
6707
 
6708
    // isset id assignments
6709
    private static final int __PURCHASEID_ISSET_ID = 0;
6710
    private BitSet __isset_bit_vector = new BitSet(1);
6711
 
6712
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6713
    static {
6714
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6715
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6716
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6717
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6718
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_args.class, metaDataMap);
6719
    }
6720
 
6721
    public closePurchase_args() {
6722
    }
6723
 
6724
    public closePurchase_args(
6725
      long purchaseId)
6726
    {
6727
      this();
6728
      this.purchaseId = purchaseId;
6729
      setPurchaseIdIsSet(true);
6730
    }
6731
 
6732
    /**
6733
     * Performs a deep copy on <i>other</i>.
6734
     */
6735
    public closePurchase_args(closePurchase_args other) {
6736
      __isset_bit_vector.clear();
6737
      __isset_bit_vector.or(other.__isset_bit_vector);
6738
      this.purchaseId = other.purchaseId;
6739
    }
6740
 
6741
    public closePurchase_args deepCopy() {
6742
      return new closePurchase_args(this);
6743
    }
6744
 
6745
    @Override
6746
    public void clear() {
6747
      setPurchaseIdIsSet(false);
6748
      this.purchaseId = 0;
6749
    }
6750
 
6751
    public long getPurchaseId() {
6752
      return this.purchaseId;
6753
    }
6754
 
6755
    public void setPurchaseId(long purchaseId) {
6756
      this.purchaseId = purchaseId;
6757
      setPurchaseIdIsSet(true);
6758
    }
6759
 
6760
    public void unsetPurchaseId() {
6761
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
6762
    }
6763
 
6764
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
6765
    public boolean isSetPurchaseId() {
6766
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
6767
    }
6768
 
6769
    public void setPurchaseIdIsSet(boolean value) {
6770
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
6771
    }
6772
 
6773
    public void setFieldValue(_Fields field, Object value) {
6774
      switch (field) {
6775
      case PURCHASE_ID:
6776
        if (value == null) {
6777
          unsetPurchaseId();
6778
        } else {
6779
          setPurchaseId((Long)value);
6780
        }
6781
        break;
6782
 
6783
      }
6784
    }
6785
 
6786
    public Object getFieldValue(_Fields field) {
6787
      switch (field) {
6788
      case PURCHASE_ID:
6789
        return Long.valueOf(getPurchaseId());
6790
 
6791
      }
6792
      throw new IllegalStateException();
6793
    }
6794
 
6795
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6796
    public boolean isSet(_Fields field) {
6797
      if (field == null) {
6798
        throw new IllegalArgumentException();
6799
      }
6800
 
6801
      switch (field) {
6802
      case PURCHASE_ID:
6803
        return isSetPurchaseId();
6804
      }
6805
      throw new IllegalStateException();
6806
    }
6807
 
6808
    @Override
6809
    public boolean equals(Object that) {
6810
      if (that == null)
6811
        return false;
6812
      if (that instanceof closePurchase_args)
6813
        return this.equals((closePurchase_args)that);
6814
      return false;
6815
    }
6816
 
6817
    public boolean equals(closePurchase_args that) {
6818
      if (that == null)
6819
        return false;
6820
 
6821
      boolean this_present_purchaseId = true;
6822
      boolean that_present_purchaseId = true;
6823
      if (this_present_purchaseId || that_present_purchaseId) {
6824
        if (!(this_present_purchaseId && that_present_purchaseId))
6825
          return false;
6826
        if (this.purchaseId != that.purchaseId)
6827
          return false;
6828
      }
6829
 
6830
      return true;
6831
    }
6832
 
6833
    @Override
6834
    public int hashCode() {
6835
      return 0;
6836
    }
6837
 
6838
    public int compareTo(closePurchase_args other) {
6839
      if (!getClass().equals(other.getClass())) {
6840
        return getClass().getName().compareTo(other.getClass().getName());
6841
      }
6842
 
6843
      int lastComparison = 0;
6844
      closePurchase_args typedOther = (closePurchase_args)other;
6845
 
6846
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
6847
      if (lastComparison != 0) {
6848
        return lastComparison;
6849
      }
6850
      if (isSetPurchaseId()) {
6851
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
6852
        if (lastComparison != 0) {
6853
          return lastComparison;
6854
        }
6855
      }
6856
      return 0;
6857
    }
6858
 
6859
    public _Fields fieldForId(int fieldId) {
6860
      return _Fields.findByThriftId(fieldId);
6861
    }
6862
 
6863
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6864
      org.apache.thrift.protocol.TField field;
6865
      iprot.readStructBegin();
6866
      while (true)
6867
      {
6868
        field = iprot.readFieldBegin();
6869
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6870
          break;
6871
        }
6872
        switch (field.id) {
6873
          case 1: // PURCHASE_ID
6874
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6875
              this.purchaseId = iprot.readI64();
6876
              setPurchaseIdIsSet(true);
6877
            } else { 
6878
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6879
            }
6880
            break;
6881
          default:
6882
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6883
        }
6884
        iprot.readFieldEnd();
6885
      }
6886
      iprot.readStructEnd();
6887
      validate();
6888
    }
6889
 
6890
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6891
      validate();
6892
 
6893
      oprot.writeStructBegin(STRUCT_DESC);
6894
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
6895
      oprot.writeI64(this.purchaseId);
6896
      oprot.writeFieldEnd();
6897
      oprot.writeFieldStop();
6898
      oprot.writeStructEnd();
6899
    }
6900
 
6901
    @Override
6902
    public String toString() {
6903
      StringBuilder sb = new StringBuilder("closePurchase_args(");
6904
      boolean first = true;
6905
 
6906
      sb.append("purchaseId:");
6907
      sb.append(this.purchaseId);
6908
      first = false;
6909
      sb.append(")");
6910
      return sb.toString();
6911
    }
6912
 
6913
    public void validate() throws org.apache.thrift.TException {
6914
      // check for required fields
6915
    }
6916
 
6917
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6918
      try {
6919
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6920
      } catch (org.apache.thrift.TException te) {
6921
        throw new java.io.IOException(te);
6922
      }
6923
    }
6924
 
6925
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6926
      try {
6927
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6928
      } catch (org.apache.thrift.TException te) {
6929
        throw new java.io.IOException(te);
6930
      }
6931
    }
6932
 
6933
  }
6934
 
6935
  public static class closePurchase_result implements org.apache.thrift.TBase<closePurchase_result, closePurchase_result._Fields>, java.io.Serializable, Cloneable   {
6936
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_result");
6937
 
6938
    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);
6939
    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);
6940
 
6941
    private long success; // required
6942
    private PurchaseServiceException e; // required
6943
 
6944
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6945
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6946
      SUCCESS((short)0, "success"),
6947
      E((short)1, "e");
6948
 
6949
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6950
 
6951
      static {
6952
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6953
          byName.put(field.getFieldName(), field);
6954
        }
6955
      }
6956
 
6957
      /**
6958
       * Find the _Fields constant that matches fieldId, or null if its not found.
6959
       */
6960
      public static _Fields findByThriftId(int fieldId) {
6961
        switch(fieldId) {
6962
          case 0: // SUCCESS
6963
            return SUCCESS;
6964
          case 1: // E
6965
            return E;
6966
          default:
6967
            return null;
6968
        }
6969
      }
6970
 
6971
      /**
6972
       * Find the _Fields constant that matches fieldId, throwing an exception
6973
       * if it is not found.
6974
       */
6975
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6976
        _Fields fields = findByThriftId(fieldId);
6977
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6978
        return fields;
6979
      }
6980
 
6981
      /**
6982
       * Find the _Fields constant that matches name, or null if its not found.
6983
       */
6984
      public static _Fields findByName(String name) {
6985
        return byName.get(name);
6986
      }
6987
 
6988
      private final short _thriftId;
6989
      private final String _fieldName;
6990
 
6991
      _Fields(short thriftId, String fieldName) {
6992
        _thriftId = thriftId;
6993
        _fieldName = fieldName;
6994
      }
6995
 
6996
      public short getThriftFieldId() {
6997
        return _thriftId;
6998
      }
6999
 
7000
      public String getFieldName() {
7001
        return _fieldName;
7002
      }
7003
    }
7004
 
7005
    // isset id assignments
7006
    private static final int __SUCCESS_ISSET_ID = 0;
7007
    private BitSet __isset_bit_vector = new BitSet(1);
7008
 
7009
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7010
    static {
7011
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7012
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7013
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7014
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7015
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7016
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7017
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_result.class, metaDataMap);
7018
    }
7019
 
7020
    public closePurchase_result() {
7021
    }
7022
 
7023
    public closePurchase_result(
7024
      long success,
7025
      PurchaseServiceException e)
7026
    {
7027
      this();
7028
      this.success = success;
7029
      setSuccessIsSet(true);
7030
      this.e = e;
7031
    }
7032
 
7033
    /**
7034
     * Performs a deep copy on <i>other</i>.
7035
     */
7036
    public closePurchase_result(closePurchase_result other) {
7037
      __isset_bit_vector.clear();
7038
      __isset_bit_vector.or(other.__isset_bit_vector);
7039
      this.success = other.success;
7040
      if (other.isSetE()) {
7041
        this.e = new PurchaseServiceException(other.e);
7042
      }
7043
    }
7044
 
7045
    public closePurchase_result deepCopy() {
7046
      return new closePurchase_result(this);
7047
    }
7048
 
7049
    @Override
7050
    public void clear() {
7051
      setSuccessIsSet(false);
7052
      this.success = 0;
7053
      this.e = null;
7054
    }
7055
 
7056
    public long getSuccess() {
7057
      return this.success;
7058
    }
7059
 
7060
    public void setSuccess(long success) {
7061
      this.success = success;
7062
      setSuccessIsSet(true);
7063
    }
7064
 
7065
    public void unsetSuccess() {
7066
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7067
    }
7068
 
7069
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7070
    public boolean isSetSuccess() {
7071
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7072
    }
7073
 
7074
    public void setSuccessIsSet(boolean value) {
7075
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7076
    }
7077
 
7078
    public PurchaseServiceException getE() {
7079
      return this.e;
7080
    }
7081
 
7082
    public void setE(PurchaseServiceException e) {
7083
      this.e = e;
7084
    }
7085
 
7086
    public void unsetE() {
7087
      this.e = null;
7088
    }
7089
 
7090
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
7091
    public boolean isSetE() {
7092
      return this.e != null;
7093
    }
7094
 
7095
    public void setEIsSet(boolean value) {
7096
      if (!value) {
7097
        this.e = null;
7098
      }
7099
    }
7100
 
7101
    public void setFieldValue(_Fields field, Object value) {
7102
      switch (field) {
7103
      case SUCCESS:
7104
        if (value == null) {
7105
          unsetSuccess();
7106
        } else {
7107
          setSuccess((Long)value);
7108
        }
7109
        break;
7110
 
7111
      case E:
7112
        if (value == null) {
7113
          unsetE();
7114
        } else {
7115
          setE((PurchaseServiceException)value);
7116
        }
7117
        break;
7118
 
7119
      }
7120
    }
7121
 
7122
    public Object getFieldValue(_Fields field) {
7123
      switch (field) {
7124
      case SUCCESS:
7125
        return Long.valueOf(getSuccess());
7126
 
7127
      case E:
7128
        return getE();
7129
 
7130
      }
7131
      throw new IllegalStateException();
7132
    }
7133
 
7134
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7135
    public boolean isSet(_Fields field) {
7136
      if (field == null) {
7137
        throw new IllegalArgumentException();
7138
      }
7139
 
7140
      switch (field) {
7141
      case SUCCESS:
7142
        return isSetSuccess();
7143
      case E:
7144
        return isSetE();
7145
      }
7146
      throw new IllegalStateException();
7147
    }
7148
 
7149
    @Override
7150
    public boolean equals(Object that) {
7151
      if (that == null)
7152
        return false;
7153
      if (that instanceof closePurchase_result)
7154
        return this.equals((closePurchase_result)that);
7155
      return false;
7156
    }
7157
 
7158
    public boolean equals(closePurchase_result that) {
7159
      if (that == null)
7160
        return false;
7161
 
7162
      boolean this_present_success = true;
7163
      boolean that_present_success = true;
7164
      if (this_present_success || that_present_success) {
7165
        if (!(this_present_success && that_present_success))
7166
          return false;
7167
        if (this.success != that.success)
7168
          return false;
7169
      }
7170
 
7171
      boolean this_present_e = true && this.isSetE();
7172
      boolean that_present_e = true && that.isSetE();
7173
      if (this_present_e || that_present_e) {
7174
        if (!(this_present_e && that_present_e))
7175
          return false;
7176
        if (!this.e.equals(that.e))
7177
          return false;
7178
      }
7179
 
7180
      return true;
7181
    }
7182
 
7183
    @Override
7184
    public int hashCode() {
7185
      return 0;
7186
    }
7187
 
7188
    public int compareTo(closePurchase_result other) {
7189
      if (!getClass().equals(other.getClass())) {
7190
        return getClass().getName().compareTo(other.getClass().getName());
7191
      }
7192
 
7193
      int lastComparison = 0;
7194
      closePurchase_result typedOther = (closePurchase_result)other;
7195
 
7196
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7197
      if (lastComparison != 0) {
7198
        return lastComparison;
7199
      }
7200
      if (isSetSuccess()) {
7201
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7202
        if (lastComparison != 0) {
7203
          return lastComparison;
7204
        }
7205
      }
7206
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
7207
      if (lastComparison != 0) {
7208
        return lastComparison;
7209
      }
7210
      if (isSetE()) {
7211
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
7212
        if (lastComparison != 0) {
7213
          return lastComparison;
7214
        }
7215
      }
7216
      return 0;
7217
    }
7218
 
7219
    public _Fields fieldForId(int fieldId) {
7220
      return _Fields.findByThriftId(fieldId);
7221
    }
7222
 
7223
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7224
      org.apache.thrift.protocol.TField field;
7225
      iprot.readStructBegin();
7226
      while (true)
7227
      {
7228
        field = iprot.readFieldBegin();
7229
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7230
          break;
7231
        }
7232
        switch (field.id) {
7233
          case 0: // SUCCESS
7234
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7235
              this.success = iprot.readI64();
7236
              setSuccessIsSet(true);
7237
            } else { 
7238
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7239
            }
7240
            break;
7241
          case 1: // E
7242
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7243
              this.e = new PurchaseServiceException();
7244
              this.e.read(iprot);
7245
            } else { 
7246
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7247
            }
7248
            break;
7249
          default:
7250
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7251
        }
7252
        iprot.readFieldEnd();
7253
      }
7254
      iprot.readStructEnd();
7255
      validate();
7256
    }
7257
 
7258
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7259
      oprot.writeStructBegin(STRUCT_DESC);
7260
 
7261
      if (this.isSetSuccess()) {
7262
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7263
        oprot.writeI64(this.success);
7264
        oprot.writeFieldEnd();
7265
      } else if (this.isSetE()) {
7266
        oprot.writeFieldBegin(E_FIELD_DESC);
7267
        this.e.write(oprot);
7268
        oprot.writeFieldEnd();
7269
      }
7270
      oprot.writeFieldStop();
7271
      oprot.writeStructEnd();
7272
    }
7273
 
7274
    @Override
7275
    public String toString() {
7276
      StringBuilder sb = new StringBuilder("closePurchase_result(");
7277
      boolean first = true;
7278
 
7279
      sb.append("success:");
7280
      sb.append(this.success);
7281
      first = false;
7282
      if (!first) sb.append(", ");
7283
      sb.append("e:");
7284
      if (this.e == null) {
7285
        sb.append("null");
7286
      } else {
7287
        sb.append(this.e);
7288
      }
7289
      first = false;
7290
      sb.append(")");
7291
      return sb.toString();
7292
    }
7293
 
7294
    public void validate() throws org.apache.thrift.TException {
7295
      // check for required fields
7296
    }
7297
 
7298
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7299
      try {
7300
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7301
      } catch (org.apache.thrift.TException te) {
7302
        throw new java.io.IOException(te);
7303
      }
7304
    }
7305
 
7306
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7307
      try {
7308
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7309
      } catch (org.apache.thrift.TException te) {
7310
        throw new java.io.IOException(te);
7311
      }
7312
    }
7313
 
7314
  }
7315
 
7316
  public static class getAllPurchases_args implements org.apache.thrift.TBase<getAllPurchases_args, getAllPurchases_args._Fields>, java.io.Serializable, Cloneable   {
7317
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_args");
7318
 
7319
    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);
7320
    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);
7321
 
7322
    private long purchaseOrderId; // required
7323
    private boolean open; // required
7324
 
7325
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7326
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7327
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
7328
      OPEN((short)2, "open");
7329
 
7330
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7331
 
7332
      static {
7333
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7334
          byName.put(field.getFieldName(), field);
7335
        }
7336
      }
7337
 
7338
      /**
7339
       * Find the _Fields constant that matches fieldId, or null if its not found.
7340
       */
7341
      public static _Fields findByThriftId(int fieldId) {
7342
        switch(fieldId) {
7343
          case 1: // PURCHASE_ORDER_ID
7344
            return PURCHASE_ORDER_ID;
7345
          case 2: // OPEN
7346
            return OPEN;
7347
          default:
7348
            return null;
7349
        }
7350
      }
7351
 
7352
      /**
7353
       * Find the _Fields constant that matches fieldId, throwing an exception
7354
       * if it is not found.
7355
       */
7356
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7357
        _Fields fields = findByThriftId(fieldId);
7358
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7359
        return fields;
7360
      }
7361
 
7362
      /**
7363
       * Find the _Fields constant that matches name, or null if its not found.
7364
       */
7365
      public static _Fields findByName(String name) {
7366
        return byName.get(name);
7367
      }
7368
 
7369
      private final short _thriftId;
7370
      private final String _fieldName;
7371
 
7372
      _Fields(short thriftId, String fieldName) {
7373
        _thriftId = thriftId;
7374
        _fieldName = fieldName;
7375
      }
7376
 
7377
      public short getThriftFieldId() {
7378
        return _thriftId;
7379
      }
7380
 
7381
      public String getFieldName() {
7382
        return _fieldName;
7383
      }
7384
    }
7385
 
7386
    // isset id assignments
7387
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
7388
    private static final int __OPEN_ISSET_ID = 1;
7389
    private BitSet __isset_bit_vector = new BitSet(2);
7390
 
7391
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7392
    static {
7393
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7394
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7395
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7396
      tmpMap.put(_Fields.OPEN, new org.apache.thrift.meta_data.FieldMetaData("open", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7397
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
7398
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7399
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_args.class, metaDataMap);
7400
    }
7401
 
7402
    public getAllPurchases_args() {
7403
    }
7404
 
7405
    public getAllPurchases_args(
7406
      long purchaseOrderId,
7407
      boolean open)
7408
    {
7409
      this();
7410
      this.purchaseOrderId = purchaseOrderId;
7411
      setPurchaseOrderIdIsSet(true);
7412
      this.open = open;
7413
      setOpenIsSet(true);
7414
    }
7415
 
7416
    /**
7417
     * Performs a deep copy on <i>other</i>.
7418
     */
7419
    public getAllPurchases_args(getAllPurchases_args other) {
7420
      __isset_bit_vector.clear();
7421
      __isset_bit_vector.or(other.__isset_bit_vector);
7422
      this.purchaseOrderId = other.purchaseOrderId;
7423
      this.open = other.open;
7424
    }
7425
 
7426
    public getAllPurchases_args deepCopy() {
7427
      return new getAllPurchases_args(this);
7428
    }
7429
 
7430
    @Override
7431
    public void clear() {
7432
      setPurchaseOrderIdIsSet(false);
7433
      this.purchaseOrderId = 0;
7434
      setOpenIsSet(false);
7435
      this.open = false;
7436
    }
7437
 
7438
    public long getPurchaseOrderId() {
7439
      return this.purchaseOrderId;
7440
    }
7441
 
7442
    public void setPurchaseOrderId(long purchaseOrderId) {
7443
      this.purchaseOrderId = purchaseOrderId;
7444
      setPurchaseOrderIdIsSet(true);
7445
    }
7446
 
7447
    public void unsetPurchaseOrderId() {
7448
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
7449
    }
7450
 
7451
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
7452
    public boolean isSetPurchaseOrderId() {
7453
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
7454
    }
7455
 
7456
    public void setPurchaseOrderIdIsSet(boolean value) {
7457
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
7458
    }
7459
 
7460
    public boolean isOpen() {
7461
      return this.open;
7462
    }
7463
 
7464
    public void setOpen(boolean open) {
7465
      this.open = open;
7466
      setOpenIsSet(true);
7467
    }
7468
 
7469
    public void unsetOpen() {
7470
      __isset_bit_vector.clear(__OPEN_ISSET_ID);
7471
    }
7472
 
7473
    /** Returns true if field open is set (has been assigned a value) and false otherwise */
7474
    public boolean isSetOpen() {
7475
      return __isset_bit_vector.get(__OPEN_ISSET_ID);
7476
    }
7477
 
7478
    public void setOpenIsSet(boolean value) {
7479
      __isset_bit_vector.set(__OPEN_ISSET_ID, value);
7480
    }
7481
 
7482
    public void setFieldValue(_Fields field, Object value) {
7483
      switch (field) {
7484
      case PURCHASE_ORDER_ID:
7485
        if (value == null) {
7486
          unsetPurchaseOrderId();
7487
        } else {
7488
          setPurchaseOrderId((Long)value);
7489
        }
7490
        break;
7491
 
7492
      case OPEN:
7493
        if (value == null) {
7494
          unsetOpen();
7495
        } else {
7496
          setOpen((Boolean)value);
7497
        }
7498
        break;
7499
 
7500
      }
7501
    }
7502
 
7503
    public Object getFieldValue(_Fields field) {
7504
      switch (field) {
7505
      case PURCHASE_ORDER_ID:
7506
        return Long.valueOf(getPurchaseOrderId());
7507
 
7508
      case OPEN:
7509
        return Boolean.valueOf(isOpen());
7510
 
7511
      }
7512
      throw new IllegalStateException();
7513
    }
7514
 
7515
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7516
    public boolean isSet(_Fields field) {
7517
      if (field == null) {
7518
        throw new IllegalArgumentException();
7519
      }
7520
 
7521
      switch (field) {
7522
      case PURCHASE_ORDER_ID:
7523
        return isSetPurchaseOrderId();
7524
      case OPEN:
7525
        return isSetOpen();
7526
      }
7527
      throw new IllegalStateException();
7528
    }
7529
 
7530
    @Override
7531
    public boolean equals(Object that) {
7532
      if (that == null)
7533
        return false;
7534
      if (that instanceof getAllPurchases_args)
7535
        return this.equals((getAllPurchases_args)that);
7536
      return false;
7537
    }
7538
 
7539
    public boolean equals(getAllPurchases_args that) {
7540
      if (that == null)
7541
        return false;
7542
 
7543
      boolean this_present_purchaseOrderId = true;
7544
      boolean that_present_purchaseOrderId = true;
7545
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
7546
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
7547
          return false;
7548
        if (this.purchaseOrderId != that.purchaseOrderId)
7549
          return false;
7550
      }
7551
 
7552
      boolean this_present_open = true;
7553
      boolean that_present_open = true;
7554
      if (this_present_open || that_present_open) {
7555
        if (!(this_present_open && that_present_open))
7556
          return false;
7557
        if (this.open != that.open)
7558
          return false;
7559
      }
7560
 
7561
      return true;
7562
    }
7563
 
7564
    @Override
7565
    public int hashCode() {
7566
      return 0;
7567
    }
7568
 
7569
    public int compareTo(getAllPurchases_args other) {
7570
      if (!getClass().equals(other.getClass())) {
7571
        return getClass().getName().compareTo(other.getClass().getName());
7572
      }
7573
 
7574
      int lastComparison = 0;
7575
      getAllPurchases_args typedOther = (getAllPurchases_args)other;
7576
 
7577
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
7578
      if (lastComparison != 0) {
7579
        return lastComparison;
7580
      }
7581
      if (isSetPurchaseOrderId()) {
7582
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
7583
        if (lastComparison != 0) {
7584
          return lastComparison;
7585
        }
7586
      }
7587
      lastComparison = Boolean.valueOf(isSetOpen()).compareTo(typedOther.isSetOpen());
7588
      if (lastComparison != 0) {
7589
        return lastComparison;
7590
      }
7591
      if (isSetOpen()) {
7592
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.open, typedOther.open);
7593
        if (lastComparison != 0) {
7594
          return lastComparison;
7595
        }
7596
      }
7597
      return 0;
7598
    }
7599
 
7600
    public _Fields fieldForId(int fieldId) {
7601
      return _Fields.findByThriftId(fieldId);
7602
    }
7603
 
7604
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7605
      org.apache.thrift.protocol.TField field;
7606
      iprot.readStructBegin();
7607
      while (true)
7608
      {
7609
        field = iprot.readFieldBegin();
7610
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7611
          break;
7612
        }
7613
        switch (field.id) {
7614
          case 1: // PURCHASE_ORDER_ID
7615
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7616
              this.purchaseOrderId = iprot.readI64();
7617
              setPurchaseOrderIdIsSet(true);
7618
            } else { 
7619
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7620
            }
7621
            break;
7622
          case 2: // OPEN
7623
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
7624
              this.open = iprot.readBool();
7625
              setOpenIsSet(true);
7626
            } else { 
7627
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7628
            }
7629
            break;
7630
          default:
7631
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7632
        }
7633
        iprot.readFieldEnd();
7634
      }
7635
      iprot.readStructEnd();
7636
      validate();
7637
    }
7638
 
7639
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7640
      validate();
7641
 
7642
      oprot.writeStructBegin(STRUCT_DESC);
7643
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
7644
      oprot.writeI64(this.purchaseOrderId);
7645
      oprot.writeFieldEnd();
7646
      oprot.writeFieldBegin(OPEN_FIELD_DESC);
7647
      oprot.writeBool(this.open);
7648
      oprot.writeFieldEnd();
7649
      oprot.writeFieldStop();
7650
      oprot.writeStructEnd();
7651
    }
7652
 
7653
    @Override
7654
    public String toString() {
7655
      StringBuilder sb = new StringBuilder("getAllPurchases_args(");
7656
      boolean first = true;
7657
 
7658
      sb.append("purchaseOrderId:");
7659
      sb.append(this.purchaseOrderId);
7660
      first = false;
7661
      if (!first) sb.append(", ");
7662
      sb.append("open:");
7663
      sb.append(this.open);
7664
      first = false;
7665
      sb.append(")");
7666
      return sb.toString();
7667
    }
7668
 
7669
    public void validate() throws org.apache.thrift.TException {
7670
      // check for required fields
7671
    }
7672
 
7673
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7674
      try {
7675
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7676
      } catch (org.apache.thrift.TException te) {
7677
        throw new java.io.IOException(te);
7678
      }
7679
    }
7680
 
7681
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7682
      try {
7683
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7684
      } catch (org.apache.thrift.TException te) {
7685
        throw new java.io.IOException(te);
7686
      }
7687
    }
7688
 
7689
  }
7690
 
7691
  public static class getAllPurchases_result implements org.apache.thrift.TBase<getAllPurchases_result, getAllPurchases_result._Fields>, java.io.Serializable, Cloneable   {
7692
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_result");
7693
 
7694
    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);
7695
    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);
7696
 
7697
    private List<Purchase> success; // required
7698
    private PurchaseServiceException e; // required
7699
 
7700
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7701
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7702
      SUCCESS((short)0, "success"),
7703
      E((short)1, "e");
7704
 
7705
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7706
 
7707
      static {
7708
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7709
          byName.put(field.getFieldName(), field);
7710
        }
7711
      }
7712
 
7713
      /**
7714
       * Find the _Fields constant that matches fieldId, or null if its not found.
7715
       */
7716
      public static _Fields findByThriftId(int fieldId) {
7717
        switch(fieldId) {
7718
          case 0: // SUCCESS
7719
            return SUCCESS;
7720
          case 1: // E
7721
            return E;
7722
          default:
7723
            return null;
7724
        }
7725
      }
7726
 
7727
      /**
7728
       * Find the _Fields constant that matches fieldId, throwing an exception
7729
       * if it is not found.
7730
       */
7731
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7732
        _Fields fields = findByThriftId(fieldId);
7733
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7734
        return fields;
7735
      }
7736
 
7737
      /**
7738
       * Find the _Fields constant that matches name, or null if its not found.
7739
       */
7740
      public static _Fields findByName(String name) {
7741
        return byName.get(name);
7742
      }
7743
 
7744
      private final short _thriftId;
7745
      private final String _fieldName;
7746
 
7747
      _Fields(short thriftId, String fieldName) {
7748
        _thriftId = thriftId;
7749
        _fieldName = fieldName;
7750
      }
7751
 
7752
      public short getThriftFieldId() {
7753
        return _thriftId;
7754
      }
7755
 
7756
      public String getFieldName() {
7757
        return _fieldName;
7758
      }
7759
    }
7760
 
7761
    // isset id assignments
7762
 
7763
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7764
    static {
7765
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7766
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7767
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7768
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));
7769
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7770
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7771
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7772
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_result.class, metaDataMap);
7773
    }
7774
 
7775
    public getAllPurchases_result() {
7776
    }
7777
 
7778
    public getAllPurchases_result(
7779
      List<Purchase> success,
7780
      PurchaseServiceException e)
7781
    {
7782
      this();
7783
      this.success = success;
7784
      this.e = e;
7785
    }
7786
 
7787
    /**
7788
     * Performs a deep copy on <i>other</i>.
7789
     */
7790
    public getAllPurchases_result(getAllPurchases_result other) {
7791
      if (other.isSetSuccess()) {
7792
        List<Purchase> __this__success = new ArrayList<Purchase>();
7793
        for (Purchase other_element : other.success) {
7794
          __this__success.add(new Purchase(other_element));
7795
        }
7796
        this.success = __this__success;
7797
      }
7798
      if (other.isSetE()) {
7799
        this.e = new PurchaseServiceException(other.e);
7800
      }
7801
    }
7802
 
7803
    public getAllPurchases_result deepCopy() {
7804
      return new getAllPurchases_result(this);
7805
    }
7806
 
7807
    @Override
7808
    public void clear() {
7809
      this.success = null;
7810
      this.e = null;
7811
    }
7812
 
7813
    public int getSuccessSize() {
7814
      return (this.success == null) ? 0 : this.success.size();
7815
    }
7816
 
7817
    public java.util.Iterator<Purchase> getSuccessIterator() {
7818
      return (this.success == null) ? null : this.success.iterator();
7819
    }
7820
 
7821
    public void addToSuccess(Purchase elem) {
7822
      if (this.success == null) {
7823
        this.success = new ArrayList<Purchase>();
7824
      }
7825
      this.success.add(elem);
7826
    }
7827
 
7828
    public List<Purchase> getSuccess() {
7829
      return this.success;
7830
    }
7831
 
7832
    public void setSuccess(List<Purchase> success) {
7833
      this.success = success;
7834
    }
7835
 
7836
    public void unsetSuccess() {
7837
      this.success = null;
7838
    }
7839
 
7840
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7841
    public boolean isSetSuccess() {
7842
      return this.success != null;
7843
    }
7844
 
7845
    public void setSuccessIsSet(boolean value) {
7846
      if (!value) {
7847
        this.success = null;
7848
      }
7849
    }
7850
 
7851
    public PurchaseServiceException getE() {
7852
      return this.e;
7853
    }
7854
 
7855
    public void setE(PurchaseServiceException e) {
7856
      this.e = e;
7857
    }
7858
 
7859
    public void unsetE() {
7860
      this.e = null;
7861
    }
7862
 
7863
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
7864
    public boolean isSetE() {
7865
      return this.e != null;
7866
    }
7867
 
7868
    public void setEIsSet(boolean value) {
7869
      if (!value) {
7870
        this.e = null;
7871
      }
7872
    }
7873
 
7874
    public void setFieldValue(_Fields field, Object value) {
7875
      switch (field) {
7876
      case SUCCESS:
7877
        if (value == null) {
7878
          unsetSuccess();
7879
        } else {
7880
          setSuccess((List<Purchase>)value);
7881
        }
7882
        break;
7883
 
7884
      case E:
7885
        if (value == null) {
7886
          unsetE();
7887
        } else {
7888
          setE((PurchaseServiceException)value);
7889
        }
7890
        break;
7891
 
7892
      }
7893
    }
7894
 
7895
    public Object getFieldValue(_Fields field) {
7896
      switch (field) {
7897
      case SUCCESS:
7898
        return getSuccess();
7899
 
7900
      case E:
7901
        return getE();
7902
 
7903
      }
7904
      throw new IllegalStateException();
7905
    }
7906
 
7907
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7908
    public boolean isSet(_Fields field) {
7909
      if (field == null) {
7910
        throw new IllegalArgumentException();
7911
      }
7912
 
7913
      switch (field) {
7914
      case SUCCESS:
7915
        return isSetSuccess();
7916
      case E:
7917
        return isSetE();
7918
      }
7919
      throw new IllegalStateException();
7920
    }
7921
 
7922
    @Override
7923
    public boolean equals(Object that) {
7924
      if (that == null)
7925
        return false;
7926
      if (that instanceof getAllPurchases_result)
7927
        return this.equals((getAllPurchases_result)that);
7928
      return false;
7929
    }
7930
 
7931
    public boolean equals(getAllPurchases_result that) {
7932
      if (that == null)
7933
        return false;
7934
 
7935
      boolean this_present_success = true && this.isSetSuccess();
7936
      boolean that_present_success = true && that.isSetSuccess();
7937
      if (this_present_success || that_present_success) {
7938
        if (!(this_present_success && that_present_success))
7939
          return false;
7940
        if (!this.success.equals(that.success))
7941
          return false;
7942
      }
7943
 
7944
      boolean this_present_e = true && this.isSetE();
7945
      boolean that_present_e = true && that.isSetE();
7946
      if (this_present_e || that_present_e) {
7947
        if (!(this_present_e && that_present_e))
7948
          return false;
7949
        if (!this.e.equals(that.e))
7950
          return false;
7951
      }
7952
 
7953
      return true;
7954
    }
7955
 
7956
    @Override
7957
    public int hashCode() {
7958
      return 0;
7959
    }
7960
 
7961
    public int compareTo(getAllPurchases_result other) {
7962
      if (!getClass().equals(other.getClass())) {
7963
        return getClass().getName().compareTo(other.getClass().getName());
7964
      }
7965
 
7966
      int lastComparison = 0;
7967
      getAllPurchases_result typedOther = (getAllPurchases_result)other;
7968
 
7969
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7970
      if (lastComparison != 0) {
7971
        return lastComparison;
7972
      }
7973
      if (isSetSuccess()) {
7974
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7975
        if (lastComparison != 0) {
7976
          return lastComparison;
7977
        }
7978
      }
7979
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
7980
      if (lastComparison != 0) {
7981
        return lastComparison;
7982
      }
7983
      if (isSetE()) {
7984
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
7985
        if (lastComparison != 0) {
7986
          return lastComparison;
7987
        }
7988
      }
7989
      return 0;
7990
    }
7991
 
7992
    public _Fields fieldForId(int fieldId) {
7993
      return _Fields.findByThriftId(fieldId);
7994
    }
7995
 
7996
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7997
      org.apache.thrift.protocol.TField field;
7998
      iprot.readStructBegin();
7999
      while (true)
8000
      {
8001
        field = iprot.readFieldBegin();
8002
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8003
          break;
8004
        }
8005
        switch (field.id) {
8006
          case 0: // SUCCESS
8007
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8008
              {
8009
                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
8010
                this.success = new ArrayList<Purchase>(_list8.size);
8011
                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
8012
                {
8013
                  Purchase _elem10; // required
8014
                  _elem10 = new Purchase();
8015
                  _elem10.read(iprot);
8016
                  this.success.add(_elem10);
8017
                }
8018
                iprot.readListEnd();
8019
              }
8020
            } else { 
8021
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8022
            }
8023
            break;
8024
          case 1: // E
8025
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8026
              this.e = new PurchaseServiceException();
8027
              this.e.read(iprot);
8028
            } else { 
8029
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8030
            }
8031
            break;
8032
          default:
8033
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8034
        }
8035
        iprot.readFieldEnd();
8036
      }
8037
      iprot.readStructEnd();
8038
      validate();
8039
    }
8040
 
8041
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8042
      oprot.writeStructBegin(STRUCT_DESC);
8043
 
8044
      if (this.isSetSuccess()) {
8045
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8046
        {
8047
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
8048
          for (Purchase _iter11 : this.success)
8049
          {
8050
            _iter11.write(oprot);
8051
          }
8052
          oprot.writeListEnd();
8053
        }
8054
        oprot.writeFieldEnd();
8055
      } else if (this.isSetE()) {
8056
        oprot.writeFieldBegin(E_FIELD_DESC);
8057
        this.e.write(oprot);
8058
        oprot.writeFieldEnd();
8059
      }
8060
      oprot.writeFieldStop();
8061
      oprot.writeStructEnd();
8062
    }
8063
 
8064
    @Override
8065
    public String toString() {
8066
      StringBuilder sb = new StringBuilder("getAllPurchases_result(");
8067
      boolean first = true;
8068
 
8069
      sb.append("success:");
8070
      if (this.success == null) {
8071
        sb.append("null");
8072
      } else {
8073
        sb.append(this.success);
8074
      }
8075
      first = false;
8076
      if (!first) sb.append(", ");
8077
      sb.append("e:");
8078
      if (this.e == null) {
8079
        sb.append("null");
8080
      } else {
8081
        sb.append(this.e);
8082
      }
8083
      first = false;
8084
      sb.append(")");
8085
      return sb.toString();
8086
    }
8087
 
8088
    public void validate() throws org.apache.thrift.TException {
8089
      // check for required fields
8090
    }
8091
 
8092
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8093
      try {
8094
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8095
      } catch (org.apache.thrift.TException te) {
8096
        throw new java.io.IOException(te);
8097
      }
8098
    }
8099
 
8100
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8101
      try {
8102
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8103
      } catch (org.apache.thrift.TException te) {
8104
        throw new java.io.IOException(te);
8105
      }
8106
    }
8107
 
8108
  }
8109
 
6385 amar.kumar 8110
  public static class getPurchasesForPO_args implements org.apache.thrift.TBase<getPurchasesForPO_args, getPurchasesForPO_args._Fields>, java.io.Serializable, Cloneable   {
8111
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchasesForPO_args");
8112
 
8113
    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);
8114
 
8115
    private long purchaseOrderId; // required
8116
 
8117
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8118
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8119
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId");
8120
 
8121
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8122
 
8123
      static {
8124
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8125
          byName.put(field.getFieldName(), field);
8126
        }
8127
      }
8128
 
8129
      /**
8130
       * Find the _Fields constant that matches fieldId, or null if its not found.
8131
       */
8132
      public static _Fields findByThriftId(int fieldId) {
8133
        switch(fieldId) {
8134
          case 1: // PURCHASE_ORDER_ID
8135
            return PURCHASE_ORDER_ID;
8136
          default:
8137
            return null;
8138
        }
8139
      }
8140
 
8141
      /**
8142
       * Find the _Fields constant that matches fieldId, throwing an exception
8143
       * if it is not found.
8144
       */
8145
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8146
        _Fields fields = findByThriftId(fieldId);
8147
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8148
        return fields;
8149
      }
8150
 
8151
      /**
8152
       * Find the _Fields constant that matches name, or null if its not found.
8153
       */
8154
      public static _Fields findByName(String name) {
8155
        return byName.get(name);
8156
      }
8157
 
8158
      private final short _thriftId;
8159
      private final String _fieldName;
8160
 
8161
      _Fields(short thriftId, String fieldName) {
8162
        _thriftId = thriftId;
8163
        _fieldName = fieldName;
8164
      }
8165
 
8166
      public short getThriftFieldId() {
8167
        return _thriftId;
8168
      }
8169
 
8170
      public String getFieldName() {
8171
        return _fieldName;
8172
      }
8173
    }
8174
 
8175
    // isset id assignments
8176
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
8177
    private BitSet __isset_bit_vector = new BitSet(1);
8178
 
8179
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8180
    static {
8181
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8182
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8183
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8184
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8185
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchasesForPO_args.class, metaDataMap);
8186
    }
8187
 
8188
    public getPurchasesForPO_args() {
8189
    }
8190
 
8191
    public getPurchasesForPO_args(
8192
      long purchaseOrderId)
8193
    {
8194
      this();
8195
      this.purchaseOrderId = purchaseOrderId;
8196
      setPurchaseOrderIdIsSet(true);
8197
    }
8198
 
8199
    /**
8200
     * Performs a deep copy on <i>other</i>.
8201
     */
8202
    public getPurchasesForPO_args(getPurchasesForPO_args other) {
8203
      __isset_bit_vector.clear();
8204
      __isset_bit_vector.or(other.__isset_bit_vector);
8205
      this.purchaseOrderId = other.purchaseOrderId;
8206
    }
8207
 
8208
    public getPurchasesForPO_args deepCopy() {
8209
      return new getPurchasesForPO_args(this);
8210
    }
8211
 
8212
    @Override
8213
    public void clear() {
8214
      setPurchaseOrderIdIsSet(false);
8215
      this.purchaseOrderId = 0;
8216
    }
8217
 
8218
    public long getPurchaseOrderId() {
8219
      return this.purchaseOrderId;
8220
    }
8221
 
8222
    public void setPurchaseOrderId(long purchaseOrderId) {
8223
      this.purchaseOrderId = purchaseOrderId;
8224
      setPurchaseOrderIdIsSet(true);
8225
    }
8226
 
8227
    public void unsetPurchaseOrderId() {
8228
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
8229
    }
8230
 
8231
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
8232
    public boolean isSetPurchaseOrderId() {
8233
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
8234
    }
8235
 
8236
    public void setPurchaseOrderIdIsSet(boolean value) {
8237
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
8238
    }
8239
 
8240
    public void setFieldValue(_Fields field, Object value) {
8241
      switch (field) {
8242
      case PURCHASE_ORDER_ID:
8243
        if (value == null) {
8244
          unsetPurchaseOrderId();
8245
        } else {
8246
          setPurchaseOrderId((Long)value);
8247
        }
8248
        break;
8249
 
8250
      }
8251
    }
8252
 
8253
    public Object getFieldValue(_Fields field) {
8254
      switch (field) {
8255
      case PURCHASE_ORDER_ID:
8256
        return Long.valueOf(getPurchaseOrderId());
8257
 
8258
      }
8259
      throw new IllegalStateException();
8260
    }
8261
 
8262
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8263
    public boolean isSet(_Fields field) {
8264
      if (field == null) {
8265
        throw new IllegalArgumentException();
8266
      }
8267
 
8268
      switch (field) {
8269
      case PURCHASE_ORDER_ID:
8270
        return isSetPurchaseOrderId();
8271
      }
8272
      throw new IllegalStateException();
8273
    }
8274
 
8275
    @Override
8276
    public boolean equals(Object that) {
8277
      if (that == null)
8278
        return false;
8279
      if (that instanceof getPurchasesForPO_args)
8280
        return this.equals((getPurchasesForPO_args)that);
8281
      return false;
8282
    }
8283
 
8284
    public boolean equals(getPurchasesForPO_args that) {
8285
      if (that == null)
8286
        return false;
8287
 
8288
      boolean this_present_purchaseOrderId = true;
8289
      boolean that_present_purchaseOrderId = true;
8290
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
8291
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
8292
          return false;
8293
        if (this.purchaseOrderId != that.purchaseOrderId)
8294
          return false;
8295
      }
8296
 
8297
      return true;
8298
    }
8299
 
8300
    @Override
8301
    public int hashCode() {
8302
      return 0;
8303
    }
8304
 
8305
    public int compareTo(getPurchasesForPO_args other) {
8306
      if (!getClass().equals(other.getClass())) {
8307
        return getClass().getName().compareTo(other.getClass().getName());
8308
      }
8309
 
8310
      int lastComparison = 0;
8311
      getPurchasesForPO_args typedOther = (getPurchasesForPO_args)other;
8312
 
8313
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
8314
      if (lastComparison != 0) {
8315
        return lastComparison;
8316
      }
8317
      if (isSetPurchaseOrderId()) {
8318
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
8319
        if (lastComparison != 0) {
8320
          return lastComparison;
8321
        }
8322
      }
8323
      return 0;
8324
    }
8325
 
8326
    public _Fields fieldForId(int fieldId) {
8327
      return _Fields.findByThriftId(fieldId);
8328
    }
8329
 
8330
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8331
      org.apache.thrift.protocol.TField field;
8332
      iprot.readStructBegin();
8333
      while (true)
8334
      {
8335
        field = iprot.readFieldBegin();
8336
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8337
          break;
8338
        }
8339
        switch (field.id) {
8340
          case 1: // PURCHASE_ORDER_ID
8341
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8342
              this.purchaseOrderId = iprot.readI64();
8343
              setPurchaseOrderIdIsSet(true);
8344
            } else { 
8345
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8346
            }
8347
            break;
8348
          default:
8349
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8350
        }
8351
        iprot.readFieldEnd();
8352
      }
8353
      iprot.readStructEnd();
8354
      validate();
8355
    }
8356
 
8357
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8358
      validate();
8359
 
8360
      oprot.writeStructBegin(STRUCT_DESC);
8361
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
8362
      oprot.writeI64(this.purchaseOrderId);
8363
      oprot.writeFieldEnd();
8364
      oprot.writeFieldStop();
8365
      oprot.writeStructEnd();
8366
    }
8367
 
8368
    @Override
8369
    public String toString() {
8370
      StringBuilder sb = new StringBuilder("getPurchasesForPO_args(");
8371
      boolean first = true;
8372
 
8373
      sb.append("purchaseOrderId:");
8374
      sb.append(this.purchaseOrderId);
8375
      first = false;
8376
      sb.append(")");
8377
      return sb.toString();
8378
    }
8379
 
8380
    public void validate() throws org.apache.thrift.TException {
8381
      // check for required fields
8382
    }
8383
 
8384
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8385
      try {
8386
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8387
      } catch (org.apache.thrift.TException te) {
8388
        throw new java.io.IOException(te);
8389
      }
8390
    }
8391
 
8392
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8393
      try {
8394
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8395
        __isset_bit_vector = new BitSet(1);
8396
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8397
      } catch (org.apache.thrift.TException te) {
8398
        throw new java.io.IOException(te);
8399
      }
8400
    }
8401
 
8402
  }
8403
 
8404
  public static class getPurchasesForPO_result implements org.apache.thrift.TBase<getPurchasesForPO_result, getPurchasesForPO_result._Fields>, java.io.Serializable, Cloneable   {
8405
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchasesForPO_result");
8406
 
8407
    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);
8408
    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);
8409
 
8410
    private List<Purchase> success; // required
8411
    private PurchaseServiceException e; // required
8412
 
8413
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8414
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8415
      SUCCESS((short)0, "success"),
8416
      E((short)1, "e");
8417
 
8418
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8419
 
8420
      static {
8421
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8422
          byName.put(field.getFieldName(), field);
8423
        }
8424
      }
8425
 
8426
      /**
8427
       * Find the _Fields constant that matches fieldId, or null if its not found.
8428
       */
8429
      public static _Fields findByThriftId(int fieldId) {
8430
        switch(fieldId) {
8431
          case 0: // SUCCESS
8432
            return SUCCESS;
8433
          case 1: // E
8434
            return E;
8435
          default:
8436
            return null;
8437
        }
8438
      }
8439
 
8440
      /**
8441
       * Find the _Fields constant that matches fieldId, throwing an exception
8442
       * if it is not found.
8443
       */
8444
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8445
        _Fields fields = findByThriftId(fieldId);
8446
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8447
        return fields;
8448
      }
8449
 
8450
      /**
8451
       * Find the _Fields constant that matches name, or null if its not found.
8452
       */
8453
      public static _Fields findByName(String name) {
8454
        return byName.get(name);
8455
      }
8456
 
8457
      private final short _thriftId;
8458
      private final String _fieldName;
8459
 
8460
      _Fields(short thriftId, String fieldName) {
8461
        _thriftId = thriftId;
8462
        _fieldName = fieldName;
8463
      }
8464
 
8465
      public short getThriftFieldId() {
8466
        return _thriftId;
8467
      }
8468
 
8469
      public String getFieldName() {
8470
        return _fieldName;
8471
      }
8472
    }
8473
 
8474
    // isset id assignments
8475
 
8476
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8477
    static {
8478
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8479
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8480
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
8481
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));
8482
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8483
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
8484
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8485
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchasesForPO_result.class, metaDataMap);
8486
    }
8487
 
8488
    public getPurchasesForPO_result() {
8489
    }
8490
 
8491
    public getPurchasesForPO_result(
8492
      List<Purchase> success,
8493
      PurchaseServiceException e)
8494
    {
8495
      this();
8496
      this.success = success;
8497
      this.e = e;
8498
    }
8499
 
8500
    /**
8501
     * Performs a deep copy on <i>other</i>.
8502
     */
8503
    public getPurchasesForPO_result(getPurchasesForPO_result other) {
8504
      if (other.isSetSuccess()) {
8505
        List<Purchase> __this__success = new ArrayList<Purchase>();
8506
        for (Purchase other_element : other.success) {
8507
          __this__success.add(new Purchase(other_element));
8508
        }
8509
        this.success = __this__success;
8510
      }
8511
      if (other.isSetE()) {
8512
        this.e = new PurchaseServiceException(other.e);
8513
      }
8514
    }
8515
 
8516
    public getPurchasesForPO_result deepCopy() {
8517
      return new getPurchasesForPO_result(this);
8518
    }
8519
 
8520
    @Override
8521
    public void clear() {
8522
      this.success = null;
8523
      this.e = null;
8524
    }
8525
 
8526
    public int getSuccessSize() {
8527
      return (this.success == null) ? 0 : this.success.size();
8528
    }
8529
 
8530
    public java.util.Iterator<Purchase> getSuccessIterator() {
8531
      return (this.success == null) ? null : this.success.iterator();
8532
    }
8533
 
8534
    public void addToSuccess(Purchase elem) {
8535
      if (this.success == null) {
8536
        this.success = new ArrayList<Purchase>();
8537
      }
8538
      this.success.add(elem);
8539
    }
8540
 
8541
    public List<Purchase> getSuccess() {
8542
      return this.success;
8543
    }
8544
 
8545
    public void setSuccess(List<Purchase> success) {
8546
      this.success = success;
8547
    }
8548
 
8549
    public void unsetSuccess() {
8550
      this.success = null;
8551
    }
8552
 
8553
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8554
    public boolean isSetSuccess() {
8555
      return this.success != null;
8556
    }
8557
 
8558
    public void setSuccessIsSet(boolean value) {
8559
      if (!value) {
8560
        this.success = null;
8561
      }
8562
    }
8563
 
8564
    public PurchaseServiceException getE() {
8565
      return this.e;
8566
    }
8567
 
8568
    public void setE(PurchaseServiceException e) {
8569
      this.e = e;
8570
    }
8571
 
8572
    public void unsetE() {
8573
      this.e = null;
8574
    }
8575
 
8576
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
8577
    public boolean isSetE() {
8578
      return this.e != null;
8579
    }
8580
 
8581
    public void setEIsSet(boolean value) {
8582
      if (!value) {
8583
        this.e = null;
8584
      }
8585
    }
8586
 
8587
    public void setFieldValue(_Fields field, Object value) {
8588
      switch (field) {
8589
      case SUCCESS:
8590
        if (value == null) {
8591
          unsetSuccess();
8592
        } else {
8593
          setSuccess((List<Purchase>)value);
8594
        }
8595
        break;
8596
 
8597
      case E:
8598
        if (value == null) {
8599
          unsetE();
8600
        } else {
8601
          setE((PurchaseServiceException)value);
8602
        }
8603
        break;
8604
 
8605
      }
8606
    }
8607
 
8608
    public Object getFieldValue(_Fields field) {
8609
      switch (field) {
8610
      case SUCCESS:
8611
        return getSuccess();
8612
 
8613
      case E:
8614
        return getE();
8615
 
8616
      }
8617
      throw new IllegalStateException();
8618
    }
8619
 
8620
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8621
    public boolean isSet(_Fields field) {
8622
      if (field == null) {
8623
        throw new IllegalArgumentException();
8624
      }
8625
 
8626
      switch (field) {
8627
      case SUCCESS:
8628
        return isSetSuccess();
8629
      case E:
8630
        return isSetE();
8631
      }
8632
      throw new IllegalStateException();
8633
    }
8634
 
8635
    @Override
8636
    public boolean equals(Object that) {
8637
      if (that == null)
8638
        return false;
8639
      if (that instanceof getPurchasesForPO_result)
8640
        return this.equals((getPurchasesForPO_result)that);
8641
      return false;
8642
    }
8643
 
8644
    public boolean equals(getPurchasesForPO_result that) {
8645
      if (that == null)
8646
        return false;
8647
 
8648
      boolean this_present_success = true && this.isSetSuccess();
8649
      boolean that_present_success = true && that.isSetSuccess();
8650
      if (this_present_success || that_present_success) {
8651
        if (!(this_present_success && that_present_success))
8652
          return false;
8653
        if (!this.success.equals(that.success))
8654
          return false;
8655
      }
8656
 
8657
      boolean this_present_e = true && this.isSetE();
8658
      boolean that_present_e = true && that.isSetE();
8659
      if (this_present_e || that_present_e) {
8660
        if (!(this_present_e && that_present_e))
8661
          return false;
8662
        if (!this.e.equals(that.e))
8663
          return false;
8664
      }
8665
 
8666
      return true;
8667
    }
8668
 
8669
    @Override
8670
    public int hashCode() {
8671
      return 0;
8672
    }
8673
 
8674
    public int compareTo(getPurchasesForPO_result other) {
8675
      if (!getClass().equals(other.getClass())) {
8676
        return getClass().getName().compareTo(other.getClass().getName());
8677
      }
8678
 
8679
      int lastComparison = 0;
8680
      getPurchasesForPO_result typedOther = (getPurchasesForPO_result)other;
8681
 
8682
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8683
      if (lastComparison != 0) {
8684
        return lastComparison;
8685
      }
8686
      if (isSetSuccess()) {
8687
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8688
        if (lastComparison != 0) {
8689
          return lastComparison;
8690
        }
8691
      }
8692
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
8693
      if (lastComparison != 0) {
8694
        return lastComparison;
8695
      }
8696
      if (isSetE()) {
8697
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
8698
        if (lastComparison != 0) {
8699
          return lastComparison;
8700
        }
8701
      }
8702
      return 0;
8703
    }
8704
 
8705
    public _Fields fieldForId(int fieldId) {
8706
      return _Fields.findByThriftId(fieldId);
8707
    }
8708
 
8709
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8710
      org.apache.thrift.protocol.TField field;
8711
      iprot.readStructBegin();
8712
      while (true)
8713
      {
8714
        field = iprot.readFieldBegin();
8715
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8716
          break;
8717
        }
8718
        switch (field.id) {
8719
          case 0: // SUCCESS
8720
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8721
              {
8722
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
8723
                this.success = new ArrayList<Purchase>(_list12.size);
8724
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
8725
                {
8726
                  Purchase _elem14; // required
8727
                  _elem14 = new Purchase();
8728
                  _elem14.read(iprot);
8729
                  this.success.add(_elem14);
8730
                }
8731
                iprot.readListEnd();
8732
              }
8733
            } else { 
8734
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8735
            }
8736
            break;
8737
          case 1: // E
8738
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8739
              this.e = new PurchaseServiceException();
8740
              this.e.read(iprot);
8741
            } else { 
8742
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8743
            }
8744
            break;
8745
          default:
8746
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8747
        }
8748
        iprot.readFieldEnd();
8749
      }
8750
      iprot.readStructEnd();
8751
      validate();
8752
    }
8753
 
8754
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8755
      oprot.writeStructBegin(STRUCT_DESC);
8756
 
8757
      if (this.isSetSuccess()) {
8758
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8759
        {
8760
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
8761
          for (Purchase _iter15 : this.success)
8762
          {
8763
            _iter15.write(oprot);
8764
          }
8765
          oprot.writeListEnd();
8766
        }
8767
        oprot.writeFieldEnd();
8768
      } else if (this.isSetE()) {
8769
        oprot.writeFieldBegin(E_FIELD_DESC);
8770
        this.e.write(oprot);
8771
        oprot.writeFieldEnd();
8772
      }
8773
      oprot.writeFieldStop();
8774
      oprot.writeStructEnd();
8775
    }
8776
 
8777
    @Override
8778
    public String toString() {
8779
      StringBuilder sb = new StringBuilder("getPurchasesForPO_result(");
8780
      boolean first = true;
8781
 
8782
      sb.append("success:");
8783
      if (this.success == null) {
8784
        sb.append("null");
8785
      } else {
8786
        sb.append(this.success);
8787
      }
8788
      first = false;
8789
      if (!first) sb.append(", ");
8790
      sb.append("e:");
8791
      if (this.e == null) {
8792
        sb.append("null");
8793
      } else {
8794
        sb.append(this.e);
8795
      }
8796
      first = false;
8797
      sb.append(")");
8798
      return sb.toString();
8799
    }
8800
 
8801
    public void validate() throws org.apache.thrift.TException {
8802
      // check for required fields
8803
    }
8804
 
8805
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8806
      try {
8807
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8808
      } catch (org.apache.thrift.TException te) {
8809
        throw new java.io.IOException(te);
8810
      }
8811
    }
8812
 
8813
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8814
      try {
8815
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8816
      } catch (org.apache.thrift.TException te) {
8817
        throw new java.io.IOException(te);
8818
      }
8819
    }
8820
 
8821
  }
8822
 
4555 mandeep.dh 8823
  public static class getPurchaseOrderForPurchase_args implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_args, getPurchaseOrderForPurchase_args._Fields>, java.io.Serializable, Cloneable   {
8824
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_args");
4496 mandeep.dh 8825
 
8826
    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);
8827
 
8828
    private long purchaseId; // required
8829
 
8830
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8831
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4555 mandeep.dh 8832
      PURCHASE_ID((short)1, "purchaseId");
4496 mandeep.dh 8833
 
8834
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8835
 
8836
      static {
8837
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8838
          byName.put(field.getFieldName(), field);
8839
        }
8840
      }
8841
 
8842
      /**
8843
       * Find the _Fields constant that matches fieldId, or null if its not found.
8844
       */
8845
      public static _Fields findByThriftId(int fieldId) {
8846
        switch(fieldId) {
8847
          case 1: // PURCHASE_ID
8848
            return PURCHASE_ID;
8849
          default:
8850
            return null;
8851
        }
8852
      }
8853
 
8854
      /**
8855
       * Find the _Fields constant that matches fieldId, throwing an exception
8856
       * if it is not found.
8857
       */
8858
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8859
        _Fields fields = findByThriftId(fieldId);
8860
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8861
        return fields;
8862
      }
8863
 
8864
      /**
8865
       * Find the _Fields constant that matches name, or null if its not found.
8866
       */
8867
      public static _Fields findByName(String name) {
8868
        return byName.get(name);
8869
      }
8870
 
8871
      private final short _thriftId;
8872
      private final String _fieldName;
8873
 
8874
      _Fields(short thriftId, String fieldName) {
8875
        _thriftId = thriftId;
8876
        _fieldName = fieldName;
8877
      }
8878
 
8879
      public short getThriftFieldId() {
8880
        return _thriftId;
8881
      }
8882
 
8883
      public String getFieldName() {
8884
        return _fieldName;
8885
      }
8886
    }
8887
 
8888
    // isset id assignments
8889
    private static final int __PURCHASEID_ISSET_ID = 0;
4555 mandeep.dh 8890
    private BitSet __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 8891
 
8892
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8893
    static {
8894
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8895
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8896
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8897
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 8898
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_args.class, metaDataMap);
4496 mandeep.dh 8899
    }
8900
 
4555 mandeep.dh 8901
    public getPurchaseOrderForPurchase_args() {
4496 mandeep.dh 8902
    }
8903
 
4555 mandeep.dh 8904
    public getPurchaseOrderForPurchase_args(
8905
      long purchaseId)
4496 mandeep.dh 8906
    {
8907
      this();
8908
      this.purchaseId = purchaseId;
8909
      setPurchaseIdIsSet(true);
8910
    }
8911
 
8912
    /**
8913
     * Performs a deep copy on <i>other</i>.
8914
     */
4555 mandeep.dh 8915
    public getPurchaseOrderForPurchase_args(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 8916
      __isset_bit_vector.clear();
8917
      __isset_bit_vector.or(other.__isset_bit_vector);
8918
      this.purchaseId = other.purchaseId;
8919
    }
8920
 
4555 mandeep.dh 8921
    public getPurchaseOrderForPurchase_args deepCopy() {
8922
      return new getPurchaseOrderForPurchase_args(this);
4496 mandeep.dh 8923
    }
8924
 
8925
    @Override
8926
    public void clear() {
8927
      setPurchaseIdIsSet(false);
8928
      this.purchaseId = 0;
8929
    }
8930
 
8931
    public long getPurchaseId() {
8932
      return this.purchaseId;
8933
    }
8934
 
8935
    public void setPurchaseId(long purchaseId) {
8936
      this.purchaseId = purchaseId;
8937
      setPurchaseIdIsSet(true);
8938
    }
8939
 
8940
    public void unsetPurchaseId() {
8941
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
8942
    }
8943
 
8944
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
8945
    public boolean isSetPurchaseId() {
8946
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
8947
    }
8948
 
8949
    public void setPurchaseIdIsSet(boolean value) {
8950
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
8951
    }
8952
 
8953
    public void setFieldValue(_Fields field, Object value) {
8954
      switch (field) {
8955
      case PURCHASE_ID:
8956
        if (value == null) {
8957
          unsetPurchaseId();
8958
        } else {
8959
          setPurchaseId((Long)value);
8960
        }
8961
        break;
8962
 
8963
      }
8964
    }
8965
 
8966
    public Object getFieldValue(_Fields field) {
8967
      switch (field) {
8968
      case PURCHASE_ID:
8969
        return Long.valueOf(getPurchaseId());
8970
 
8971
      }
8972
      throw new IllegalStateException();
8973
    }
8974
 
8975
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8976
    public boolean isSet(_Fields field) {
8977
      if (field == null) {
8978
        throw new IllegalArgumentException();
8979
      }
8980
 
8981
      switch (field) {
8982
      case PURCHASE_ID:
8983
        return isSetPurchaseId();
8984
      }
8985
      throw new IllegalStateException();
8986
    }
8987
 
8988
    @Override
8989
    public boolean equals(Object that) {
8990
      if (that == null)
8991
        return false;
4555 mandeep.dh 8992
      if (that instanceof getPurchaseOrderForPurchase_args)
8993
        return this.equals((getPurchaseOrderForPurchase_args)that);
4496 mandeep.dh 8994
      return false;
8995
    }
8996
 
4555 mandeep.dh 8997
    public boolean equals(getPurchaseOrderForPurchase_args that) {
4496 mandeep.dh 8998
      if (that == null)
8999
        return false;
9000
 
9001
      boolean this_present_purchaseId = true;
9002
      boolean that_present_purchaseId = true;
9003
      if (this_present_purchaseId || that_present_purchaseId) {
9004
        if (!(this_present_purchaseId && that_present_purchaseId))
9005
          return false;
9006
        if (this.purchaseId != that.purchaseId)
9007
          return false;
9008
      }
9009
 
9010
      return true;
9011
    }
9012
 
9013
    @Override
9014
    public int hashCode() {
9015
      return 0;
9016
    }
9017
 
4555 mandeep.dh 9018
    public int compareTo(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 9019
      if (!getClass().equals(other.getClass())) {
9020
        return getClass().getName().compareTo(other.getClass().getName());
9021
      }
9022
 
9023
      int lastComparison = 0;
4555 mandeep.dh 9024
      getPurchaseOrderForPurchase_args typedOther = (getPurchaseOrderForPurchase_args)other;
4496 mandeep.dh 9025
 
9026
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
9027
      if (lastComparison != 0) {
9028
        return lastComparison;
9029
      }
9030
      if (isSetPurchaseId()) {
9031
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
9032
        if (lastComparison != 0) {
9033
          return lastComparison;
9034
        }
9035
      }
9036
      return 0;
9037
    }
9038
 
9039
    public _Fields fieldForId(int fieldId) {
9040
      return _Fields.findByThriftId(fieldId);
9041
    }
9042
 
9043
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9044
      org.apache.thrift.protocol.TField field;
9045
      iprot.readStructBegin();
9046
      while (true)
9047
      {
9048
        field = iprot.readFieldBegin();
9049
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9050
          break;
9051
        }
9052
        switch (field.id) {
9053
          case 1: // PURCHASE_ID
9054
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9055
              this.purchaseId = iprot.readI64();
9056
              setPurchaseIdIsSet(true);
9057
            } else { 
9058
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9059
            }
9060
            break;
9061
          default:
9062
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9063
        }
9064
        iprot.readFieldEnd();
9065
      }
9066
      iprot.readStructEnd();
9067
      validate();
9068
    }
9069
 
9070
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9071
      validate();
9072
 
9073
      oprot.writeStructBegin(STRUCT_DESC);
9074
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
9075
      oprot.writeI64(this.purchaseId);
9076
      oprot.writeFieldEnd();
9077
      oprot.writeFieldStop();
9078
      oprot.writeStructEnd();
9079
    }
9080
 
9081
    @Override
9082
    public String toString() {
4555 mandeep.dh 9083
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_args(");
4496 mandeep.dh 9084
      boolean first = true;
9085
 
9086
      sb.append("purchaseId:");
9087
      sb.append(this.purchaseId);
9088
      first = false;
9089
      sb.append(")");
9090
      return sb.toString();
9091
    }
9092
 
9093
    public void validate() throws org.apache.thrift.TException {
9094
      // check for required fields
9095
    }
9096
 
9097
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9098
      try {
9099
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9100
      } catch (org.apache.thrift.TException te) {
9101
        throw new java.io.IOException(te);
9102
      }
9103
    }
9104
 
9105
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9106
      try {
4555 mandeep.dh 9107
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9108
        __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 9109
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9110
      } catch (org.apache.thrift.TException te) {
9111
        throw new java.io.IOException(te);
9112
      }
9113
    }
9114
 
9115
  }
9116
 
4555 mandeep.dh 9117
  public static class getPurchaseOrderForPurchase_result implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_result, getPurchaseOrderForPurchase_result._Fields>, java.io.Serializable, Cloneable   {
9118
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_result");
4496 mandeep.dh 9119
 
4555 mandeep.dh 9120
    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 9121
 
4555 mandeep.dh 9122
    private PurchaseOrder success; // required
4496 mandeep.dh 9123
 
9124
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9125
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9126
      SUCCESS((short)0, "success");
9127
 
9128
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9129
 
9130
      static {
9131
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9132
          byName.put(field.getFieldName(), field);
9133
        }
9134
      }
9135
 
9136
      /**
9137
       * Find the _Fields constant that matches fieldId, or null if its not found.
9138
       */
9139
      public static _Fields findByThriftId(int fieldId) {
9140
        switch(fieldId) {
9141
          case 0: // SUCCESS
9142
            return SUCCESS;
9143
          default:
9144
            return null;
9145
        }
9146
      }
9147
 
9148
      /**
9149
       * Find the _Fields constant that matches fieldId, throwing an exception
9150
       * if it is not found.
9151
       */
9152
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9153
        _Fields fields = findByThriftId(fieldId);
9154
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9155
        return fields;
9156
      }
9157
 
9158
      /**
9159
       * Find the _Fields constant that matches name, or null if its not found.
9160
       */
9161
      public static _Fields findByName(String name) {
9162
        return byName.get(name);
9163
      }
9164
 
9165
      private final short _thriftId;
9166
      private final String _fieldName;
9167
 
9168
      _Fields(short thriftId, String fieldName) {
9169
        _thriftId = thriftId;
9170
        _fieldName = fieldName;
9171
      }
9172
 
9173
      public short getThriftFieldId() {
9174
        return _thriftId;
9175
      }
9176
 
9177
      public String getFieldName() {
9178
        return _fieldName;
9179
      }
9180
    }
9181
 
9182
    // isset id assignments
9183
 
9184
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9185
    static {
9186
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9187
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 9188
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
4496 mandeep.dh 9189
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 9190
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_result.class, metaDataMap);
4496 mandeep.dh 9191
    }
9192
 
4555 mandeep.dh 9193
    public getPurchaseOrderForPurchase_result() {
4496 mandeep.dh 9194
    }
9195
 
4555 mandeep.dh 9196
    public getPurchaseOrderForPurchase_result(
9197
      PurchaseOrder success)
4496 mandeep.dh 9198
    {
9199
      this();
9200
      this.success = success;
9201
    }
9202
 
9203
    /**
9204
     * Performs a deep copy on <i>other</i>.
9205
     */
4555 mandeep.dh 9206
    public getPurchaseOrderForPurchase_result(getPurchaseOrderForPurchase_result other) {
9207
      if (other.isSetSuccess()) {
9208
        this.success = new PurchaseOrder(other.success);
9209
      }
4496 mandeep.dh 9210
    }
9211
 
4555 mandeep.dh 9212
    public getPurchaseOrderForPurchase_result deepCopy() {
9213
      return new getPurchaseOrderForPurchase_result(this);
4496 mandeep.dh 9214
    }
9215
 
9216
    @Override
9217
    public void clear() {
4555 mandeep.dh 9218
      this.success = null;
4496 mandeep.dh 9219
    }
9220
 
4555 mandeep.dh 9221
    public PurchaseOrder getSuccess() {
4496 mandeep.dh 9222
      return this.success;
9223
    }
9224
 
4555 mandeep.dh 9225
    public void setSuccess(PurchaseOrder success) {
4496 mandeep.dh 9226
      this.success = success;
9227
    }
9228
 
9229
    public void unsetSuccess() {
4555 mandeep.dh 9230
      this.success = null;
4496 mandeep.dh 9231
    }
9232
 
9233
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9234
    public boolean isSetSuccess() {
4555 mandeep.dh 9235
      return this.success != null;
4496 mandeep.dh 9236
    }
9237
 
9238
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 9239
      if (!value) {
9240
        this.success = null;
9241
      }
4496 mandeep.dh 9242
    }
9243
 
9244
    public void setFieldValue(_Fields field, Object value) {
9245
      switch (field) {
9246
      case SUCCESS:
9247
        if (value == null) {
9248
          unsetSuccess();
9249
        } else {
4555 mandeep.dh 9250
          setSuccess((PurchaseOrder)value);
4496 mandeep.dh 9251
        }
9252
        break;
9253
 
9254
      }
9255
    }
9256
 
9257
    public Object getFieldValue(_Fields field) {
9258
      switch (field) {
9259
      case SUCCESS:
4555 mandeep.dh 9260
        return getSuccess();
4496 mandeep.dh 9261
 
9262
      }
9263
      throw new IllegalStateException();
9264
    }
9265
 
9266
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9267
    public boolean isSet(_Fields field) {
9268
      if (field == null) {
9269
        throw new IllegalArgumentException();
9270
      }
9271
 
9272
      switch (field) {
9273
      case SUCCESS:
9274
        return isSetSuccess();
9275
      }
9276
      throw new IllegalStateException();
9277
    }
9278
 
9279
    @Override
9280
    public boolean equals(Object that) {
9281
      if (that == null)
9282
        return false;
4555 mandeep.dh 9283
      if (that instanceof getPurchaseOrderForPurchase_result)
9284
        return this.equals((getPurchaseOrderForPurchase_result)that);
4496 mandeep.dh 9285
      return false;
9286
    }
9287
 
4555 mandeep.dh 9288
    public boolean equals(getPurchaseOrderForPurchase_result that) {
4496 mandeep.dh 9289
      if (that == null)
9290
        return false;
9291
 
4555 mandeep.dh 9292
      boolean this_present_success = true && this.isSetSuccess();
9293
      boolean that_present_success = true && that.isSetSuccess();
4496 mandeep.dh 9294
      if (this_present_success || that_present_success) {
9295
        if (!(this_present_success && that_present_success))
9296
          return false;
4555 mandeep.dh 9297
        if (!this.success.equals(that.success))
4496 mandeep.dh 9298
          return false;
9299
      }
9300
 
9301
      return true;
9302
    }
9303
 
9304
    @Override
9305
    public int hashCode() {
9306
      return 0;
9307
    }
9308
 
4555 mandeep.dh 9309
    public int compareTo(getPurchaseOrderForPurchase_result other) {
4496 mandeep.dh 9310
      if (!getClass().equals(other.getClass())) {
9311
        return getClass().getName().compareTo(other.getClass().getName());
9312
      }
9313
 
9314
      int lastComparison = 0;
4555 mandeep.dh 9315
      getPurchaseOrderForPurchase_result typedOther = (getPurchaseOrderForPurchase_result)other;
4496 mandeep.dh 9316
 
9317
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9318
      if (lastComparison != 0) {
9319
        return lastComparison;
9320
      }
9321
      if (isSetSuccess()) {
9322
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9323
        if (lastComparison != 0) {
9324
          return lastComparison;
9325
        }
9326
      }
9327
      return 0;
9328
    }
9329
 
9330
    public _Fields fieldForId(int fieldId) {
9331
      return _Fields.findByThriftId(fieldId);
9332
    }
9333
 
9334
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9335
      org.apache.thrift.protocol.TField field;
9336
      iprot.readStructBegin();
9337
      while (true)
9338
      {
9339
        field = iprot.readFieldBegin();
9340
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9341
          break;
9342
        }
9343
        switch (field.id) {
9344
          case 0: // SUCCESS
4555 mandeep.dh 9345
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9346
              this.success = new PurchaseOrder();
9347
              this.success.read(iprot);
4496 mandeep.dh 9348
            } else { 
9349
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9350
            }
9351
            break;
9352
          default:
9353
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9354
        }
9355
        iprot.readFieldEnd();
9356
      }
9357
      iprot.readStructEnd();
9358
      validate();
9359
    }
9360
 
9361
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9362
      oprot.writeStructBegin(STRUCT_DESC);
9363
 
9364
      if (this.isSetSuccess()) {
9365
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 9366
        this.success.write(oprot);
4496 mandeep.dh 9367
        oprot.writeFieldEnd();
9368
      }
9369
      oprot.writeFieldStop();
9370
      oprot.writeStructEnd();
9371
    }
9372
 
9373
    @Override
9374
    public String toString() {
4555 mandeep.dh 9375
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_result(");
4496 mandeep.dh 9376
      boolean first = true;
9377
 
9378
      sb.append("success:");
4555 mandeep.dh 9379
      if (this.success == null) {
9380
        sb.append("null");
9381
      } else {
9382
        sb.append(this.success);
9383
      }
4496 mandeep.dh 9384
      first = false;
9385
      sb.append(")");
9386
      return sb.toString();
9387
    }
9388
 
9389
    public void validate() throws org.apache.thrift.TException {
9390
      // check for required fields
9391
    }
9392
 
9393
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9394
      try {
9395
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9396
      } catch (org.apache.thrift.TException te) {
9397
        throw new java.io.IOException(te);
9398
      }
9399
    }
9400
 
9401
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9402
      try {
9403
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9404
      } catch (org.apache.thrift.TException te) {
9405
        throw new java.io.IOException(te);
9406
      }
9407
    }
9408
 
9409
  }
9410
 
4754 mandeep.dh 9411
  public static class getPendingPurchaseOrders_args implements org.apache.thrift.TBase<getPendingPurchaseOrders_args, getPendingPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
9412
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_args");
9413
 
9414
    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);
9415
 
9416
    private long warehouseId; // required
9417
 
9418
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9419
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9420
      WAREHOUSE_ID((short)1, "warehouseId");
9421
 
9422
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9423
 
9424
      static {
9425
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9426
          byName.put(field.getFieldName(), field);
9427
        }
9428
      }
9429
 
9430
      /**
9431
       * Find the _Fields constant that matches fieldId, or null if its not found.
9432
       */
9433
      public static _Fields findByThriftId(int fieldId) {
9434
        switch(fieldId) {
9435
          case 1: // WAREHOUSE_ID
9436
            return WAREHOUSE_ID;
9437
          default:
9438
            return null;
9439
        }
9440
      }
9441
 
9442
      /**
9443
       * Find the _Fields constant that matches fieldId, throwing an exception
9444
       * if it is not found.
9445
       */
9446
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9447
        _Fields fields = findByThriftId(fieldId);
9448
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9449
        return fields;
9450
      }
9451
 
9452
      /**
9453
       * Find the _Fields constant that matches name, or null if its not found.
9454
       */
9455
      public static _Fields findByName(String name) {
9456
        return byName.get(name);
9457
      }
9458
 
9459
      private final short _thriftId;
9460
      private final String _fieldName;
9461
 
9462
      _Fields(short thriftId, String fieldName) {
9463
        _thriftId = thriftId;
9464
        _fieldName = fieldName;
9465
      }
9466
 
9467
      public short getThriftFieldId() {
9468
        return _thriftId;
9469
      }
9470
 
9471
      public String getFieldName() {
9472
        return _fieldName;
9473
      }
9474
    }
9475
 
9476
    // isset id assignments
9477
    private static final int __WAREHOUSEID_ISSET_ID = 0;
9478
    private BitSet __isset_bit_vector = new BitSet(1);
9479
 
9480
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9481
    static {
9482
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9483
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9484
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9485
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9486
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_args.class, metaDataMap);
9487
    }
9488
 
9489
    public getPendingPurchaseOrders_args() {
9490
    }
9491
 
9492
    public getPendingPurchaseOrders_args(
9493
      long warehouseId)
9494
    {
9495
      this();
9496
      this.warehouseId = warehouseId;
9497
      setWarehouseIdIsSet(true);
9498
    }
9499
 
9500
    /**
9501
     * Performs a deep copy on <i>other</i>.
9502
     */
9503
    public getPendingPurchaseOrders_args(getPendingPurchaseOrders_args other) {
9504
      __isset_bit_vector.clear();
9505
      __isset_bit_vector.or(other.__isset_bit_vector);
9506
      this.warehouseId = other.warehouseId;
9507
    }
9508
 
9509
    public getPendingPurchaseOrders_args deepCopy() {
9510
      return new getPendingPurchaseOrders_args(this);
9511
    }
9512
 
9513
    @Override
9514
    public void clear() {
9515
      setWarehouseIdIsSet(false);
9516
      this.warehouseId = 0;
9517
    }
9518
 
9519
    public long getWarehouseId() {
9520
      return this.warehouseId;
9521
    }
9522
 
9523
    public void setWarehouseId(long warehouseId) {
9524
      this.warehouseId = warehouseId;
9525
      setWarehouseIdIsSet(true);
9526
    }
9527
 
9528
    public void unsetWarehouseId() {
9529
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
9530
    }
9531
 
9532
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
9533
    public boolean isSetWarehouseId() {
9534
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
9535
    }
9536
 
9537
    public void setWarehouseIdIsSet(boolean value) {
9538
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
9539
    }
9540
 
9541
    public void setFieldValue(_Fields field, Object value) {
9542
      switch (field) {
9543
      case WAREHOUSE_ID:
9544
        if (value == null) {
9545
          unsetWarehouseId();
9546
        } else {
9547
          setWarehouseId((Long)value);
9548
        }
9549
        break;
9550
 
9551
      }
9552
    }
9553
 
9554
    public Object getFieldValue(_Fields field) {
9555
      switch (field) {
9556
      case WAREHOUSE_ID:
9557
        return Long.valueOf(getWarehouseId());
9558
 
9559
      }
9560
      throw new IllegalStateException();
9561
    }
9562
 
9563
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9564
    public boolean isSet(_Fields field) {
9565
      if (field == null) {
9566
        throw new IllegalArgumentException();
9567
      }
9568
 
9569
      switch (field) {
9570
      case WAREHOUSE_ID:
9571
        return isSetWarehouseId();
9572
      }
9573
      throw new IllegalStateException();
9574
    }
9575
 
9576
    @Override
9577
    public boolean equals(Object that) {
9578
      if (that == null)
9579
        return false;
9580
      if (that instanceof getPendingPurchaseOrders_args)
9581
        return this.equals((getPendingPurchaseOrders_args)that);
9582
      return false;
9583
    }
9584
 
9585
    public boolean equals(getPendingPurchaseOrders_args that) {
9586
      if (that == null)
9587
        return false;
9588
 
9589
      boolean this_present_warehouseId = true;
9590
      boolean that_present_warehouseId = true;
9591
      if (this_present_warehouseId || that_present_warehouseId) {
9592
        if (!(this_present_warehouseId && that_present_warehouseId))
9593
          return false;
9594
        if (this.warehouseId != that.warehouseId)
9595
          return false;
9596
      }
9597
 
9598
      return true;
9599
    }
9600
 
9601
    @Override
9602
    public int hashCode() {
9603
      return 0;
9604
    }
9605
 
9606
    public int compareTo(getPendingPurchaseOrders_args other) {
9607
      if (!getClass().equals(other.getClass())) {
9608
        return getClass().getName().compareTo(other.getClass().getName());
9609
      }
9610
 
9611
      int lastComparison = 0;
9612
      getPendingPurchaseOrders_args typedOther = (getPendingPurchaseOrders_args)other;
9613
 
9614
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
9615
      if (lastComparison != 0) {
9616
        return lastComparison;
9617
      }
9618
      if (isSetWarehouseId()) {
9619
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
9620
        if (lastComparison != 0) {
9621
          return lastComparison;
9622
        }
9623
      }
9624
      return 0;
9625
    }
9626
 
9627
    public _Fields fieldForId(int fieldId) {
9628
      return _Fields.findByThriftId(fieldId);
9629
    }
9630
 
9631
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9632
      org.apache.thrift.protocol.TField field;
9633
      iprot.readStructBegin();
9634
      while (true)
9635
      {
9636
        field = iprot.readFieldBegin();
9637
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9638
          break;
9639
        }
9640
        switch (field.id) {
9641
          case 1: // WAREHOUSE_ID
9642
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9643
              this.warehouseId = iprot.readI64();
9644
              setWarehouseIdIsSet(true);
9645
            } else { 
9646
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9647
            }
9648
            break;
9649
          default:
9650
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9651
        }
9652
        iprot.readFieldEnd();
9653
      }
9654
      iprot.readStructEnd();
9655
      validate();
9656
    }
9657
 
9658
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9659
      validate();
9660
 
9661
      oprot.writeStructBegin(STRUCT_DESC);
9662
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
9663
      oprot.writeI64(this.warehouseId);
9664
      oprot.writeFieldEnd();
9665
      oprot.writeFieldStop();
9666
      oprot.writeStructEnd();
9667
    }
9668
 
9669
    @Override
9670
    public String toString() {
9671
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_args(");
9672
      boolean first = true;
9673
 
9674
      sb.append("warehouseId:");
9675
      sb.append(this.warehouseId);
9676
      first = false;
9677
      sb.append(")");
9678
      return sb.toString();
9679
    }
9680
 
9681
    public void validate() throws org.apache.thrift.TException {
9682
      // check for required fields
9683
    }
9684
 
9685
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9686
      try {
9687
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9688
      } catch (org.apache.thrift.TException te) {
9689
        throw new java.io.IOException(te);
9690
      }
9691
    }
9692
 
9693
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9694
      try {
9695
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9696
        __isset_bit_vector = new BitSet(1);
9697
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9698
      } catch (org.apache.thrift.TException te) {
9699
        throw new java.io.IOException(te);
9700
      }
9701
    }
9702
 
9703
  }
9704
 
9705
  public static class getPendingPurchaseOrders_result implements org.apache.thrift.TBase<getPendingPurchaseOrders_result, getPendingPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
9706
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_result");
9707
 
9708
    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);
9709
    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);
9710
 
9711
    private List<PurchaseOrder> success; // required
9712
    private PurchaseServiceException e; // required
9713
 
9714
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9715
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9716
      SUCCESS((short)0, "success"),
9717
      E((short)1, "e");
9718
 
9719
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9720
 
9721
      static {
9722
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9723
          byName.put(field.getFieldName(), field);
9724
        }
9725
      }
9726
 
9727
      /**
9728
       * Find the _Fields constant that matches fieldId, or null if its not found.
9729
       */
9730
      public static _Fields findByThriftId(int fieldId) {
9731
        switch(fieldId) {
9732
          case 0: // SUCCESS
9733
            return SUCCESS;
9734
          case 1: // E
9735
            return E;
9736
          default:
9737
            return null;
9738
        }
9739
      }
9740
 
9741
      /**
9742
       * Find the _Fields constant that matches fieldId, throwing an exception
9743
       * if it is not found.
9744
       */
9745
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9746
        _Fields fields = findByThriftId(fieldId);
9747
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9748
        return fields;
9749
      }
9750
 
9751
      /**
9752
       * Find the _Fields constant that matches name, or null if its not found.
9753
       */
9754
      public static _Fields findByName(String name) {
9755
        return byName.get(name);
9756
      }
9757
 
9758
      private final short _thriftId;
9759
      private final String _fieldName;
9760
 
9761
      _Fields(short thriftId, String fieldName) {
9762
        _thriftId = thriftId;
9763
        _fieldName = fieldName;
9764
      }
9765
 
9766
      public short getThriftFieldId() {
9767
        return _thriftId;
9768
      }
9769
 
9770
      public String getFieldName() {
9771
        return _fieldName;
9772
      }
9773
    }
9774
 
9775
    // isset id assignments
9776
 
9777
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9778
    static {
9779
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9780
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9781
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
9782
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
9783
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9784
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9785
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9786
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_result.class, metaDataMap);
9787
    }
9788
 
9789
    public getPendingPurchaseOrders_result() {
9790
    }
9791
 
9792
    public getPendingPurchaseOrders_result(
9793
      List<PurchaseOrder> success,
9794
      PurchaseServiceException e)
9795
    {
9796
      this();
9797
      this.success = success;
9798
      this.e = e;
9799
    }
9800
 
9801
    /**
9802
     * Performs a deep copy on <i>other</i>.
9803
     */
9804
    public getPendingPurchaseOrders_result(getPendingPurchaseOrders_result other) {
9805
      if (other.isSetSuccess()) {
9806
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
9807
        for (PurchaseOrder other_element : other.success) {
9808
          __this__success.add(new PurchaseOrder(other_element));
9809
        }
9810
        this.success = __this__success;
9811
      }
9812
      if (other.isSetE()) {
9813
        this.e = new PurchaseServiceException(other.e);
9814
      }
9815
    }
9816
 
9817
    public getPendingPurchaseOrders_result deepCopy() {
9818
      return new getPendingPurchaseOrders_result(this);
9819
    }
9820
 
9821
    @Override
9822
    public void clear() {
9823
      this.success = null;
9824
      this.e = null;
9825
    }
9826
 
9827
    public int getSuccessSize() {
9828
      return (this.success == null) ? 0 : this.success.size();
9829
    }
9830
 
9831
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
9832
      return (this.success == null) ? null : this.success.iterator();
9833
    }
9834
 
9835
    public void addToSuccess(PurchaseOrder elem) {
9836
      if (this.success == null) {
9837
        this.success = new ArrayList<PurchaseOrder>();
9838
      }
9839
      this.success.add(elem);
9840
    }
9841
 
9842
    public List<PurchaseOrder> getSuccess() {
9843
      return this.success;
9844
    }
9845
 
9846
    public void setSuccess(List<PurchaseOrder> success) {
9847
      this.success = success;
9848
    }
9849
 
9850
    public void unsetSuccess() {
9851
      this.success = null;
9852
    }
9853
 
9854
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9855
    public boolean isSetSuccess() {
9856
      return this.success != null;
9857
    }
9858
 
9859
    public void setSuccessIsSet(boolean value) {
9860
      if (!value) {
9861
        this.success = null;
9862
      }
9863
    }
9864
 
9865
    public PurchaseServiceException getE() {
9866
      return this.e;
9867
    }
9868
 
9869
    public void setE(PurchaseServiceException e) {
9870
      this.e = e;
9871
    }
9872
 
9873
    public void unsetE() {
9874
      this.e = null;
9875
    }
9876
 
9877
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
9878
    public boolean isSetE() {
9879
      return this.e != null;
9880
    }
9881
 
9882
    public void setEIsSet(boolean value) {
9883
      if (!value) {
9884
        this.e = null;
9885
      }
9886
    }
9887
 
9888
    public void setFieldValue(_Fields field, Object value) {
9889
      switch (field) {
9890
      case SUCCESS:
9891
        if (value == null) {
9892
          unsetSuccess();
9893
        } else {
9894
          setSuccess((List<PurchaseOrder>)value);
9895
        }
9896
        break;
9897
 
9898
      case E:
9899
        if (value == null) {
9900
          unsetE();
9901
        } else {
9902
          setE((PurchaseServiceException)value);
9903
        }
9904
        break;
9905
 
9906
      }
9907
    }
9908
 
9909
    public Object getFieldValue(_Fields field) {
9910
      switch (field) {
9911
      case SUCCESS:
9912
        return getSuccess();
9913
 
9914
      case E:
9915
        return getE();
9916
 
9917
      }
9918
      throw new IllegalStateException();
9919
    }
9920
 
9921
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9922
    public boolean isSet(_Fields field) {
9923
      if (field == null) {
9924
        throw new IllegalArgumentException();
9925
      }
9926
 
9927
      switch (field) {
9928
      case SUCCESS:
9929
        return isSetSuccess();
9930
      case E:
9931
        return isSetE();
9932
      }
9933
      throw new IllegalStateException();
9934
    }
9935
 
9936
    @Override
9937
    public boolean equals(Object that) {
9938
      if (that == null)
9939
        return false;
9940
      if (that instanceof getPendingPurchaseOrders_result)
9941
        return this.equals((getPendingPurchaseOrders_result)that);
9942
      return false;
9943
    }
9944
 
9945
    public boolean equals(getPendingPurchaseOrders_result that) {
9946
      if (that == null)
9947
        return false;
9948
 
9949
      boolean this_present_success = true && this.isSetSuccess();
9950
      boolean that_present_success = true && that.isSetSuccess();
9951
      if (this_present_success || that_present_success) {
9952
        if (!(this_present_success && that_present_success))
9953
          return false;
9954
        if (!this.success.equals(that.success))
9955
          return false;
9956
      }
9957
 
9958
      boolean this_present_e = true && this.isSetE();
9959
      boolean that_present_e = true && that.isSetE();
9960
      if (this_present_e || that_present_e) {
9961
        if (!(this_present_e && that_present_e))
9962
          return false;
9963
        if (!this.e.equals(that.e))
9964
          return false;
9965
      }
9966
 
9967
      return true;
9968
    }
9969
 
9970
    @Override
9971
    public int hashCode() {
9972
      return 0;
9973
    }
9974
 
9975
    public int compareTo(getPendingPurchaseOrders_result other) {
9976
      if (!getClass().equals(other.getClass())) {
9977
        return getClass().getName().compareTo(other.getClass().getName());
9978
      }
9979
 
9980
      int lastComparison = 0;
9981
      getPendingPurchaseOrders_result typedOther = (getPendingPurchaseOrders_result)other;
9982
 
9983
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9984
      if (lastComparison != 0) {
9985
        return lastComparison;
9986
      }
9987
      if (isSetSuccess()) {
9988
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9989
        if (lastComparison != 0) {
9990
          return lastComparison;
9991
        }
9992
      }
9993
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
9994
      if (lastComparison != 0) {
9995
        return lastComparison;
9996
      }
9997
      if (isSetE()) {
9998
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
9999
        if (lastComparison != 0) {
10000
          return lastComparison;
10001
        }
10002
      }
10003
      return 0;
10004
    }
10005
 
10006
    public _Fields fieldForId(int fieldId) {
10007
      return _Fields.findByThriftId(fieldId);
10008
    }
10009
 
10010
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10011
      org.apache.thrift.protocol.TField field;
10012
      iprot.readStructBegin();
10013
      while (true)
10014
      {
10015
        field = iprot.readFieldBegin();
10016
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10017
          break;
10018
        }
10019
        switch (field.id) {
10020
          case 0: // SUCCESS
10021
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
10022
              {
6385 amar.kumar 10023
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
10024
                this.success = new ArrayList<PurchaseOrder>(_list16.size);
10025
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
4754 mandeep.dh 10026
                {
6385 amar.kumar 10027
                  PurchaseOrder _elem18; // required
10028
                  _elem18 = new PurchaseOrder();
10029
                  _elem18.read(iprot);
10030
                  this.success.add(_elem18);
4754 mandeep.dh 10031
                }
10032
                iprot.readListEnd();
10033
              }
10034
            } else { 
10035
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10036
            }
10037
            break;
10038
          case 1: // E
10039
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10040
              this.e = new PurchaseServiceException();
10041
              this.e.read(iprot);
10042
            } else { 
10043
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10044
            }
10045
            break;
10046
          default:
10047
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10048
        }
10049
        iprot.readFieldEnd();
10050
      }
10051
      iprot.readStructEnd();
10052
      validate();
10053
    }
10054
 
10055
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10056
      oprot.writeStructBegin(STRUCT_DESC);
10057
 
10058
      if (this.isSetSuccess()) {
10059
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10060
        {
10061
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 10062
          for (PurchaseOrder _iter19 : this.success)
4754 mandeep.dh 10063
          {
6385 amar.kumar 10064
            _iter19.write(oprot);
4754 mandeep.dh 10065
          }
10066
          oprot.writeListEnd();
10067
        }
10068
        oprot.writeFieldEnd();
10069
      } else if (this.isSetE()) {
10070
        oprot.writeFieldBegin(E_FIELD_DESC);
10071
        this.e.write(oprot);
10072
        oprot.writeFieldEnd();
10073
      }
10074
      oprot.writeFieldStop();
10075
      oprot.writeStructEnd();
10076
    }
10077
 
10078
    @Override
10079
    public String toString() {
10080
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_result(");
10081
      boolean first = true;
10082
 
10083
      sb.append("success:");
10084
      if (this.success == null) {
10085
        sb.append("null");
10086
      } else {
10087
        sb.append(this.success);
10088
      }
10089
      first = false;
10090
      if (!first) sb.append(", ");
10091
      sb.append("e:");
10092
      if (this.e == null) {
10093
        sb.append("null");
10094
      } else {
10095
        sb.append(this.e);
10096
      }
10097
      first = false;
10098
      sb.append(")");
10099
      return sb.toString();
10100
    }
10101
 
10102
    public void validate() throws org.apache.thrift.TException {
10103
      // check for required fields
10104
    }
10105
 
10106
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10107
      try {
10108
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10109
      } catch (org.apache.thrift.TException te) {
10110
        throw new java.io.IOException(te);
10111
      }
10112
    }
10113
 
10114
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10115
      try {
10116
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10117
      } catch (org.apache.thrift.TException te) {
10118
        throw new java.io.IOException(te);
10119
      }
10120
    }
10121
 
10122
  }
10123
 
10124
  public static class getSuppliers_args implements org.apache.thrift.TBase<getSuppliers_args, getSuppliers_args._Fields>, java.io.Serializable, Cloneable   {
10125
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_args");
10126
 
10127
 
10128
 
10129
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10130
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10131
;
10132
 
10133
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10134
 
10135
      static {
10136
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10137
          byName.put(field.getFieldName(), field);
10138
        }
10139
      }
10140
 
10141
      /**
10142
       * Find the _Fields constant that matches fieldId, or null if its not found.
10143
       */
10144
      public static _Fields findByThriftId(int fieldId) {
10145
        switch(fieldId) {
10146
          default:
10147
            return null;
10148
        }
10149
      }
10150
 
10151
      /**
10152
       * Find the _Fields constant that matches fieldId, throwing an exception
10153
       * if it is not found.
10154
       */
10155
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10156
        _Fields fields = findByThriftId(fieldId);
10157
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10158
        return fields;
10159
      }
10160
 
10161
      /**
10162
       * Find the _Fields constant that matches name, or null if its not found.
10163
       */
10164
      public static _Fields findByName(String name) {
10165
        return byName.get(name);
10166
      }
10167
 
10168
      private final short _thriftId;
10169
      private final String _fieldName;
10170
 
10171
      _Fields(short thriftId, String fieldName) {
10172
        _thriftId = thriftId;
10173
        _fieldName = fieldName;
10174
      }
10175
 
10176
      public short getThriftFieldId() {
10177
        return _thriftId;
10178
      }
10179
 
10180
      public String getFieldName() {
10181
        return _fieldName;
10182
      }
10183
    }
10184
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10185
    static {
10186
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10187
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10188
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_args.class, metaDataMap);
10189
    }
10190
 
10191
    public getSuppliers_args() {
10192
    }
10193
 
10194
    /**
10195
     * Performs a deep copy on <i>other</i>.
10196
     */
10197
    public getSuppliers_args(getSuppliers_args other) {
10198
    }
10199
 
10200
    public getSuppliers_args deepCopy() {
10201
      return new getSuppliers_args(this);
10202
    }
10203
 
10204
    @Override
10205
    public void clear() {
10206
    }
10207
 
10208
    public void setFieldValue(_Fields field, Object value) {
10209
      switch (field) {
10210
      }
10211
    }
10212
 
10213
    public Object getFieldValue(_Fields field) {
10214
      switch (field) {
10215
      }
10216
      throw new IllegalStateException();
10217
    }
10218
 
10219
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10220
    public boolean isSet(_Fields field) {
10221
      if (field == null) {
10222
        throw new IllegalArgumentException();
10223
      }
10224
 
10225
      switch (field) {
10226
      }
10227
      throw new IllegalStateException();
10228
    }
10229
 
10230
    @Override
10231
    public boolean equals(Object that) {
10232
      if (that == null)
10233
        return false;
10234
      if (that instanceof getSuppliers_args)
10235
        return this.equals((getSuppliers_args)that);
10236
      return false;
10237
    }
10238
 
10239
    public boolean equals(getSuppliers_args that) {
10240
      if (that == null)
10241
        return false;
10242
 
10243
      return true;
10244
    }
10245
 
10246
    @Override
10247
    public int hashCode() {
10248
      return 0;
10249
    }
10250
 
10251
    public int compareTo(getSuppliers_args other) {
10252
      if (!getClass().equals(other.getClass())) {
10253
        return getClass().getName().compareTo(other.getClass().getName());
10254
      }
10255
 
10256
      int lastComparison = 0;
10257
      getSuppliers_args typedOther = (getSuppliers_args)other;
10258
 
10259
      return 0;
10260
    }
10261
 
10262
    public _Fields fieldForId(int fieldId) {
10263
      return _Fields.findByThriftId(fieldId);
10264
    }
10265
 
10266
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10267
      org.apache.thrift.protocol.TField field;
10268
      iprot.readStructBegin();
10269
      while (true)
10270
      {
10271
        field = iprot.readFieldBegin();
10272
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10273
          break;
10274
        }
10275
        switch (field.id) {
10276
          default:
10277
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10278
        }
10279
        iprot.readFieldEnd();
10280
      }
10281
      iprot.readStructEnd();
10282
      validate();
10283
    }
10284
 
10285
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10286
      validate();
10287
 
10288
      oprot.writeStructBegin(STRUCT_DESC);
10289
      oprot.writeFieldStop();
10290
      oprot.writeStructEnd();
10291
    }
10292
 
10293
    @Override
10294
    public String toString() {
10295
      StringBuilder sb = new StringBuilder("getSuppliers_args(");
10296
      boolean first = true;
10297
 
10298
      sb.append(")");
10299
      return sb.toString();
10300
    }
10301
 
10302
    public void validate() throws org.apache.thrift.TException {
10303
      // check for required fields
10304
    }
10305
 
10306
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10307
      try {
10308
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10309
      } catch (org.apache.thrift.TException te) {
10310
        throw new java.io.IOException(te);
10311
      }
10312
    }
10313
 
10314
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10315
      try {
10316
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10317
      } catch (org.apache.thrift.TException te) {
10318
        throw new java.io.IOException(te);
10319
      }
10320
    }
10321
 
10322
  }
10323
 
10324
  public static class getSuppliers_result implements org.apache.thrift.TBase<getSuppliers_result, getSuppliers_result._Fields>, java.io.Serializable, Cloneable   {
10325
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_result");
10326
 
10327
    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);
10328
    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);
10329
 
10330
    private List<Supplier> success; // required
10331
    private PurchaseServiceException e; // required
10332
 
10333
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10334
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10335
      SUCCESS((short)0, "success"),
10336
      E((short)1, "e");
10337
 
10338
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10339
 
10340
      static {
10341
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10342
          byName.put(field.getFieldName(), field);
10343
        }
10344
      }
10345
 
10346
      /**
10347
       * Find the _Fields constant that matches fieldId, or null if its not found.
10348
       */
10349
      public static _Fields findByThriftId(int fieldId) {
10350
        switch(fieldId) {
10351
          case 0: // SUCCESS
10352
            return SUCCESS;
10353
          case 1: // E
10354
            return E;
10355
          default:
10356
            return null;
10357
        }
10358
      }
10359
 
10360
      /**
10361
       * Find the _Fields constant that matches fieldId, throwing an exception
10362
       * if it is not found.
10363
       */
10364
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10365
        _Fields fields = findByThriftId(fieldId);
10366
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10367
        return fields;
10368
      }
10369
 
10370
      /**
10371
       * Find the _Fields constant that matches name, or null if its not found.
10372
       */
10373
      public static _Fields findByName(String name) {
10374
        return byName.get(name);
10375
      }
10376
 
10377
      private final short _thriftId;
10378
      private final String _fieldName;
10379
 
10380
      _Fields(short thriftId, String fieldName) {
10381
        _thriftId = thriftId;
10382
        _fieldName = fieldName;
10383
      }
10384
 
10385
      public short getThriftFieldId() {
10386
        return _thriftId;
10387
      }
10388
 
10389
      public String getFieldName() {
10390
        return _fieldName;
10391
      }
10392
    }
10393
 
10394
    // isset id assignments
10395
 
10396
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10397
    static {
10398
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10399
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10400
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
10401
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class))));
10402
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10403
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
10404
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10405
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_result.class, metaDataMap);
10406
    }
10407
 
10408
    public getSuppliers_result() {
10409
    }
10410
 
10411
    public getSuppliers_result(
10412
      List<Supplier> success,
10413
      PurchaseServiceException e)
10414
    {
10415
      this();
10416
      this.success = success;
10417
      this.e = e;
10418
    }
10419
 
10420
    /**
10421
     * Performs a deep copy on <i>other</i>.
10422
     */
10423
    public getSuppliers_result(getSuppliers_result other) {
10424
      if (other.isSetSuccess()) {
10425
        List<Supplier> __this__success = new ArrayList<Supplier>();
10426
        for (Supplier other_element : other.success) {
10427
          __this__success.add(new Supplier(other_element));
10428
        }
10429
        this.success = __this__success;
10430
      }
10431
      if (other.isSetE()) {
10432
        this.e = new PurchaseServiceException(other.e);
10433
      }
10434
    }
10435
 
10436
    public getSuppliers_result deepCopy() {
10437
      return new getSuppliers_result(this);
10438
    }
10439
 
10440
    @Override
10441
    public void clear() {
10442
      this.success = null;
10443
      this.e = null;
10444
    }
10445
 
10446
    public int getSuccessSize() {
10447
      return (this.success == null) ? 0 : this.success.size();
10448
    }
10449
 
10450
    public java.util.Iterator<Supplier> getSuccessIterator() {
10451
      return (this.success == null) ? null : this.success.iterator();
10452
    }
10453
 
10454
    public void addToSuccess(Supplier elem) {
10455
      if (this.success == null) {
10456
        this.success = new ArrayList<Supplier>();
10457
      }
10458
      this.success.add(elem);
10459
    }
10460
 
10461
    public List<Supplier> getSuccess() {
10462
      return this.success;
10463
    }
10464
 
10465
    public void setSuccess(List<Supplier> success) {
10466
      this.success = success;
10467
    }
10468
 
10469
    public void unsetSuccess() {
10470
      this.success = null;
10471
    }
10472
 
10473
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
10474
    public boolean isSetSuccess() {
10475
      return this.success != null;
10476
    }
10477
 
10478
    public void setSuccessIsSet(boolean value) {
10479
      if (!value) {
10480
        this.success = null;
10481
      }
10482
    }
10483
 
10484
    public PurchaseServiceException getE() {
10485
      return this.e;
10486
    }
10487
 
10488
    public void setE(PurchaseServiceException e) {
10489
      this.e = e;
10490
    }
10491
 
10492
    public void unsetE() {
10493
      this.e = null;
10494
    }
10495
 
10496
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
10497
    public boolean isSetE() {
10498
      return this.e != null;
10499
    }
10500
 
10501
    public void setEIsSet(boolean value) {
10502
      if (!value) {
10503
        this.e = null;
10504
      }
10505
    }
10506
 
10507
    public void setFieldValue(_Fields field, Object value) {
10508
      switch (field) {
10509
      case SUCCESS:
10510
        if (value == null) {
10511
          unsetSuccess();
10512
        } else {
10513
          setSuccess((List<Supplier>)value);
10514
        }
10515
        break;
10516
 
10517
      case E:
10518
        if (value == null) {
10519
          unsetE();
10520
        } else {
10521
          setE((PurchaseServiceException)value);
10522
        }
10523
        break;
10524
 
10525
      }
10526
    }
10527
 
10528
    public Object getFieldValue(_Fields field) {
10529
      switch (field) {
10530
      case SUCCESS:
10531
        return getSuccess();
10532
 
10533
      case E:
10534
        return getE();
10535
 
10536
      }
10537
      throw new IllegalStateException();
10538
    }
10539
 
10540
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10541
    public boolean isSet(_Fields field) {
10542
      if (field == null) {
10543
        throw new IllegalArgumentException();
10544
      }
10545
 
10546
      switch (field) {
10547
      case SUCCESS:
10548
        return isSetSuccess();
10549
      case E:
10550
        return isSetE();
10551
      }
10552
      throw new IllegalStateException();
10553
    }
10554
 
10555
    @Override
10556
    public boolean equals(Object that) {
10557
      if (that == null)
10558
        return false;
10559
      if (that instanceof getSuppliers_result)
10560
        return this.equals((getSuppliers_result)that);
10561
      return false;
10562
    }
10563
 
10564
    public boolean equals(getSuppliers_result that) {
10565
      if (that == null)
10566
        return false;
10567
 
10568
      boolean this_present_success = true && this.isSetSuccess();
10569
      boolean that_present_success = true && that.isSetSuccess();
10570
      if (this_present_success || that_present_success) {
10571
        if (!(this_present_success && that_present_success))
10572
          return false;
10573
        if (!this.success.equals(that.success))
10574
          return false;
10575
      }
10576
 
10577
      boolean this_present_e = true && this.isSetE();
10578
      boolean that_present_e = true && that.isSetE();
10579
      if (this_present_e || that_present_e) {
10580
        if (!(this_present_e && that_present_e))
10581
          return false;
10582
        if (!this.e.equals(that.e))
10583
          return false;
10584
      }
10585
 
10586
      return true;
10587
    }
10588
 
10589
    @Override
10590
    public int hashCode() {
10591
      return 0;
10592
    }
10593
 
10594
    public int compareTo(getSuppliers_result other) {
10595
      if (!getClass().equals(other.getClass())) {
10596
        return getClass().getName().compareTo(other.getClass().getName());
10597
      }
10598
 
10599
      int lastComparison = 0;
10600
      getSuppliers_result typedOther = (getSuppliers_result)other;
10601
 
10602
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
10603
      if (lastComparison != 0) {
10604
        return lastComparison;
10605
      }
10606
      if (isSetSuccess()) {
10607
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
10608
        if (lastComparison != 0) {
10609
          return lastComparison;
10610
        }
10611
      }
10612
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
10613
      if (lastComparison != 0) {
10614
        return lastComparison;
10615
      }
10616
      if (isSetE()) {
10617
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
10618
        if (lastComparison != 0) {
10619
          return lastComparison;
10620
        }
10621
      }
10622
      return 0;
10623
    }
10624
 
10625
    public _Fields fieldForId(int fieldId) {
10626
      return _Fields.findByThriftId(fieldId);
10627
    }
10628
 
10629
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10630
      org.apache.thrift.protocol.TField field;
10631
      iprot.readStructBegin();
10632
      while (true)
10633
      {
10634
        field = iprot.readFieldBegin();
10635
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10636
          break;
10637
        }
10638
        switch (field.id) {
10639
          case 0: // SUCCESS
10640
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
10641
              {
6385 amar.kumar 10642
                org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
10643
                this.success = new ArrayList<Supplier>(_list20.size);
10644
                for (int _i21 = 0; _i21 < _list20.size; ++_i21)
4754 mandeep.dh 10645
                {
6385 amar.kumar 10646
                  Supplier _elem22; // required
10647
                  _elem22 = new Supplier();
10648
                  _elem22.read(iprot);
10649
                  this.success.add(_elem22);
4754 mandeep.dh 10650
                }
10651
                iprot.readListEnd();
10652
              }
10653
            } else { 
10654
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10655
            }
10656
            break;
10657
          case 1: // E
10658
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10659
              this.e = new PurchaseServiceException();
10660
              this.e.read(iprot);
10661
            } else { 
10662
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10663
            }
10664
            break;
10665
          default:
10666
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10667
        }
10668
        iprot.readFieldEnd();
10669
      }
10670
      iprot.readStructEnd();
10671
      validate();
10672
    }
10673
 
10674
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10675
      oprot.writeStructBegin(STRUCT_DESC);
10676
 
10677
      if (this.isSetSuccess()) {
10678
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10679
        {
10680
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 10681
          for (Supplier _iter23 : this.success)
4754 mandeep.dh 10682
          {
6385 amar.kumar 10683
            _iter23.write(oprot);
4754 mandeep.dh 10684
          }
10685
          oprot.writeListEnd();
10686
        }
10687
        oprot.writeFieldEnd();
10688
      } else if (this.isSetE()) {
10689
        oprot.writeFieldBegin(E_FIELD_DESC);
10690
        this.e.write(oprot);
10691
        oprot.writeFieldEnd();
10692
      }
10693
      oprot.writeFieldStop();
10694
      oprot.writeStructEnd();
10695
    }
10696
 
10697
    @Override
10698
    public String toString() {
10699
      StringBuilder sb = new StringBuilder("getSuppliers_result(");
10700
      boolean first = true;
10701
 
10702
      sb.append("success:");
10703
      if (this.success == null) {
10704
        sb.append("null");
10705
      } else {
10706
        sb.append(this.success);
10707
      }
10708
      first = false;
10709
      if (!first) sb.append(", ");
10710
      sb.append("e:");
10711
      if (this.e == null) {
10712
        sb.append("null");
10713
      } else {
10714
        sb.append(this.e);
10715
      }
10716
      first = false;
10717
      sb.append(")");
10718
      return sb.toString();
10719
    }
10720
 
10721
    public void validate() throws org.apache.thrift.TException {
10722
      // check for required fields
10723
    }
10724
 
10725
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10726
      try {
10727
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10728
      } catch (org.apache.thrift.TException te) {
10729
        throw new java.io.IOException(te);
10730
      }
10731
    }
10732
 
10733
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10734
      try {
10735
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10736
      } catch (org.apache.thrift.TException te) {
10737
        throw new java.io.IOException(te);
10738
      }
10739
    }
10740
 
10741
  }
10742
 
10743
  public static class fulfillPO_args implements org.apache.thrift.TBase<fulfillPO_args, fulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
10744
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_args");
10745
 
10746
    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);
10747
    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);
10748
    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);
10749
 
10750
    private long purchaseOrderId; // required
10751
    private long itemId; // required
10752
    private long quantity; // required
10753
 
10754
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10755
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10756
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
10757
      ITEM_ID((short)2, "itemId"),
10758
      QUANTITY((short)3, "quantity");
10759
 
10760
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10761
 
10762
      static {
10763
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10764
          byName.put(field.getFieldName(), field);
10765
        }
10766
      }
10767
 
10768
      /**
10769
       * Find the _Fields constant that matches fieldId, or null if its not found.
10770
       */
10771
      public static _Fields findByThriftId(int fieldId) {
10772
        switch(fieldId) {
10773
          case 1: // PURCHASE_ORDER_ID
10774
            return PURCHASE_ORDER_ID;
10775
          case 2: // ITEM_ID
10776
            return ITEM_ID;
10777
          case 3: // QUANTITY
10778
            return QUANTITY;
10779
          default:
10780
            return null;
10781
        }
10782
      }
10783
 
10784
      /**
10785
       * Find the _Fields constant that matches fieldId, throwing an exception
10786
       * if it is not found.
10787
       */
10788
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10789
        _Fields fields = findByThriftId(fieldId);
10790
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10791
        return fields;
10792
      }
10793
 
10794
      /**
10795
       * Find the _Fields constant that matches name, or null if its not found.
10796
       */
10797
      public static _Fields findByName(String name) {
10798
        return byName.get(name);
10799
      }
10800
 
10801
      private final short _thriftId;
10802
      private final String _fieldName;
10803
 
10804
      _Fields(short thriftId, String fieldName) {
10805
        _thriftId = thriftId;
10806
        _fieldName = fieldName;
10807
      }
10808
 
10809
      public short getThriftFieldId() {
10810
        return _thriftId;
10811
      }
10812
 
10813
      public String getFieldName() {
10814
        return _fieldName;
10815
      }
10816
    }
10817
 
10818
    // isset id assignments
10819
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
10820
    private static final int __ITEMID_ISSET_ID = 1;
10821
    private static final int __QUANTITY_ISSET_ID = 2;
10822
    private BitSet __isset_bit_vector = new BitSet(3);
10823
 
10824
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10825
    static {
10826
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10827
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10828
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10829
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10830
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10831
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10832
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10833
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10834
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_args.class, metaDataMap);
10835
    }
10836
 
10837
    public fulfillPO_args() {
10838
    }
10839
 
10840
    public fulfillPO_args(
10841
      long purchaseOrderId,
10842
      long itemId,
10843
      long quantity)
10844
    {
10845
      this();
10846
      this.purchaseOrderId = purchaseOrderId;
10847
      setPurchaseOrderIdIsSet(true);
10848
      this.itemId = itemId;
10849
      setItemIdIsSet(true);
10850
      this.quantity = quantity;
10851
      setQuantityIsSet(true);
10852
    }
10853
 
10854
    /**
10855
     * Performs a deep copy on <i>other</i>.
10856
     */
10857
    public fulfillPO_args(fulfillPO_args other) {
10858
      __isset_bit_vector.clear();
10859
      __isset_bit_vector.or(other.__isset_bit_vector);
10860
      this.purchaseOrderId = other.purchaseOrderId;
10861
      this.itemId = other.itemId;
10862
      this.quantity = other.quantity;
10863
    }
10864
 
10865
    public fulfillPO_args deepCopy() {
10866
      return new fulfillPO_args(this);
10867
    }
10868
 
10869
    @Override
10870
    public void clear() {
10871
      setPurchaseOrderIdIsSet(false);
10872
      this.purchaseOrderId = 0;
10873
      setItemIdIsSet(false);
10874
      this.itemId = 0;
10875
      setQuantityIsSet(false);
10876
      this.quantity = 0;
10877
    }
10878
 
10879
    public long getPurchaseOrderId() {
10880
      return this.purchaseOrderId;
10881
    }
10882
 
10883
    public void setPurchaseOrderId(long purchaseOrderId) {
10884
      this.purchaseOrderId = purchaseOrderId;
10885
      setPurchaseOrderIdIsSet(true);
10886
    }
10887
 
10888
    public void unsetPurchaseOrderId() {
10889
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
10890
    }
10891
 
10892
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
10893
    public boolean isSetPurchaseOrderId() {
10894
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
10895
    }
10896
 
10897
    public void setPurchaseOrderIdIsSet(boolean value) {
10898
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
10899
    }
10900
 
10901
    public long getItemId() {
10902
      return this.itemId;
10903
    }
10904
 
10905
    public void setItemId(long itemId) {
10906
      this.itemId = itemId;
10907
      setItemIdIsSet(true);
10908
    }
10909
 
10910
    public void unsetItemId() {
10911
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
10912
    }
10913
 
10914
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
10915
    public boolean isSetItemId() {
10916
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
10917
    }
10918
 
10919
    public void setItemIdIsSet(boolean value) {
10920
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
10921
    }
10922
 
10923
    public long getQuantity() {
10924
      return this.quantity;
10925
    }
10926
 
10927
    public void setQuantity(long quantity) {
10928
      this.quantity = quantity;
10929
      setQuantityIsSet(true);
10930
    }
10931
 
10932
    public void unsetQuantity() {
10933
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
10934
    }
10935
 
10936
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
10937
    public boolean isSetQuantity() {
10938
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
10939
    }
10940
 
10941
    public void setQuantityIsSet(boolean value) {
10942
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
10943
    }
10944
 
10945
    public void setFieldValue(_Fields field, Object value) {
10946
      switch (field) {
10947
      case PURCHASE_ORDER_ID:
10948
        if (value == null) {
10949
          unsetPurchaseOrderId();
10950
        } else {
10951
          setPurchaseOrderId((Long)value);
10952
        }
10953
        break;
10954
 
10955
      case ITEM_ID:
10956
        if (value == null) {
10957
          unsetItemId();
10958
        } else {
10959
          setItemId((Long)value);
10960
        }
10961
        break;
10962
 
10963
      case QUANTITY:
10964
        if (value == null) {
10965
          unsetQuantity();
10966
        } else {
10967
          setQuantity((Long)value);
10968
        }
10969
        break;
10970
 
10971
      }
10972
    }
10973
 
10974
    public Object getFieldValue(_Fields field) {
10975
      switch (field) {
10976
      case PURCHASE_ORDER_ID:
10977
        return Long.valueOf(getPurchaseOrderId());
10978
 
10979
      case ITEM_ID:
10980
        return Long.valueOf(getItemId());
10981
 
10982
      case QUANTITY:
10983
        return Long.valueOf(getQuantity());
10984
 
10985
      }
10986
      throw new IllegalStateException();
10987
    }
10988
 
10989
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10990
    public boolean isSet(_Fields field) {
10991
      if (field == null) {
10992
        throw new IllegalArgumentException();
10993
      }
10994
 
10995
      switch (field) {
10996
      case PURCHASE_ORDER_ID:
10997
        return isSetPurchaseOrderId();
10998
      case ITEM_ID:
10999
        return isSetItemId();
11000
      case QUANTITY:
11001
        return isSetQuantity();
11002
      }
11003
      throw new IllegalStateException();
11004
    }
11005
 
11006
    @Override
11007
    public boolean equals(Object that) {
11008
      if (that == null)
11009
        return false;
11010
      if (that instanceof fulfillPO_args)
11011
        return this.equals((fulfillPO_args)that);
11012
      return false;
11013
    }
11014
 
11015
    public boolean equals(fulfillPO_args that) {
11016
      if (that == null)
11017
        return false;
11018
 
11019
      boolean this_present_purchaseOrderId = true;
11020
      boolean that_present_purchaseOrderId = true;
11021
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
11022
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
11023
          return false;
11024
        if (this.purchaseOrderId != that.purchaseOrderId)
11025
          return false;
11026
      }
11027
 
11028
      boolean this_present_itemId = true;
11029
      boolean that_present_itemId = true;
11030
      if (this_present_itemId || that_present_itemId) {
11031
        if (!(this_present_itemId && that_present_itemId))
11032
          return false;
11033
        if (this.itemId != that.itemId)
11034
          return false;
11035
      }
11036
 
11037
      boolean this_present_quantity = true;
11038
      boolean that_present_quantity = true;
11039
      if (this_present_quantity || that_present_quantity) {
11040
        if (!(this_present_quantity && that_present_quantity))
11041
          return false;
11042
        if (this.quantity != that.quantity)
11043
          return false;
11044
      }
11045
 
11046
      return true;
11047
    }
11048
 
11049
    @Override
11050
    public int hashCode() {
11051
      return 0;
11052
    }
11053
 
11054
    public int compareTo(fulfillPO_args other) {
11055
      if (!getClass().equals(other.getClass())) {
11056
        return getClass().getName().compareTo(other.getClass().getName());
11057
      }
11058
 
11059
      int lastComparison = 0;
11060
      fulfillPO_args typedOther = (fulfillPO_args)other;
11061
 
11062
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
11063
      if (lastComparison != 0) {
11064
        return lastComparison;
11065
      }
11066
      if (isSetPurchaseOrderId()) {
11067
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
11068
        if (lastComparison != 0) {
11069
          return lastComparison;
11070
        }
11071
      }
11072
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
11073
      if (lastComparison != 0) {
11074
        return lastComparison;
11075
      }
11076
      if (isSetItemId()) {
11077
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
11078
        if (lastComparison != 0) {
11079
          return lastComparison;
11080
        }
11081
      }
11082
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
11083
      if (lastComparison != 0) {
11084
        return lastComparison;
11085
      }
11086
      if (isSetQuantity()) {
11087
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
11088
        if (lastComparison != 0) {
11089
          return lastComparison;
11090
        }
11091
      }
11092
      return 0;
11093
    }
11094
 
11095
    public _Fields fieldForId(int fieldId) {
11096
      return _Fields.findByThriftId(fieldId);
11097
    }
11098
 
11099
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11100
      org.apache.thrift.protocol.TField field;
11101
      iprot.readStructBegin();
11102
      while (true)
11103
      {
11104
        field = iprot.readFieldBegin();
11105
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11106
          break;
11107
        }
11108
        switch (field.id) {
11109
          case 1: // PURCHASE_ORDER_ID
11110
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11111
              this.purchaseOrderId = iprot.readI64();
11112
              setPurchaseOrderIdIsSet(true);
11113
            } else { 
11114
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11115
            }
11116
            break;
11117
          case 2: // ITEM_ID
11118
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11119
              this.itemId = iprot.readI64();
11120
              setItemIdIsSet(true);
11121
            } else { 
11122
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11123
            }
11124
            break;
11125
          case 3: // QUANTITY
11126
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11127
              this.quantity = iprot.readI64();
11128
              setQuantityIsSet(true);
11129
            } else { 
11130
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11131
            }
11132
            break;
11133
          default:
11134
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11135
        }
11136
        iprot.readFieldEnd();
11137
      }
11138
      iprot.readStructEnd();
11139
      validate();
11140
    }
11141
 
11142
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11143
      validate();
11144
 
11145
      oprot.writeStructBegin(STRUCT_DESC);
11146
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
11147
      oprot.writeI64(this.purchaseOrderId);
11148
      oprot.writeFieldEnd();
11149
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
11150
      oprot.writeI64(this.itemId);
11151
      oprot.writeFieldEnd();
11152
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
11153
      oprot.writeI64(this.quantity);
11154
      oprot.writeFieldEnd();
11155
      oprot.writeFieldStop();
11156
      oprot.writeStructEnd();
11157
    }
11158
 
11159
    @Override
11160
    public String toString() {
11161
      StringBuilder sb = new StringBuilder("fulfillPO_args(");
11162
      boolean first = true;
11163
 
11164
      sb.append("purchaseOrderId:");
11165
      sb.append(this.purchaseOrderId);
11166
      first = false;
11167
      if (!first) sb.append(", ");
11168
      sb.append("itemId:");
11169
      sb.append(this.itemId);
11170
      first = false;
11171
      if (!first) sb.append(", ");
11172
      sb.append("quantity:");
11173
      sb.append(this.quantity);
11174
      first = false;
11175
      sb.append(")");
11176
      return sb.toString();
11177
    }
11178
 
11179
    public void validate() throws org.apache.thrift.TException {
11180
      // check for required fields
11181
    }
11182
 
11183
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11184
      try {
11185
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11186
      } catch (org.apache.thrift.TException te) {
11187
        throw new java.io.IOException(te);
11188
      }
11189
    }
11190
 
11191
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11192
      try {
11193
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
11194
        __isset_bit_vector = new BitSet(1);
11195
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11196
      } catch (org.apache.thrift.TException te) {
11197
        throw new java.io.IOException(te);
11198
      }
11199
    }
11200
 
11201
  }
11202
 
11203
  public static class fulfillPO_result implements org.apache.thrift.TBase<fulfillPO_result, fulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
11204
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_result");
11205
 
11206
    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);
11207
 
11208
    private PurchaseServiceException e; // required
11209
 
11210
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11211
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11212
      E((short)1, "e");
11213
 
11214
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11215
 
11216
      static {
11217
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11218
          byName.put(field.getFieldName(), field);
11219
        }
11220
      }
11221
 
11222
      /**
11223
       * Find the _Fields constant that matches fieldId, or null if its not found.
11224
       */
11225
      public static _Fields findByThriftId(int fieldId) {
11226
        switch(fieldId) {
11227
          case 1: // E
11228
            return E;
11229
          default:
11230
            return null;
11231
        }
11232
      }
11233
 
11234
      /**
11235
       * Find the _Fields constant that matches fieldId, throwing an exception
11236
       * if it is not found.
11237
       */
11238
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11239
        _Fields fields = findByThriftId(fieldId);
11240
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11241
        return fields;
11242
      }
11243
 
11244
      /**
11245
       * Find the _Fields constant that matches name, or null if its not found.
11246
       */
11247
      public static _Fields findByName(String name) {
11248
        return byName.get(name);
11249
      }
11250
 
11251
      private final short _thriftId;
11252
      private final String _fieldName;
11253
 
11254
      _Fields(short thriftId, String fieldName) {
11255
        _thriftId = thriftId;
11256
        _fieldName = fieldName;
11257
      }
11258
 
11259
      public short getThriftFieldId() {
11260
        return _thriftId;
11261
      }
11262
 
11263
      public String getFieldName() {
11264
        return _fieldName;
11265
      }
11266
    }
11267
 
11268
    // isset id assignments
11269
 
11270
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11271
    static {
11272
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11273
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11274
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11275
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11276
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_result.class, metaDataMap);
11277
    }
11278
 
11279
    public fulfillPO_result() {
11280
    }
11281
 
11282
    public fulfillPO_result(
11283
      PurchaseServiceException e)
11284
    {
11285
      this();
11286
      this.e = e;
11287
    }
11288
 
11289
    /**
11290
     * Performs a deep copy on <i>other</i>.
11291
     */
11292
    public fulfillPO_result(fulfillPO_result other) {
11293
      if (other.isSetE()) {
11294
        this.e = new PurchaseServiceException(other.e);
11295
      }
11296
    }
11297
 
11298
    public fulfillPO_result deepCopy() {
11299
      return new fulfillPO_result(this);
11300
    }
11301
 
11302
    @Override
11303
    public void clear() {
11304
      this.e = null;
11305
    }
11306
 
11307
    public PurchaseServiceException getE() {
11308
      return this.e;
11309
    }
11310
 
11311
    public void setE(PurchaseServiceException e) {
11312
      this.e = e;
11313
    }
11314
 
11315
    public void unsetE() {
11316
      this.e = null;
11317
    }
11318
 
11319
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
11320
    public boolean isSetE() {
11321
      return this.e != null;
11322
    }
11323
 
11324
    public void setEIsSet(boolean value) {
11325
      if (!value) {
11326
        this.e = null;
11327
      }
11328
    }
11329
 
11330
    public void setFieldValue(_Fields field, Object value) {
11331
      switch (field) {
11332
      case E:
11333
        if (value == null) {
11334
          unsetE();
11335
        } else {
11336
          setE((PurchaseServiceException)value);
11337
        }
11338
        break;
11339
 
11340
      }
11341
    }
11342
 
11343
    public Object getFieldValue(_Fields field) {
11344
      switch (field) {
11345
      case E:
11346
        return getE();
11347
 
11348
      }
11349
      throw new IllegalStateException();
11350
    }
11351
 
11352
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11353
    public boolean isSet(_Fields field) {
11354
      if (field == null) {
11355
        throw new IllegalArgumentException();
11356
      }
11357
 
11358
      switch (field) {
11359
      case E:
11360
        return isSetE();
11361
      }
11362
      throw new IllegalStateException();
11363
    }
11364
 
11365
    @Override
11366
    public boolean equals(Object that) {
11367
      if (that == null)
11368
        return false;
11369
      if (that instanceof fulfillPO_result)
11370
        return this.equals((fulfillPO_result)that);
11371
      return false;
11372
    }
11373
 
11374
    public boolean equals(fulfillPO_result that) {
11375
      if (that == null)
11376
        return false;
11377
 
11378
      boolean this_present_e = true && this.isSetE();
11379
      boolean that_present_e = true && that.isSetE();
11380
      if (this_present_e || that_present_e) {
11381
        if (!(this_present_e && that_present_e))
11382
          return false;
11383
        if (!this.e.equals(that.e))
11384
          return false;
11385
      }
11386
 
11387
      return true;
11388
    }
11389
 
11390
    @Override
11391
    public int hashCode() {
11392
      return 0;
11393
    }
11394
 
11395
    public int compareTo(fulfillPO_result other) {
11396
      if (!getClass().equals(other.getClass())) {
11397
        return getClass().getName().compareTo(other.getClass().getName());
11398
      }
11399
 
11400
      int lastComparison = 0;
11401
      fulfillPO_result typedOther = (fulfillPO_result)other;
11402
 
11403
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
11404
      if (lastComparison != 0) {
11405
        return lastComparison;
11406
      }
11407
      if (isSetE()) {
11408
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
11409
        if (lastComparison != 0) {
11410
          return lastComparison;
11411
        }
11412
      }
11413
      return 0;
11414
    }
11415
 
11416
    public _Fields fieldForId(int fieldId) {
11417
      return _Fields.findByThriftId(fieldId);
11418
    }
11419
 
11420
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11421
      org.apache.thrift.protocol.TField field;
11422
      iprot.readStructBegin();
11423
      while (true)
11424
      {
11425
        field = iprot.readFieldBegin();
11426
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11427
          break;
11428
        }
11429
        switch (field.id) {
11430
          case 1: // E
11431
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11432
              this.e = new PurchaseServiceException();
11433
              this.e.read(iprot);
11434
            } else { 
11435
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11436
            }
11437
            break;
11438
          default:
11439
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11440
        }
11441
        iprot.readFieldEnd();
11442
      }
11443
      iprot.readStructEnd();
11444
      validate();
11445
    }
11446
 
11447
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11448
      oprot.writeStructBegin(STRUCT_DESC);
11449
 
11450
      if (this.isSetE()) {
11451
        oprot.writeFieldBegin(E_FIELD_DESC);
11452
        this.e.write(oprot);
11453
        oprot.writeFieldEnd();
11454
      }
11455
      oprot.writeFieldStop();
11456
      oprot.writeStructEnd();
11457
    }
11458
 
11459
    @Override
11460
    public String toString() {
11461
      StringBuilder sb = new StringBuilder("fulfillPO_result(");
11462
      boolean first = true;
11463
 
11464
      sb.append("e:");
11465
      if (this.e == null) {
11466
        sb.append("null");
11467
      } else {
11468
        sb.append(this.e);
11469
      }
11470
      first = false;
11471
      sb.append(")");
11472
      return sb.toString();
11473
    }
11474
 
11475
    public void validate() throws org.apache.thrift.TException {
11476
      // check for required fields
11477
    }
11478
 
11479
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11480
      try {
11481
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11482
      } catch (org.apache.thrift.TException te) {
11483
        throw new java.io.IOException(te);
11484
      }
11485
    }
11486
 
11487
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11488
      try {
11489
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11490
      } catch (org.apache.thrift.TException te) {
11491
        throw new java.io.IOException(te);
11492
      }
11493
    }
11494
 
11495
  }
11496
 
11497
  public static class updatePurchaseOrder_args implements org.apache.thrift.TBase<updatePurchaseOrder_args, updatePurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
11498
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_args");
11499
 
11500
    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);
11501
 
11502
    private PurchaseOrder purchaseOrder; // required
11503
 
11504
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11505
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11506
      PURCHASE_ORDER((short)1, "purchaseOrder");
11507
 
11508
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11509
 
11510
      static {
11511
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11512
          byName.put(field.getFieldName(), field);
11513
        }
11514
      }
11515
 
11516
      /**
11517
       * Find the _Fields constant that matches fieldId, or null if its not found.
11518
       */
11519
      public static _Fields findByThriftId(int fieldId) {
11520
        switch(fieldId) {
11521
          case 1: // PURCHASE_ORDER
11522
            return PURCHASE_ORDER;
11523
          default:
11524
            return null;
11525
        }
11526
      }
11527
 
11528
      /**
11529
       * Find the _Fields constant that matches fieldId, throwing an exception
11530
       * if it is not found.
11531
       */
11532
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11533
        _Fields fields = findByThriftId(fieldId);
11534
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11535
        return fields;
11536
      }
11537
 
11538
      /**
11539
       * Find the _Fields constant that matches name, or null if its not found.
11540
       */
11541
      public static _Fields findByName(String name) {
11542
        return byName.get(name);
11543
      }
11544
 
11545
      private final short _thriftId;
11546
      private final String _fieldName;
11547
 
11548
      _Fields(short thriftId, String fieldName) {
11549
        _thriftId = thriftId;
11550
        _fieldName = fieldName;
11551
      }
11552
 
11553
      public short getThriftFieldId() {
11554
        return _thriftId;
11555
      }
11556
 
11557
      public String getFieldName() {
11558
        return _fieldName;
11559
      }
11560
    }
11561
 
11562
    // isset id assignments
11563
 
11564
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11565
    static {
11566
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11567
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11568
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
11569
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11570
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_args.class, metaDataMap);
11571
    }
11572
 
11573
    public updatePurchaseOrder_args() {
11574
    }
11575
 
11576
    public updatePurchaseOrder_args(
11577
      PurchaseOrder purchaseOrder)
11578
    {
11579
      this();
11580
      this.purchaseOrder = purchaseOrder;
11581
    }
11582
 
11583
    /**
11584
     * Performs a deep copy on <i>other</i>.
11585
     */
11586
    public updatePurchaseOrder_args(updatePurchaseOrder_args other) {
11587
      if (other.isSetPurchaseOrder()) {
11588
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
11589
      }
11590
    }
11591
 
11592
    public updatePurchaseOrder_args deepCopy() {
11593
      return new updatePurchaseOrder_args(this);
11594
    }
11595
 
11596
    @Override
11597
    public void clear() {
11598
      this.purchaseOrder = null;
11599
    }
11600
 
11601
    public PurchaseOrder getPurchaseOrder() {
11602
      return this.purchaseOrder;
11603
    }
11604
 
11605
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
11606
      this.purchaseOrder = purchaseOrder;
11607
    }
11608
 
11609
    public void unsetPurchaseOrder() {
11610
      this.purchaseOrder = null;
11611
    }
11612
 
11613
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
11614
    public boolean isSetPurchaseOrder() {
11615
      return this.purchaseOrder != null;
11616
    }
11617
 
11618
    public void setPurchaseOrderIsSet(boolean value) {
11619
      if (!value) {
11620
        this.purchaseOrder = null;
11621
      }
11622
    }
11623
 
11624
    public void setFieldValue(_Fields field, Object value) {
11625
      switch (field) {
11626
      case PURCHASE_ORDER:
11627
        if (value == null) {
11628
          unsetPurchaseOrder();
11629
        } else {
11630
          setPurchaseOrder((PurchaseOrder)value);
11631
        }
11632
        break;
11633
 
11634
      }
11635
    }
11636
 
11637
    public Object getFieldValue(_Fields field) {
11638
      switch (field) {
11639
      case PURCHASE_ORDER:
11640
        return getPurchaseOrder();
11641
 
11642
      }
11643
      throw new IllegalStateException();
11644
    }
11645
 
11646
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11647
    public boolean isSet(_Fields field) {
11648
      if (field == null) {
11649
        throw new IllegalArgumentException();
11650
      }
11651
 
11652
      switch (field) {
11653
      case PURCHASE_ORDER:
11654
        return isSetPurchaseOrder();
11655
      }
11656
      throw new IllegalStateException();
11657
    }
11658
 
11659
    @Override
11660
    public boolean equals(Object that) {
11661
      if (that == null)
11662
        return false;
11663
      if (that instanceof updatePurchaseOrder_args)
11664
        return this.equals((updatePurchaseOrder_args)that);
11665
      return false;
11666
    }
11667
 
11668
    public boolean equals(updatePurchaseOrder_args that) {
11669
      if (that == null)
11670
        return false;
11671
 
11672
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
11673
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
11674
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
11675
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
11676
          return false;
11677
        if (!this.purchaseOrder.equals(that.purchaseOrder))
11678
          return false;
11679
      }
11680
 
11681
      return true;
11682
    }
11683
 
11684
    @Override
11685
    public int hashCode() {
11686
      return 0;
11687
    }
11688
 
11689
    public int compareTo(updatePurchaseOrder_args other) {
11690
      if (!getClass().equals(other.getClass())) {
11691
        return getClass().getName().compareTo(other.getClass().getName());
11692
      }
11693
 
11694
      int lastComparison = 0;
11695
      updatePurchaseOrder_args typedOther = (updatePurchaseOrder_args)other;
11696
 
11697
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
11698
      if (lastComparison != 0) {
11699
        return lastComparison;
11700
      }
11701
      if (isSetPurchaseOrder()) {
11702
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
11703
        if (lastComparison != 0) {
11704
          return lastComparison;
11705
        }
11706
      }
11707
      return 0;
11708
    }
11709
 
11710
    public _Fields fieldForId(int fieldId) {
11711
      return _Fields.findByThriftId(fieldId);
11712
    }
11713
 
11714
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11715
      org.apache.thrift.protocol.TField field;
11716
      iprot.readStructBegin();
11717
      while (true)
11718
      {
11719
        field = iprot.readFieldBegin();
11720
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11721
          break;
11722
        }
11723
        switch (field.id) {
11724
          case 1: // PURCHASE_ORDER
11725
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11726
              this.purchaseOrder = new PurchaseOrder();
11727
              this.purchaseOrder.read(iprot);
11728
            } else { 
11729
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11730
            }
11731
            break;
11732
          default:
11733
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11734
        }
11735
        iprot.readFieldEnd();
11736
      }
11737
      iprot.readStructEnd();
11738
      validate();
11739
    }
11740
 
11741
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11742
      validate();
11743
 
11744
      oprot.writeStructBegin(STRUCT_DESC);
11745
      if (this.purchaseOrder != null) {
11746
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
11747
        this.purchaseOrder.write(oprot);
11748
        oprot.writeFieldEnd();
11749
      }
11750
      oprot.writeFieldStop();
11751
      oprot.writeStructEnd();
11752
    }
11753
 
11754
    @Override
11755
    public String toString() {
11756
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_args(");
11757
      boolean first = true;
11758
 
11759
      sb.append("purchaseOrder:");
11760
      if (this.purchaseOrder == null) {
11761
        sb.append("null");
11762
      } else {
11763
        sb.append(this.purchaseOrder);
11764
      }
11765
      first = false;
11766
      sb.append(")");
11767
      return sb.toString();
11768
    }
11769
 
11770
    public void validate() throws org.apache.thrift.TException {
11771
      // check for required fields
11772
    }
11773
 
11774
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11775
      try {
11776
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11777
      } catch (org.apache.thrift.TException te) {
11778
        throw new java.io.IOException(te);
11779
      }
11780
    }
11781
 
11782
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11783
      try {
11784
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11785
      } catch (org.apache.thrift.TException te) {
11786
        throw new java.io.IOException(te);
11787
      }
11788
    }
11789
 
11790
  }
11791
 
11792
  public static class updatePurchaseOrder_result implements org.apache.thrift.TBase<updatePurchaseOrder_result, updatePurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
11793
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_result");
11794
 
11795
    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);
11796
 
11797
    private PurchaseServiceException e; // required
11798
 
11799
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11800
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11801
      E((short)1, "e");
11802
 
11803
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11804
 
11805
      static {
11806
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11807
          byName.put(field.getFieldName(), field);
11808
        }
11809
      }
11810
 
11811
      /**
11812
       * Find the _Fields constant that matches fieldId, or null if its not found.
11813
       */
11814
      public static _Fields findByThriftId(int fieldId) {
11815
        switch(fieldId) {
11816
          case 1: // E
11817
            return E;
11818
          default:
11819
            return null;
11820
        }
11821
      }
11822
 
11823
      /**
11824
       * Find the _Fields constant that matches fieldId, throwing an exception
11825
       * if it is not found.
11826
       */
11827
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11828
        _Fields fields = findByThriftId(fieldId);
11829
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11830
        return fields;
11831
      }
11832
 
11833
      /**
11834
       * Find the _Fields constant that matches name, or null if its not found.
11835
       */
11836
      public static _Fields findByName(String name) {
11837
        return byName.get(name);
11838
      }
11839
 
11840
      private final short _thriftId;
11841
      private final String _fieldName;
11842
 
11843
      _Fields(short thriftId, String fieldName) {
11844
        _thriftId = thriftId;
11845
        _fieldName = fieldName;
11846
      }
11847
 
11848
      public short getThriftFieldId() {
11849
        return _thriftId;
11850
      }
11851
 
11852
      public String getFieldName() {
11853
        return _fieldName;
11854
      }
11855
    }
11856
 
11857
    // isset id assignments
11858
 
11859
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11860
    static {
11861
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11862
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11863
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11864
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11865
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_result.class, metaDataMap);
11866
    }
11867
 
11868
    public updatePurchaseOrder_result() {
11869
    }
11870
 
11871
    public updatePurchaseOrder_result(
11872
      PurchaseServiceException e)
11873
    {
11874
      this();
11875
      this.e = e;
11876
    }
11877
 
11878
    /**
11879
     * Performs a deep copy on <i>other</i>.
11880
     */
11881
    public updatePurchaseOrder_result(updatePurchaseOrder_result other) {
11882
      if (other.isSetE()) {
11883
        this.e = new PurchaseServiceException(other.e);
11884
      }
11885
    }
11886
 
11887
    public updatePurchaseOrder_result deepCopy() {
11888
      return new updatePurchaseOrder_result(this);
11889
    }
11890
 
11891
    @Override
11892
    public void clear() {
11893
      this.e = null;
11894
    }
11895
 
11896
    public PurchaseServiceException getE() {
11897
      return this.e;
11898
    }
11899
 
11900
    public void setE(PurchaseServiceException e) {
11901
      this.e = e;
11902
    }
11903
 
11904
    public void unsetE() {
11905
      this.e = null;
11906
    }
11907
 
11908
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
11909
    public boolean isSetE() {
11910
      return this.e != null;
11911
    }
11912
 
11913
    public void setEIsSet(boolean value) {
11914
      if (!value) {
11915
        this.e = null;
11916
      }
11917
    }
11918
 
11919
    public void setFieldValue(_Fields field, Object value) {
11920
      switch (field) {
11921
      case E:
11922
        if (value == null) {
11923
          unsetE();
11924
        } else {
11925
          setE((PurchaseServiceException)value);
11926
        }
11927
        break;
11928
 
11929
      }
11930
    }
11931
 
11932
    public Object getFieldValue(_Fields field) {
11933
      switch (field) {
11934
      case E:
11935
        return getE();
11936
 
11937
      }
11938
      throw new IllegalStateException();
11939
    }
11940
 
11941
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11942
    public boolean isSet(_Fields field) {
11943
      if (field == null) {
11944
        throw new IllegalArgumentException();
11945
      }
11946
 
11947
      switch (field) {
11948
      case E:
11949
        return isSetE();
11950
      }
11951
      throw new IllegalStateException();
11952
    }
11953
 
11954
    @Override
11955
    public boolean equals(Object that) {
11956
      if (that == null)
11957
        return false;
11958
      if (that instanceof updatePurchaseOrder_result)
11959
        return this.equals((updatePurchaseOrder_result)that);
11960
      return false;
11961
    }
11962
 
11963
    public boolean equals(updatePurchaseOrder_result that) {
11964
      if (that == null)
11965
        return false;
11966
 
11967
      boolean this_present_e = true && this.isSetE();
11968
      boolean that_present_e = true && that.isSetE();
11969
      if (this_present_e || that_present_e) {
11970
        if (!(this_present_e && that_present_e))
11971
          return false;
11972
        if (!this.e.equals(that.e))
11973
          return false;
11974
      }
11975
 
11976
      return true;
11977
    }
11978
 
11979
    @Override
11980
    public int hashCode() {
11981
      return 0;
11982
    }
11983
 
11984
    public int compareTo(updatePurchaseOrder_result other) {
11985
      if (!getClass().equals(other.getClass())) {
11986
        return getClass().getName().compareTo(other.getClass().getName());
11987
      }
11988
 
11989
      int lastComparison = 0;
11990
      updatePurchaseOrder_result typedOther = (updatePurchaseOrder_result)other;
11991
 
11992
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
11993
      if (lastComparison != 0) {
11994
        return lastComparison;
11995
      }
11996
      if (isSetE()) {
11997
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
11998
        if (lastComparison != 0) {
11999
          return lastComparison;
12000
        }
12001
      }
12002
      return 0;
12003
    }
12004
 
12005
    public _Fields fieldForId(int fieldId) {
12006
      return _Fields.findByThriftId(fieldId);
12007
    }
12008
 
12009
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12010
      org.apache.thrift.protocol.TField field;
12011
      iprot.readStructBegin();
12012
      while (true)
12013
      {
12014
        field = iprot.readFieldBegin();
12015
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12016
          break;
12017
        }
12018
        switch (field.id) {
12019
          case 1: // E
12020
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12021
              this.e = new PurchaseServiceException();
12022
              this.e.read(iprot);
12023
            } else { 
12024
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12025
            }
12026
            break;
12027
          default:
12028
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12029
        }
12030
        iprot.readFieldEnd();
12031
      }
12032
      iprot.readStructEnd();
12033
      validate();
12034
    }
12035
 
12036
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12037
      oprot.writeStructBegin(STRUCT_DESC);
12038
 
12039
      if (this.isSetE()) {
12040
        oprot.writeFieldBegin(E_FIELD_DESC);
12041
        this.e.write(oprot);
12042
        oprot.writeFieldEnd();
12043
      }
12044
      oprot.writeFieldStop();
12045
      oprot.writeStructEnd();
12046
    }
12047
 
12048
    @Override
12049
    public String toString() {
12050
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_result(");
12051
      boolean first = true;
12052
 
12053
      sb.append("e:");
12054
      if (this.e == null) {
12055
        sb.append("null");
12056
      } else {
12057
        sb.append(this.e);
12058
      }
12059
      first = false;
12060
      sb.append(")");
12061
      return sb.toString();
12062
    }
12063
 
12064
    public void validate() throws org.apache.thrift.TException {
12065
      // check for required fields
12066
    }
12067
 
12068
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12069
      try {
12070
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12071
      } catch (org.apache.thrift.TException te) {
12072
        throw new java.io.IOException(te);
12073
      }
12074
    }
12075
 
12076
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12077
      try {
12078
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12079
      } catch (org.apache.thrift.TException te) {
12080
        throw new java.io.IOException(te);
12081
      }
12082
    }
12083
 
12084
  }
12085
 
5185 mandeep.dh 12086
  public static class unFulfillPO_args implements org.apache.thrift.TBase<unFulfillPO_args, unFulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
12087
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_args");
12088
 
12089
    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);
12090
    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);
12091
    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);
12092
 
12093
    private long purchaseId; // required
12094
    private long itemId; // required
12095
    private long quantity; // required
12096
 
12097
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12098
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12099
      PURCHASE_ID((short)1, "purchaseId"),
12100
      ITEM_ID((short)2, "itemId"),
12101
      QUANTITY((short)3, "quantity");
12102
 
12103
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12104
 
12105
      static {
12106
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12107
          byName.put(field.getFieldName(), field);
12108
        }
12109
      }
12110
 
12111
      /**
12112
       * Find the _Fields constant that matches fieldId, or null if its not found.
12113
       */
12114
      public static _Fields findByThriftId(int fieldId) {
12115
        switch(fieldId) {
12116
          case 1: // PURCHASE_ID
12117
            return PURCHASE_ID;
12118
          case 2: // ITEM_ID
12119
            return ITEM_ID;
12120
          case 3: // QUANTITY
12121
            return QUANTITY;
12122
          default:
12123
            return null;
12124
        }
12125
      }
12126
 
12127
      /**
12128
       * Find the _Fields constant that matches fieldId, throwing an exception
12129
       * if it is not found.
12130
       */
12131
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12132
        _Fields fields = findByThriftId(fieldId);
12133
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12134
        return fields;
12135
      }
12136
 
12137
      /**
12138
       * Find the _Fields constant that matches name, or null if its not found.
12139
       */
12140
      public static _Fields findByName(String name) {
12141
        return byName.get(name);
12142
      }
12143
 
12144
      private final short _thriftId;
12145
      private final String _fieldName;
12146
 
12147
      _Fields(short thriftId, String fieldName) {
12148
        _thriftId = thriftId;
12149
        _fieldName = fieldName;
12150
      }
12151
 
12152
      public short getThriftFieldId() {
12153
        return _thriftId;
12154
      }
12155
 
12156
      public String getFieldName() {
12157
        return _fieldName;
12158
      }
12159
    }
12160
 
12161
    // isset id assignments
12162
    private static final int __PURCHASEID_ISSET_ID = 0;
12163
    private static final int __ITEMID_ISSET_ID = 1;
12164
    private static final int __QUANTITY_ISSET_ID = 2;
12165
    private BitSet __isset_bit_vector = new BitSet(3);
12166
 
12167
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12168
    static {
12169
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12170
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12171
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12172
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12173
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12174
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12175
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12176
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12177
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_args.class, metaDataMap);
12178
    }
12179
 
12180
    public unFulfillPO_args() {
12181
    }
12182
 
12183
    public unFulfillPO_args(
12184
      long purchaseId,
12185
      long itemId,
12186
      long quantity)
12187
    {
12188
      this();
12189
      this.purchaseId = purchaseId;
12190
      setPurchaseIdIsSet(true);
12191
      this.itemId = itemId;
12192
      setItemIdIsSet(true);
12193
      this.quantity = quantity;
12194
      setQuantityIsSet(true);
12195
    }
12196
 
12197
    /**
12198
     * Performs a deep copy on <i>other</i>.
12199
     */
12200
    public unFulfillPO_args(unFulfillPO_args other) {
12201
      __isset_bit_vector.clear();
12202
      __isset_bit_vector.or(other.__isset_bit_vector);
12203
      this.purchaseId = other.purchaseId;
12204
      this.itemId = other.itemId;
12205
      this.quantity = other.quantity;
12206
    }
12207
 
12208
    public unFulfillPO_args deepCopy() {
12209
      return new unFulfillPO_args(this);
12210
    }
12211
 
12212
    @Override
12213
    public void clear() {
12214
      setPurchaseIdIsSet(false);
12215
      this.purchaseId = 0;
12216
      setItemIdIsSet(false);
12217
      this.itemId = 0;
12218
      setQuantityIsSet(false);
12219
      this.quantity = 0;
12220
    }
12221
 
12222
    public long getPurchaseId() {
12223
      return this.purchaseId;
12224
    }
12225
 
12226
    public void setPurchaseId(long purchaseId) {
12227
      this.purchaseId = purchaseId;
12228
      setPurchaseIdIsSet(true);
12229
    }
12230
 
12231
    public void unsetPurchaseId() {
12232
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
12233
    }
12234
 
12235
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
12236
    public boolean isSetPurchaseId() {
12237
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
12238
    }
12239
 
12240
    public void setPurchaseIdIsSet(boolean value) {
12241
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
12242
    }
12243
 
12244
    public long getItemId() {
12245
      return this.itemId;
12246
    }
12247
 
12248
    public void setItemId(long itemId) {
12249
      this.itemId = itemId;
12250
      setItemIdIsSet(true);
12251
    }
12252
 
12253
    public void unsetItemId() {
12254
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
12255
    }
12256
 
12257
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
12258
    public boolean isSetItemId() {
12259
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
12260
    }
12261
 
12262
    public void setItemIdIsSet(boolean value) {
12263
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
12264
    }
12265
 
12266
    public long getQuantity() {
12267
      return this.quantity;
12268
    }
12269
 
12270
    public void setQuantity(long quantity) {
12271
      this.quantity = quantity;
12272
      setQuantityIsSet(true);
12273
    }
12274
 
12275
    public void unsetQuantity() {
12276
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
12277
    }
12278
 
12279
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
12280
    public boolean isSetQuantity() {
12281
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
12282
    }
12283
 
12284
    public void setQuantityIsSet(boolean value) {
12285
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
12286
    }
12287
 
12288
    public void setFieldValue(_Fields field, Object value) {
12289
      switch (field) {
12290
      case PURCHASE_ID:
12291
        if (value == null) {
12292
          unsetPurchaseId();
12293
        } else {
12294
          setPurchaseId((Long)value);
12295
        }
12296
        break;
12297
 
12298
      case ITEM_ID:
12299
        if (value == null) {
12300
          unsetItemId();
12301
        } else {
12302
          setItemId((Long)value);
12303
        }
12304
        break;
12305
 
12306
      case QUANTITY:
12307
        if (value == null) {
12308
          unsetQuantity();
12309
        } else {
12310
          setQuantity((Long)value);
12311
        }
12312
        break;
12313
 
12314
      }
12315
    }
12316
 
12317
    public Object getFieldValue(_Fields field) {
12318
      switch (field) {
12319
      case PURCHASE_ID:
12320
        return Long.valueOf(getPurchaseId());
12321
 
12322
      case ITEM_ID:
12323
        return Long.valueOf(getItemId());
12324
 
12325
      case QUANTITY:
12326
        return Long.valueOf(getQuantity());
12327
 
12328
      }
12329
      throw new IllegalStateException();
12330
    }
12331
 
12332
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12333
    public boolean isSet(_Fields field) {
12334
      if (field == null) {
12335
        throw new IllegalArgumentException();
12336
      }
12337
 
12338
      switch (field) {
12339
      case PURCHASE_ID:
12340
        return isSetPurchaseId();
12341
      case ITEM_ID:
12342
        return isSetItemId();
12343
      case QUANTITY:
12344
        return isSetQuantity();
12345
      }
12346
      throw new IllegalStateException();
12347
    }
12348
 
12349
    @Override
12350
    public boolean equals(Object that) {
12351
      if (that == null)
12352
        return false;
12353
      if (that instanceof unFulfillPO_args)
12354
        return this.equals((unFulfillPO_args)that);
12355
      return false;
12356
    }
12357
 
12358
    public boolean equals(unFulfillPO_args that) {
12359
      if (that == null)
12360
        return false;
12361
 
12362
      boolean this_present_purchaseId = true;
12363
      boolean that_present_purchaseId = true;
12364
      if (this_present_purchaseId || that_present_purchaseId) {
12365
        if (!(this_present_purchaseId && that_present_purchaseId))
12366
          return false;
12367
        if (this.purchaseId != that.purchaseId)
12368
          return false;
12369
      }
12370
 
12371
      boolean this_present_itemId = true;
12372
      boolean that_present_itemId = true;
12373
      if (this_present_itemId || that_present_itemId) {
12374
        if (!(this_present_itemId && that_present_itemId))
12375
          return false;
12376
        if (this.itemId != that.itemId)
12377
          return false;
12378
      }
12379
 
12380
      boolean this_present_quantity = true;
12381
      boolean that_present_quantity = true;
12382
      if (this_present_quantity || that_present_quantity) {
12383
        if (!(this_present_quantity && that_present_quantity))
12384
          return false;
12385
        if (this.quantity != that.quantity)
12386
          return false;
12387
      }
12388
 
12389
      return true;
12390
    }
12391
 
12392
    @Override
12393
    public int hashCode() {
12394
      return 0;
12395
    }
12396
 
12397
    public int compareTo(unFulfillPO_args other) {
12398
      if (!getClass().equals(other.getClass())) {
12399
        return getClass().getName().compareTo(other.getClass().getName());
12400
      }
12401
 
12402
      int lastComparison = 0;
12403
      unFulfillPO_args typedOther = (unFulfillPO_args)other;
12404
 
12405
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
12406
      if (lastComparison != 0) {
12407
        return lastComparison;
12408
      }
12409
      if (isSetPurchaseId()) {
12410
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
12411
        if (lastComparison != 0) {
12412
          return lastComparison;
12413
        }
12414
      }
12415
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
12416
      if (lastComparison != 0) {
12417
        return lastComparison;
12418
      }
12419
      if (isSetItemId()) {
12420
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
12421
        if (lastComparison != 0) {
12422
          return lastComparison;
12423
        }
12424
      }
12425
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
12426
      if (lastComparison != 0) {
12427
        return lastComparison;
12428
      }
12429
      if (isSetQuantity()) {
12430
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
12431
        if (lastComparison != 0) {
12432
          return lastComparison;
12433
        }
12434
      }
12435
      return 0;
12436
    }
12437
 
12438
    public _Fields fieldForId(int fieldId) {
12439
      return _Fields.findByThriftId(fieldId);
12440
    }
12441
 
12442
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12443
      org.apache.thrift.protocol.TField field;
12444
      iprot.readStructBegin();
12445
      while (true)
12446
      {
12447
        field = iprot.readFieldBegin();
12448
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12449
          break;
12450
        }
12451
        switch (field.id) {
12452
          case 1: // PURCHASE_ID
12453
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12454
              this.purchaseId = iprot.readI64();
12455
              setPurchaseIdIsSet(true);
12456
            } else { 
12457
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12458
            }
12459
            break;
12460
          case 2: // ITEM_ID
12461
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12462
              this.itemId = iprot.readI64();
12463
              setItemIdIsSet(true);
12464
            } else { 
12465
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12466
            }
12467
            break;
12468
          case 3: // QUANTITY
12469
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12470
              this.quantity = iprot.readI64();
12471
              setQuantityIsSet(true);
12472
            } else { 
12473
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12474
            }
12475
            break;
12476
          default:
12477
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12478
        }
12479
        iprot.readFieldEnd();
12480
      }
12481
      iprot.readStructEnd();
12482
      validate();
12483
    }
12484
 
12485
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12486
      validate();
12487
 
12488
      oprot.writeStructBegin(STRUCT_DESC);
12489
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
12490
      oprot.writeI64(this.purchaseId);
12491
      oprot.writeFieldEnd();
12492
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
12493
      oprot.writeI64(this.itemId);
12494
      oprot.writeFieldEnd();
12495
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
12496
      oprot.writeI64(this.quantity);
12497
      oprot.writeFieldEnd();
12498
      oprot.writeFieldStop();
12499
      oprot.writeStructEnd();
12500
    }
12501
 
12502
    @Override
12503
    public String toString() {
12504
      StringBuilder sb = new StringBuilder("unFulfillPO_args(");
12505
      boolean first = true;
12506
 
12507
      sb.append("purchaseId:");
12508
      sb.append(this.purchaseId);
12509
      first = false;
12510
      if (!first) sb.append(", ");
12511
      sb.append("itemId:");
12512
      sb.append(this.itemId);
12513
      first = false;
12514
      if (!first) sb.append(", ");
12515
      sb.append("quantity:");
12516
      sb.append(this.quantity);
12517
      first = false;
12518
      sb.append(")");
12519
      return sb.toString();
12520
    }
12521
 
12522
    public void validate() throws org.apache.thrift.TException {
12523
      // check for required fields
12524
    }
12525
 
12526
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12527
      try {
12528
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12529
      } catch (org.apache.thrift.TException te) {
12530
        throw new java.io.IOException(te);
12531
      }
12532
    }
12533
 
12534
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12535
      try {
12536
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
12537
        __isset_bit_vector = new BitSet(1);
12538
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12539
      } catch (org.apache.thrift.TException te) {
12540
        throw new java.io.IOException(te);
12541
      }
12542
    }
12543
 
12544
  }
12545
 
12546
  public static class unFulfillPO_result implements org.apache.thrift.TBase<unFulfillPO_result, unFulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
12547
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_result");
12548
 
12549
    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);
12550
 
12551
    private PurchaseServiceException e; // required
12552
 
12553
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12554
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12555
      E((short)1, "e");
12556
 
12557
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12558
 
12559
      static {
12560
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12561
          byName.put(field.getFieldName(), field);
12562
        }
12563
      }
12564
 
12565
      /**
12566
       * Find the _Fields constant that matches fieldId, or null if its not found.
12567
       */
12568
      public static _Fields findByThriftId(int fieldId) {
12569
        switch(fieldId) {
12570
          case 1: // E
12571
            return E;
12572
          default:
12573
            return null;
12574
        }
12575
      }
12576
 
12577
      /**
12578
       * Find the _Fields constant that matches fieldId, throwing an exception
12579
       * if it is not found.
12580
       */
12581
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12582
        _Fields fields = findByThriftId(fieldId);
12583
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12584
        return fields;
12585
      }
12586
 
12587
      /**
12588
       * Find the _Fields constant that matches name, or null if its not found.
12589
       */
12590
      public static _Fields findByName(String name) {
12591
        return byName.get(name);
12592
      }
12593
 
12594
      private final short _thriftId;
12595
      private final String _fieldName;
12596
 
12597
      _Fields(short thriftId, String fieldName) {
12598
        _thriftId = thriftId;
12599
        _fieldName = fieldName;
12600
      }
12601
 
12602
      public short getThriftFieldId() {
12603
        return _thriftId;
12604
      }
12605
 
12606
      public String getFieldName() {
12607
        return _fieldName;
12608
      }
12609
    }
12610
 
12611
    // isset id assignments
12612
 
12613
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12614
    static {
12615
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12616
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12617
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
12618
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12619
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_result.class, metaDataMap);
12620
    }
12621
 
12622
    public unFulfillPO_result() {
12623
    }
12624
 
12625
    public unFulfillPO_result(
12626
      PurchaseServiceException e)
12627
    {
12628
      this();
12629
      this.e = e;
12630
    }
12631
 
12632
    /**
12633
     * Performs a deep copy on <i>other</i>.
12634
     */
12635
    public unFulfillPO_result(unFulfillPO_result other) {
12636
      if (other.isSetE()) {
12637
        this.e = new PurchaseServiceException(other.e);
12638
      }
12639
    }
12640
 
12641
    public unFulfillPO_result deepCopy() {
12642
      return new unFulfillPO_result(this);
12643
    }
12644
 
12645
    @Override
12646
    public void clear() {
12647
      this.e = null;
12648
    }
12649
 
12650
    public PurchaseServiceException getE() {
12651
      return this.e;
12652
    }
12653
 
12654
    public void setE(PurchaseServiceException e) {
12655
      this.e = e;
12656
    }
12657
 
12658
    public void unsetE() {
12659
      this.e = null;
12660
    }
12661
 
12662
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
12663
    public boolean isSetE() {
12664
      return this.e != null;
12665
    }
12666
 
12667
    public void setEIsSet(boolean value) {
12668
      if (!value) {
12669
        this.e = null;
12670
      }
12671
    }
12672
 
12673
    public void setFieldValue(_Fields field, Object value) {
12674
      switch (field) {
12675
      case E:
12676
        if (value == null) {
12677
          unsetE();
12678
        } else {
12679
          setE((PurchaseServiceException)value);
12680
        }
12681
        break;
12682
 
12683
      }
12684
    }
12685
 
12686
    public Object getFieldValue(_Fields field) {
12687
      switch (field) {
12688
      case E:
12689
        return getE();
12690
 
12691
      }
12692
      throw new IllegalStateException();
12693
    }
12694
 
12695
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12696
    public boolean isSet(_Fields field) {
12697
      if (field == null) {
12698
        throw new IllegalArgumentException();
12699
      }
12700
 
12701
      switch (field) {
12702
      case E:
12703
        return isSetE();
12704
      }
12705
      throw new IllegalStateException();
12706
    }
12707
 
12708
    @Override
12709
    public boolean equals(Object that) {
12710
      if (that == null)
12711
        return false;
12712
      if (that instanceof unFulfillPO_result)
12713
        return this.equals((unFulfillPO_result)that);
12714
      return false;
12715
    }
12716
 
12717
    public boolean equals(unFulfillPO_result that) {
12718
      if (that == null)
12719
        return false;
12720
 
12721
      boolean this_present_e = true && this.isSetE();
12722
      boolean that_present_e = true && that.isSetE();
12723
      if (this_present_e || that_present_e) {
12724
        if (!(this_present_e && that_present_e))
12725
          return false;
12726
        if (!this.e.equals(that.e))
12727
          return false;
12728
      }
12729
 
12730
      return true;
12731
    }
12732
 
12733
    @Override
12734
    public int hashCode() {
12735
      return 0;
12736
    }
12737
 
12738
    public int compareTo(unFulfillPO_result other) {
12739
      if (!getClass().equals(other.getClass())) {
12740
        return getClass().getName().compareTo(other.getClass().getName());
12741
      }
12742
 
12743
      int lastComparison = 0;
12744
      unFulfillPO_result typedOther = (unFulfillPO_result)other;
12745
 
12746
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
12747
      if (lastComparison != 0) {
12748
        return lastComparison;
12749
      }
12750
      if (isSetE()) {
12751
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
12752
        if (lastComparison != 0) {
12753
          return lastComparison;
12754
        }
12755
      }
12756
      return 0;
12757
    }
12758
 
12759
    public _Fields fieldForId(int fieldId) {
12760
      return _Fields.findByThriftId(fieldId);
12761
    }
12762
 
12763
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12764
      org.apache.thrift.protocol.TField field;
12765
      iprot.readStructBegin();
12766
      while (true)
12767
      {
12768
        field = iprot.readFieldBegin();
12769
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12770
          break;
12771
        }
12772
        switch (field.id) {
12773
          case 1: // E
12774
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12775
              this.e = new PurchaseServiceException();
12776
              this.e.read(iprot);
12777
            } else { 
12778
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12779
            }
12780
            break;
12781
          default:
12782
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12783
        }
12784
        iprot.readFieldEnd();
12785
      }
12786
      iprot.readStructEnd();
12787
      validate();
12788
    }
12789
 
12790
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12791
      oprot.writeStructBegin(STRUCT_DESC);
12792
 
12793
      if (this.isSetE()) {
12794
        oprot.writeFieldBegin(E_FIELD_DESC);
12795
        this.e.write(oprot);
12796
        oprot.writeFieldEnd();
12797
      }
12798
      oprot.writeFieldStop();
12799
      oprot.writeStructEnd();
12800
    }
12801
 
12802
    @Override
12803
    public String toString() {
12804
      StringBuilder sb = new StringBuilder("unFulfillPO_result(");
12805
      boolean first = true;
12806
 
12807
      sb.append("e:");
12808
      if (this.e == null) {
12809
        sb.append("null");
12810
      } else {
12811
        sb.append(this.e);
12812
      }
12813
      first = false;
12814
      sb.append(")");
12815
      return sb.toString();
12816
    }
12817
 
12818
    public void validate() throws org.apache.thrift.TException {
12819
      // check for required fields
12820
    }
12821
 
12822
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12823
      try {
12824
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12825
      } catch (org.apache.thrift.TException te) {
12826
        throw new java.io.IOException(te);
12827
      }
12828
    }
12829
 
12830
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12831
      try {
12832
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12833
      } catch (org.apache.thrift.TException te) {
12834
        throw new java.io.IOException(te);
12835
      }
12836
    }
12837
 
12838
  }
12839
 
5443 mandeep.dh 12840
  public static class getInvoices_args implements org.apache.thrift.TBase<getInvoices_args, getInvoices_args._Fields>, java.io.Serializable, Cloneable   {
12841
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_args");
12842
 
12843
    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);
12844
 
12845
    private long date; // required
12846
 
12847
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12848
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12849
      DATE((short)1, "date");
12850
 
12851
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12852
 
12853
      static {
12854
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12855
          byName.put(field.getFieldName(), field);
12856
        }
12857
      }
12858
 
12859
      /**
12860
       * Find the _Fields constant that matches fieldId, or null if its not found.
12861
       */
12862
      public static _Fields findByThriftId(int fieldId) {
12863
        switch(fieldId) {
12864
          case 1: // DATE
12865
            return DATE;
12866
          default:
12867
            return null;
12868
        }
12869
      }
12870
 
12871
      /**
12872
       * Find the _Fields constant that matches fieldId, throwing an exception
12873
       * if it is not found.
12874
       */
12875
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12876
        _Fields fields = findByThriftId(fieldId);
12877
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12878
        return fields;
12879
      }
12880
 
12881
      /**
12882
       * Find the _Fields constant that matches name, or null if its not found.
12883
       */
12884
      public static _Fields findByName(String name) {
12885
        return byName.get(name);
12886
      }
12887
 
12888
      private final short _thriftId;
12889
      private final String _fieldName;
12890
 
12891
      _Fields(short thriftId, String fieldName) {
12892
        _thriftId = thriftId;
12893
        _fieldName = fieldName;
12894
      }
12895
 
12896
      public short getThriftFieldId() {
12897
        return _thriftId;
12898
      }
12899
 
12900
      public String getFieldName() {
12901
        return _fieldName;
12902
      }
12903
    }
12904
 
12905
    // isset id assignments
12906
    private static final int __DATE_ISSET_ID = 0;
12907
    private BitSet __isset_bit_vector = new BitSet(1);
12908
 
12909
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12910
    static {
12911
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12912
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12913
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12914
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12915
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_args.class, metaDataMap);
12916
    }
12917
 
12918
    public getInvoices_args() {
12919
    }
12920
 
12921
    public getInvoices_args(
12922
      long date)
12923
    {
12924
      this();
12925
      this.date = date;
12926
      setDateIsSet(true);
12927
    }
12928
 
12929
    /**
12930
     * Performs a deep copy on <i>other</i>.
12931
     */
12932
    public getInvoices_args(getInvoices_args other) {
12933
      __isset_bit_vector.clear();
12934
      __isset_bit_vector.or(other.__isset_bit_vector);
12935
      this.date = other.date;
12936
    }
12937
 
12938
    public getInvoices_args deepCopy() {
12939
      return new getInvoices_args(this);
12940
    }
12941
 
12942
    @Override
12943
    public void clear() {
12944
      setDateIsSet(false);
12945
      this.date = 0;
12946
    }
12947
 
12948
    public long getDate() {
12949
      return this.date;
12950
    }
12951
 
12952
    public void setDate(long date) {
12953
      this.date = date;
12954
      setDateIsSet(true);
12955
    }
12956
 
12957
    public void unsetDate() {
12958
      __isset_bit_vector.clear(__DATE_ISSET_ID);
12959
    }
12960
 
12961
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
12962
    public boolean isSetDate() {
12963
      return __isset_bit_vector.get(__DATE_ISSET_ID);
12964
    }
12965
 
12966
    public void setDateIsSet(boolean value) {
12967
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
12968
    }
12969
 
12970
    public void setFieldValue(_Fields field, Object value) {
12971
      switch (field) {
12972
      case DATE:
12973
        if (value == null) {
12974
          unsetDate();
12975
        } else {
12976
          setDate((Long)value);
12977
        }
12978
        break;
12979
 
12980
      }
12981
    }
12982
 
12983
    public Object getFieldValue(_Fields field) {
12984
      switch (field) {
12985
      case DATE:
12986
        return Long.valueOf(getDate());
12987
 
12988
      }
12989
      throw new IllegalStateException();
12990
    }
12991
 
12992
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12993
    public boolean isSet(_Fields field) {
12994
      if (field == null) {
12995
        throw new IllegalArgumentException();
12996
      }
12997
 
12998
      switch (field) {
12999
      case DATE:
13000
        return isSetDate();
13001
      }
13002
      throw new IllegalStateException();
13003
    }
13004
 
13005
    @Override
13006
    public boolean equals(Object that) {
13007
      if (that == null)
13008
        return false;
13009
      if (that instanceof getInvoices_args)
13010
        return this.equals((getInvoices_args)that);
13011
      return false;
13012
    }
13013
 
13014
    public boolean equals(getInvoices_args that) {
13015
      if (that == null)
13016
        return false;
13017
 
13018
      boolean this_present_date = true;
13019
      boolean that_present_date = true;
13020
      if (this_present_date || that_present_date) {
13021
        if (!(this_present_date && that_present_date))
13022
          return false;
13023
        if (this.date != that.date)
13024
          return false;
13025
      }
13026
 
13027
      return true;
13028
    }
13029
 
13030
    @Override
13031
    public int hashCode() {
13032
      return 0;
13033
    }
13034
 
13035
    public int compareTo(getInvoices_args other) {
13036
      if (!getClass().equals(other.getClass())) {
13037
        return getClass().getName().compareTo(other.getClass().getName());
13038
      }
13039
 
13040
      int lastComparison = 0;
13041
      getInvoices_args typedOther = (getInvoices_args)other;
13042
 
13043
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
13044
      if (lastComparison != 0) {
13045
        return lastComparison;
13046
      }
13047
      if (isSetDate()) {
13048
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
13049
        if (lastComparison != 0) {
13050
          return lastComparison;
13051
        }
13052
      }
13053
      return 0;
13054
    }
13055
 
13056
    public _Fields fieldForId(int fieldId) {
13057
      return _Fields.findByThriftId(fieldId);
13058
    }
13059
 
13060
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13061
      org.apache.thrift.protocol.TField field;
13062
      iprot.readStructBegin();
13063
      while (true)
13064
      {
13065
        field = iprot.readFieldBegin();
13066
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13067
          break;
13068
        }
13069
        switch (field.id) {
13070
          case 1: // DATE
13071
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13072
              this.date = iprot.readI64();
13073
              setDateIsSet(true);
13074
            } else { 
13075
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13076
            }
13077
            break;
13078
          default:
13079
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13080
        }
13081
        iprot.readFieldEnd();
13082
      }
13083
      iprot.readStructEnd();
13084
      validate();
13085
    }
13086
 
13087
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13088
      validate();
13089
 
13090
      oprot.writeStructBegin(STRUCT_DESC);
13091
      oprot.writeFieldBegin(DATE_FIELD_DESC);
13092
      oprot.writeI64(this.date);
13093
      oprot.writeFieldEnd();
13094
      oprot.writeFieldStop();
13095
      oprot.writeStructEnd();
13096
    }
13097
 
13098
    @Override
13099
    public String toString() {
13100
      StringBuilder sb = new StringBuilder("getInvoices_args(");
13101
      boolean first = true;
13102
 
13103
      sb.append("date:");
13104
      sb.append(this.date);
13105
      first = false;
13106
      sb.append(")");
13107
      return sb.toString();
13108
    }
13109
 
13110
    public void validate() throws org.apache.thrift.TException {
13111
      // check for required fields
13112
    }
13113
 
13114
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13115
      try {
13116
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13117
      } catch (org.apache.thrift.TException te) {
13118
        throw new java.io.IOException(te);
13119
      }
13120
    }
13121
 
13122
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13123
      try {
13124
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
13125
        __isset_bit_vector = new BitSet(1);
13126
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13127
      } catch (org.apache.thrift.TException te) {
13128
        throw new java.io.IOException(te);
13129
      }
13130
    }
13131
 
13132
  }
13133
 
13134
  public static class getInvoices_result implements org.apache.thrift.TBase<getInvoices_result, getInvoices_result._Fields>, java.io.Serializable, Cloneable   {
13135
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_result");
13136
 
13137
    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);
13138
 
13139
    private List<Invoice> success; // required
13140
 
13141
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13142
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13143
      SUCCESS((short)0, "success");
13144
 
13145
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13146
 
13147
      static {
13148
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13149
          byName.put(field.getFieldName(), field);
13150
        }
13151
      }
13152
 
13153
      /**
13154
       * Find the _Fields constant that matches fieldId, or null if its not found.
13155
       */
13156
      public static _Fields findByThriftId(int fieldId) {
13157
        switch(fieldId) {
13158
          case 0: // SUCCESS
13159
            return SUCCESS;
13160
          default:
13161
            return null;
13162
        }
13163
      }
13164
 
13165
      /**
13166
       * Find the _Fields constant that matches fieldId, throwing an exception
13167
       * if it is not found.
13168
       */
13169
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13170
        _Fields fields = findByThriftId(fieldId);
13171
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13172
        return fields;
13173
      }
13174
 
13175
      /**
13176
       * Find the _Fields constant that matches name, or null if its not found.
13177
       */
13178
      public static _Fields findByName(String name) {
13179
        return byName.get(name);
13180
      }
13181
 
13182
      private final short _thriftId;
13183
      private final String _fieldName;
13184
 
13185
      _Fields(short thriftId, String fieldName) {
13186
        _thriftId = thriftId;
13187
        _fieldName = fieldName;
13188
      }
13189
 
13190
      public short getThriftFieldId() {
13191
        return _thriftId;
13192
      }
13193
 
13194
      public String getFieldName() {
13195
        return _fieldName;
13196
      }
13197
    }
13198
 
13199
    // isset id assignments
13200
 
13201
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13202
    static {
13203
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13204
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13205
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
13206
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class))));
13207
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13208
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_result.class, metaDataMap);
13209
    }
13210
 
13211
    public getInvoices_result() {
13212
    }
13213
 
13214
    public getInvoices_result(
13215
      List<Invoice> success)
13216
    {
13217
      this();
13218
      this.success = success;
13219
    }
13220
 
13221
    /**
13222
     * Performs a deep copy on <i>other</i>.
13223
     */
13224
    public getInvoices_result(getInvoices_result other) {
13225
      if (other.isSetSuccess()) {
13226
        List<Invoice> __this__success = new ArrayList<Invoice>();
13227
        for (Invoice other_element : other.success) {
13228
          __this__success.add(new Invoice(other_element));
13229
        }
13230
        this.success = __this__success;
13231
      }
13232
    }
13233
 
13234
    public getInvoices_result deepCopy() {
13235
      return new getInvoices_result(this);
13236
    }
13237
 
13238
    @Override
13239
    public void clear() {
13240
      this.success = null;
13241
    }
13242
 
13243
    public int getSuccessSize() {
13244
      return (this.success == null) ? 0 : this.success.size();
13245
    }
13246
 
13247
    public java.util.Iterator<Invoice> getSuccessIterator() {
13248
      return (this.success == null) ? null : this.success.iterator();
13249
    }
13250
 
13251
    public void addToSuccess(Invoice elem) {
13252
      if (this.success == null) {
13253
        this.success = new ArrayList<Invoice>();
13254
      }
13255
      this.success.add(elem);
13256
    }
13257
 
13258
    public List<Invoice> getSuccess() {
13259
      return this.success;
13260
    }
13261
 
13262
    public void setSuccess(List<Invoice> success) {
13263
      this.success = success;
13264
    }
13265
 
13266
    public void unsetSuccess() {
13267
      this.success = null;
13268
    }
13269
 
13270
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
13271
    public boolean isSetSuccess() {
13272
      return this.success != null;
13273
    }
13274
 
13275
    public void setSuccessIsSet(boolean value) {
13276
      if (!value) {
13277
        this.success = null;
13278
      }
13279
    }
13280
 
13281
    public void setFieldValue(_Fields field, Object value) {
13282
      switch (field) {
13283
      case SUCCESS:
13284
        if (value == null) {
13285
          unsetSuccess();
13286
        } else {
13287
          setSuccess((List<Invoice>)value);
13288
        }
13289
        break;
13290
 
13291
      }
13292
    }
13293
 
13294
    public Object getFieldValue(_Fields field) {
13295
      switch (field) {
13296
      case SUCCESS:
13297
        return getSuccess();
13298
 
13299
      }
13300
      throw new IllegalStateException();
13301
    }
13302
 
13303
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13304
    public boolean isSet(_Fields field) {
13305
      if (field == null) {
13306
        throw new IllegalArgumentException();
13307
      }
13308
 
13309
      switch (field) {
13310
      case SUCCESS:
13311
        return isSetSuccess();
13312
      }
13313
      throw new IllegalStateException();
13314
    }
13315
 
13316
    @Override
13317
    public boolean equals(Object that) {
13318
      if (that == null)
13319
        return false;
13320
      if (that instanceof getInvoices_result)
13321
        return this.equals((getInvoices_result)that);
13322
      return false;
13323
    }
13324
 
13325
    public boolean equals(getInvoices_result that) {
13326
      if (that == null)
13327
        return false;
13328
 
13329
      boolean this_present_success = true && this.isSetSuccess();
13330
      boolean that_present_success = true && that.isSetSuccess();
13331
      if (this_present_success || that_present_success) {
13332
        if (!(this_present_success && that_present_success))
13333
          return false;
13334
        if (!this.success.equals(that.success))
13335
          return false;
13336
      }
13337
 
13338
      return true;
13339
    }
13340
 
13341
    @Override
13342
    public int hashCode() {
13343
      return 0;
13344
    }
13345
 
13346
    public int compareTo(getInvoices_result other) {
13347
      if (!getClass().equals(other.getClass())) {
13348
        return getClass().getName().compareTo(other.getClass().getName());
13349
      }
13350
 
13351
      int lastComparison = 0;
13352
      getInvoices_result typedOther = (getInvoices_result)other;
13353
 
13354
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
13355
      if (lastComparison != 0) {
13356
        return lastComparison;
13357
      }
13358
      if (isSetSuccess()) {
13359
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
13360
        if (lastComparison != 0) {
13361
          return lastComparison;
13362
        }
13363
      }
13364
      return 0;
13365
    }
13366
 
13367
    public _Fields fieldForId(int fieldId) {
13368
      return _Fields.findByThriftId(fieldId);
13369
    }
13370
 
13371
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13372
      org.apache.thrift.protocol.TField field;
13373
      iprot.readStructBegin();
13374
      while (true)
13375
      {
13376
        field = iprot.readFieldBegin();
13377
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13378
          break;
13379
        }
13380
        switch (field.id) {
13381
          case 0: // SUCCESS
13382
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
13383
              {
6385 amar.kumar 13384
                org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
13385
                this.success = new ArrayList<Invoice>(_list24.size);
13386
                for (int _i25 = 0; _i25 < _list24.size; ++_i25)
5443 mandeep.dh 13387
                {
6385 amar.kumar 13388
                  Invoice _elem26; // required
13389
                  _elem26 = new Invoice();
13390
                  _elem26.read(iprot);
13391
                  this.success.add(_elem26);
5443 mandeep.dh 13392
                }
13393
                iprot.readListEnd();
13394
              }
13395
            } else { 
13396
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13397
            }
13398
            break;
13399
          default:
13400
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13401
        }
13402
        iprot.readFieldEnd();
13403
      }
13404
      iprot.readStructEnd();
13405
      validate();
13406
    }
13407
 
13408
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13409
      oprot.writeStructBegin(STRUCT_DESC);
13410
 
13411
      if (this.isSetSuccess()) {
13412
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13413
        {
13414
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 13415
          for (Invoice _iter27 : this.success)
5443 mandeep.dh 13416
          {
6385 amar.kumar 13417
            _iter27.write(oprot);
5443 mandeep.dh 13418
          }
13419
          oprot.writeListEnd();
13420
        }
13421
        oprot.writeFieldEnd();
13422
      }
13423
      oprot.writeFieldStop();
13424
      oprot.writeStructEnd();
13425
    }
13426
 
13427
    @Override
13428
    public String toString() {
13429
      StringBuilder sb = new StringBuilder("getInvoices_result(");
13430
      boolean first = true;
13431
 
13432
      sb.append("success:");
13433
      if (this.success == null) {
13434
        sb.append("null");
13435
      } else {
13436
        sb.append(this.success);
13437
      }
13438
      first = false;
13439
      sb.append(")");
13440
      return sb.toString();
13441
    }
13442
 
13443
    public void validate() throws org.apache.thrift.TException {
13444
      // check for required fields
13445
    }
13446
 
13447
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13448
      try {
13449
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13450
      } catch (org.apache.thrift.TException te) {
13451
        throw new java.io.IOException(te);
13452
      }
13453
    }
13454
 
13455
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13456
      try {
13457
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13458
      } catch (org.apache.thrift.TException te) {
13459
        throw new java.io.IOException(te);
13460
      }
13461
    }
13462
 
13463
  }
13464
 
7410 amar.kumar 13465
  public static class getInvoicesForWarehouse_args implements org.apache.thrift.TBase<getInvoicesForWarehouse_args, getInvoicesForWarehouse_args._Fields>, java.io.Serializable, Cloneable   {
13466
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoicesForWarehouse_args");
13467
 
13468
    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);
13469
    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);
13470
    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);
13471
 
13472
    private long warehouseId; // required
13473
    private long supplierId; // required
13474
    private long date; // required
13475
 
13476
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13477
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13478
      WAREHOUSE_ID((short)1, "warehouseId"),
13479
      SUPPLIER_ID((short)2, "supplierId"),
13480
      DATE((short)3, "date");
13481
 
13482
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13483
 
13484
      static {
13485
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13486
          byName.put(field.getFieldName(), field);
13487
        }
13488
      }
13489
 
13490
      /**
13491
       * Find the _Fields constant that matches fieldId, or null if its not found.
13492
       */
13493
      public static _Fields findByThriftId(int fieldId) {
13494
        switch(fieldId) {
13495
          case 1: // WAREHOUSE_ID
13496
            return WAREHOUSE_ID;
13497
          case 2: // SUPPLIER_ID
13498
            return SUPPLIER_ID;
13499
          case 3: // DATE
13500
            return DATE;
13501
          default:
13502
            return null;
13503
        }
13504
      }
13505
 
13506
      /**
13507
       * Find the _Fields constant that matches fieldId, throwing an exception
13508
       * if it is not found.
13509
       */
13510
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13511
        _Fields fields = findByThriftId(fieldId);
13512
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13513
        return fields;
13514
      }
13515
 
13516
      /**
13517
       * Find the _Fields constant that matches name, or null if its not found.
13518
       */
13519
      public static _Fields findByName(String name) {
13520
        return byName.get(name);
13521
      }
13522
 
13523
      private final short _thriftId;
13524
      private final String _fieldName;
13525
 
13526
      _Fields(short thriftId, String fieldName) {
13527
        _thriftId = thriftId;
13528
        _fieldName = fieldName;
13529
      }
13530
 
13531
      public short getThriftFieldId() {
13532
        return _thriftId;
13533
      }
13534
 
13535
      public String getFieldName() {
13536
        return _fieldName;
13537
      }
13538
    }
13539
 
13540
    // isset id assignments
13541
    private static final int __WAREHOUSEID_ISSET_ID = 0;
13542
    private static final int __SUPPLIERID_ISSET_ID = 1;
13543
    private static final int __DATE_ISSET_ID = 2;
13544
    private BitSet __isset_bit_vector = new BitSet(3);
13545
 
13546
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13547
    static {
13548
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13549
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13550
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13551
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13552
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13553
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13554
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13555
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13556
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoicesForWarehouse_args.class, metaDataMap);
13557
    }
13558
 
13559
    public getInvoicesForWarehouse_args() {
13560
    }
13561
 
13562
    public getInvoicesForWarehouse_args(
13563
      long warehouseId,
13564
      long supplierId,
13565
      long date)
13566
    {
13567
      this();
13568
      this.warehouseId = warehouseId;
13569
      setWarehouseIdIsSet(true);
13570
      this.supplierId = supplierId;
13571
      setSupplierIdIsSet(true);
13572
      this.date = date;
13573
      setDateIsSet(true);
13574
    }
13575
 
13576
    /**
13577
     * Performs a deep copy on <i>other</i>.
13578
     */
13579
    public getInvoicesForWarehouse_args(getInvoicesForWarehouse_args other) {
13580
      __isset_bit_vector.clear();
13581
      __isset_bit_vector.or(other.__isset_bit_vector);
13582
      this.warehouseId = other.warehouseId;
13583
      this.supplierId = other.supplierId;
13584
      this.date = other.date;
13585
    }
13586
 
13587
    public getInvoicesForWarehouse_args deepCopy() {
13588
      return new getInvoicesForWarehouse_args(this);
13589
    }
13590
 
13591
    @Override
13592
    public void clear() {
13593
      setWarehouseIdIsSet(false);
13594
      this.warehouseId = 0;
13595
      setSupplierIdIsSet(false);
13596
      this.supplierId = 0;
13597
      setDateIsSet(false);
13598
      this.date = 0;
13599
    }
13600
 
13601
    public long getWarehouseId() {
13602
      return this.warehouseId;
13603
    }
13604
 
13605
    public void setWarehouseId(long warehouseId) {
13606
      this.warehouseId = warehouseId;
13607
      setWarehouseIdIsSet(true);
13608
    }
13609
 
13610
    public void unsetWarehouseId() {
13611
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
13612
    }
13613
 
13614
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
13615
    public boolean isSetWarehouseId() {
13616
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
13617
    }
13618
 
13619
    public void setWarehouseIdIsSet(boolean value) {
13620
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
13621
    }
13622
 
13623
    public long getSupplierId() {
13624
      return this.supplierId;
13625
    }
13626
 
13627
    public void setSupplierId(long supplierId) {
13628
      this.supplierId = supplierId;
13629
      setSupplierIdIsSet(true);
13630
    }
13631
 
13632
    public void unsetSupplierId() {
13633
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
13634
    }
13635
 
13636
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
13637
    public boolean isSetSupplierId() {
13638
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
13639
    }
13640
 
13641
    public void setSupplierIdIsSet(boolean value) {
13642
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
13643
    }
13644
 
13645
    public long getDate() {
13646
      return this.date;
13647
    }
13648
 
13649
    public void setDate(long date) {
13650
      this.date = date;
13651
      setDateIsSet(true);
13652
    }
13653
 
13654
    public void unsetDate() {
13655
      __isset_bit_vector.clear(__DATE_ISSET_ID);
13656
    }
13657
 
13658
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
13659
    public boolean isSetDate() {
13660
      return __isset_bit_vector.get(__DATE_ISSET_ID);
13661
    }
13662
 
13663
    public void setDateIsSet(boolean value) {
13664
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
13665
    }
13666
 
13667
    public void setFieldValue(_Fields field, Object value) {
13668
      switch (field) {
13669
      case WAREHOUSE_ID:
13670
        if (value == null) {
13671
          unsetWarehouseId();
13672
        } else {
13673
          setWarehouseId((Long)value);
13674
        }
13675
        break;
13676
 
13677
      case SUPPLIER_ID:
13678
        if (value == null) {
13679
          unsetSupplierId();
13680
        } else {
13681
          setSupplierId((Long)value);
13682
        }
13683
        break;
13684
 
13685
      case DATE:
13686
        if (value == null) {
13687
          unsetDate();
13688
        } else {
13689
          setDate((Long)value);
13690
        }
13691
        break;
13692
 
13693
      }
13694
    }
13695
 
13696
    public Object getFieldValue(_Fields field) {
13697
      switch (field) {
13698
      case WAREHOUSE_ID:
13699
        return Long.valueOf(getWarehouseId());
13700
 
13701
      case SUPPLIER_ID:
13702
        return Long.valueOf(getSupplierId());
13703
 
13704
      case DATE:
13705
        return Long.valueOf(getDate());
13706
 
13707
      }
13708
      throw new IllegalStateException();
13709
    }
13710
 
13711
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13712
    public boolean isSet(_Fields field) {
13713
      if (field == null) {
13714
        throw new IllegalArgumentException();
13715
      }
13716
 
13717
      switch (field) {
13718
      case WAREHOUSE_ID:
13719
        return isSetWarehouseId();
13720
      case SUPPLIER_ID:
13721
        return isSetSupplierId();
13722
      case DATE:
13723
        return isSetDate();
13724
      }
13725
      throw new IllegalStateException();
13726
    }
13727
 
13728
    @Override
13729
    public boolean equals(Object that) {
13730
      if (that == null)
13731
        return false;
13732
      if (that instanceof getInvoicesForWarehouse_args)
13733
        return this.equals((getInvoicesForWarehouse_args)that);
13734
      return false;
13735
    }
13736
 
13737
    public boolean equals(getInvoicesForWarehouse_args that) {
13738
      if (that == null)
13739
        return false;
13740
 
13741
      boolean this_present_warehouseId = true;
13742
      boolean that_present_warehouseId = true;
13743
      if (this_present_warehouseId || that_present_warehouseId) {
13744
        if (!(this_present_warehouseId && that_present_warehouseId))
13745
          return false;
13746
        if (this.warehouseId != that.warehouseId)
13747
          return false;
13748
      }
13749
 
13750
      boolean this_present_supplierId = true;
13751
      boolean that_present_supplierId = true;
13752
      if (this_present_supplierId || that_present_supplierId) {
13753
        if (!(this_present_supplierId && that_present_supplierId))
13754
          return false;
13755
        if (this.supplierId != that.supplierId)
13756
          return false;
13757
      }
13758
 
13759
      boolean this_present_date = true;
13760
      boolean that_present_date = true;
13761
      if (this_present_date || that_present_date) {
13762
        if (!(this_present_date && that_present_date))
13763
          return false;
13764
        if (this.date != that.date)
13765
          return false;
13766
      }
13767
 
13768
      return true;
13769
    }
13770
 
13771
    @Override
13772
    public int hashCode() {
13773
      return 0;
13774
    }
13775
 
13776
    public int compareTo(getInvoicesForWarehouse_args other) {
13777
      if (!getClass().equals(other.getClass())) {
13778
        return getClass().getName().compareTo(other.getClass().getName());
13779
      }
13780
 
13781
      int lastComparison = 0;
13782
      getInvoicesForWarehouse_args typedOther = (getInvoicesForWarehouse_args)other;
13783
 
13784
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
13785
      if (lastComparison != 0) {
13786
        return lastComparison;
13787
      }
13788
      if (isSetWarehouseId()) {
13789
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
13790
        if (lastComparison != 0) {
13791
          return lastComparison;
13792
        }
13793
      }
13794
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
13795
      if (lastComparison != 0) {
13796
        return lastComparison;
13797
      }
13798
      if (isSetSupplierId()) {
13799
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
13800
        if (lastComparison != 0) {
13801
          return lastComparison;
13802
        }
13803
      }
13804
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
13805
      if (lastComparison != 0) {
13806
        return lastComparison;
13807
      }
13808
      if (isSetDate()) {
13809
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
13810
        if (lastComparison != 0) {
13811
          return lastComparison;
13812
        }
13813
      }
13814
      return 0;
13815
    }
13816
 
13817
    public _Fields fieldForId(int fieldId) {
13818
      return _Fields.findByThriftId(fieldId);
13819
    }
13820
 
13821
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13822
      org.apache.thrift.protocol.TField field;
13823
      iprot.readStructBegin();
13824
      while (true)
13825
      {
13826
        field = iprot.readFieldBegin();
13827
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13828
          break;
13829
        }
13830
        switch (field.id) {
13831
          case 1: // WAREHOUSE_ID
13832
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13833
              this.warehouseId = iprot.readI64();
13834
              setWarehouseIdIsSet(true);
13835
            } else { 
13836
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13837
            }
13838
            break;
13839
          case 2: // SUPPLIER_ID
13840
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13841
              this.supplierId = iprot.readI64();
13842
              setSupplierIdIsSet(true);
13843
            } else { 
13844
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13845
            }
13846
            break;
13847
          case 3: // DATE
13848
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13849
              this.date = iprot.readI64();
13850
              setDateIsSet(true);
13851
            } else { 
13852
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13853
            }
13854
            break;
13855
          default:
13856
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13857
        }
13858
        iprot.readFieldEnd();
13859
      }
13860
      iprot.readStructEnd();
13861
      validate();
13862
    }
13863
 
13864
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13865
      validate();
13866
 
13867
      oprot.writeStructBegin(STRUCT_DESC);
13868
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
13869
      oprot.writeI64(this.warehouseId);
13870
      oprot.writeFieldEnd();
13871
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
13872
      oprot.writeI64(this.supplierId);
13873
      oprot.writeFieldEnd();
13874
      oprot.writeFieldBegin(DATE_FIELD_DESC);
13875
      oprot.writeI64(this.date);
13876
      oprot.writeFieldEnd();
13877
      oprot.writeFieldStop();
13878
      oprot.writeStructEnd();
13879
    }
13880
 
13881
    @Override
13882
    public String toString() {
13883
      StringBuilder sb = new StringBuilder("getInvoicesForWarehouse_args(");
13884
      boolean first = true;
13885
 
13886
      sb.append("warehouseId:");
13887
      sb.append(this.warehouseId);
13888
      first = false;
13889
      if (!first) sb.append(", ");
13890
      sb.append("supplierId:");
13891
      sb.append(this.supplierId);
13892
      first = false;
13893
      if (!first) sb.append(", ");
13894
      sb.append("date:");
13895
      sb.append(this.date);
13896
      first = false;
13897
      sb.append(")");
13898
      return sb.toString();
13899
    }
13900
 
13901
    public void validate() throws org.apache.thrift.TException {
13902
      // check for required fields
13903
    }
13904
 
13905
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13906
      try {
13907
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13908
      } catch (org.apache.thrift.TException te) {
13909
        throw new java.io.IOException(te);
13910
      }
13911
    }
13912
 
13913
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13914
      try {
13915
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
13916
        __isset_bit_vector = new BitSet(1);
13917
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13918
      } catch (org.apache.thrift.TException te) {
13919
        throw new java.io.IOException(te);
13920
      }
13921
    }
13922
 
13923
  }
13924
 
13925
  public static class getInvoicesForWarehouse_result implements org.apache.thrift.TBase<getInvoicesForWarehouse_result, getInvoicesForWarehouse_result._Fields>, java.io.Serializable, Cloneable   {
13926
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoicesForWarehouse_result");
13927
 
13928
    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);
13929
 
13930
    private List<Invoice> success; // required
13931
 
13932
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13933
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13934
      SUCCESS((short)0, "success");
13935
 
13936
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13937
 
13938
      static {
13939
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13940
          byName.put(field.getFieldName(), field);
13941
        }
13942
      }
13943
 
13944
      /**
13945
       * Find the _Fields constant that matches fieldId, or null if its not found.
13946
       */
13947
      public static _Fields findByThriftId(int fieldId) {
13948
        switch(fieldId) {
13949
          case 0: // SUCCESS
13950
            return SUCCESS;
13951
          default:
13952
            return null;
13953
        }
13954
      }
13955
 
13956
      /**
13957
       * Find the _Fields constant that matches fieldId, throwing an exception
13958
       * if it is not found.
13959
       */
13960
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13961
        _Fields fields = findByThriftId(fieldId);
13962
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13963
        return fields;
13964
      }
13965
 
13966
      /**
13967
       * Find the _Fields constant that matches name, or null if its not found.
13968
       */
13969
      public static _Fields findByName(String name) {
13970
        return byName.get(name);
13971
      }
13972
 
13973
      private final short _thriftId;
13974
      private final String _fieldName;
13975
 
13976
      _Fields(short thriftId, String fieldName) {
13977
        _thriftId = thriftId;
13978
        _fieldName = fieldName;
13979
      }
13980
 
13981
      public short getThriftFieldId() {
13982
        return _thriftId;
13983
      }
13984
 
13985
      public String getFieldName() {
13986
        return _fieldName;
13987
      }
13988
    }
13989
 
13990
    // isset id assignments
13991
 
13992
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13993
    static {
13994
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13995
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13996
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
13997
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class))));
13998
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13999
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoicesForWarehouse_result.class, metaDataMap);
14000
    }
14001
 
14002
    public getInvoicesForWarehouse_result() {
14003
    }
14004
 
14005
    public getInvoicesForWarehouse_result(
14006
      List<Invoice> success)
14007
    {
14008
      this();
14009
      this.success = success;
14010
    }
14011
 
14012
    /**
14013
     * Performs a deep copy on <i>other</i>.
14014
     */
14015
    public getInvoicesForWarehouse_result(getInvoicesForWarehouse_result other) {
14016
      if (other.isSetSuccess()) {
14017
        List<Invoice> __this__success = new ArrayList<Invoice>();
14018
        for (Invoice other_element : other.success) {
14019
          __this__success.add(new Invoice(other_element));
14020
        }
14021
        this.success = __this__success;
14022
      }
14023
    }
14024
 
14025
    public getInvoicesForWarehouse_result deepCopy() {
14026
      return new getInvoicesForWarehouse_result(this);
14027
    }
14028
 
14029
    @Override
14030
    public void clear() {
14031
      this.success = null;
14032
    }
14033
 
14034
    public int getSuccessSize() {
14035
      return (this.success == null) ? 0 : this.success.size();
14036
    }
14037
 
14038
    public java.util.Iterator<Invoice> getSuccessIterator() {
14039
      return (this.success == null) ? null : this.success.iterator();
14040
    }
14041
 
14042
    public void addToSuccess(Invoice elem) {
14043
      if (this.success == null) {
14044
        this.success = new ArrayList<Invoice>();
14045
      }
14046
      this.success.add(elem);
14047
    }
14048
 
14049
    public List<Invoice> getSuccess() {
14050
      return this.success;
14051
    }
14052
 
14053
    public void setSuccess(List<Invoice> success) {
14054
      this.success = success;
14055
    }
14056
 
14057
    public void unsetSuccess() {
14058
      this.success = null;
14059
    }
14060
 
14061
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
14062
    public boolean isSetSuccess() {
14063
      return this.success != null;
14064
    }
14065
 
14066
    public void setSuccessIsSet(boolean value) {
14067
      if (!value) {
14068
        this.success = null;
14069
      }
14070
    }
14071
 
14072
    public void setFieldValue(_Fields field, Object value) {
14073
      switch (field) {
14074
      case SUCCESS:
14075
        if (value == null) {
14076
          unsetSuccess();
14077
        } else {
14078
          setSuccess((List<Invoice>)value);
14079
        }
14080
        break;
14081
 
14082
      }
14083
    }
14084
 
14085
    public Object getFieldValue(_Fields field) {
14086
      switch (field) {
14087
      case SUCCESS:
14088
        return getSuccess();
14089
 
14090
      }
14091
      throw new IllegalStateException();
14092
    }
14093
 
14094
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14095
    public boolean isSet(_Fields field) {
14096
      if (field == null) {
14097
        throw new IllegalArgumentException();
14098
      }
14099
 
14100
      switch (field) {
14101
      case SUCCESS:
14102
        return isSetSuccess();
14103
      }
14104
      throw new IllegalStateException();
14105
    }
14106
 
14107
    @Override
14108
    public boolean equals(Object that) {
14109
      if (that == null)
14110
        return false;
14111
      if (that instanceof getInvoicesForWarehouse_result)
14112
        return this.equals((getInvoicesForWarehouse_result)that);
14113
      return false;
14114
    }
14115
 
14116
    public boolean equals(getInvoicesForWarehouse_result that) {
14117
      if (that == null)
14118
        return false;
14119
 
14120
      boolean this_present_success = true && this.isSetSuccess();
14121
      boolean that_present_success = true && that.isSetSuccess();
14122
      if (this_present_success || that_present_success) {
14123
        if (!(this_present_success && that_present_success))
14124
          return false;
14125
        if (!this.success.equals(that.success))
14126
          return false;
14127
      }
14128
 
14129
      return true;
14130
    }
14131
 
14132
    @Override
14133
    public int hashCode() {
14134
      return 0;
14135
    }
14136
 
14137
    public int compareTo(getInvoicesForWarehouse_result other) {
14138
      if (!getClass().equals(other.getClass())) {
14139
        return getClass().getName().compareTo(other.getClass().getName());
14140
      }
14141
 
14142
      int lastComparison = 0;
14143
      getInvoicesForWarehouse_result typedOther = (getInvoicesForWarehouse_result)other;
14144
 
14145
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
14146
      if (lastComparison != 0) {
14147
        return lastComparison;
14148
      }
14149
      if (isSetSuccess()) {
14150
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
14151
        if (lastComparison != 0) {
14152
          return lastComparison;
14153
        }
14154
      }
14155
      return 0;
14156
    }
14157
 
14158
    public _Fields fieldForId(int fieldId) {
14159
      return _Fields.findByThriftId(fieldId);
14160
    }
14161
 
14162
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14163
      org.apache.thrift.protocol.TField field;
14164
      iprot.readStructBegin();
14165
      while (true)
14166
      {
14167
        field = iprot.readFieldBegin();
14168
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14169
          break;
14170
        }
14171
        switch (field.id) {
14172
          case 0: // SUCCESS
14173
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
14174
              {
14175
                org.apache.thrift.protocol.TList _list28 = iprot.readListBegin();
14176
                this.success = new ArrayList<Invoice>(_list28.size);
14177
                for (int _i29 = 0; _i29 < _list28.size; ++_i29)
14178
                {
14179
                  Invoice _elem30; // required
14180
                  _elem30 = new Invoice();
14181
                  _elem30.read(iprot);
14182
                  this.success.add(_elem30);
14183
                }
14184
                iprot.readListEnd();
14185
              }
14186
            } else { 
14187
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14188
            }
14189
            break;
14190
          default:
14191
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14192
        }
14193
        iprot.readFieldEnd();
14194
      }
14195
      iprot.readStructEnd();
14196
      validate();
14197
    }
14198
 
14199
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14200
      oprot.writeStructBegin(STRUCT_DESC);
14201
 
14202
      if (this.isSetSuccess()) {
14203
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14204
        {
14205
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
14206
          for (Invoice _iter31 : this.success)
14207
          {
14208
            _iter31.write(oprot);
14209
          }
14210
          oprot.writeListEnd();
14211
        }
14212
        oprot.writeFieldEnd();
14213
      }
14214
      oprot.writeFieldStop();
14215
      oprot.writeStructEnd();
14216
    }
14217
 
14218
    @Override
14219
    public String toString() {
14220
      StringBuilder sb = new StringBuilder("getInvoicesForWarehouse_result(");
14221
      boolean first = true;
14222
 
14223
      sb.append("success:");
14224
      if (this.success == null) {
14225
        sb.append("null");
14226
      } else {
14227
        sb.append(this.success);
14228
      }
14229
      first = false;
14230
      sb.append(")");
14231
      return sb.toString();
14232
    }
14233
 
14234
    public void validate() throws org.apache.thrift.TException {
14235
      // check for required fields
14236
    }
14237
 
14238
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14239
      try {
14240
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14241
      } catch (org.apache.thrift.TException te) {
14242
        throw new java.io.IOException(te);
14243
      }
14244
    }
14245
 
14246
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14247
      try {
14248
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14249
      } catch (org.apache.thrift.TException te) {
14250
        throw new java.io.IOException(te);
14251
      }
14252
    }
14253
 
14254
  }
14255
 
5443 mandeep.dh 14256
  public static class createInvoice_args implements org.apache.thrift.TBase<createInvoice_args, createInvoice_args._Fields>, java.io.Serializable, Cloneable   {
14257
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_args");
14258
 
14259
    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);
14260
 
14261
    private Invoice invoice; // required
14262
 
14263
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14264
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14265
      INVOICE((short)1, "invoice");
14266
 
14267
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14268
 
14269
      static {
14270
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14271
          byName.put(field.getFieldName(), field);
14272
        }
14273
      }
14274
 
14275
      /**
14276
       * Find the _Fields constant that matches fieldId, or null if its not found.
14277
       */
14278
      public static _Fields findByThriftId(int fieldId) {
14279
        switch(fieldId) {
14280
          case 1: // INVOICE
14281
            return INVOICE;
14282
          default:
14283
            return null;
14284
        }
14285
      }
14286
 
14287
      /**
14288
       * Find the _Fields constant that matches fieldId, throwing an exception
14289
       * if it is not found.
14290
       */
14291
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14292
        _Fields fields = findByThriftId(fieldId);
14293
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14294
        return fields;
14295
      }
14296
 
14297
      /**
14298
       * Find the _Fields constant that matches name, or null if its not found.
14299
       */
14300
      public static _Fields findByName(String name) {
14301
        return byName.get(name);
14302
      }
14303
 
14304
      private final short _thriftId;
14305
      private final String _fieldName;
14306
 
14307
      _Fields(short thriftId, String fieldName) {
14308
        _thriftId = thriftId;
14309
        _fieldName = fieldName;
14310
      }
14311
 
14312
      public short getThriftFieldId() {
14313
        return _thriftId;
14314
      }
14315
 
14316
      public String getFieldName() {
14317
        return _fieldName;
14318
      }
14319
    }
14320
 
14321
    // isset id assignments
14322
 
14323
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14324
    static {
14325
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14326
      tmpMap.put(_Fields.INVOICE, new org.apache.thrift.meta_data.FieldMetaData("invoice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14327
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class)));
14328
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14329
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_args.class, metaDataMap);
14330
    }
14331
 
14332
    public createInvoice_args() {
14333
    }
14334
 
14335
    public createInvoice_args(
14336
      Invoice invoice)
14337
    {
14338
      this();
14339
      this.invoice = invoice;
14340
    }
14341
 
14342
    /**
14343
     * Performs a deep copy on <i>other</i>.
14344
     */
14345
    public createInvoice_args(createInvoice_args other) {
14346
      if (other.isSetInvoice()) {
14347
        this.invoice = new Invoice(other.invoice);
14348
      }
14349
    }
14350
 
14351
    public createInvoice_args deepCopy() {
14352
      return new createInvoice_args(this);
14353
    }
14354
 
14355
    @Override
14356
    public void clear() {
14357
      this.invoice = null;
14358
    }
14359
 
14360
    public Invoice getInvoice() {
14361
      return this.invoice;
14362
    }
14363
 
14364
    public void setInvoice(Invoice invoice) {
14365
      this.invoice = invoice;
14366
    }
14367
 
14368
    public void unsetInvoice() {
14369
      this.invoice = null;
14370
    }
14371
 
14372
    /** Returns true if field invoice is set (has been assigned a value) and false otherwise */
14373
    public boolean isSetInvoice() {
14374
      return this.invoice != null;
14375
    }
14376
 
14377
    public void setInvoiceIsSet(boolean value) {
14378
      if (!value) {
14379
        this.invoice = null;
14380
      }
14381
    }
14382
 
14383
    public void setFieldValue(_Fields field, Object value) {
14384
      switch (field) {
14385
      case INVOICE:
14386
        if (value == null) {
14387
          unsetInvoice();
14388
        } else {
14389
          setInvoice((Invoice)value);
14390
        }
14391
        break;
14392
 
14393
      }
14394
    }
14395
 
14396
    public Object getFieldValue(_Fields field) {
14397
      switch (field) {
14398
      case INVOICE:
14399
        return getInvoice();
14400
 
14401
      }
14402
      throw new IllegalStateException();
14403
    }
14404
 
14405
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14406
    public boolean isSet(_Fields field) {
14407
      if (field == null) {
14408
        throw new IllegalArgumentException();
14409
      }
14410
 
14411
      switch (field) {
14412
      case INVOICE:
14413
        return isSetInvoice();
14414
      }
14415
      throw new IllegalStateException();
14416
    }
14417
 
14418
    @Override
14419
    public boolean equals(Object that) {
14420
      if (that == null)
14421
        return false;
14422
      if (that instanceof createInvoice_args)
14423
        return this.equals((createInvoice_args)that);
14424
      return false;
14425
    }
14426
 
14427
    public boolean equals(createInvoice_args that) {
14428
      if (that == null)
14429
        return false;
14430
 
14431
      boolean this_present_invoice = true && this.isSetInvoice();
14432
      boolean that_present_invoice = true && that.isSetInvoice();
14433
      if (this_present_invoice || that_present_invoice) {
14434
        if (!(this_present_invoice && that_present_invoice))
14435
          return false;
14436
        if (!this.invoice.equals(that.invoice))
14437
          return false;
14438
      }
14439
 
14440
      return true;
14441
    }
14442
 
14443
    @Override
14444
    public int hashCode() {
14445
      return 0;
14446
    }
14447
 
14448
    public int compareTo(createInvoice_args other) {
14449
      if (!getClass().equals(other.getClass())) {
14450
        return getClass().getName().compareTo(other.getClass().getName());
14451
      }
14452
 
14453
      int lastComparison = 0;
14454
      createInvoice_args typedOther = (createInvoice_args)other;
14455
 
14456
      lastComparison = Boolean.valueOf(isSetInvoice()).compareTo(typedOther.isSetInvoice());
14457
      if (lastComparison != 0) {
14458
        return lastComparison;
14459
      }
14460
      if (isSetInvoice()) {
14461
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoice, typedOther.invoice);
14462
        if (lastComparison != 0) {
14463
          return lastComparison;
14464
        }
14465
      }
14466
      return 0;
14467
    }
14468
 
14469
    public _Fields fieldForId(int fieldId) {
14470
      return _Fields.findByThriftId(fieldId);
14471
    }
14472
 
14473
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14474
      org.apache.thrift.protocol.TField field;
14475
      iprot.readStructBegin();
14476
      while (true)
14477
      {
14478
        field = iprot.readFieldBegin();
14479
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14480
          break;
14481
        }
14482
        switch (field.id) {
14483
          case 1: // INVOICE
14484
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14485
              this.invoice = new Invoice();
14486
              this.invoice.read(iprot);
14487
            } else { 
14488
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14489
            }
14490
            break;
14491
          default:
14492
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14493
        }
14494
        iprot.readFieldEnd();
14495
      }
14496
      iprot.readStructEnd();
14497
      validate();
14498
    }
14499
 
14500
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14501
      validate();
14502
 
14503
      oprot.writeStructBegin(STRUCT_DESC);
14504
      if (this.invoice != null) {
14505
        oprot.writeFieldBegin(INVOICE_FIELD_DESC);
14506
        this.invoice.write(oprot);
14507
        oprot.writeFieldEnd();
14508
      }
14509
      oprot.writeFieldStop();
14510
      oprot.writeStructEnd();
14511
    }
14512
 
14513
    @Override
14514
    public String toString() {
14515
      StringBuilder sb = new StringBuilder("createInvoice_args(");
14516
      boolean first = true;
14517
 
14518
      sb.append("invoice:");
14519
      if (this.invoice == null) {
14520
        sb.append("null");
14521
      } else {
14522
        sb.append(this.invoice);
14523
      }
14524
      first = false;
14525
      sb.append(")");
14526
      return sb.toString();
14527
    }
14528
 
14529
    public void validate() throws org.apache.thrift.TException {
14530
      // check for required fields
14531
    }
14532
 
14533
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14534
      try {
14535
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14536
      } catch (org.apache.thrift.TException te) {
14537
        throw new java.io.IOException(te);
14538
      }
14539
    }
14540
 
14541
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14542
      try {
14543
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14544
      } catch (org.apache.thrift.TException te) {
14545
        throw new java.io.IOException(te);
14546
      }
14547
    }
14548
 
14549
  }
14550
 
14551
  public static class createInvoice_result implements org.apache.thrift.TBase<createInvoice_result, createInvoice_result._Fields>, java.io.Serializable, Cloneable   {
14552
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_result");
14553
 
14554
    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);
14555
 
14556
    private PurchaseServiceException e; // required
14557
 
14558
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14559
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14560
      E((short)1, "e");
14561
 
14562
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14563
 
14564
      static {
14565
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14566
          byName.put(field.getFieldName(), field);
14567
        }
14568
      }
14569
 
14570
      /**
14571
       * Find the _Fields constant that matches fieldId, or null if its not found.
14572
       */
14573
      public static _Fields findByThriftId(int fieldId) {
14574
        switch(fieldId) {
14575
          case 1: // E
14576
            return E;
14577
          default:
14578
            return null;
14579
        }
14580
      }
14581
 
14582
      /**
14583
       * Find the _Fields constant that matches fieldId, throwing an exception
14584
       * if it is not found.
14585
       */
14586
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14587
        _Fields fields = findByThriftId(fieldId);
14588
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14589
        return fields;
14590
      }
14591
 
14592
      /**
14593
       * Find the _Fields constant that matches name, or null if its not found.
14594
       */
14595
      public static _Fields findByName(String name) {
14596
        return byName.get(name);
14597
      }
14598
 
14599
      private final short _thriftId;
14600
      private final String _fieldName;
14601
 
14602
      _Fields(short thriftId, String fieldName) {
14603
        _thriftId = thriftId;
14604
        _fieldName = fieldName;
14605
      }
14606
 
14607
      public short getThriftFieldId() {
14608
        return _thriftId;
14609
      }
14610
 
14611
      public String getFieldName() {
14612
        return _fieldName;
14613
      }
14614
    }
14615
 
14616
    // isset id assignments
14617
 
14618
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14619
    static {
14620
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14621
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14622
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
14623
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14624
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_result.class, metaDataMap);
14625
    }
14626
 
14627
    public createInvoice_result() {
14628
    }
14629
 
14630
    public createInvoice_result(
14631
      PurchaseServiceException e)
14632
    {
14633
      this();
14634
      this.e = e;
14635
    }
14636
 
14637
    /**
14638
     * Performs a deep copy on <i>other</i>.
14639
     */
14640
    public createInvoice_result(createInvoice_result other) {
14641
      if (other.isSetE()) {
14642
        this.e = new PurchaseServiceException(other.e);
14643
      }
14644
    }
14645
 
14646
    public createInvoice_result deepCopy() {
14647
      return new createInvoice_result(this);
14648
    }
14649
 
14650
    @Override
14651
    public void clear() {
14652
      this.e = null;
14653
    }
14654
 
14655
    public PurchaseServiceException getE() {
14656
      return this.e;
14657
    }
14658
 
14659
    public void setE(PurchaseServiceException e) {
14660
      this.e = e;
14661
    }
14662
 
14663
    public void unsetE() {
14664
      this.e = null;
14665
    }
14666
 
14667
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
14668
    public boolean isSetE() {
14669
      return this.e != null;
14670
    }
14671
 
14672
    public void setEIsSet(boolean value) {
14673
      if (!value) {
14674
        this.e = null;
14675
      }
14676
    }
14677
 
14678
    public void setFieldValue(_Fields field, Object value) {
14679
      switch (field) {
14680
      case E:
14681
        if (value == null) {
14682
          unsetE();
14683
        } else {
14684
          setE((PurchaseServiceException)value);
14685
        }
14686
        break;
14687
 
14688
      }
14689
    }
14690
 
14691
    public Object getFieldValue(_Fields field) {
14692
      switch (field) {
14693
      case E:
14694
        return getE();
14695
 
14696
      }
14697
      throw new IllegalStateException();
14698
    }
14699
 
14700
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14701
    public boolean isSet(_Fields field) {
14702
      if (field == null) {
14703
        throw new IllegalArgumentException();
14704
      }
14705
 
14706
      switch (field) {
14707
      case E:
14708
        return isSetE();
14709
      }
14710
      throw new IllegalStateException();
14711
    }
14712
 
14713
    @Override
14714
    public boolean equals(Object that) {
14715
      if (that == null)
14716
        return false;
14717
      if (that instanceof createInvoice_result)
14718
        return this.equals((createInvoice_result)that);
14719
      return false;
14720
    }
14721
 
14722
    public boolean equals(createInvoice_result that) {
14723
      if (that == null)
14724
        return false;
14725
 
14726
      boolean this_present_e = true && this.isSetE();
14727
      boolean that_present_e = true && that.isSetE();
14728
      if (this_present_e || that_present_e) {
14729
        if (!(this_present_e && that_present_e))
14730
          return false;
14731
        if (!this.e.equals(that.e))
14732
          return false;
14733
      }
14734
 
14735
      return true;
14736
    }
14737
 
14738
    @Override
14739
    public int hashCode() {
14740
      return 0;
14741
    }
14742
 
14743
    public int compareTo(createInvoice_result other) {
14744
      if (!getClass().equals(other.getClass())) {
14745
        return getClass().getName().compareTo(other.getClass().getName());
14746
      }
14747
 
14748
      int lastComparison = 0;
14749
      createInvoice_result typedOther = (createInvoice_result)other;
14750
 
14751
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
14752
      if (lastComparison != 0) {
14753
        return lastComparison;
14754
      }
14755
      if (isSetE()) {
14756
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
14757
        if (lastComparison != 0) {
14758
          return lastComparison;
14759
        }
14760
      }
14761
      return 0;
14762
    }
14763
 
14764
    public _Fields fieldForId(int fieldId) {
14765
      return _Fields.findByThriftId(fieldId);
14766
    }
14767
 
14768
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14769
      org.apache.thrift.protocol.TField field;
14770
      iprot.readStructBegin();
14771
      while (true)
14772
      {
14773
        field = iprot.readFieldBegin();
14774
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14775
          break;
14776
        }
14777
        switch (field.id) {
14778
          case 1: // E
14779
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14780
              this.e = new PurchaseServiceException();
14781
              this.e.read(iprot);
14782
            } else { 
14783
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14784
            }
14785
            break;
14786
          default:
14787
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14788
        }
14789
        iprot.readFieldEnd();
14790
      }
14791
      iprot.readStructEnd();
14792
      validate();
14793
    }
14794
 
14795
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14796
      oprot.writeStructBegin(STRUCT_DESC);
14797
 
14798
      if (this.isSetE()) {
14799
        oprot.writeFieldBegin(E_FIELD_DESC);
14800
        this.e.write(oprot);
14801
        oprot.writeFieldEnd();
14802
      }
14803
      oprot.writeFieldStop();
14804
      oprot.writeStructEnd();
14805
    }
14806
 
14807
    @Override
14808
    public String toString() {
14809
      StringBuilder sb = new StringBuilder("createInvoice_result(");
14810
      boolean first = true;
14811
 
14812
      sb.append("e:");
14813
      if (this.e == null) {
14814
        sb.append("null");
14815
      } else {
14816
        sb.append(this.e);
14817
      }
14818
      first = false;
14819
      sb.append(")");
14820
      return sb.toString();
14821
    }
14822
 
14823
    public void validate() throws org.apache.thrift.TException {
14824
      // check for required fields
14825
    }
14826
 
14827
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14828
      try {
14829
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14830
      } catch (org.apache.thrift.TException te) {
14831
        throw new java.io.IOException(te);
14832
      }
14833
    }
14834
 
14835
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14836
      try {
14837
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14838
      } catch (org.apache.thrift.TException te) {
14839
        throw new java.io.IOException(te);
14840
      }
14841
    }
14842
 
14843
  }
14844
 
5591 mandeep.dh 14845
  public static class addSupplier_args implements org.apache.thrift.TBase<addSupplier_args, addSupplier_args._Fields>, java.io.Serializable, Cloneable   {
14846
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSupplier_args");
14847
 
14848
    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);
14849
 
14850
    private Supplier supplier; // required
14851
 
14852
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14853
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14854
      SUPPLIER((short)1, "supplier");
14855
 
14856
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14857
 
14858
      static {
14859
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14860
          byName.put(field.getFieldName(), field);
14861
        }
14862
      }
14863
 
14864
      /**
14865
       * Find the _Fields constant that matches fieldId, or null if its not found.
14866
       */
14867
      public static _Fields findByThriftId(int fieldId) {
14868
        switch(fieldId) {
14869
          case 1: // SUPPLIER
14870
            return SUPPLIER;
14871
          default:
14872
            return null;
14873
        }
14874
      }
14875
 
14876
      /**
14877
       * Find the _Fields constant that matches fieldId, throwing an exception
14878
       * if it is not found.
14879
       */
14880
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14881
        _Fields fields = findByThriftId(fieldId);
14882
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14883
        return fields;
14884
      }
14885
 
14886
      /**
14887
       * Find the _Fields constant that matches name, or null if its not found.
14888
       */
14889
      public static _Fields findByName(String name) {
14890
        return byName.get(name);
14891
      }
14892
 
14893
      private final short _thriftId;
14894
      private final String _fieldName;
14895
 
14896
      _Fields(short thriftId, String fieldName) {
14897
        _thriftId = thriftId;
14898
        _fieldName = fieldName;
14899
      }
14900
 
14901
      public short getThriftFieldId() {
14902
        return _thriftId;
14903
      }
14904
 
14905
      public String getFieldName() {
14906
        return _fieldName;
14907
      }
14908
    }
14909
 
14910
    // isset id assignments
14911
 
14912
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14913
    static {
14914
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14915
      tmpMap.put(_Fields.SUPPLIER, new org.apache.thrift.meta_data.FieldMetaData("supplier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14916
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
14917
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14918
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSupplier_args.class, metaDataMap);
14919
    }
14920
 
14921
    public addSupplier_args() {
14922
    }
14923
 
14924
    public addSupplier_args(
14925
      Supplier supplier)
14926
    {
14927
      this();
14928
      this.supplier = supplier;
14929
    }
14930
 
14931
    /**
14932
     * Performs a deep copy on <i>other</i>.
14933
     */
14934
    public addSupplier_args(addSupplier_args other) {
14935
      if (other.isSetSupplier()) {
14936
        this.supplier = new Supplier(other.supplier);
14937
      }
14938
    }
14939
 
14940
    public addSupplier_args deepCopy() {
14941
      return new addSupplier_args(this);
14942
    }
14943
 
14944
    @Override
14945
    public void clear() {
14946
      this.supplier = null;
14947
    }
14948
 
14949
    public Supplier getSupplier() {
14950
      return this.supplier;
14951
    }
14952
 
14953
    public void setSupplier(Supplier supplier) {
14954
      this.supplier = supplier;
14955
    }
14956
 
14957
    public void unsetSupplier() {
14958
      this.supplier = null;
14959
    }
14960
 
14961
    /** Returns true if field supplier is set (has been assigned a value) and false otherwise */
14962
    public boolean isSetSupplier() {
14963
      return this.supplier != null;
14964
    }
14965
 
14966
    public void setSupplierIsSet(boolean value) {
14967
      if (!value) {
14968
        this.supplier = null;
14969
      }
14970
    }
14971
 
14972
    public void setFieldValue(_Fields field, Object value) {
14973
      switch (field) {
14974
      case SUPPLIER:
14975
        if (value == null) {
14976
          unsetSupplier();
14977
        } else {
14978
          setSupplier((Supplier)value);
14979
        }
14980
        break;
14981
 
14982
      }
14983
    }
14984
 
14985
    public Object getFieldValue(_Fields field) {
14986
      switch (field) {
14987
      case SUPPLIER:
14988
        return getSupplier();
14989
 
14990
      }
14991
      throw new IllegalStateException();
14992
    }
14993
 
14994
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14995
    public boolean isSet(_Fields field) {
14996
      if (field == null) {
14997
        throw new IllegalArgumentException();
14998
      }
14999
 
15000
      switch (field) {
15001
      case SUPPLIER:
15002
        return isSetSupplier();
15003
      }
15004
      throw new IllegalStateException();
15005
    }
15006
 
15007
    @Override
15008
    public boolean equals(Object that) {
15009
      if (that == null)
15010
        return false;
15011
      if (that instanceof addSupplier_args)
15012
        return this.equals((addSupplier_args)that);
15013
      return false;
15014
    }
15015
 
15016
    public boolean equals(addSupplier_args that) {
15017
      if (that == null)
15018
        return false;
15019
 
15020
      boolean this_present_supplier = true && this.isSetSupplier();
15021
      boolean that_present_supplier = true && that.isSetSupplier();
15022
      if (this_present_supplier || that_present_supplier) {
15023
        if (!(this_present_supplier && that_present_supplier))
15024
          return false;
15025
        if (!this.supplier.equals(that.supplier))
15026
          return false;
15027
      }
15028
 
15029
      return true;
15030
    }
15031
 
15032
    @Override
15033
    public int hashCode() {
15034
      return 0;
15035
    }
15036
 
15037
    public int compareTo(addSupplier_args other) {
15038
      if (!getClass().equals(other.getClass())) {
15039
        return getClass().getName().compareTo(other.getClass().getName());
15040
      }
15041
 
15042
      int lastComparison = 0;
15043
      addSupplier_args typedOther = (addSupplier_args)other;
15044
 
15045
      lastComparison = Boolean.valueOf(isSetSupplier()).compareTo(typedOther.isSetSupplier());
15046
      if (lastComparison != 0) {
15047
        return lastComparison;
15048
      }
15049
      if (isSetSupplier()) {
15050
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplier, typedOther.supplier);
15051
        if (lastComparison != 0) {
15052
          return lastComparison;
15053
        }
15054
      }
15055
      return 0;
15056
    }
15057
 
15058
    public _Fields fieldForId(int fieldId) {
15059
      return _Fields.findByThriftId(fieldId);
15060
    }
15061
 
15062
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15063
      org.apache.thrift.protocol.TField field;
15064
      iprot.readStructBegin();
15065
      while (true)
15066
      {
15067
        field = iprot.readFieldBegin();
15068
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15069
          break;
15070
        }
15071
        switch (field.id) {
15072
          case 1: // SUPPLIER
15073
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15074
              this.supplier = new Supplier();
15075
              this.supplier.read(iprot);
15076
            } else { 
15077
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15078
            }
15079
            break;
15080
          default:
15081
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15082
        }
15083
        iprot.readFieldEnd();
15084
      }
15085
      iprot.readStructEnd();
15086
      validate();
15087
    }
15088
 
15089
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15090
      validate();
15091
 
15092
      oprot.writeStructBegin(STRUCT_DESC);
15093
      if (this.supplier != null) {
15094
        oprot.writeFieldBegin(SUPPLIER_FIELD_DESC);
15095
        this.supplier.write(oprot);
15096
        oprot.writeFieldEnd();
15097
      }
15098
      oprot.writeFieldStop();
15099
      oprot.writeStructEnd();
15100
    }
15101
 
15102
    @Override
15103
    public String toString() {
15104
      StringBuilder sb = new StringBuilder("addSupplier_args(");
15105
      boolean first = true;
15106
 
15107
      sb.append("supplier:");
15108
      if (this.supplier == null) {
15109
        sb.append("null");
15110
      } else {
15111
        sb.append(this.supplier);
15112
      }
15113
      first = false;
15114
      sb.append(")");
15115
      return sb.toString();
15116
    }
15117
 
15118
    public void validate() throws org.apache.thrift.TException {
15119
      // check for required fields
15120
    }
15121
 
15122
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15123
      try {
15124
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15125
      } catch (org.apache.thrift.TException te) {
15126
        throw new java.io.IOException(te);
15127
      }
15128
    }
15129
 
15130
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15131
      try {
15132
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15133
      } catch (org.apache.thrift.TException te) {
15134
        throw new java.io.IOException(te);
15135
      }
15136
    }
15137
 
15138
  }
15139
 
15140
  public static class addSupplier_result implements org.apache.thrift.TBase<addSupplier_result, addSupplier_result._Fields>, java.io.Serializable, Cloneable   {
15141
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSupplier_result");
15142
 
15143
    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);
15144
 
15145
    private Supplier success; // required
15146
 
15147
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15148
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15149
      SUCCESS((short)0, "success");
15150
 
15151
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15152
 
15153
      static {
15154
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15155
          byName.put(field.getFieldName(), field);
15156
        }
15157
      }
15158
 
15159
      /**
15160
       * Find the _Fields constant that matches fieldId, or null if its not found.
15161
       */
15162
      public static _Fields findByThriftId(int fieldId) {
15163
        switch(fieldId) {
15164
          case 0: // SUCCESS
15165
            return SUCCESS;
15166
          default:
15167
            return null;
15168
        }
15169
      }
15170
 
15171
      /**
15172
       * Find the _Fields constant that matches fieldId, throwing an exception
15173
       * if it is not found.
15174
       */
15175
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15176
        _Fields fields = findByThriftId(fieldId);
15177
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15178
        return fields;
15179
      }
15180
 
15181
      /**
15182
       * Find the _Fields constant that matches name, or null if its not found.
15183
       */
15184
      public static _Fields findByName(String name) {
15185
        return byName.get(name);
15186
      }
15187
 
15188
      private final short _thriftId;
15189
      private final String _fieldName;
15190
 
15191
      _Fields(short thriftId, String fieldName) {
15192
        _thriftId = thriftId;
15193
        _fieldName = fieldName;
15194
      }
15195
 
15196
      public short getThriftFieldId() {
15197
        return _thriftId;
15198
      }
15199
 
15200
      public String getFieldName() {
15201
        return _fieldName;
15202
      }
15203
    }
15204
 
15205
    // isset id assignments
15206
 
15207
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15208
    static {
15209
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15210
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15211
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
15212
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15213
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSupplier_result.class, metaDataMap);
15214
    }
15215
 
15216
    public addSupplier_result() {
15217
    }
15218
 
15219
    public addSupplier_result(
15220
      Supplier success)
15221
    {
15222
      this();
15223
      this.success = success;
15224
    }
15225
 
15226
    /**
15227
     * Performs a deep copy on <i>other</i>.
15228
     */
15229
    public addSupplier_result(addSupplier_result other) {
15230
      if (other.isSetSuccess()) {
15231
        this.success = new Supplier(other.success);
15232
      }
15233
    }
15234
 
15235
    public addSupplier_result deepCopy() {
15236
      return new addSupplier_result(this);
15237
    }
15238
 
15239
    @Override
15240
    public void clear() {
15241
      this.success = null;
15242
    }
15243
 
15244
    public Supplier getSuccess() {
15245
      return this.success;
15246
    }
15247
 
15248
    public void setSuccess(Supplier success) {
15249
      this.success = success;
15250
    }
15251
 
15252
    public void unsetSuccess() {
15253
      this.success = null;
15254
    }
15255
 
15256
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
15257
    public boolean isSetSuccess() {
15258
      return this.success != null;
15259
    }
15260
 
15261
    public void setSuccessIsSet(boolean value) {
15262
      if (!value) {
15263
        this.success = null;
15264
      }
15265
    }
15266
 
15267
    public void setFieldValue(_Fields field, Object value) {
15268
      switch (field) {
15269
      case SUCCESS:
15270
        if (value == null) {
15271
          unsetSuccess();
15272
        } else {
15273
          setSuccess((Supplier)value);
15274
        }
15275
        break;
15276
 
15277
      }
15278
    }
15279
 
15280
    public Object getFieldValue(_Fields field) {
15281
      switch (field) {
15282
      case SUCCESS:
15283
        return getSuccess();
15284
 
15285
      }
15286
      throw new IllegalStateException();
15287
    }
15288
 
15289
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15290
    public boolean isSet(_Fields field) {
15291
      if (field == null) {
15292
        throw new IllegalArgumentException();
15293
      }
15294
 
15295
      switch (field) {
15296
      case SUCCESS:
15297
        return isSetSuccess();
15298
      }
15299
      throw new IllegalStateException();
15300
    }
15301
 
15302
    @Override
15303
    public boolean equals(Object that) {
15304
      if (that == null)
15305
        return false;
15306
      if (that instanceof addSupplier_result)
15307
        return this.equals((addSupplier_result)that);
15308
      return false;
15309
    }
15310
 
15311
    public boolean equals(addSupplier_result that) {
15312
      if (that == null)
15313
        return false;
15314
 
15315
      boolean this_present_success = true && this.isSetSuccess();
15316
      boolean that_present_success = true && that.isSetSuccess();
15317
      if (this_present_success || that_present_success) {
15318
        if (!(this_present_success && that_present_success))
15319
          return false;
15320
        if (!this.success.equals(that.success))
15321
          return false;
15322
      }
15323
 
15324
      return true;
15325
    }
15326
 
15327
    @Override
15328
    public int hashCode() {
15329
      return 0;
15330
    }
15331
 
15332
    public int compareTo(addSupplier_result other) {
15333
      if (!getClass().equals(other.getClass())) {
15334
        return getClass().getName().compareTo(other.getClass().getName());
15335
      }
15336
 
15337
      int lastComparison = 0;
15338
      addSupplier_result typedOther = (addSupplier_result)other;
15339
 
15340
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
15341
      if (lastComparison != 0) {
15342
        return lastComparison;
15343
      }
15344
      if (isSetSuccess()) {
15345
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
15346
        if (lastComparison != 0) {
15347
          return lastComparison;
15348
        }
15349
      }
15350
      return 0;
15351
    }
15352
 
15353
    public _Fields fieldForId(int fieldId) {
15354
      return _Fields.findByThriftId(fieldId);
15355
    }
15356
 
15357
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15358
      org.apache.thrift.protocol.TField field;
15359
      iprot.readStructBegin();
15360
      while (true)
15361
      {
15362
        field = iprot.readFieldBegin();
15363
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15364
          break;
15365
        }
15366
        switch (field.id) {
15367
          case 0: // SUCCESS
15368
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15369
              this.success = new Supplier();
15370
              this.success.read(iprot);
15371
            } else { 
15372
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15373
            }
15374
            break;
15375
          default:
15376
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15377
        }
15378
        iprot.readFieldEnd();
15379
      }
15380
      iprot.readStructEnd();
15381
      validate();
15382
    }
15383
 
15384
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15385
      oprot.writeStructBegin(STRUCT_DESC);
15386
 
15387
      if (this.isSetSuccess()) {
15388
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15389
        this.success.write(oprot);
15390
        oprot.writeFieldEnd();
15391
      }
15392
      oprot.writeFieldStop();
15393
      oprot.writeStructEnd();
15394
    }
15395
 
15396
    @Override
15397
    public String toString() {
15398
      StringBuilder sb = new StringBuilder("addSupplier_result(");
15399
      boolean first = true;
15400
 
15401
      sb.append("success:");
15402
      if (this.success == null) {
15403
        sb.append("null");
15404
      } else {
15405
        sb.append(this.success);
15406
      }
15407
      first = false;
15408
      sb.append(")");
15409
      return sb.toString();
15410
    }
15411
 
15412
    public void validate() throws org.apache.thrift.TException {
15413
      // check for required fields
15414
    }
15415
 
15416
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15417
      try {
15418
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15419
      } catch (org.apache.thrift.TException te) {
15420
        throw new java.io.IOException(te);
15421
      }
15422
    }
15423
 
15424
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15425
      try {
15426
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15427
      } catch (org.apache.thrift.TException te) {
15428
        throw new java.io.IOException(te);
15429
      }
15430
    }
15431
 
15432
  }
15433
 
15434
  public static class updateSupplier_args implements org.apache.thrift.TBase<updateSupplier_args, updateSupplier_args._Fields>, java.io.Serializable, Cloneable   {
15435
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSupplier_args");
15436
 
15437
    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);
15438
 
15439
    private Supplier supplier; // required
15440
 
15441
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15442
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15443
      SUPPLIER((short)1, "supplier");
15444
 
15445
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15446
 
15447
      static {
15448
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15449
          byName.put(field.getFieldName(), field);
15450
        }
15451
      }
15452
 
15453
      /**
15454
       * Find the _Fields constant that matches fieldId, or null if its not found.
15455
       */
15456
      public static _Fields findByThriftId(int fieldId) {
15457
        switch(fieldId) {
15458
          case 1: // SUPPLIER
15459
            return SUPPLIER;
15460
          default:
15461
            return null;
15462
        }
15463
      }
15464
 
15465
      /**
15466
       * Find the _Fields constant that matches fieldId, throwing an exception
15467
       * if it is not found.
15468
       */
15469
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15470
        _Fields fields = findByThriftId(fieldId);
15471
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15472
        return fields;
15473
      }
15474
 
15475
      /**
15476
       * Find the _Fields constant that matches name, or null if its not found.
15477
       */
15478
      public static _Fields findByName(String name) {
15479
        return byName.get(name);
15480
      }
15481
 
15482
      private final short _thriftId;
15483
      private final String _fieldName;
15484
 
15485
      _Fields(short thriftId, String fieldName) {
15486
        _thriftId = thriftId;
15487
        _fieldName = fieldName;
15488
      }
15489
 
15490
      public short getThriftFieldId() {
15491
        return _thriftId;
15492
      }
15493
 
15494
      public String getFieldName() {
15495
        return _fieldName;
15496
      }
15497
    }
15498
 
15499
    // isset id assignments
15500
 
15501
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15502
    static {
15503
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15504
      tmpMap.put(_Fields.SUPPLIER, new org.apache.thrift.meta_data.FieldMetaData("supplier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15505
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
15506
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15507
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSupplier_args.class, metaDataMap);
15508
    }
15509
 
15510
    public updateSupplier_args() {
15511
    }
15512
 
15513
    public updateSupplier_args(
15514
      Supplier supplier)
15515
    {
15516
      this();
15517
      this.supplier = supplier;
15518
    }
15519
 
15520
    /**
15521
     * Performs a deep copy on <i>other</i>.
15522
     */
15523
    public updateSupplier_args(updateSupplier_args other) {
15524
      if (other.isSetSupplier()) {
15525
        this.supplier = new Supplier(other.supplier);
15526
      }
15527
    }
15528
 
15529
    public updateSupplier_args deepCopy() {
15530
      return new updateSupplier_args(this);
15531
    }
15532
 
15533
    @Override
15534
    public void clear() {
15535
      this.supplier = null;
15536
    }
15537
 
15538
    public Supplier getSupplier() {
15539
      return this.supplier;
15540
    }
15541
 
15542
    public void setSupplier(Supplier supplier) {
15543
      this.supplier = supplier;
15544
    }
15545
 
15546
    public void unsetSupplier() {
15547
      this.supplier = null;
15548
    }
15549
 
15550
    /** Returns true if field supplier is set (has been assigned a value) and false otherwise */
15551
    public boolean isSetSupplier() {
15552
      return this.supplier != null;
15553
    }
15554
 
15555
    public void setSupplierIsSet(boolean value) {
15556
      if (!value) {
15557
        this.supplier = null;
15558
      }
15559
    }
15560
 
15561
    public void setFieldValue(_Fields field, Object value) {
15562
      switch (field) {
15563
      case SUPPLIER:
15564
        if (value == null) {
15565
          unsetSupplier();
15566
        } else {
15567
          setSupplier((Supplier)value);
15568
        }
15569
        break;
15570
 
15571
      }
15572
    }
15573
 
15574
    public Object getFieldValue(_Fields field) {
15575
      switch (field) {
15576
      case SUPPLIER:
15577
        return getSupplier();
15578
 
15579
      }
15580
      throw new IllegalStateException();
15581
    }
15582
 
15583
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15584
    public boolean isSet(_Fields field) {
15585
      if (field == null) {
15586
        throw new IllegalArgumentException();
15587
      }
15588
 
15589
      switch (field) {
15590
      case SUPPLIER:
15591
        return isSetSupplier();
15592
      }
15593
      throw new IllegalStateException();
15594
    }
15595
 
15596
    @Override
15597
    public boolean equals(Object that) {
15598
      if (that == null)
15599
        return false;
15600
      if (that instanceof updateSupplier_args)
15601
        return this.equals((updateSupplier_args)that);
15602
      return false;
15603
    }
15604
 
15605
    public boolean equals(updateSupplier_args that) {
15606
      if (that == null)
15607
        return false;
15608
 
15609
      boolean this_present_supplier = true && this.isSetSupplier();
15610
      boolean that_present_supplier = true && that.isSetSupplier();
15611
      if (this_present_supplier || that_present_supplier) {
15612
        if (!(this_present_supplier && that_present_supplier))
15613
          return false;
15614
        if (!this.supplier.equals(that.supplier))
15615
          return false;
15616
      }
15617
 
15618
      return true;
15619
    }
15620
 
15621
    @Override
15622
    public int hashCode() {
15623
      return 0;
15624
    }
15625
 
15626
    public int compareTo(updateSupplier_args other) {
15627
      if (!getClass().equals(other.getClass())) {
15628
        return getClass().getName().compareTo(other.getClass().getName());
15629
      }
15630
 
15631
      int lastComparison = 0;
15632
      updateSupplier_args typedOther = (updateSupplier_args)other;
15633
 
15634
      lastComparison = Boolean.valueOf(isSetSupplier()).compareTo(typedOther.isSetSupplier());
15635
      if (lastComparison != 0) {
15636
        return lastComparison;
15637
      }
15638
      if (isSetSupplier()) {
15639
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplier, typedOther.supplier);
15640
        if (lastComparison != 0) {
15641
          return lastComparison;
15642
        }
15643
      }
15644
      return 0;
15645
    }
15646
 
15647
    public _Fields fieldForId(int fieldId) {
15648
      return _Fields.findByThriftId(fieldId);
15649
    }
15650
 
15651
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15652
      org.apache.thrift.protocol.TField field;
15653
      iprot.readStructBegin();
15654
      while (true)
15655
      {
15656
        field = iprot.readFieldBegin();
15657
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15658
          break;
15659
        }
15660
        switch (field.id) {
15661
          case 1: // SUPPLIER
15662
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15663
              this.supplier = new Supplier();
15664
              this.supplier.read(iprot);
15665
            } else { 
15666
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15667
            }
15668
            break;
15669
          default:
15670
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15671
        }
15672
        iprot.readFieldEnd();
15673
      }
15674
      iprot.readStructEnd();
15675
      validate();
15676
    }
15677
 
15678
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15679
      validate();
15680
 
15681
      oprot.writeStructBegin(STRUCT_DESC);
15682
      if (this.supplier != null) {
15683
        oprot.writeFieldBegin(SUPPLIER_FIELD_DESC);
15684
        this.supplier.write(oprot);
15685
        oprot.writeFieldEnd();
15686
      }
15687
      oprot.writeFieldStop();
15688
      oprot.writeStructEnd();
15689
    }
15690
 
15691
    @Override
15692
    public String toString() {
15693
      StringBuilder sb = new StringBuilder("updateSupplier_args(");
15694
      boolean first = true;
15695
 
15696
      sb.append("supplier:");
15697
      if (this.supplier == null) {
15698
        sb.append("null");
15699
      } else {
15700
        sb.append(this.supplier);
15701
      }
15702
      first = false;
15703
      sb.append(")");
15704
      return sb.toString();
15705
    }
15706
 
15707
    public void validate() throws org.apache.thrift.TException {
15708
      // check for required fields
15709
    }
15710
 
15711
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15712
      try {
15713
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15714
      } catch (org.apache.thrift.TException te) {
15715
        throw new java.io.IOException(te);
15716
      }
15717
    }
15718
 
15719
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15720
      try {
15721
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15722
      } catch (org.apache.thrift.TException te) {
15723
        throw new java.io.IOException(te);
15724
      }
15725
    }
15726
 
15727
  }
15728
 
15729
  public static class updateSupplier_result implements org.apache.thrift.TBase<updateSupplier_result, updateSupplier_result._Fields>, java.io.Serializable, Cloneable   {
15730
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSupplier_result");
15731
 
15732
 
15733
 
15734
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15735
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15736
;
15737
 
15738
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15739
 
15740
      static {
15741
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15742
          byName.put(field.getFieldName(), field);
15743
        }
15744
      }
15745
 
15746
      /**
15747
       * Find the _Fields constant that matches fieldId, or null if its not found.
15748
       */
15749
      public static _Fields findByThriftId(int fieldId) {
15750
        switch(fieldId) {
15751
          default:
15752
            return null;
15753
        }
15754
      }
15755
 
15756
      /**
15757
       * Find the _Fields constant that matches fieldId, throwing an exception
15758
       * if it is not found.
15759
       */
15760
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15761
        _Fields fields = findByThriftId(fieldId);
15762
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15763
        return fields;
15764
      }
15765
 
15766
      /**
15767
       * Find the _Fields constant that matches name, or null if its not found.
15768
       */
15769
      public static _Fields findByName(String name) {
15770
        return byName.get(name);
15771
      }
15772
 
15773
      private final short _thriftId;
15774
      private final String _fieldName;
15775
 
15776
      _Fields(short thriftId, String fieldName) {
15777
        _thriftId = thriftId;
15778
        _fieldName = fieldName;
15779
      }
15780
 
15781
      public short getThriftFieldId() {
15782
        return _thriftId;
15783
      }
15784
 
15785
      public String getFieldName() {
15786
        return _fieldName;
15787
      }
15788
    }
15789
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15790
    static {
15791
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15792
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15793
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSupplier_result.class, metaDataMap);
15794
    }
15795
 
15796
    public updateSupplier_result() {
15797
    }
15798
 
15799
    /**
15800
     * Performs a deep copy on <i>other</i>.
15801
     */
15802
    public updateSupplier_result(updateSupplier_result other) {
15803
    }
15804
 
15805
    public updateSupplier_result deepCopy() {
15806
      return new updateSupplier_result(this);
15807
    }
15808
 
15809
    @Override
15810
    public void clear() {
15811
    }
15812
 
15813
    public void setFieldValue(_Fields field, Object value) {
15814
      switch (field) {
15815
      }
15816
    }
15817
 
15818
    public Object getFieldValue(_Fields field) {
15819
      switch (field) {
15820
      }
15821
      throw new IllegalStateException();
15822
    }
15823
 
15824
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15825
    public boolean isSet(_Fields field) {
15826
      if (field == null) {
15827
        throw new IllegalArgumentException();
15828
      }
15829
 
15830
      switch (field) {
15831
      }
15832
      throw new IllegalStateException();
15833
    }
15834
 
15835
    @Override
15836
    public boolean equals(Object that) {
15837
      if (that == null)
15838
        return false;
15839
      if (that instanceof updateSupplier_result)
15840
        return this.equals((updateSupplier_result)that);
15841
      return false;
15842
    }
15843
 
15844
    public boolean equals(updateSupplier_result that) {
15845
      if (that == null)
15846
        return false;
15847
 
15848
      return true;
15849
    }
15850
 
15851
    @Override
15852
    public int hashCode() {
15853
      return 0;
15854
    }
15855
 
15856
    public int compareTo(updateSupplier_result other) {
15857
      if (!getClass().equals(other.getClass())) {
15858
        return getClass().getName().compareTo(other.getClass().getName());
15859
      }
15860
 
15861
      int lastComparison = 0;
15862
      updateSupplier_result typedOther = (updateSupplier_result)other;
15863
 
15864
      return 0;
15865
    }
15866
 
15867
    public _Fields fieldForId(int fieldId) {
15868
      return _Fields.findByThriftId(fieldId);
15869
    }
15870
 
15871
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15872
      org.apache.thrift.protocol.TField field;
15873
      iprot.readStructBegin();
15874
      while (true)
15875
      {
15876
        field = iprot.readFieldBegin();
15877
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15878
          break;
15879
        }
15880
        switch (field.id) {
15881
          default:
15882
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15883
        }
15884
        iprot.readFieldEnd();
15885
      }
15886
      iprot.readStructEnd();
15887
      validate();
15888
    }
15889
 
15890
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15891
      oprot.writeStructBegin(STRUCT_DESC);
15892
 
15893
      oprot.writeFieldStop();
15894
      oprot.writeStructEnd();
15895
    }
15896
 
15897
    @Override
15898
    public String toString() {
15899
      StringBuilder sb = new StringBuilder("updateSupplier_result(");
15900
      boolean first = true;
15901
 
15902
      sb.append(")");
15903
      return sb.toString();
15904
    }
15905
 
15906
    public void validate() throws org.apache.thrift.TException {
15907
      // check for required fields
15908
    }
15909
 
15910
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15911
      try {
15912
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15913
      } catch (org.apache.thrift.TException te) {
15914
        throw new java.io.IOException(te);
15915
      }
15916
    }
15917
 
15918
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15919
      try {
15920
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15921
      } catch (org.apache.thrift.TException te) {
15922
        throw new java.io.IOException(te);
15923
      }
15924
    }
15925
 
15926
  }
15927
 
6467 amar.kumar 15928
  public static class createPurchaseReturn_args implements org.apache.thrift.TBase<createPurchaseReturn_args, createPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
15929
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseReturn_args");
15930
 
15931
    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);
15932
 
15933
    private PurchaseReturn purchaseReturn; // required
15934
 
15935
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15936
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15937
      PURCHASE_RETURN((short)1, "purchaseReturn");
15938
 
15939
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15940
 
15941
      static {
15942
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15943
          byName.put(field.getFieldName(), field);
15944
        }
15945
      }
15946
 
15947
      /**
15948
       * Find the _Fields constant that matches fieldId, or null if its not found.
15949
       */
15950
      public static _Fields findByThriftId(int fieldId) {
15951
        switch(fieldId) {
15952
          case 1: // PURCHASE_RETURN
15953
            return PURCHASE_RETURN;
15954
          default:
15955
            return null;
15956
        }
15957
      }
15958
 
15959
      /**
15960
       * Find the _Fields constant that matches fieldId, throwing an exception
15961
       * if it is not found.
15962
       */
15963
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15964
        _Fields fields = findByThriftId(fieldId);
15965
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15966
        return fields;
15967
      }
15968
 
15969
      /**
15970
       * Find the _Fields constant that matches name, or null if its not found.
15971
       */
15972
      public static _Fields findByName(String name) {
15973
        return byName.get(name);
15974
      }
15975
 
15976
      private final short _thriftId;
15977
      private final String _fieldName;
15978
 
15979
      _Fields(short thriftId, String fieldName) {
15980
        _thriftId = thriftId;
15981
        _fieldName = fieldName;
15982
      }
15983
 
15984
      public short getThriftFieldId() {
15985
        return _thriftId;
15986
      }
15987
 
15988
      public String getFieldName() {
15989
        return _fieldName;
15990
      }
15991
    }
15992
 
15993
    // isset id assignments
15994
 
15995
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15996
    static {
15997
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15998
      tmpMap.put(_Fields.PURCHASE_RETURN, new org.apache.thrift.meta_data.FieldMetaData("purchaseReturn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15999
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class)));
16000
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16001
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseReturn_args.class, metaDataMap);
16002
    }
16003
 
16004
    public createPurchaseReturn_args() {
16005
    }
16006
 
16007
    public createPurchaseReturn_args(
16008
      PurchaseReturn purchaseReturn)
16009
    {
16010
      this();
16011
      this.purchaseReturn = purchaseReturn;
16012
    }
16013
 
16014
    /**
16015
     * Performs a deep copy on <i>other</i>.
16016
     */
16017
    public createPurchaseReturn_args(createPurchaseReturn_args other) {
16018
      if (other.isSetPurchaseReturn()) {
16019
        this.purchaseReturn = new PurchaseReturn(other.purchaseReturn);
16020
      }
16021
    }
16022
 
16023
    public createPurchaseReturn_args deepCopy() {
16024
      return new createPurchaseReturn_args(this);
16025
    }
16026
 
16027
    @Override
16028
    public void clear() {
16029
      this.purchaseReturn = null;
16030
    }
16031
 
16032
    public PurchaseReturn getPurchaseReturn() {
16033
      return this.purchaseReturn;
16034
    }
16035
 
16036
    public void setPurchaseReturn(PurchaseReturn purchaseReturn) {
16037
      this.purchaseReturn = purchaseReturn;
16038
    }
16039
 
16040
    public void unsetPurchaseReturn() {
16041
      this.purchaseReturn = null;
16042
    }
16043
 
16044
    /** Returns true if field purchaseReturn is set (has been assigned a value) and false otherwise */
16045
    public boolean isSetPurchaseReturn() {
16046
      return this.purchaseReturn != null;
16047
    }
16048
 
16049
    public void setPurchaseReturnIsSet(boolean value) {
16050
      if (!value) {
16051
        this.purchaseReturn = null;
16052
      }
16053
    }
16054
 
16055
    public void setFieldValue(_Fields field, Object value) {
16056
      switch (field) {
16057
      case PURCHASE_RETURN:
16058
        if (value == null) {
16059
          unsetPurchaseReturn();
16060
        } else {
16061
          setPurchaseReturn((PurchaseReturn)value);
16062
        }
16063
        break;
16064
 
16065
      }
16066
    }
16067
 
16068
    public Object getFieldValue(_Fields field) {
16069
      switch (field) {
16070
      case PURCHASE_RETURN:
16071
        return getPurchaseReturn();
16072
 
16073
      }
16074
      throw new IllegalStateException();
16075
    }
16076
 
16077
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16078
    public boolean isSet(_Fields field) {
16079
      if (field == null) {
16080
        throw new IllegalArgumentException();
16081
      }
16082
 
16083
      switch (field) {
16084
      case PURCHASE_RETURN:
16085
        return isSetPurchaseReturn();
16086
      }
16087
      throw new IllegalStateException();
16088
    }
16089
 
16090
    @Override
16091
    public boolean equals(Object that) {
16092
      if (that == null)
16093
        return false;
16094
      if (that instanceof createPurchaseReturn_args)
16095
        return this.equals((createPurchaseReturn_args)that);
16096
      return false;
16097
    }
16098
 
16099
    public boolean equals(createPurchaseReturn_args that) {
16100
      if (that == null)
16101
        return false;
16102
 
16103
      boolean this_present_purchaseReturn = true && this.isSetPurchaseReturn();
16104
      boolean that_present_purchaseReturn = true && that.isSetPurchaseReturn();
16105
      if (this_present_purchaseReturn || that_present_purchaseReturn) {
16106
        if (!(this_present_purchaseReturn && that_present_purchaseReturn))
16107
          return false;
16108
        if (!this.purchaseReturn.equals(that.purchaseReturn))
16109
          return false;
16110
      }
16111
 
16112
      return true;
16113
    }
16114
 
16115
    @Override
16116
    public int hashCode() {
16117
      return 0;
16118
    }
16119
 
16120
    public int compareTo(createPurchaseReturn_args other) {
16121
      if (!getClass().equals(other.getClass())) {
16122
        return getClass().getName().compareTo(other.getClass().getName());
16123
      }
16124
 
16125
      int lastComparison = 0;
16126
      createPurchaseReturn_args typedOther = (createPurchaseReturn_args)other;
16127
 
16128
      lastComparison = Boolean.valueOf(isSetPurchaseReturn()).compareTo(typedOther.isSetPurchaseReturn());
16129
      if (lastComparison != 0) {
16130
        return lastComparison;
16131
      }
16132
      if (isSetPurchaseReturn()) {
16133
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseReturn, typedOther.purchaseReturn);
16134
        if (lastComparison != 0) {
16135
          return lastComparison;
16136
        }
16137
      }
16138
      return 0;
16139
    }
16140
 
16141
    public _Fields fieldForId(int fieldId) {
16142
      return _Fields.findByThriftId(fieldId);
16143
    }
16144
 
16145
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16146
      org.apache.thrift.protocol.TField field;
16147
      iprot.readStructBegin();
16148
      while (true)
16149
      {
16150
        field = iprot.readFieldBegin();
16151
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16152
          break;
16153
        }
16154
        switch (field.id) {
16155
          case 1: // PURCHASE_RETURN
16156
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
16157
              this.purchaseReturn = new PurchaseReturn();
16158
              this.purchaseReturn.read(iprot);
16159
            } else { 
16160
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16161
            }
16162
            break;
16163
          default:
16164
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16165
        }
16166
        iprot.readFieldEnd();
16167
      }
16168
      iprot.readStructEnd();
16169
      validate();
16170
    }
16171
 
16172
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16173
      validate();
16174
 
16175
      oprot.writeStructBegin(STRUCT_DESC);
16176
      if (this.purchaseReturn != null) {
16177
        oprot.writeFieldBegin(PURCHASE_RETURN_FIELD_DESC);
16178
        this.purchaseReturn.write(oprot);
16179
        oprot.writeFieldEnd();
16180
      }
16181
      oprot.writeFieldStop();
16182
      oprot.writeStructEnd();
16183
    }
16184
 
16185
    @Override
16186
    public String toString() {
16187
      StringBuilder sb = new StringBuilder("createPurchaseReturn_args(");
16188
      boolean first = true;
16189
 
16190
      sb.append("purchaseReturn:");
16191
      if (this.purchaseReturn == null) {
16192
        sb.append("null");
16193
      } else {
16194
        sb.append(this.purchaseReturn);
16195
      }
16196
      first = false;
16197
      sb.append(")");
16198
      return sb.toString();
16199
    }
16200
 
16201
    public void validate() throws org.apache.thrift.TException {
16202
      // check for required fields
16203
    }
16204
 
16205
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16206
      try {
16207
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16208
      } catch (org.apache.thrift.TException te) {
16209
        throw new java.io.IOException(te);
16210
      }
16211
    }
16212
 
16213
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16214
      try {
16215
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16216
      } catch (org.apache.thrift.TException te) {
16217
        throw new java.io.IOException(te);
16218
      }
16219
    }
16220
 
16221
  }
16222
 
16223
  public static class createPurchaseReturn_result implements org.apache.thrift.TBase<createPurchaseReturn_result, createPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
16224
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseReturn_result");
16225
 
16226
    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);
16227
 
16228
    private long success; // required
16229
 
16230
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16231
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16232
      SUCCESS((short)0, "success");
16233
 
16234
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16235
 
16236
      static {
16237
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16238
          byName.put(field.getFieldName(), field);
16239
        }
16240
      }
16241
 
16242
      /**
16243
       * Find the _Fields constant that matches fieldId, or null if its not found.
16244
       */
16245
      public static _Fields findByThriftId(int fieldId) {
16246
        switch(fieldId) {
16247
          case 0: // SUCCESS
16248
            return SUCCESS;
16249
          default:
16250
            return null;
16251
        }
16252
      }
16253
 
16254
      /**
16255
       * Find the _Fields constant that matches fieldId, throwing an exception
16256
       * if it is not found.
16257
       */
16258
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16259
        _Fields fields = findByThriftId(fieldId);
16260
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16261
        return fields;
16262
      }
16263
 
16264
      /**
16265
       * Find the _Fields constant that matches name, or null if its not found.
16266
       */
16267
      public static _Fields findByName(String name) {
16268
        return byName.get(name);
16269
      }
16270
 
16271
      private final short _thriftId;
16272
      private final String _fieldName;
16273
 
16274
      _Fields(short thriftId, String fieldName) {
16275
        _thriftId = thriftId;
16276
        _fieldName = fieldName;
16277
      }
16278
 
16279
      public short getThriftFieldId() {
16280
        return _thriftId;
16281
      }
16282
 
16283
      public String getFieldName() {
16284
        return _fieldName;
16285
      }
16286
    }
16287
 
16288
    // isset id assignments
16289
    private static final int __SUCCESS_ISSET_ID = 0;
16290
    private BitSet __isset_bit_vector = new BitSet(1);
16291
 
16292
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16293
    static {
16294
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16295
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16296
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
16297
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16298
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseReturn_result.class, metaDataMap);
16299
    }
16300
 
16301
    public createPurchaseReturn_result() {
16302
    }
16303
 
16304
    public createPurchaseReturn_result(
16305
      long success)
16306
    {
16307
      this();
16308
      this.success = success;
16309
      setSuccessIsSet(true);
16310
    }
16311
 
16312
    /**
16313
     * Performs a deep copy on <i>other</i>.
16314
     */
16315
    public createPurchaseReturn_result(createPurchaseReturn_result other) {
16316
      __isset_bit_vector.clear();
16317
      __isset_bit_vector.or(other.__isset_bit_vector);
16318
      this.success = other.success;
16319
    }
16320
 
16321
    public createPurchaseReturn_result deepCopy() {
16322
      return new createPurchaseReturn_result(this);
16323
    }
16324
 
16325
    @Override
16326
    public void clear() {
16327
      setSuccessIsSet(false);
16328
      this.success = 0;
16329
    }
16330
 
16331
    public long getSuccess() {
16332
      return this.success;
16333
    }
16334
 
16335
    public void setSuccess(long success) {
16336
      this.success = success;
16337
      setSuccessIsSet(true);
16338
    }
16339
 
16340
    public void unsetSuccess() {
16341
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
16342
    }
16343
 
16344
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
16345
    public boolean isSetSuccess() {
16346
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
16347
    }
16348
 
16349
    public void setSuccessIsSet(boolean value) {
16350
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
16351
    }
16352
 
16353
    public void setFieldValue(_Fields field, Object value) {
16354
      switch (field) {
16355
      case SUCCESS:
16356
        if (value == null) {
16357
          unsetSuccess();
16358
        } else {
16359
          setSuccess((Long)value);
16360
        }
16361
        break;
16362
 
16363
      }
16364
    }
16365
 
16366
    public Object getFieldValue(_Fields field) {
16367
      switch (field) {
16368
      case SUCCESS:
16369
        return Long.valueOf(getSuccess());
16370
 
16371
      }
16372
      throw new IllegalStateException();
16373
    }
16374
 
16375
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16376
    public boolean isSet(_Fields field) {
16377
      if (field == null) {
16378
        throw new IllegalArgumentException();
16379
      }
16380
 
16381
      switch (field) {
16382
      case SUCCESS:
16383
        return isSetSuccess();
16384
      }
16385
      throw new IllegalStateException();
16386
    }
16387
 
16388
    @Override
16389
    public boolean equals(Object that) {
16390
      if (that == null)
16391
        return false;
16392
      if (that instanceof createPurchaseReturn_result)
16393
        return this.equals((createPurchaseReturn_result)that);
16394
      return false;
16395
    }
16396
 
16397
    public boolean equals(createPurchaseReturn_result that) {
16398
      if (that == null)
16399
        return false;
16400
 
16401
      boolean this_present_success = true;
16402
      boolean that_present_success = true;
16403
      if (this_present_success || that_present_success) {
16404
        if (!(this_present_success && that_present_success))
16405
          return false;
16406
        if (this.success != that.success)
16407
          return false;
16408
      }
16409
 
16410
      return true;
16411
    }
16412
 
16413
    @Override
16414
    public int hashCode() {
16415
      return 0;
16416
    }
16417
 
16418
    public int compareTo(createPurchaseReturn_result other) {
16419
      if (!getClass().equals(other.getClass())) {
16420
        return getClass().getName().compareTo(other.getClass().getName());
16421
      }
16422
 
16423
      int lastComparison = 0;
16424
      createPurchaseReturn_result typedOther = (createPurchaseReturn_result)other;
16425
 
16426
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
16427
      if (lastComparison != 0) {
16428
        return lastComparison;
16429
      }
16430
      if (isSetSuccess()) {
16431
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
16432
        if (lastComparison != 0) {
16433
          return lastComparison;
16434
        }
16435
      }
16436
      return 0;
16437
    }
16438
 
16439
    public _Fields fieldForId(int fieldId) {
16440
      return _Fields.findByThriftId(fieldId);
16441
    }
16442
 
16443
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16444
      org.apache.thrift.protocol.TField field;
16445
      iprot.readStructBegin();
16446
      while (true)
16447
      {
16448
        field = iprot.readFieldBegin();
16449
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16450
          break;
16451
        }
16452
        switch (field.id) {
16453
          case 0: // SUCCESS
16454
            if (field.type == org.apache.thrift.protocol.TType.I64) {
16455
              this.success = iprot.readI64();
16456
              setSuccessIsSet(true);
16457
            } else { 
16458
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16459
            }
16460
            break;
16461
          default:
16462
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16463
        }
16464
        iprot.readFieldEnd();
16465
      }
16466
      iprot.readStructEnd();
16467
      validate();
16468
    }
16469
 
16470
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16471
      oprot.writeStructBegin(STRUCT_DESC);
16472
 
16473
      if (this.isSetSuccess()) {
16474
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16475
        oprot.writeI64(this.success);
16476
        oprot.writeFieldEnd();
16477
      }
16478
      oprot.writeFieldStop();
16479
      oprot.writeStructEnd();
16480
    }
16481
 
16482
    @Override
16483
    public String toString() {
16484
      StringBuilder sb = new StringBuilder("createPurchaseReturn_result(");
16485
      boolean first = true;
16486
 
16487
      sb.append("success:");
16488
      sb.append(this.success);
16489
      first = false;
16490
      sb.append(")");
16491
      return sb.toString();
16492
    }
16493
 
16494
    public void validate() throws org.apache.thrift.TException {
16495
      // check for required fields
16496
    }
16497
 
16498
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16499
      try {
16500
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16501
      } catch (org.apache.thrift.TException te) {
16502
        throw new java.io.IOException(te);
16503
      }
16504
    }
16505
 
16506
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16507
      try {
16508
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16509
      } catch (org.apache.thrift.TException te) {
16510
        throw new java.io.IOException(te);
16511
      }
16512
    }
16513
 
16514
  }
16515
 
16516
  public static class settlePurchaseReturn_args implements org.apache.thrift.TBase<settlePurchaseReturn_args, settlePurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
16517
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("settlePurchaseReturn_args");
16518
 
16519
    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);
16520
 
16521
    private long id; // required
16522
 
16523
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16524
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16525
      ID((short)1, "id");
16526
 
16527
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16528
 
16529
      static {
16530
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16531
          byName.put(field.getFieldName(), field);
16532
        }
16533
      }
16534
 
16535
      /**
16536
       * Find the _Fields constant that matches fieldId, or null if its not found.
16537
       */
16538
      public static _Fields findByThriftId(int fieldId) {
16539
        switch(fieldId) {
16540
          case 1: // ID
16541
            return ID;
16542
          default:
16543
            return null;
16544
        }
16545
      }
16546
 
16547
      /**
16548
       * Find the _Fields constant that matches fieldId, throwing an exception
16549
       * if it is not found.
16550
       */
16551
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16552
        _Fields fields = findByThriftId(fieldId);
16553
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16554
        return fields;
16555
      }
16556
 
16557
      /**
16558
       * Find the _Fields constant that matches name, or null if its not found.
16559
       */
16560
      public static _Fields findByName(String name) {
16561
        return byName.get(name);
16562
      }
16563
 
16564
      private final short _thriftId;
16565
      private final String _fieldName;
16566
 
16567
      _Fields(short thriftId, String fieldName) {
16568
        _thriftId = thriftId;
16569
        _fieldName = fieldName;
16570
      }
16571
 
16572
      public short getThriftFieldId() {
16573
        return _thriftId;
16574
      }
16575
 
16576
      public String getFieldName() {
16577
        return _fieldName;
16578
      }
16579
    }
16580
 
16581
    // isset id assignments
16582
    private static final int __ID_ISSET_ID = 0;
16583
    private BitSet __isset_bit_vector = new BitSet(1);
16584
 
16585
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16586
    static {
16587
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16588
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16589
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
16590
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16591
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(settlePurchaseReturn_args.class, metaDataMap);
16592
    }
16593
 
16594
    public settlePurchaseReturn_args() {
16595
    }
16596
 
16597
    public settlePurchaseReturn_args(
16598
      long id)
16599
    {
16600
      this();
16601
      this.id = id;
16602
      setIdIsSet(true);
16603
    }
16604
 
16605
    /**
16606
     * Performs a deep copy on <i>other</i>.
16607
     */
16608
    public settlePurchaseReturn_args(settlePurchaseReturn_args other) {
16609
      __isset_bit_vector.clear();
16610
      __isset_bit_vector.or(other.__isset_bit_vector);
16611
      this.id = other.id;
16612
    }
16613
 
16614
    public settlePurchaseReturn_args deepCopy() {
16615
      return new settlePurchaseReturn_args(this);
16616
    }
16617
 
16618
    @Override
16619
    public void clear() {
16620
      setIdIsSet(false);
16621
      this.id = 0;
16622
    }
16623
 
16624
    public long getId() {
16625
      return this.id;
16626
    }
16627
 
16628
    public void setId(long id) {
16629
      this.id = id;
16630
      setIdIsSet(true);
16631
    }
16632
 
16633
    public void unsetId() {
16634
      __isset_bit_vector.clear(__ID_ISSET_ID);
16635
    }
16636
 
16637
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
16638
    public boolean isSetId() {
16639
      return __isset_bit_vector.get(__ID_ISSET_ID);
16640
    }
16641
 
16642
    public void setIdIsSet(boolean value) {
16643
      __isset_bit_vector.set(__ID_ISSET_ID, value);
16644
    }
16645
 
16646
    public void setFieldValue(_Fields field, Object value) {
16647
      switch (field) {
16648
      case ID:
16649
        if (value == null) {
16650
          unsetId();
16651
        } else {
16652
          setId((Long)value);
16653
        }
16654
        break;
16655
 
16656
      }
16657
    }
16658
 
16659
    public Object getFieldValue(_Fields field) {
16660
      switch (field) {
16661
      case ID:
16662
        return Long.valueOf(getId());
16663
 
16664
      }
16665
      throw new IllegalStateException();
16666
    }
16667
 
16668
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16669
    public boolean isSet(_Fields field) {
16670
      if (field == null) {
16671
        throw new IllegalArgumentException();
16672
      }
16673
 
16674
      switch (field) {
16675
      case ID:
16676
        return isSetId();
16677
      }
16678
      throw new IllegalStateException();
16679
    }
16680
 
16681
    @Override
16682
    public boolean equals(Object that) {
16683
      if (that == null)
16684
        return false;
16685
      if (that instanceof settlePurchaseReturn_args)
16686
        return this.equals((settlePurchaseReturn_args)that);
16687
      return false;
16688
    }
16689
 
16690
    public boolean equals(settlePurchaseReturn_args that) {
16691
      if (that == null)
16692
        return false;
16693
 
16694
      boolean this_present_id = true;
16695
      boolean that_present_id = true;
16696
      if (this_present_id || that_present_id) {
16697
        if (!(this_present_id && that_present_id))
16698
          return false;
16699
        if (this.id != that.id)
16700
          return false;
16701
      }
16702
 
16703
      return true;
16704
    }
16705
 
16706
    @Override
16707
    public int hashCode() {
16708
      return 0;
16709
    }
16710
 
16711
    public int compareTo(settlePurchaseReturn_args other) {
16712
      if (!getClass().equals(other.getClass())) {
16713
        return getClass().getName().compareTo(other.getClass().getName());
16714
      }
16715
 
16716
      int lastComparison = 0;
16717
      settlePurchaseReturn_args typedOther = (settlePurchaseReturn_args)other;
16718
 
16719
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
16720
      if (lastComparison != 0) {
16721
        return lastComparison;
16722
      }
16723
      if (isSetId()) {
16724
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
16725
        if (lastComparison != 0) {
16726
          return lastComparison;
16727
        }
16728
      }
16729
      return 0;
16730
    }
16731
 
16732
    public _Fields fieldForId(int fieldId) {
16733
      return _Fields.findByThriftId(fieldId);
16734
    }
16735
 
16736
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16737
      org.apache.thrift.protocol.TField field;
16738
      iprot.readStructBegin();
16739
      while (true)
16740
      {
16741
        field = iprot.readFieldBegin();
16742
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16743
          break;
16744
        }
16745
        switch (field.id) {
16746
          case 1: // ID
16747
            if (field.type == org.apache.thrift.protocol.TType.I64) {
16748
              this.id = iprot.readI64();
16749
              setIdIsSet(true);
16750
            } else { 
16751
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16752
            }
16753
            break;
16754
          default:
16755
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16756
        }
16757
        iprot.readFieldEnd();
16758
      }
16759
      iprot.readStructEnd();
16760
      validate();
16761
    }
16762
 
16763
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16764
      validate();
16765
 
16766
      oprot.writeStructBegin(STRUCT_DESC);
16767
      oprot.writeFieldBegin(ID_FIELD_DESC);
16768
      oprot.writeI64(this.id);
16769
      oprot.writeFieldEnd();
16770
      oprot.writeFieldStop();
16771
      oprot.writeStructEnd();
16772
    }
16773
 
16774
    @Override
16775
    public String toString() {
16776
      StringBuilder sb = new StringBuilder("settlePurchaseReturn_args(");
16777
      boolean first = true;
16778
 
16779
      sb.append("id:");
16780
      sb.append(this.id);
16781
      first = false;
16782
      sb.append(")");
16783
      return sb.toString();
16784
    }
16785
 
16786
    public void validate() throws org.apache.thrift.TException {
16787
      // check for required fields
16788
    }
16789
 
16790
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16791
      try {
16792
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16793
      } catch (org.apache.thrift.TException te) {
16794
        throw new java.io.IOException(te);
16795
      }
16796
    }
16797
 
16798
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16799
      try {
16800
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
16801
        __isset_bit_vector = new BitSet(1);
16802
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16803
      } catch (org.apache.thrift.TException te) {
16804
        throw new java.io.IOException(te);
16805
      }
16806
    }
16807
 
16808
  }
16809
 
16810
  public static class settlePurchaseReturn_result implements org.apache.thrift.TBase<settlePurchaseReturn_result, settlePurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
16811
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("settlePurchaseReturn_result");
16812
 
16813
 
16814
 
16815
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16816
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16817
;
16818
 
16819
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16820
 
16821
      static {
16822
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16823
          byName.put(field.getFieldName(), field);
16824
        }
16825
      }
16826
 
16827
      /**
16828
       * Find the _Fields constant that matches fieldId, or null if its not found.
16829
       */
16830
      public static _Fields findByThriftId(int fieldId) {
16831
        switch(fieldId) {
16832
          default:
16833
            return null;
16834
        }
16835
      }
16836
 
16837
      /**
16838
       * Find the _Fields constant that matches fieldId, throwing an exception
16839
       * if it is not found.
16840
       */
16841
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16842
        _Fields fields = findByThriftId(fieldId);
16843
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16844
        return fields;
16845
      }
16846
 
16847
      /**
16848
       * Find the _Fields constant that matches name, or null if its not found.
16849
       */
16850
      public static _Fields findByName(String name) {
16851
        return byName.get(name);
16852
      }
16853
 
16854
      private final short _thriftId;
16855
      private final String _fieldName;
16856
 
16857
      _Fields(short thriftId, String fieldName) {
16858
        _thriftId = thriftId;
16859
        _fieldName = fieldName;
16860
      }
16861
 
16862
      public short getThriftFieldId() {
16863
        return _thriftId;
16864
      }
16865
 
16866
      public String getFieldName() {
16867
        return _fieldName;
16868
      }
16869
    }
16870
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16871
    static {
16872
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16873
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16874
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(settlePurchaseReturn_result.class, metaDataMap);
16875
    }
16876
 
16877
    public settlePurchaseReturn_result() {
16878
    }
16879
 
16880
    /**
16881
     * Performs a deep copy on <i>other</i>.
16882
     */
16883
    public settlePurchaseReturn_result(settlePurchaseReturn_result other) {
16884
    }
16885
 
16886
    public settlePurchaseReturn_result deepCopy() {
16887
      return new settlePurchaseReturn_result(this);
16888
    }
16889
 
16890
    @Override
16891
    public void clear() {
16892
    }
16893
 
16894
    public void setFieldValue(_Fields field, Object value) {
16895
      switch (field) {
16896
      }
16897
    }
16898
 
16899
    public Object getFieldValue(_Fields field) {
16900
      switch (field) {
16901
      }
16902
      throw new IllegalStateException();
16903
    }
16904
 
16905
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16906
    public boolean isSet(_Fields field) {
16907
      if (field == null) {
16908
        throw new IllegalArgumentException();
16909
      }
16910
 
16911
      switch (field) {
16912
      }
16913
      throw new IllegalStateException();
16914
    }
16915
 
16916
    @Override
16917
    public boolean equals(Object that) {
16918
      if (that == null)
16919
        return false;
16920
      if (that instanceof settlePurchaseReturn_result)
16921
        return this.equals((settlePurchaseReturn_result)that);
16922
      return false;
16923
    }
16924
 
16925
    public boolean equals(settlePurchaseReturn_result that) {
16926
      if (that == null)
16927
        return false;
16928
 
16929
      return true;
16930
    }
16931
 
16932
    @Override
16933
    public int hashCode() {
16934
      return 0;
16935
    }
16936
 
16937
    public int compareTo(settlePurchaseReturn_result other) {
16938
      if (!getClass().equals(other.getClass())) {
16939
        return getClass().getName().compareTo(other.getClass().getName());
16940
      }
16941
 
16942
      int lastComparison = 0;
16943
      settlePurchaseReturn_result typedOther = (settlePurchaseReturn_result)other;
16944
 
16945
      return 0;
16946
    }
16947
 
16948
    public _Fields fieldForId(int fieldId) {
16949
      return _Fields.findByThriftId(fieldId);
16950
    }
16951
 
16952
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16953
      org.apache.thrift.protocol.TField field;
16954
      iprot.readStructBegin();
16955
      while (true)
16956
      {
16957
        field = iprot.readFieldBegin();
16958
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16959
          break;
16960
        }
16961
        switch (field.id) {
16962
          default:
16963
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16964
        }
16965
        iprot.readFieldEnd();
16966
      }
16967
      iprot.readStructEnd();
16968
      validate();
16969
    }
16970
 
16971
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16972
      oprot.writeStructBegin(STRUCT_DESC);
16973
 
16974
      oprot.writeFieldStop();
16975
      oprot.writeStructEnd();
16976
    }
16977
 
16978
    @Override
16979
    public String toString() {
16980
      StringBuilder sb = new StringBuilder("settlePurchaseReturn_result(");
16981
      boolean first = true;
16982
 
16983
      sb.append(")");
16984
      return sb.toString();
16985
    }
16986
 
16987
    public void validate() throws org.apache.thrift.TException {
16988
      // check for required fields
16989
    }
16990
 
16991
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16992
      try {
16993
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16994
      } catch (org.apache.thrift.TException te) {
16995
        throw new java.io.IOException(te);
16996
      }
16997
    }
16998
 
16999
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17000
      try {
17001
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17002
      } catch (org.apache.thrift.TException te) {
17003
        throw new java.io.IOException(te);
17004
      }
17005
    }
17006
 
17007
  }
17008
 
17009
  public static class getUnsettledPurchaseReturns_args implements org.apache.thrift.TBase<getUnsettledPurchaseReturns_args, getUnsettledPurchaseReturns_args._Fields>, java.io.Serializable, Cloneable   {
17010
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUnsettledPurchaseReturns_args");
17011
 
17012
 
17013
 
17014
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17015
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17016
;
17017
 
17018
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17019
 
17020
      static {
17021
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17022
          byName.put(field.getFieldName(), field);
17023
        }
17024
      }
17025
 
17026
      /**
17027
       * Find the _Fields constant that matches fieldId, or null if its not found.
17028
       */
17029
      public static _Fields findByThriftId(int fieldId) {
17030
        switch(fieldId) {
17031
          default:
17032
            return null;
17033
        }
17034
      }
17035
 
17036
      /**
17037
       * Find the _Fields constant that matches fieldId, throwing an exception
17038
       * if it is not found.
17039
       */
17040
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17041
        _Fields fields = findByThriftId(fieldId);
17042
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17043
        return fields;
17044
      }
17045
 
17046
      /**
17047
       * Find the _Fields constant that matches name, or null if its not found.
17048
       */
17049
      public static _Fields findByName(String name) {
17050
        return byName.get(name);
17051
      }
17052
 
17053
      private final short _thriftId;
17054
      private final String _fieldName;
17055
 
17056
      _Fields(short thriftId, String fieldName) {
17057
        _thriftId = thriftId;
17058
        _fieldName = fieldName;
17059
      }
17060
 
17061
      public short getThriftFieldId() {
17062
        return _thriftId;
17063
      }
17064
 
17065
      public String getFieldName() {
17066
        return _fieldName;
17067
      }
17068
    }
17069
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17070
    static {
17071
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17072
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17073
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUnsettledPurchaseReturns_args.class, metaDataMap);
17074
    }
17075
 
17076
    public getUnsettledPurchaseReturns_args() {
17077
    }
17078
 
17079
    /**
17080
     * Performs a deep copy on <i>other</i>.
17081
     */
17082
    public getUnsettledPurchaseReturns_args(getUnsettledPurchaseReturns_args other) {
17083
    }
17084
 
17085
    public getUnsettledPurchaseReturns_args deepCopy() {
17086
      return new getUnsettledPurchaseReturns_args(this);
17087
    }
17088
 
17089
    @Override
17090
    public void clear() {
17091
    }
17092
 
17093
    public void setFieldValue(_Fields field, Object value) {
17094
      switch (field) {
17095
      }
17096
    }
17097
 
17098
    public Object getFieldValue(_Fields field) {
17099
      switch (field) {
17100
      }
17101
      throw new IllegalStateException();
17102
    }
17103
 
17104
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17105
    public boolean isSet(_Fields field) {
17106
      if (field == null) {
17107
        throw new IllegalArgumentException();
17108
      }
17109
 
17110
      switch (field) {
17111
      }
17112
      throw new IllegalStateException();
17113
    }
17114
 
17115
    @Override
17116
    public boolean equals(Object that) {
17117
      if (that == null)
17118
        return false;
17119
      if (that instanceof getUnsettledPurchaseReturns_args)
17120
        return this.equals((getUnsettledPurchaseReturns_args)that);
17121
      return false;
17122
    }
17123
 
17124
    public boolean equals(getUnsettledPurchaseReturns_args that) {
17125
      if (that == null)
17126
        return false;
17127
 
17128
      return true;
17129
    }
17130
 
17131
    @Override
17132
    public int hashCode() {
17133
      return 0;
17134
    }
17135
 
17136
    public int compareTo(getUnsettledPurchaseReturns_args other) {
17137
      if (!getClass().equals(other.getClass())) {
17138
        return getClass().getName().compareTo(other.getClass().getName());
17139
      }
17140
 
17141
      int lastComparison = 0;
17142
      getUnsettledPurchaseReturns_args typedOther = (getUnsettledPurchaseReturns_args)other;
17143
 
17144
      return 0;
17145
    }
17146
 
17147
    public _Fields fieldForId(int fieldId) {
17148
      return _Fields.findByThriftId(fieldId);
17149
    }
17150
 
17151
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17152
      org.apache.thrift.protocol.TField field;
17153
      iprot.readStructBegin();
17154
      while (true)
17155
      {
17156
        field = iprot.readFieldBegin();
17157
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17158
          break;
17159
        }
17160
        switch (field.id) {
17161
          default:
17162
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17163
        }
17164
        iprot.readFieldEnd();
17165
      }
17166
      iprot.readStructEnd();
17167
      validate();
17168
    }
17169
 
17170
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17171
      validate();
17172
 
17173
      oprot.writeStructBegin(STRUCT_DESC);
17174
      oprot.writeFieldStop();
17175
      oprot.writeStructEnd();
17176
    }
17177
 
17178
    @Override
17179
    public String toString() {
17180
      StringBuilder sb = new StringBuilder("getUnsettledPurchaseReturns_args(");
17181
      boolean first = true;
17182
 
17183
      sb.append(")");
17184
      return sb.toString();
17185
    }
17186
 
17187
    public void validate() throws org.apache.thrift.TException {
17188
      // check for required fields
17189
    }
17190
 
17191
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17192
      try {
17193
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17194
      } catch (org.apache.thrift.TException te) {
17195
        throw new java.io.IOException(te);
17196
      }
17197
    }
17198
 
17199
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17200
      try {
17201
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17202
      } catch (org.apache.thrift.TException te) {
17203
        throw new java.io.IOException(te);
17204
      }
17205
    }
17206
 
17207
  }
17208
 
17209
  public static class getUnsettledPurchaseReturns_result implements org.apache.thrift.TBase<getUnsettledPurchaseReturns_result, getUnsettledPurchaseReturns_result._Fields>, java.io.Serializable, Cloneable   {
17210
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUnsettledPurchaseReturns_result");
17211
 
17212
    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);
17213
 
17214
    private List<PurchaseReturn> success; // required
17215
 
17216
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17217
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17218
      SUCCESS((short)0, "success");
17219
 
17220
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17221
 
17222
      static {
17223
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17224
          byName.put(field.getFieldName(), field);
17225
        }
17226
      }
17227
 
17228
      /**
17229
       * Find the _Fields constant that matches fieldId, or null if its not found.
17230
       */
17231
      public static _Fields findByThriftId(int fieldId) {
17232
        switch(fieldId) {
17233
          case 0: // SUCCESS
17234
            return SUCCESS;
17235
          default:
17236
            return null;
17237
        }
17238
      }
17239
 
17240
      /**
17241
       * Find the _Fields constant that matches fieldId, throwing an exception
17242
       * if it is not found.
17243
       */
17244
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17245
        _Fields fields = findByThriftId(fieldId);
17246
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17247
        return fields;
17248
      }
17249
 
17250
      /**
17251
       * Find the _Fields constant that matches name, or null if its not found.
17252
       */
17253
      public static _Fields findByName(String name) {
17254
        return byName.get(name);
17255
      }
17256
 
17257
      private final short _thriftId;
17258
      private final String _fieldName;
17259
 
17260
      _Fields(short thriftId, String fieldName) {
17261
        _thriftId = thriftId;
17262
        _fieldName = fieldName;
17263
      }
17264
 
17265
      public short getThriftFieldId() {
17266
        return _thriftId;
17267
      }
17268
 
17269
      public String getFieldName() {
17270
        return _fieldName;
17271
      }
17272
    }
17273
 
17274
    // isset id assignments
17275
 
17276
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17277
    static {
17278
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17279
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17280
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
17281
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class))));
17282
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17283
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUnsettledPurchaseReturns_result.class, metaDataMap);
17284
    }
17285
 
17286
    public getUnsettledPurchaseReturns_result() {
17287
    }
17288
 
17289
    public getUnsettledPurchaseReturns_result(
17290
      List<PurchaseReturn> success)
17291
    {
17292
      this();
17293
      this.success = success;
17294
    }
17295
 
17296
    /**
17297
     * Performs a deep copy on <i>other</i>.
17298
     */
17299
    public getUnsettledPurchaseReturns_result(getUnsettledPurchaseReturns_result other) {
17300
      if (other.isSetSuccess()) {
17301
        List<PurchaseReturn> __this__success = new ArrayList<PurchaseReturn>();
17302
        for (PurchaseReturn other_element : other.success) {
17303
          __this__success.add(new PurchaseReturn(other_element));
17304
        }
17305
        this.success = __this__success;
17306
      }
17307
    }
17308
 
17309
    public getUnsettledPurchaseReturns_result deepCopy() {
17310
      return new getUnsettledPurchaseReturns_result(this);
17311
    }
17312
 
17313
    @Override
17314
    public void clear() {
17315
      this.success = null;
17316
    }
17317
 
17318
    public int getSuccessSize() {
17319
      return (this.success == null) ? 0 : this.success.size();
17320
    }
17321
 
17322
    public java.util.Iterator<PurchaseReturn> getSuccessIterator() {
17323
      return (this.success == null) ? null : this.success.iterator();
17324
    }
17325
 
17326
    public void addToSuccess(PurchaseReturn elem) {
17327
      if (this.success == null) {
17328
        this.success = new ArrayList<PurchaseReturn>();
17329
      }
17330
      this.success.add(elem);
17331
    }
17332
 
17333
    public List<PurchaseReturn> getSuccess() {
17334
      return this.success;
17335
    }
17336
 
17337
    public void setSuccess(List<PurchaseReturn> success) {
17338
      this.success = success;
17339
    }
17340
 
17341
    public void unsetSuccess() {
17342
      this.success = null;
17343
    }
17344
 
17345
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
17346
    public boolean isSetSuccess() {
17347
      return this.success != null;
17348
    }
17349
 
17350
    public void setSuccessIsSet(boolean value) {
17351
      if (!value) {
17352
        this.success = null;
17353
      }
17354
    }
17355
 
17356
    public void setFieldValue(_Fields field, Object value) {
17357
      switch (field) {
17358
      case SUCCESS:
17359
        if (value == null) {
17360
          unsetSuccess();
17361
        } else {
17362
          setSuccess((List<PurchaseReturn>)value);
17363
        }
17364
        break;
17365
 
17366
      }
17367
    }
17368
 
17369
    public Object getFieldValue(_Fields field) {
17370
      switch (field) {
17371
      case SUCCESS:
17372
        return getSuccess();
17373
 
17374
      }
17375
      throw new IllegalStateException();
17376
    }
17377
 
17378
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17379
    public boolean isSet(_Fields field) {
17380
      if (field == null) {
17381
        throw new IllegalArgumentException();
17382
      }
17383
 
17384
      switch (field) {
17385
      case SUCCESS:
17386
        return isSetSuccess();
17387
      }
17388
      throw new IllegalStateException();
17389
    }
17390
 
17391
    @Override
17392
    public boolean equals(Object that) {
17393
      if (that == null)
17394
        return false;
17395
      if (that instanceof getUnsettledPurchaseReturns_result)
17396
        return this.equals((getUnsettledPurchaseReturns_result)that);
17397
      return false;
17398
    }
17399
 
17400
    public boolean equals(getUnsettledPurchaseReturns_result that) {
17401
      if (that == null)
17402
        return false;
17403
 
17404
      boolean this_present_success = true && this.isSetSuccess();
17405
      boolean that_present_success = true && that.isSetSuccess();
17406
      if (this_present_success || that_present_success) {
17407
        if (!(this_present_success && that_present_success))
17408
          return false;
17409
        if (!this.success.equals(that.success))
17410
          return false;
17411
      }
17412
 
17413
      return true;
17414
    }
17415
 
17416
    @Override
17417
    public int hashCode() {
17418
      return 0;
17419
    }
17420
 
17421
    public int compareTo(getUnsettledPurchaseReturns_result other) {
17422
      if (!getClass().equals(other.getClass())) {
17423
        return getClass().getName().compareTo(other.getClass().getName());
17424
      }
17425
 
17426
      int lastComparison = 0;
17427
      getUnsettledPurchaseReturns_result typedOther = (getUnsettledPurchaseReturns_result)other;
17428
 
17429
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
17430
      if (lastComparison != 0) {
17431
        return lastComparison;
17432
      }
17433
      if (isSetSuccess()) {
17434
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
17435
        if (lastComparison != 0) {
17436
          return lastComparison;
17437
        }
17438
      }
17439
      return 0;
17440
    }
17441
 
17442
    public _Fields fieldForId(int fieldId) {
17443
      return _Fields.findByThriftId(fieldId);
17444
    }
17445
 
17446
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17447
      org.apache.thrift.protocol.TField field;
17448
      iprot.readStructBegin();
17449
      while (true)
17450
      {
17451
        field = iprot.readFieldBegin();
17452
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17453
          break;
17454
        }
17455
        switch (field.id) {
17456
          case 0: // SUCCESS
17457
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
17458
              {
7410 amar.kumar 17459
                org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
17460
                this.success = new ArrayList<PurchaseReturn>(_list32.size);
17461
                for (int _i33 = 0; _i33 < _list32.size; ++_i33)
6467 amar.kumar 17462
                {
7410 amar.kumar 17463
                  PurchaseReturn _elem34; // required
17464
                  _elem34 = new PurchaseReturn();
17465
                  _elem34.read(iprot);
17466
                  this.success.add(_elem34);
6467 amar.kumar 17467
                }
17468
                iprot.readListEnd();
17469
              }
17470
            } else { 
17471
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17472
            }
17473
            break;
17474
          default:
17475
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17476
        }
17477
        iprot.readFieldEnd();
17478
      }
17479
      iprot.readStructEnd();
17480
      validate();
17481
    }
17482
 
17483
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17484
      oprot.writeStructBegin(STRUCT_DESC);
17485
 
17486
      if (this.isSetSuccess()) {
17487
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17488
        {
17489
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7410 amar.kumar 17490
          for (PurchaseReturn _iter35 : this.success)
6467 amar.kumar 17491
          {
7410 amar.kumar 17492
            _iter35.write(oprot);
6467 amar.kumar 17493
          }
17494
          oprot.writeListEnd();
17495
        }
17496
        oprot.writeFieldEnd();
17497
      }
17498
      oprot.writeFieldStop();
17499
      oprot.writeStructEnd();
17500
    }
17501
 
17502
    @Override
17503
    public String toString() {
17504
      StringBuilder sb = new StringBuilder("getUnsettledPurchaseReturns_result(");
17505
      boolean first = true;
17506
 
17507
      sb.append("success:");
17508
      if (this.success == null) {
17509
        sb.append("null");
17510
      } else {
17511
        sb.append(this.success);
17512
      }
17513
      first = false;
17514
      sb.append(")");
17515
      return sb.toString();
17516
    }
17517
 
17518
    public void validate() throws org.apache.thrift.TException {
17519
      // check for required fields
17520
    }
17521
 
17522
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17523
      try {
17524
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17525
      } catch (org.apache.thrift.TException te) {
17526
        throw new java.io.IOException(te);
17527
      }
17528
    }
17529
 
17530
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17531
      try {
17532
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17533
      } catch (org.apache.thrift.TException te) {
17534
        throw new java.io.IOException(te);
17535
      }
17536
    }
17537
 
17538
  }
17539
 
6630 amar.kumar 17540
  public static class getInvoice_args implements org.apache.thrift.TBase<getInvoice_args, getInvoice_args._Fields>, java.io.Serializable, Cloneable   {
17541
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoice_args");
17542
 
17543
    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);
17544
    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);
17545
 
17546
    private String invoiceNumber; // required
17547
    private long supplierId; // required
17548
 
17549
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17550
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17551
      INVOICE_NUMBER((short)1, "invoiceNumber"),
17552
      SUPPLIER_ID((short)2, "supplierId");
17553
 
17554
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17555
 
17556
      static {
17557
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17558
          byName.put(field.getFieldName(), field);
17559
        }
17560
      }
17561
 
17562
      /**
17563
       * Find the _Fields constant that matches fieldId, or null if its not found.
17564
       */
17565
      public static _Fields findByThriftId(int fieldId) {
17566
        switch(fieldId) {
17567
          case 1: // INVOICE_NUMBER
17568
            return INVOICE_NUMBER;
17569
          case 2: // SUPPLIER_ID
17570
            return SUPPLIER_ID;
17571
          default:
17572
            return null;
17573
        }
17574
      }
17575
 
17576
      /**
17577
       * Find the _Fields constant that matches fieldId, throwing an exception
17578
       * if it is not found.
17579
       */
17580
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17581
        _Fields fields = findByThriftId(fieldId);
17582
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17583
        return fields;
17584
      }
17585
 
17586
      /**
17587
       * Find the _Fields constant that matches name, or null if its not found.
17588
       */
17589
      public static _Fields findByName(String name) {
17590
        return byName.get(name);
17591
      }
17592
 
17593
      private final short _thriftId;
17594
      private final String _fieldName;
17595
 
17596
      _Fields(short thriftId, String fieldName) {
17597
        _thriftId = thriftId;
17598
        _fieldName = fieldName;
17599
      }
17600
 
17601
      public short getThriftFieldId() {
17602
        return _thriftId;
17603
      }
17604
 
17605
      public String getFieldName() {
17606
        return _fieldName;
17607
      }
17608
    }
17609
 
17610
    // isset id assignments
17611
    private static final int __SUPPLIERID_ISSET_ID = 0;
17612
    private BitSet __isset_bit_vector = new BitSet(1);
17613
 
17614
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17615
    static {
17616
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17617
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17618
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
17619
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17620
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
17621
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17622
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoice_args.class, metaDataMap);
17623
    }
17624
 
17625
    public getInvoice_args() {
17626
    }
17627
 
17628
    public getInvoice_args(
17629
      String invoiceNumber,
17630
      long supplierId)
17631
    {
17632
      this();
17633
      this.invoiceNumber = invoiceNumber;
17634
      this.supplierId = supplierId;
17635
      setSupplierIdIsSet(true);
17636
    }
17637
 
17638
    /**
17639
     * Performs a deep copy on <i>other</i>.
17640
     */
17641
    public getInvoice_args(getInvoice_args other) {
17642
      __isset_bit_vector.clear();
17643
      __isset_bit_vector.or(other.__isset_bit_vector);
17644
      if (other.isSetInvoiceNumber()) {
17645
        this.invoiceNumber = other.invoiceNumber;
17646
      }
17647
      this.supplierId = other.supplierId;
17648
    }
17649
 
17650
    public getInvoice_args deepCopy() {
17651
      return new getInvoice_args(this);
17652
    }
17653
 
17654
    @Override
17655
    public void clear() {
17656
      this.invoiceNumber = null;
17657
      setSupplierIdIsSet(false);
17658
      this.supplierId = 0;
17659
    }
17660
 
17661
    public String getInvoiceNumber() {
17662
      return this.invoiceNumber;
17663
    }
17664
 
17665
    public void setInvoiceNumber(String invoiceNumber) {
17666
      this.invoiceNumber = invoiceNumber;
17667
    }
17668
 
17669
    public void unsetInvoiceNumber() {
17670
      this.invoiceNumber = null;
17671
    }
17672
 
17673
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
17674
    public boolean isSetInvoiceNumber() {
17675
      return this.invoiceNumber != null;
17676
    }
17677
 
17678
    public void setInvoiceNumberIsSet(boolean value) {
17679
      if (!value) {
17680
        this.invoiceNumber = null;
17681
      }
17682
    }
17683
 
17684
    public long getSupplierId() {
17685
      return this.supplierId;
17686
    }
17687
 
17688
    public void setSupplierId(long supplierId) {
17689
      this.supplierId = supplierId;
17690
      setSupplierIdIsSet(true);
17691
    }
17692
 
17693
    public void unsetSupplierId() {
17694
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
17695
    }
17696
 
17697
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
17698
    public boolean isSetSupplierId() {
17699
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
17700
    }
17701
 
17702
    public void setSupplierIdIsSet(boolean value) {
17703
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
17704
    }
17705
 
17706
    public void setFieldValue(_Fields field, Object value) {
17707
      switch (field) {
17708
      case INVOICE_NUMBER:
17709
        if (value == null) {
17710
          unsetInvoiceNumber();
17711
        } else {
17712
          setInvoiceNumber((String)value);
17713
        }
17714
        break;
17715
 
17716
      case SUPPLIER_ID:
17717
        if (value == null) {
17718
          unsetSupplierId();
17719
        } else {
17720
          setSupplierId((Long)value);
17721
        }
17722
        break;
17723
 
17724
      }
17725
    }
17726
 
17727
    public Object getFieldValue(_Fields field) {
17728
      switch (field) {
17729
      case INVOICE_NUMBER:
17730
        return getInvoiceNumber();
17731
 
17732
      case SUPPLIER_ID:
17733
        return Long.valueOf(getSupplierId());
17734
 
17735
      }
17736
      throw new IllegalStateException();
17737
    }
17738
 
17739
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17740
    public boolean isSet(_Fields field) {
17741
      if (field == null) {
17742
        throw new IllegalArgumentException();
17743
      }
17744
 
17745
      switch (field) {
17746
      case INVOICE_NUMBER:
17747
        return isSetInvoiceNumber();
17748
      case SUPPLIER_ID:
17749
        return isSetSupplierId();
17750
      }
17751
      throw new IllegalStateException();
17752
    }
17753
 
17754
    @Override
17755
    public boolean equals(Object that) {
17756
      if (that == null)
17757
        return false;
17758
      if (that instanceof getInvoice_args)
17759
        return this.equals((getInvoice_args)that);
17760
      return false;
17761
    }
17762
 
17763
    public boolean equals(getInvoice_args that) {
17764
      if (that == null)
17765
        return false;
17766
 
17767
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
17768
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
17769
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
17770
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
17771
          return false;
17772
        if (!this.invoiceNumber.equals(that.invoiceNumber))
17773
          return false;
17774
      }
17775
 
17776
      boolean this_present_supplierId = true;
17777
      boolean that_present_supplierId = true;
17778
      if (this_present_supplierId || that_present_supplierId) {
17779
        if (!(this_present_supplierId && that_present_supplierId))
17780
          return false;
17781
        if (this.supplierId != that.supplierId)
17782
          return false;
17783
      }
17784
 
17785
      return true;
17786
    }
17787
 
17788
    @Override
17789
    public int hashCode() {
17790
      return 0;
17791
    }
17792
 
17793
    public int compareTo(getInvoice_args other) {
17794
      if (!getClass().equals(other.getClass())) {
17795
        return getClass().getName().compareTo(other.getClass().getName());
17796
      }
17797
 
17798
      int lastComparison = 0;
17799
      getInvoice_args typedOther = (getInvoice_args)other;
17800
 
17801
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
17802
      if (lastComparison != 0) {
17803
        return lastComparison;
17804
      }
17805
      if (isSetInvoiceNumber()) {
17806
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
17807
        if (lastComparison != 0) {
17808
          return lastComparison;
17809
        }
17810
      }
17811
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
17812
      if (lastComparison != 0) {
17813
        return lastComparison;
17814
      }
17815
      if (isSetSupplierId()) {
17816
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
17817
        if (lastComparison != 0) {
17818
          return lastComparison;
17819
        }
17820
      }
17821
      return 0;
17822
    }
17823
 
17824
    public _Fields fieldForId(int fieldId) {
17825
      return _Fields.findByThriftId(fieldId);
17826
    }
17827
 
17828
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17829
      org.apache.thrift.protocol.TField field;
17830
      iprot.readStructBegin();
17831
      while (true)
17832
      {
17833
        field = iprot.readFieldBegin();
17834
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17835
          break;
17836
        }
17837
        switch (field.id) {
17838
          case 1: // INVOICE_NUMBER
17839
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
17840
              this.invoiceNumber = iprot.readString();
17841
            } else { 
17842
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17843
            }
17844
            break;
17845
          case 2: // SUPPLIER_ID
17846
            if (field.type == org.apache.thrift.protocol.TType.I64) {
17847
              this.supplierId = iprot.readI64();
17848
              setSupplierIdIsSet(true);
17849
            } else { 
17850
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17851
            }
17852
            break;
17853
          default:
17854
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17855
        }
17856
        iprot.readFieldEnd();
17857
      }
17858
      iprot.readStructEnd();
17859
      validate();
17860
    }
17861
 
17862
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17863
      validate();
17864
 
17865
      oprot.writeStructBegin(STRUCT_DESC);
17866
      if (this.invoiceNumber != null) {
17867
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
17868
        oprot.writeString(this.invoiceNumber);
17869
        oprot.writeFieldEnd();
17870
      }
17871
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
17872
      oprot.writeI64(this.supplierId);
17873
      oprot.writeFieldEnd();
17874
      oprot.writeFieldStop();
17875
      oprot.writeStructEnd();
17876
    }
17877
 
17878
    @Override
17879
    public String toString() {
17880
      StringBuilder sb = new StringBuilder("getInvoice_args(");
17881
      boolean first = true;
17882
 
17883
      sb.append("invoiceNumber:");
17884
      if (this.invoiceNumber == null) {
17885
        sb.append("null");
17886
      } else {
17887
        sb.append(this.invoiceNumber);
17888
      }
17889
      first = false;
17890
      if (!first) sb.append(", ");
17891
      sb.append("supplierId:");
17892
      sb.append(this.supplierId);
17893
      first = false;
17894
      sb.append(")");
17895
      return sb.toString();
17896
    }
17897
 
17898
    public void validate() throws org.apache.thrift.TException {
17899
      // check for required fields
17900
    }
17901
 
17902
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17903
      try {
17904
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17905
      } catch (org.apache.thrift.TException te) {
17906
        throw new java.io.IOException(te);
17907
      }
17908
    }
17909
 
17910
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17911
      try {
17912
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17913
      } catch (org.apache.thrift.TException te) {
17914
        throw new java.io.IOException(te);
17915
      }
17916
    }
17917
 
17918
  }
17919
 
17920
  public static class getInvoice_result implements org.apache.thrift.TBase<getInvoice_result, getInvoice_result._Fields>, java.io.Serializable, Cloneable   {
17921
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoice_result");
17922
 
17923
    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);
17924
 
17925
    private List<PurchaseReturn> success; // required
17926
 
17927
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17928
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17929
      SUCCESS((short)0, "success");
17930
 
17931
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17932
 
17933
      static {
17934
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17935
          byName.put(field.getFieldName(), field);
17936
        }
17937
      }
17938
 
17939
      /**
17940
       * Find the _Fields constant that matches fieldId, or null if its not found.
17941
       */
17942
      public static _Fields findByThriftId(int fieldId) {
17943
        switch(fieldId) {
17944
          case 0: // SUCCESS
17945
            return SUCCESS;
17946
          default:
17947
            return null;
17948
        }
17949
      }
17950
 
17951
      /**
17952
       * Find the _Fields constant that matches fieldId, throwing an exception
17953
       * if it is not found.
17954
       */
17955
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17956
        _Fields fields = findByThriftId(fieldId);
17957
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17958
        return fields;
17959
      }
17960
 
17961
      /**
17962
       * Find the _Fields constant that matches name, or null if its not found.
17963
       */
17964
      public static _Fields findByName(String name) {
17965
        return byName.get(name);
17966
      }
17967
 
17968
      private final short _thriftId;
17969
      private final String _fieldName;
17970
 
17971
      _Fields(short thriftId, String fieldName) {
17972
        _thriftId = thriftId;
17973
        _fieldName = fieldName;
17974
      }
17975
 
17976
      public short getThriftFieldId() {
17977
        return _thriftId;
17978
      }
17979
 
17980
      public String getFieldName() {
17981
        return _fieldName;
17982
      }
17983
    }
17984
 
17985
    // isset id assignments
17986
 
17987
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17988
    static {
17989
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17990
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17991
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
17992
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class))));
17993
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17994
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoice_result.class, metaDataMap);
17995
    }
17996
 
17997
    public getInvoice_result() {
17998
    }
17999
 
18000
    public getInvoice_result(
18001
      List<PurchaseReturn> success)
18002
    {
18003
      this();
18004
      this.success = success;
18005
    }
18006
 
18007
    /**
18008
     * Performs a deep copy on <i>other</i>.
18009
     */
18010
    public getInvoice_result(getInvoice_result other) {
18011
      if (other.isSetSuccess()) {
18012
        List<PurchaseReturn> __this__success = new ArrayList<PurchaseReturn>();
18013
        for (PurchaseReturn other_element : other.success) {
18014
          __this__success.add(new PurchaseReturn(other_element));
18015
        }
18016
        this.success = __this__success;
18017
      }
18018
    }
18019
 
18020
    public getInvoice_result deepCopy() {
18021
      return new getInvoice_result(this);
18022
    }
18023
 
18024
    @Override
18025
    public void clear() {
18026
      this.success = null;
18027
    }
18028
 
18029
    public int getSuccessSize() {
18030
      return (this.success == null) ? 0 : this.success.size();
18031
    }
18032
 
18033
    public java.util.Iterator<PurchaseReturn> getSuccessIterator() {
18034
      return (this.success == null) ? null : this.success.iterator();
18035
    }
18036
 
18037
    public void addToSuccess(PurchaseReturn elem) {
18038
      if (this.success == null) {
18039
        this.success = new ArrayList<PurchaseReturn>();
18040
      }
18041
      this.success.add(elem);
18042
    }
18043
 
18044
    public List<PurchaseReturn> getSuccess() {
18045
      return this.success;
18046
    }
18047
 
18048
    public void setSuccess(List<PurchaseReturn> success) {
18049
      this.success = success;
18050
    }
18051
 
18052
    public void unsetSuccess() {
18053
      this.success = null;
18054
    }
18055
 
18056
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
18057
    public boolean isSetSuccess() {
18058
      return this.success != null;
18059
    }
18060
 
18061
    public void setSuccessIsSet(boolean value) {
18062
      if (!value) {
18063
        this.success = null;
18064
      }
18065
    }
18066
 
18067
    public void setFieldValue(_Fields field, Object value) {
18068
      switch (field) {
18069
      case SUCCESS:
18070
        if (value == null) {
18071
          unsetSuccess();
18072
        } else {
18073
          setSuccess((List<PurchaseReturn>)value);
18074
        }
18075
        break;
18076
 
18077
      }
18078
    }
18079
 
18080
    public Object getFieldValue(_Fields field) {
18081
      switch (field) {
18082
      case SUCCESS:
18083
        return getSuccess();
18084
 
18085
      }
18086
      throw new IllegalStateException();
18087
    }
18088
 
18089
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18090
    public boolean isSet(_Fields field) {
18091
      if (field == null) {
18092
        throw new IllegalArgumentException();
18093
      }
18094
 
18095
      switch (field) {
18096
      case SUCCESS:
18097
        return isSetSuccess();
18098
      }
18099
      throw new IllegalStateException();
18100
    }
18101
 
18102
    @Override
18103
    public boolean equals(Object that) {
18104
      if (that == null)
18105
        return false;
18106
      if (that instanceof getInvoice_result)
18107
        return this.equals((getInvoice_result)that);
18108
      return false;
18109
    }
18110
 
18111
    public boolean equals(getInvoice_result that) {
18112
      if (that == null)
18113
        return false;
18114
 
18115
      boolean this_present_success = true && this.isSetSuccess();
18116
      boolean that_present_success = true && that.isSetSuccess();
18117
      if (this_present_success || that_present_success) {
18118
        if (!(this_present_success && that_present_success))
18119
          return false;
18120
        if (!this.success.equals(that.success))
18121
          return false;
18122
      }
18123
 
18124
      return true;
18125
    }
18126
 
18127
    @Override
18128
    public int hashCode() {
18129
      return 0;
18130
    }
18131
 
18132
    public int compareTo(getInvoice_result other) {
18133
      if (!getClass().equals(other.getClass())) {
18134
        return getClass().getName().compareTo(other.getClass().getName());
18135
      }
18136
 
18137
      int lastComparison = 0;
18138
      getInvoice_result typedOther = (getInvoice_result)other;
18139
 
18140
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
18141
      if (lastComparison != 0) {
18142
        return lastComparison;
18143
      }
18144
      if (isSetSuccess()) {
18145
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
18146
        if (lastComparison != 0) {
18147
          return lastComparison;
18148
        }
18149
      }
18150
      return 0;
18151
    }
18152
 
18153
    public _Fields fieldForId(int fieldId) {
18154
      return _Fields.findByThriftId(fieldId);
18155
    }
18156
 
18157
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18158
      org.apache.thrift.protocol.TField field;
18159
      iprot.readStructBegin();
18160
      while (true)
18161
      {
18162
        field = iprot.readFieldBegin();
18163
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18164
          break;
18165
        }
18166
        switch (field.id) {
18167
          case 0: // SUCCESS
18168
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
18169
              {
7410 amar.kumar 18170
                org.apache.thrift.protocol.TList _list36 = iprot.readListBegin();
18171
                this.success = new ArrayList<PurchaseReturn>(_list36.size);
18172
                for (int _i37 = 0; _i37 < _list36.size; ++_i37)
6630 amar.kumar 18173
                {
7410 amar.kumar 18174
                  PurchaseReturn _elem38; // required
18175
                  _elem38 = new PurchaseReturn();
18176
                  _elem38.read(iprot);
18177
                  this.success.add(_elem38);
6630 amar.kumar 18178
                }
18179
                iprot.readListEnd();
18180
              }
18181
            } else { 
18182
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18183
            }
18184
            break;
18185
          default:
18186
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18187
        }
18188
        iprot.readFieldEnd();
18189
      }
18190
      iprot.readStructEnd();
18191
      validate();
18192
    }
18193
 
18194
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18195
      oprot.writeStructBegin(STRUCT_DESC);
18196
 
18197
      if (this.isSetSuccess()) {
18198
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18199
        {
18200
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7410 amar.kumar 18201
          for (PurchaseReturn _iter39 : this.success)
6630 amar.kumar 18202
          {
7410 amar.kumar 18203
            _iter39.write(oprot);
6630 amar.kumar 18204
          }
18205
          oprot.writeListEnd();
18206
        }
18207
        oprot.writeFieldEnd();
18208
      }
18209
      oprot.writeFieldStop();
18210
      oprot.writeStructEnd();
18211
    }
18212
 
18213
    @Override
18214
    public String toString() {
18215
      StringBuilder sb = new StringBuilder("getInvoice_result(");
18216
      boolean first = true;
18217
 
18218
      sb.append("success:");
18219
      if (this.success == null) {
18220
        sb.append("null");
18221
      } else {
18222
        sb.append(this.success);
18223
      }
18224
      first = false;
18225
      sb.append(")");
18226
      return sb.toString();
18227
    }
18228
 
18229
    public void validate() throws org.apache.thrift.TException {
18230
      // check for required fields
18231
    }
18232
 
18233
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18234
      try {
18235
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18236
      } catch (org.apache.thrift.TException te) {
18237
        throw new java.io.IOException(te);
18238
      }
18239
    }
18240
 
18241
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18242
      try {
18243
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18244
      } catch (org.apache.thrift.TException te) {
18245
        throw new java.io.IOException(te);
18246
      }
18247
    }
18248
 
18249
  }
18250
 
6762 amar.kumar 18251
  public static class createPurchaseForOurExtBilling_args implements org.apache.thrift.TBase<createPurchaseForOurExtBilling_args, createPurchaseForOurExtBilling_args._Fields>, java.io.Serializable, Cloneable   {
18252
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseForOurExtBilling_args");
18253
 
18254
    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);
18255
    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 18256
    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);
18257
    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 18258
 
18259
    private String invoiceNumber; // required
18260
    private double unitPrice; // required
7672 rajveer 18261
    private double nlc; // required
6762 amar.kumar 18262
    private long itemId; // required
18263
 
18264
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18265
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18266
      INVOICE_NUMBER((short)1, "invoiceNumber"),
18267
      UNIT_PRICE((short)2, "unitPrice"),
7672 rajveer 18268
      NLC((short)3, "nlc"),
18269
      ITEM_ID((short)4, "itemId");
6762 amar.kumar 18270
 
18271
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18272
 
18273
      static {
18274
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18275
          byName.put(field.getFieldName(), field);
18276
        }
18277
      }
18278
 
18279
      /**
18280
       * Find the _Fields constant that matches fieldId, or null if its not found.
18281
       */
18282
      public static _Fields findByThriftId(int fieldId) {
18283
        switch(fieldId) {
18284
          case 1: // INVOICE_NUMBER
18285
            return INVOICE_NUMBER;
18286
          case 2: // UNIT_PRICE
18287
            return UNIT_PRICE;
7672 rajveer 18288
          case 3: // NLC
18289
            return NLC;
18290
          case 4: // ITEM_ID
6762 amar.kumar 18291
            return ITEM_ID;
18292
          default:
18293
            return null;
18294
        }
18295
      }
18296
 
18297
      /**
18298
       * Find the _Fields constant that matches fieldId, throwing an exception
18299
       * if it is not found.
18300
       */
18301
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18302
        _Fields fields = findByThriftId(fieldId);
18303
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18304
        return fields;
18305
      }
18306
 
18307
      /**
18308
       * Find the _Fields constant that matches name, or null if its not found.
18309
       */
18310
      public static _Fields findByName(String name) {
18311
        return byName.get(name);
18312
      }
18313
 
18314
      private final short _thriftId;
18315
      private final String _fieldName;
18316
 
18317
      _Fields(short thriftId, String fieldName) {
18318
        _thriftId = thriftId;
18319
        _fieldName = fieldName;
18320
      }
18321
 
18322
      public short getThriftFieldId() {
18323
        return _thriftId;
18324
      }
18325
 
18326
      public String getFieldName() {
18327
        return _fieldName;
18328
      }
18329
    }
18330
 
18331
    // isset id assignments
18332
    private static final int __UNITPRICE_ISSET_ID = 0;
7672 rajveer 18333
    private static final int __NLC_ISSET_ID = 1;
18334
    private static final int __ITEMID_ISSET_ID = 2;
18335
    private BitSet __isset_bit_vector = new BitSet(3);
6762 amar.kumar 18336
 
18337
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18338
    static {
18339
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18340
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18341
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
18342
      tmpMap.put(_Fields.UNIT_PRICE, new org.apache.thrift.meta_data.FieldMetaData("unitPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18343
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
7672 rajveer 18344
      tmpMap.put(_Fields.NLC, new org.apache.thrift.meta_data.FieldMetaData("nlc", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18345
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
6762 amar.kumar 18346
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18347
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18348
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18349
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseForOurExtBilling_args.class, metaDataMap);
18350
    }
18351
 
18352
    public createPurchaseForOurExtBilling_args() {
18353
    }
18354
 
18355
    public createPurchaseForOurExtBilling_args(
18356
      String invoiceNumber,
18357
      double unitPrice,
7672 rajveer 18358
      double nlc,
6762 amar.kumar 18359
      long itemId)
18360
    {
18361
      this();
18362
      this.invoiceNumber = invoiceNumber;
18363
      this.unitPrice = unitPrice;
18364
      setUnitPriceIsSet(true);
7672 rajveer 18365
      this.nlc = nlc;
18366
      setNlcIsSet(true);
6762 amar.kumar 18367
      this.itemId = itemId;
18368
      setItemIdIsSet(true);
18369
    }
18370
 
18371
    /**
18372
     * Performs a deep copy on <i>other</i>.
18373
     */
18374
    public createPurchaseForOurExtBilling_args(createPurchaseForOurExtBilling_args other) {
18375
      __isset_bit_vector.clear();
18376
      __isset_bit_vector.or(other.__isset_bit_vector);
18377
      if (other.isSetInvoiceNumber()) {
18378
        this.invoiceNumber = other.invoiceNumber;
18379
      }
18380
      this.unitPrice = other.unitPrice;
7672 rajveer 18381
      this.nlc = other.nlc;
6762 amar.kumar 18382
      this.itemId = other.itemId;
18383
    }
18384
 
18385
    public createPurchaseForOurExtBilling_args deepCopy() {
18386
      return new createPurchaseForOurExtBilling_args(this);
18387
    }
18388
 
18389
    @Override
18390
    public void clear() {
18391
      this.invoiceNumber = null;
18392
      setUnitPriceIsSet(false);
18393
      this.unitPrice = 0.0;
7672 rajveer 18394
      setNlcIsSet(false);
18395
      this.nlc = 0.0;
6762 amar.kumar 18396
      setItemIdIsSet(false);
18397
      this.itemId = 0;
18398
    }
18399
 
18400
    public String getInvoiceNumber() {
18401
      return this.invoiceNumber;
18402
    }
18403
 
18404
    public void setInvoiceNumber(String invoiceNumber) {
18405
      this.invoiceNumber = invoiceNumber;
18406
    }
18407
 
18408
    public void unsetInvoiceNumber() {
18409
      this.invoiceNumber = null;
18410
    }
18411
 
18412
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
18413
    public boolean isSetInvoiceNumber() {
18414
      return this.invoiceNumber != null;
18415
    }
18416
 
18417
    public void setInvoiceNumberIsSet(boolean value) {
18418
      if (!value) {
18419
        this.invoiceNumber = null;
18420
      }
18421
    }
18422
 
18423
    public double getUnitPrice() {
18424
      return this.unitPrice;
18425
    }
18426
 
18427
    public void setUnitPrice(double unitPrice) {
18428
      this.unitPrice = unitPrice;
18429
      setUnitPriceIsSet(true);
18430
    }
18431
 
18432
    public void unsetUnitPrice() {
18433
      __isset_bit_vector.clear(__UNITPRICE_ISSET_ID);
18434
    }
18435
 
18436
    /** Returns true if field unitPrice is set (has been assigned a value) and false otherwise */
18437
    public boolean isSetUnitPrice() {
18438
      return __isset_bit_vector.get(__UNITPRICE_ISSET_ID);
18439
    }
18440
 
18441
    public void setUnitPriceIsSet(boolean value) {
18442
      __isset_bit_vector.set(__UNITPRICE_ISSET_ID, value);
18443
    }
18444
 
7672 rajveer 18445
    public double getNlc() {
18446
      return this.nlc;
18447
    }
18448
 
18449
    public void setNlc(double nlc) {
18450
      this.nlc = nlc;
18451
      setNlcIsSet(true);
18452
    }
18453
 
18454
    public void unsetNlc() {
18455
      __isset_bit_vector.clear(__NLC_ISSET_ID);
18456
    }
18457
 
18458
    /** Returns true if field nlc is set (has been assigned a value) and false otherwise */
18459
    public boolean isSetNlc() {
18460
      return __isset_bit_vector.get(__NLC_ISSET_ID);
18461
    }
18462
 
18463
    public void setNlcIsSet(boolean value) {
18464
      __isset_bit_vector.set(__NLC_ISSET_ID, value);
18465
    }
18466
 
6762 amar.kumar 18467
    public long getItemId() {
18468
      return this.itemId;
18469
    }
18470
 
18471
    public void setItemId(long itemId) {
18472
      this.itemId = itemId;
18473
      setItemIdIsSet(true);
18474
    }
18475
 
18476
    public void unsetItemId() {
18477
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
18478
    }
18479
 
18480
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
18481
    public boolean isSetItemId() {
18482
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
18483
    }
18484
 
18485
    public void setItemIdIsSet(boolean value) {
18486
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
18487
    }
18488
 
18489
    public void setFieldValue(_Fields field, Object value) {
18490
      switch (field) {
18491
      case INVOICE_NUMBER:
18492
        if (value == null) {
18493
          unsetInvoiceNumber();
18494
        } else {
18495
          setInvoiceNumber((String)value);
18496
        }
18497
        break;
18498
 
18499
      case UNIT_PRICE:
18500
        if (value == null) {
18501
          unsetUnitPrice();
18502
        } else {
18503
          setUnitPrice((Double)value);
18504
        }
18505
        break;
18506
 
7672 rajveer 18507
      case NLC:
18508
        if (value == null) {
18509
          unsetNlc();
18510
        } else {
18511
          setNlc((Double)value);
18512
        }
18513
        break;
18514
 
6762 amar.kumar 18515
      case ITEM_ID:
18516
        if (value == null) {
18517
          unsetItemId();
18518
        } else {
18519
          setItemId((Long)value);
18520
        }
18521
        break;
18522
 
18523
      }
18524
    }
18525
 
18526
    public Object getFieldValue(_Fields field) {
18527
      switch (field) {
18528
      case INVOICE_NUMBER:
18529
        return getInvoiceNumber();
18530
 
18531
      case UNIT_PRICE:
18532
        return Double.valueOf(getUnitPrice());
18533
 
7672 rajveer 18534
      case NLC:
18535
        return Double.valueOf(getNlc());
18536
 
6762 amar.kumar 18537
      case ITEM_ID:
18538
        return Long.valueOf(getItemId());
18539
 
18540
      }
18541
      throw new IllegalStateException();
18542
    }
18543
 
18544
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18545
    public boolean isSet(_Fields field) {
18546
      if (field == null) {
18547
        throw new IllegalArgumentException();
18548
      }
18549
 
18550
      switch (field) {
18551
      case INVOICE_NUMBER:
18552
        return isSetInvoiceNumber();
18553
      case UNIT_PRICE:
18554
        return isSetUnitPrice();
7672 rajveer 18555
      case NLC:
18556
        return isSetNlc();
6762 amar.kumar 18557
      case ITEM_ID:
18558
        return isSetItemId();
18559
      }
18560
      throw new IllegalStateException();
18561
    }
18562
 
18563
    @Override
18564
    public boolean equals(Object that) {
18565
      if (that == null)
18566
        return false;
18567
      if (that instanceof createPurchaseForOurExtBilling_args)
18568
        return this.equals((createPurchaseForOurExtBilling_args)that);
18569
      return false;
18570
    }
18571
 
18572
    public boolean equals(createPurchaseForOurExtBilling_args that) {
18573
      if (that == null)
18574
        return false;
18575
 
18576
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
18577
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
18578
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
18579
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
18580
          return false;
18581
        if (!this.invoiceNumber.equals(that.invoiceNumber))
18582
          return false;
18583
      }
18584
 
18585
      boolean this_present_unitPrice = true;
18586
      boolean that_present_unitPrice = true;
18587
      if (this_present_unitPrice || that_present_unitPrice) {
18588
        if (!(this_present_unitPrice && that_present_unitPrice))
18589
          return false;
18590
        if (this.unitPrice != that.unitPrice)
18591
          return false;
18592
      }
18593
 
7672 rajveer 18594
      boolean this_present_nlc = true;
18595
      boolean that_present_nlc = true;
18596
      if (this_present_nlc || that_present_nlc) {
18597
        if (!(this_present_nlc && that_present_nlc))
18598
          return false;
18599
        if (this.nlc != that.nlc)
18600
          return false;
18601
      }
18602
 
6762 amar.kumar 18603
      boolean this_present_itemId = true;
18604
      boolean that_present_itemId = true;
18605
      if (this_present_itemId || that_present_itemId) {
18606
        if (!(this_present_itemId && that_present_itemId))
18607
          return false;
18608
        if (this.itemId != that.itemId)
18609
          return false;
18610
      }
18611
 
18612
      return true;
18613
    }
18614
 
18615
    @Override
18616
    public int hashCode() {
18617
      return 0;
18618
    }
18619
 
18620
    public int compareTo(createPurchaseForOurExtBilling_args other) {
18621
      if (!getClass().equals(other.getClass())) {
18622
        return getClass().getName().compareTo(other.getClass().getName());
18623
      }
18624
 
18625
      int lastComparison = 0;
18626
      createPurchaseForOurExtBilling_args typedOther = (createPurchaseForOurExtBilling_args)other;
18627
 
18628
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
18629
      if (lastComparison != 0) {
18630
        return lastComparison;
18631
      }
18632
      if (isSetInvoiceNumber()) {
18633
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
18634
        if (lastComparison != 0) {
18635
          return lastComparison;
18636
        }
18637
      }
18638
      lastComparison = Boolean.valueOf(isSetUnitPrice()).compareTo(typedOther.isSetUnitPrice());
18639
      if (lastComparison != 0) {
18640
        return lastComparison;
18641
      }
18642
      if (isSetUnitPrice()) {
18643
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unitPrice, typedOther.unitPrice);
18644
        if (lastComparison != 0) {
18645
          return lastComparison;
18646
        }
18647
      }
7672 rajveer 18648
      lastComparison = Boolean.valueOf(isSetNlc()).compareTo(typedOther.isSetNlc());
18649
      if (lastComparison != 0) {
18650
        return lastComparison;
18651
      }
18652
      if (isSetNlc()) {
18653
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nlc, typedOther.nlc);
18654
        if (lastComparison != 0) {
18655
          return lastComparison;
18656
        }
18657
      }
6762 amar.kumar 18658
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
18659
      if (lastComparison != 0) {
18660
        return lastComparison;
18661
      }
18662
      if (isSetItemId()) {
18663
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
18664
        if (lastComparison != 0) {
18665
          return lastComparison;
18666
        }
18667
      }
18668
      return 0;
18669
    }
18670
 
18671
    public _Fields fieldForId(int fieldId) {
18672
      return _Fields.findByThriftId(fieldId);
18673
    }
18674
 
18675
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18676
      org.apache.thrift.protocol.TField field;
18677
      iprot.readStructBegin();
18678
      while (true)
18679
      {
18680
        field = iprot.readFieldBegin();
18681
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18682
          break;
18683
        }
18684
        switch (field.id) {
18685
          case 1: // INVOICE_NUMBER
18686
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
18687
              this.invoiceNumber = iprot.readString();
18688
            } else { 
18689
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18690
            }
18691
            break;
18692
          case 2: // UNIT_PRICE
18693
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
18694
              this.unitPrice = iprot.readDouble();
18695
              setUnitPriceIsSet(true);
18696
            } else { 
18697
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18698
            }
18699
            break;
7672 rajveer 18700
          case 3: // NLC
18701
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
18702
              this.nlc = iprot.readDouble();
18703
              setNlcIsSet(true);
18704
            } else { 
18705
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18706
            }
18707
            break;
18708
          case 4: // ITEM_ID
6762 amar.kumar 18709
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18710
              this.itemId = iprot.readI64();
18711
              setItemIdIsSet(true);
18712
            } else { 
18713
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18714
            }
18715
            break;
18716
          default:
18717
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18718
        }
18719
        iprot.readFieldEnd();
18720
      }
18721
      iprot.readStructEnd();
18722
      validate();
18723
    }
18724
 
18725
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18726
      validate();
18727
 
18728
      oprot.writeStructBegin(STRUCT_DESC);
18729
      if (this.invoiceNumber != null) {
18730
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
18731
        oprot.writeString(this.invoiceNumber);
18732
        oprot.writeFieldEnd();
18733
      }
18734
      oprot.writeFieldBegin(UNIT_PRICE_FIELD_DESC);
18735
      oprot.writeDouble(this.unitPrice);
18736
      oprot.writeFieldEnd();
7672 rajveer 18737
      oprot.writeFieldBegin(NLC_FIELD_DESC);
18738
      oprot.writeDouble(this.nlc);
18739
      oprot.writeFieldEnd();
6762 amar.kumar 18740
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
18741
      oprot.writeI64(this.itemId);
18742
      oprot.writeFieldEnd();
18743
      oprot.writeFieldStop();
18744
      oprot.writeStructEnd();
18745
    }
18746
 
18747
    @Override
18748
    public String toString() {
18749
      StringBuilder sb = new StringBuilder("createPurchaseForOurExtBilling_args(");
18750
      boolean first = true;
18751
 
18752
      sb.append("invoiceNumber:");
18753
      if (this.invoiceNumber == null) {
18754
        sb.append("null");
18755
      } else {
18756
        sb.append(this.invoiceNumber);
18757
      }
18758
      first = false;
18759
      if (!first) sb.append(", ");
18760
      sb.append("unitPrice:");
18761
      sb.append(this.unitPrice);
18762
      first = false;
18763
      if (!first) sb.append(", ");
7672 rajveer 18764
      sb.append("nlc:");
18765
      sb.append(this.nlc);
18766
      first = false;
18767
      if (!first) sb.append(", ");
6762 amar.kumar 18768
      sb.append("itemId:");
18769
      sb.append(this.itemId);
18770
      first = false;
18771
      sb.append(")");
18772
      return sb.toString();
18773
    }
18774
 
18775
    public void validate() throws org.apache.thrift.TException {
18776
      // check for required fields
18777
    }
18778
 
18779
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18780
      try {
18781
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18782
      } catch (org.apache.thrift.TException te) {
18783
        throw new java.io.IOException(te);
18784
      }
18785
    }
18786
 
18787
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18788
      try {
18789
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
18790
        __isset_bit_vector = new BitSet(1);
18791
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18792
      } catch (org.apache.thrift.TException te) {
18793
        throw new java.io.IOException(te);
18794
      }
18795
    }
18796
 
18797
  }
18798
 
18799
  public static class createPurchaseForOurExtBilling_result implements org.apache.thrift.TBase<createPurchaseForOurExtBilling_result, createPurchaseForOurExtBilling_result._Fields>, java.io.Serializable, Cloneable   {
18800
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseForOurExtBilling_result");
18801
 
18802
    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);
18803
 
18804
    private long success; // required
18805
 
18806
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18807
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18808
      SUCCESS((short)0, "success");
18809
 
18810
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18811
 
18812
      static {
18813
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18814
          byName.put(field.getFieldName(), field);
18815
        }
18816
      }
18817
 
18818
      /**
18819
       * Find the _Fields constant that matches fieldId, or null if its not found.
18820
       */
18821
      public static _Fields findByThriftId(int fieldId) {
18822
        switch(fieldId) {
18823
          case 0: // SUCCESS
18824
            return SUCCESS;
18825
          default:
18826
            return null;
18827
        }
18828
      }
18829
 
18830
      /**
18831
       * Find the _Fields constant that matches fieldId, throwing an exception
18832
       * if it is not found.
18833
       */
18834
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18835
        _Fields fields = findByThriftId(fieldId);
18836
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18837
        return fields;
18838
      }
18839
 
18840
      /**
18841
       * Find the _Fields constant that matches name, or null if its not found.
18842
       */
18843
      public static _Fields findByName(String name) {
18844
        return byName.get(name);
18845
      }
18846
 
18847
      private final short _thriftId;
18848
      private final String _fieldName;
18849
 
18850
      _Fields(short thriftId, String fieldName) {
18851
        _thriftId = thriftId;
18852
        _fieldName = fieldName;
18853
      }
18854
 
18855
      public short getThriftFieldId() {
18856
        return _thriftId;
18857
      }
18858
 
18859
      public String getFieldName() {
18860
        return _fieldName;
18861
      }
18862
    }
18863
 
18864
    // isset id assignments
18865
    private static final int __SUCCESS_ISSET_ID = 0;
18866
    private BitSet __isset_bit_vector = new BitSet(1);
18867
 
18868
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18869
    static {
18870
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18871
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18872
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18873
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18874
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseForOurExtBilling_result.class, metaDataMap);
18875
    }
18876
 
18877
    public createPurchaseForOurExtBilling_result() {
18878
    }
18879
 
18880
    public createPurchaseForOurExtBilling_result(
18881
      long success)
18882
    {
18883
      this();
18884
      this.success = success;
18885
      setSuccessIsSet(true);
18886
    }
18887
 
18888
    /**
18889
     * Performs a deep copy on <i>other</i>.
18890
     */
18891
    public createPurchaseForOurExtBilling_result(createPurchaseForOurExtBilling_result other) {
18892
      __isset_bit_vector.clear();
18893
      __isset_bit_vector.or(other.__isset_bit_vector);
18894
      this.success = other.success;
18895
    }
18896
 
18897
    public createPurchaseForOurExtBilling_result deepCopy() {
18898
      return new createPurchaseForOurExtBilling_result(this);
18899
    }
18900
 
18901
    @Override
18902
    public void clear() {
18903
      setSuccessIsSet(false);
18904
      this.success = 0;
18905
    }
18906
 
18907
    public long getSuccess() {
18908
      return this.success;
18909
    }
18910
 
18911
    public void setSuccess(long success) {
18912
      this.success = success;
18913
      setSuccessIsSet(true);
18914
    }
18915
 
18916
    public void unsetSuccess() {
18917
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
18918
    }
18919
 
18920
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
18921
    public boolean isSetSuccess() {
18922
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
18923
    }
18924
 
18925
    public void setSuccessIsSet(boolean value) {
18926
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
18927
    }
18928
 
18929
    public void setFieldValue(_Fields field, Object value) {
18930
      switch (field) {
18931
      case SUCCESS:
18932
        if (value == null) {
18933
          unsetSuccess();
18934
        } else {
18935
          setSuccess((Long)value);
18936
        }
18937
        break;
18938
 
18939
      }
18940
    }
18941
 
18942
    public Object getFieldValue(_Fields field) {
18943
      switch (field) {
18944
      case SUCCESS:
18945
        return Long.valueOf(getSuccess());
18946
 
18947
      }
18948
      throw new IllegalStateException();
18949
    }
18950
 
18951
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18952
    public boolean isSet(_Fields field) {
18953
      if (field == null) {
18954
        throw new IllegalArgumentException();
18955
      }
18956
 
18957
      switch (field) {
18958
      case SUCCESS:
18959
        return isSetSuccess();
18960
      }
18961
      throw new IllegalStateException();
18962
    }
18963
 
18964
    @Override
18965
    public boolean equals(Object that) {
18966
      if (that == null)
18967
        return false;
18968
      if (that instanceof createPurchaseForOurExtBilling_result)
18969
        return this.equals((createPurchaseForOurExtBilling_result)that);
18970
      return false;
18971
    }
18972
 
18973
    public boolean equals(createPurchaseForOurExtBilling_result that) {
18974
      if (that == null)
18975
        return false;
18976
 
18977
      boolean this_present_success = true;
18978
      boolean that_present_success = true;
18979
      if (this_present_success || that_present_success) {
18980
        if (!(this_present_success && that_present_success))
18981
          return false;
18982
        if (this.success != that.success)
18983
          return false;
18984
      }
18985
 
18986
      return true;
18987
    }
18988
 
18989
    @Override
18990
    public int hashCode() {
18991
      return 0;
18992
    }
18993
 
18994
    public int compareTo(createPurchaseForOurExtBilling_result other) {
18995
      if (!getClass().equals(other.getClass())) {
18996
        return getClass().getName().compareTo(other.getClass().getName());
18997
      }
18998
 
18999
      int lastComparison = 0;
19000
      createPurchaseForOurExtBilling_result typedOther = (createPurchaseForOurExtBilling_result)other;
19001
 
19002
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
19003
      if (lastComparison != 0) {
19004
        return lastComparison;
19005
      }
19006
      if (isSetSuccess()) {
19007
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
19008
        if (lastComparison != 0) {
19009
          return lastComparison;
19010
        }
19011
      }
19012
      return 0;
19013
    }
19014
 
19015
    public _Fields fieldForId(int fieldId) {
19016
      return _Fields.findByThriftId(fieldId);
19017
    }
19018
 
19019
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19020
      org.apache.thrift.protocol.TField field;
19021
      iprot.readStructBegin();
19022
      while (true)
19023
      {
19024
        field = iprot.readFieldBegin();
19025
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19026
          break;
19027
        }
19028
        switch (field.id) {
19029
          case 0: // SUCCESS
19030
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19031
              this.success = iprot.readI64();
19032
              setSuccessIsSet(true);
19033
            } else { 
19034
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19035
            }
19036
            break;
19037
          default:
19038
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19039
        }
19040
        iprot.readFieldEnd();
19041
      }
19042
      iprot.readStructEnd();
19043
      validate();
19044
    }
19045
 
19046
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19047
      oprot.writeStructBegin(STRUCT_DESC);
19048
 
19049
      if (this.isSetSuccess()) {
19050
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
19051
        oprot.writeI64(this.success);
19052
        oprot.writeFieldEnd();
19053
      }
19054
      oprot.writeFieldStop();
19055
      oprot.writeStructEnd();
19056
    }
19057
 
19058
    @Override
19059
    public String toString() {
19060
      StringBuilder sb = new StringBuilder("createPurchaseForOurExtBilling_result(");
19061
      boolean first = true;
19062
 
19063
      sb.append("success:");
19064
      sb.append(this.success);
19065
      first = false;
19066
      sb.append(")");
19067
      return sb.toString();
19068
    }
19069
 
19070
    public void validate() throws org.apache.thrift.TException {
19071
      // check for required fields
19072
    }
19073
 
19074
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19075
      try {
19076
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19077
      } catch (org.apache.thrift.TException te) {
19078
        throw new java.io.IOException(te);
19079
      }
19080
    }
19081
 
19082
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19083
      try {
19084
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19085
      } catch (org.apache.thrift.TException te) {
19086
        throw new java.io.IOException(te);
19087
      }
19088
    }
19089
 
19090
  }
19091
 
19092
  public static class fulfillPOForExtBilling_args implements org.apache.thrift.TBase<fulfillPOForExtBilling_args, fulfillPOForExtBilling_args._Fields>, java.io.Serializable, Cloneable   {
19093
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPOForExtBilling_args");
19094
 
19095
    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);
19096
    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);
19097
 
19098
    private long itemId; // required
19099
    private long quantity; // required
19100
 
19101
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19102
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19103
      ITEM_ID((short)1, "itemId"),
19104
      QUANTITY((short)2, "quantity");
19105
 
19106
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19107
 
19108
      static {
19109
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19110
          byName.put(field.getFieldName(), field);
19111
        }
19112
      }
19113
 
19114
      /**
19115
       * Find the _Fields constant that matches fieldId, or null if its not found.
19116
       */
19117
      public static _Fields findByThriftId(int fieldId) {
19118
        switch(fieldId) {
19119
          case 1: // ITEM_ID
19120
            return ITEM_ID;
19121
          case 2: // QUANTITY
19122
            return QUANTITY;
19123
          default:
19124
            return null;
19125
        }
19126
      }
19127
 
19128
      /**
19129
       * Find the _Fields constant that matches fieldId, throwing an exception
19130
       * if it is not found.
19131
       */
19132
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19133
        _Fields fields = findByThriftId(fieldId);
19134
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19135
        return fields;
19136
      }
19137
 
19138
      /**
19139
       * Find the _Fields constant that matches name, or null if its not found.
19140
       */
19141
      public static _Fields findByName(String name) {
19142
        return byName.get(name);
19143
      }
19144
 
19145
      private final short _thriftId;
19146
      private final String _fieldName;
19147
 
19148
      _Fields(short thriftId, String fieldName) {
19149
        _thriftId = thriftId;
19150
        _fieldName = fieldName;
19151
      }
19152
 
19153
      public short getThriftFieldId() {
19154
        return _thriftId;
19155
      }
19156
 
19157
      public String getFieldName() {
19158
        return _fieldName;
19159
      }
19160
    }
19161
 
19162
    // isset id assignments
19163
    private static final int __ITEMID_ISSET_ID = 0;
19164
    private static final int __QUANTITY_ISSET_ID = 1;
19165
    private BitSet __isset_bit_vector = new BitSet(2);
19166
 
19167
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19168
    static {
19169
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19170
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19171
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19172
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19173
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19174
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19175
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPOForExtBilling_args.class, metaDataMap);
19176
    }
19177
 
19178
    public fulfillPOForExtBilling_args() {
19179
    }
19180
 
19181
    public fulfillPOForExtBilling_args(
19182
      long itemId,
19183
      long quantity)
19184
    {
19185
      this();
19186
      this.itemId = itemId;
19187
      setItemIdIsSet(true);
19188
      this.quantity = quantity;
19189
      setQuantityIsSet(true);
19190
    }
19191
 
19192
    /**
19193
     * Performs a deep copy on <i>other</i>.
19194
     */
19195
    public fulfillPOForExtBilling_args(fulfillPOForExtBilling_args other) {
19196
      __isset_bit_vector.clear();
19197
      __isset_bit_vector.or(other.__isset_bit_vector);
19198
      this.itemId = other.itemId;
19199
      this.quantity = other.quantity;
19200
    }
19201
 
19202
    public fulfillPOForExtBilling_args deepCopy() {
19203
      return new fulfillPOForExtBilling_args(this);
19204
    }
19205
 
19206
    @Override
19207
    public void clear() {
19208
      setItemIdIsSet(false);
19209
      this.itemId = 0;
19210
      setQuantityIsSet(false);
19211
      this.quantity = 0;
19212
    }
19213
 
19214
    public long getItemId() {
19215
      return this.itemId;
19216
    }
19217
 
19218
    public void setItemId(long itemId) {
19219
      this.itemId = itemId;
19220
      setItemIdIsSet(true);
19221
    }
19222
 
19223
    public void unsetItemId() {
19224
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
19225
    }
19226
 
19227
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
19228
    public boolean isSetItemId() {
19229
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
19230
    }
19231
 
19232
    public void setItemIdIsSet(boolean value) {
19233
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
19234
    }
19235
 
19236
    public long getQuantity() {
19237
      return this.quantity;
19238
    }
19239
 
19240
    public void setQuantity(long quantity) {
19241
      this.quantity = quantity;
19242
      setQuantityIsSet(true);
19243
    }
19244
 
19245
    public void unsetQuantity() {
19246
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
19247
    }
19248
 
19249
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
19250
    public boolean isSetQuantity() {
19251
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
19252
    }
19253
 
19254
    public void setQuantityIsSet(boolean value) {
19255
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
19256
    }
19257
 
19258
    public void setFieldValue(_Fields field, Object value) {
19259
      switch (field) {
19260
      case ITEM_ID:
19261
        if (value == null) {
19262
          unsetItemId();
19263
        } else {
19264
          setItemId((Long)value);
19265
        }
19266
        break;
19267
 
19268
      case QUANTITY:
19269
        if (value == null) {
19270
          unsetQuantity();
19271
        } else {
19272
          setQuantity((Long)value);
19273
        }
19274
        break;
19275
 
19276
      }
19277
    }
19278
 
19279
    public Object getFieldValue(_Fields field) {
19280
      switch (field) {
19281
      case ITEM_ID:
19282
        return Long.valueOf(getItemId());
19283
 
19284
      case QUANTITY:
19285
        return Long.valueOf(getQuantity());
19286
 
19287
      }
19288
      throw new IllegalStateException();
19289
    }
19290
 
19291
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19292
    public boolean isSet(_Fields field) {
19293
      if (field == null) {
19294
        throw new IllegalArgumentException();
19295
      }
19296
 
19297
      switch (field) {
19298
      case ITEM_ID:
19299
        return isSetItemId();
19300
      case QUANTITY:
19301
        return isSetQuantity();
19302
      }
19303
      throw new IllegalStateException();
19304
    }
19305
 
19306
    @Override
19307
    public boolean equals(Object that) {
19308
      if (that == null)
19309
        return false;
19310
      if (that instanceof fulfillPOForExtBilling_args)
19311
        return this.equals((fulfillPOForExtBilling_args)that);
19312
      return false;
19313
    }
19314
 
19315
    public boolean equals(fulfillPOForExtBilling_args that) {
19316
      if (that == null)
19317
        return false;
19318
 
19319
      boolean this_present_itemId = true;
19320
      boolean that_present_itemId = true;
19321
      if (this_present_itemId || that_present_itemId) {
19322
        if (!(this_present_itemId && that_present_itemId))
19323
          return false;
19324
        if (this.itemId != that.itemId)
19325
          return false;
19326
      }
19327
 
19328
      boolean this_present_quantity = true;
19329
      boolean that_present_quantity = true;
19330
      if (this_present_quantity || that_present_quantity) {
19331
        if (!(this_present_quantity && that_present_quantity))
19332
          return false;
19333
        if (this.quantity != that.quantity)
19334
          return false;
19335
      }
19336
 
19337
      return true;
19338
    }
19339
 
19340
    @Override
19341
    public int hashCode() {
19342
      return 0;
19343
    }
19344
 
19345
    public int compareTo(fulfillPOForExtBilling_args other) {
19346
      if (!getClass().equals(other.getClass())) {
19347
        return getClass().getName().compareTo(other.getClass().getName());
19348
      }
19349
 
19350
      int lastComparison = 0;
19351
      fulfillPOForExtBilling_args typedOther = (fulfillPOForExtBilling_args)other;
19352
 
19353
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
19354
      if (lastComparison != 0) {
19355
        return lastComparison;
19356
      }
19357
      if (isSetItemId()) {
19358
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
19359
        if (lastComparison != 0) {
19360
          return lastComparison;
19361
        }
19362
      }
19363
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
19364
      if (lastComparison != 0) {
19365
        return lastComparison;
19366
      }
19367
      if (isSetQuantity()) {
19368
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
19369
        if (lastComparison != 0) {
19370
          return lastComparison;
19371
        }
19372
      }
19373
      return 0;
19374
    }
19375
 
19376
    public _Fields fieldForId(int fieldId) {
19377
      return _Fields.findByThriftId(fieldId);
19378
    }
19379
 
19380
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19381
      org.apache.thrift.protocol.TField field;
19382
      iprot.readStructBegin();
19383
      while (true)
19384
      {
19385
        field = iprot.readFieldBegin();
19386
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19387
          break;
19388
        }
19389
        switch (field.id) {
19390
          case 1: // ITEM_ID
19391
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19392
              this.itemId = iprot.readI64();
19393
              setItemIdIsSet(true);
19394
            } else { 
19395
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19396
            }
19397
            break;
19398
          case 2: // QUANTITY
19399
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19400
              this.quantity = iprot.readI64();
19401
              setQuantityIsSet(true);
19402
            } else { 
19403
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19404
            }
19405
            break;
19406
          default:
19407
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19408
        }
19409
        iprot.readFieldEnd();
19410
      }
19411
      iprot.readStructEnd();
19412
      validate();
19413
    }
19414
 
19415
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19416
      validate();
19417
 
19418
      oprot.writeStructBegin(STRUCT_DESC);
19419
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
19420
      oprot.writeI64(this.itemId);
19421
      oprot.writeFieldEnd();
19422
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
19423
      oprot.writeI64(this.quantity);
19424
      oprot.writeFieldEnd();
19425
      oprot.writeFieldStop();
19426
      oprot.writeStructEnd();
19427
    }
19428
 
19429
    @Override
19430
    public String toString() {
19431
      StringBuilder sb = new StringBuilder("fulfillPOForExtBilling_args(");
19432
      boolean first = true;
19433
 
19434
      sb.append("itemId:");
19435
      sb.append(this.itemId);
19436
      first = false;
19437
      if (!first) sb.append(", ");
19438
      sb.append("quantity:");
19439
      sb.append(this.quantity);
19440
      first = false;
19441
      sb.append(")");
19442
      return sb.toString();
19443
    }
19444
 
19445
    public void validate() throws org.apache.thrift.TException {
19446
      // check for required fields
19447
    }
19448
 
19449
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19450
      try {
19451
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19452
      } catch (org.apache.thrift.TException te) {
19453
        throw new java.io.IOException(te);
19454
      }
19455
    }
19456
 
19457
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19458
      try {
19459
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
19460
        __isset_bit_vector = new BitSet(1);
19461
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19462
      } catch (org.apache.thrift.TException te) {
19463
        throw new java.io.IOException(te);
19464
      }
19465
    }
19466
 
19467
  }
19468
 
19469
  public static class fulfillPOForExtBilling_result implements org.apache.thrift.TBase<fulfillPOForExtBilling_result, fulfillPOForExtBilling_result._Fields>, java.io.Serializable, Cloneable   {
19470
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPOForExtBilling_result");
19471
 
19472
 
19473
 
19474
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19475
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19476
;
19477
 
19478
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19479
 
19480
      static {
19481
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19482
          byName.put(field.getFieldName(), field);
19483
        }
19484
      }
19485
 
19486
      /**
19487
       * Find the _Fields constant that matches fieldId, or null if its not found.
19488
       */
19489
      public static _Fields findByThriftId(int fieldId) {
19490
        switch(fieldId) {
19491
          default:
19492
            return null;
19493
        }
19494
      }
19495
 
19496
      /**
19497
       * Find the _Fields constant that matches fieldId, throwing an exception
19498
       * if it is not found.
19499
       */
19500
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19501
        _Fields fields = findByThriftId(fieldId);
19502
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19503
        return fields;
19504
      }
19505
 
19506
      /**
19507
       * Find the _Fields constant that matches name, or null if its not found.
19508
       */
19509
      public static _Fields findByName(String name) {
19510
        return byName.get(name);
19511
      }
19512
 
19513
      private final short _thriftId;
19514
      private final String _fieldName;
19515
 
19516
      _Fields(short thriftId, String fieldName) {
19517
        _thriftId = thriftId;
19518
        _fieldName = fieldName;
19519
      }
19520
 
19521
      public short getThriftFieldId() {
19522
        return _thriftId;
19523
      }
19524
 
19525
      public String getFieldName() {
19526
        return _fieldName;
19527
      }
19528
    }
19529
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19530
    static {
19531
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19532
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19533
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPOForExtBilling_result.class, metaDataMap);
19534
    }
19535
 
19536
    public fulfillPOForExtBilling_result() {
19537
    }
19538
 
19539
    /**
19540
     * Performs a deep copy on <i>other</i>.
19541
     */
19542
    public fulfillPOForExtBilling_result(fulfillPOForExtBilling_result other) {
19543
    }
19544
 
19545
    public fulfillPOForExtBilling_result deepCopy() {
19546
      return new fulfillPOForExtBilling_result(this);
19547
    }
19548
 
19549
    @Override
19550
    public void clear() {
19551
    }
19552
 
19553
    public void setFieldValue(_Fields field, Object value) {
19554
      switch (field) {
19555
      }
19556
    }
19557
 
19558
    public Object getFieldValue(_Fields field) {
19559
      switch (field) {
19560
      }
19561
      throw new IllegalStateException();
19562
    }
19563
 
19564
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19565
    public boolean isSet(_Fields field) {
19566
      if (field == null) {
19567
        throw new IllegalArgumentException();
19568
      }
19569
 
19570
      switch (field) {
19571
      }
19572
      throw new IllegalStateException();
19573
    }
19574
 
19575
    @Override
19576
    public boolean equals(Object that) {
19577
      if (that == null)
19578
        return false;
19579
      if (that instanceof fulfillPOForExtBilling_result)
19580
        return this.equals((fulfillPOForExtBilling_result)that);
19581
      return false;
19582
    }
19583
 
19584
    public boolean equals(fulfillPOForExtBilling_result that) {
19585
      if (that == null)
19586
        return false;
19587
 
19588
      return true;
19589
    }
19590
 
19591
    @Override
19592
    public int hashCode() {
19593
      return 0;
19594
    }
19595
 
19596
    public int compareTo(fulfillPOForExtBilling_result other) {
19597
      if (!getClass().equals(other.getClass())) {
19598
        return getClass().getName().compareTo(other.getClass().getName());
19599
      }
19600
 
19601
      int lastComparison = 0;
19602
      fulfillPOForExtBilling_result typedOther = (fulfillPOForExtBilling_result)other;
19603
 
19604
      return 0;
19605
    }
19606
 
19607
    public _Fields fieldForId(int fieldId) {
19608
      return _Fields.findByThriftId(fieldId);
19609
    }
19610
 
19611
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19612
      org.apache.thrift.protocol.TField field;
19613
      iprot.readStructBegin();
19614
      while (true)
19615
      {
19616
        field = iprot.readFieldBegin();
19617
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19618
          break;
19619
        }
19620
        switch (field.id) {
19621
          default:
19622
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19623
        }
19624
        iprot.readFieldEnd();
19625
      }
19626
      iprot.readStructEnd();
19627
      validate();
19628
    }
19629
 
19630
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19631
      oprot.writeStructBegin(STRUCT_DESC);
19632
 
19633
      oprot.writeFieldStop();
19634
      oprot.writeStructEnd();
19635
    }
19636
 
19637
    @Override
19638
    public String toString() {
19639
      StringBuilder sb = new StringBuilder("fulfillPOForExtBilling_result(");
19640
      boolean first = true;
19641
 
19642
      sb.append(")");
19643
      return sb.toString();
19644
    }
19645
 
19646
    public void validate() throws org.apache.thrift.TException {
19647
      // check for required fields
19648
    }
19649
 
19650
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19651
      try {
19652
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19653
      } catch (org.apache.thrift.TException te) {
19654
        throw new java.io.IOException(te);
19655
      }
19656
    }
19657
 
19658
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19659
      try {
19660
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19661
      } catch (org.apache.thrift.TException te) {
19662
        throw new java.io.IOException(te);
19663
      }
19664
    }
19665
 
19666
  }
19667
 
7410 amar.kumar 19668
  public static class closePO_args implements org.apache.thrift.TBase<closePO_args, closePO_args._Fields>, java.io.Serializable, Cloneable   {
19669
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePO_args");
19670
 
19671
    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);
19672
 
19673
    private long poId; // required
19674
 
19675
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19676
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19677
      PO_ID((short)1, "poId");
19678
 
19679
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19680
 
19681
      static {
19682
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19683
          byName.put(field.getFieldName(), field);
19684
        }
19685
      }
19686
 
19687
      /**
19688
       * Find the _Fields constant that matches fieldId, or null if its not found.
19689
       */
19690
      public static _Fields findByThriftId(int fieldId) {
19691
        switch(fieldId) {
19692
          case 1: // PO_ID
19693
            return PO_ID;
19694
          default:
19695
            return null;
19696
        }
19697
      }
19698
 
19699
      /**
19700
       * Find the _Fields constant that matches fieldId, throwing an exception
19701
       * if it is not found.
19702
       */
19703
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19704
        _Fields fields = findByThriftId(fieldId);
19705
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19706
        return fields;
19707
      }
19708
 
19709
      /**
19710
       * Find the _Fields constant that matches name, or null if its not found.
19711
       */
19712
      public static _Fields findByName(String name) {
19713
        return byName.get(name);
19714
      }
19715
 
19716
      private final short _thriftId;
19717
      private final String _fieldName;
19718
 
19719
      _Fields(short thriftId, String fieldName) {
19720
        _thriftId = thriftId;
19721
        _fieldName = fieldName;
19722
      }
19723
 
19724
      public short getThriftFieldId() {
19725
        return _thriftId;
19726
      }
19727
 
19728
      public String getFieldName() {
19729
        return _fieldName;
19730
      }
19731
    }
19732
 
19733
    // isset id assignments
19734
    private static final int __POID_ISSET_ID = 0;
19735
    private BitSet __isset_bit_vector = new BitSet(1);
19736
 
19737
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19738
    static {
19739
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19740
      tmpMap.put(_Fields.PO_ID, new org.apache.thrift.meta_data.FieldMetaData("poId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19741
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19742
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19743
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePO_args.class, metaDataMap);
19744
    }
19745
 
19746
    public closePO_args() {
19747
    }
19748
 
19749
    public closePO_args(
19750
      long poId)
19751
    {
19752
      this();
19753
      this.poId = poId;
19754
      setPoIdIsSet(true);
19755
    }
19756
 
19757
    /**
19758
     * Performs a deep copy on <i>other</i>.
19759
     */
19760
    public closePO_args(closePO_args other) {
19761
      __isset_bit_vector.clear();
19762
      __isset_bit_vector.or(other.__isset_bit_vector);
19763
      this.poId = other.poId;
19764
    }
19765
 
19766
    public closePO_args deepCopy() {
19767
      return new closePO_args(this);
19768
    }
19769
 
19770
    @Override
19771
    public void clear() {
19772
      setPoIdIsSet(false);
19773
      this.poId = 0;
19774
    }
19775
 
19776
    public long getPoId() {
19777
      return this.poId;
19778
    }
19779
 
19780
    public void setPoId(long poId) {
19781
      this.poId = poId;
19782
      setPoIdIsSet(true);
19783
    }
19784
 
19785
    public void unsetPoId() {
19786
      __isset_bit_vector.clear(__POID_ISSET_ID);
19787
    }
19788
 
19789
    /** Returns true if field poId is set (has been assigned a value) and false otherwise */
19790
    public boolean isSetPoId() {
19791
      return __isset_bit_vector.get(__POID_ISSET_ID);
19792
    }
19793
 
19794
    public void setPoIdIsSet(boolean value) {
19795
      __isset_bit_vector.set(__POID_ISSET_ID, value);
19796
    }
19797
 
19798
    public void setFieldValue(_Fields field, Object value) {
19799
      switch (field) {
19800
      case PO_ID:
19801
        if (value == null) {
19802
          unsetPoId();
19803
        } else {
19804
          setPoId((Long)value);
19805
        }
19806
        break;
19807
 
19808
      }
19809
    }
19810
 
19811
    public Object getFieldValue(_Fields field) {
19812
      switch (field) {
19813
      case PO_ID:
19814
        return Long.valueOf(getPoId());
19815
 
19816
      }
19817
      throw new IllegalStateException();
19818
    }
19819
 
19820
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19821
    public boolean isSet(_Fields field) {
19822
      if (field == null) {
19823
        throw new IllegalArgumentException();
19824
      }
19825
 
19826
      switch (field) {
19827
      case PO_ID:
19828
        return isSetPoId();
19829
      }
19830
      throw new IllegalStateException();
19831
    }
19832
 
19833
    @Override
19834
    public boolean equals(Object that) {
19835
      if (that == null)
19836
        return false;
19837
      if (that instanceof closePO_args)
19838
        return this.equals((closePO_args)that);
19839
      return false;
19840
    }
19841
 
19842
    public boolean equals(closePO_args that) {
19843
      if (that == null)
19844
        return false;
19845
 
19846
      boolean this_present_poId = true;
19847
      boolean that_present_poId = true;
19848
      if (this_present_poId || that_present_poId) {
19849
        if (!(this_present_poId && that_present_poId))
19850
          return false;
19851
        if (this.poId != that.poId)
19852
          return false;
19853
      }
19854
 
19855
      return true;
19856
    }
19857
 
19858
    @Override
19859
    public int hashCode() {
19860
      return 0;
19861
    }
19862
 
19863
    public int compareTo(closePO_args other) {
19864
      if (!getClass().equals(other.getClass())) {
19865
        return getClass().getName().compareTo(other.getClass().getName());
19866
      }
19867
 
19868
      int lastComparison = 0;
19869
      closePO_args typedOther = (closePO_args)other;
19870
 
19871
      lastComparison = Boolean.valueOf(isSetPoId()).compareTo(typedOther.isSetPoId());
19872
      if (lastComparison != 0) {
19873
        return lastComparison;
19874
      }
19875
      if (isSetPoId()) {
19876
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.poId, typedOther.poId);
19877
        if (lastComparison != 0) {
19878
          return lastComparison;
19879
        }
19880
      }
19881
      return 0;
19882
    }
19883
 
19884
    public _Fields fieldForId(int fieldId) {
19885
      return _Fields.findByThriftId(fieldId);
19886
    }
19887
 
19888
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19889
      org.apache.thrift.protocol.TField field;
19890
      iprot.readStructBegin();
19891
      while (true)
19892
      {
19893
        field = iprot.readFieldBegin();
19894
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19895
          break;
19896
        }
19897
        switch (field.id) {
19898
          case 1: // PO_ID
19899
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19900
              this.poId = iprot.readI64();
19901
              setPoIdIsSet(true);
19902
            } else { 
19903
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19904
            }
19905
            break;
19906
          default:
19907
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19908
        }
19909
        iprot.readFieldEnd();
19910
      }
19911
      iprot.readStructEnd();
19912
      validate();
19913
    }
19914
 
19915
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19916
      validate();
19917
 
19918
      oprot.writeStructBegin(STRUCT_DESC);
19919
      oprot.writeFieldBegin(PO_ID_FIELD_DESC);
19920
      oprot.writeI64(this.poId);
19921
      oprot.writeFieldEnd();
19922
      oprot.writeFieldStop();
19923
      oprot.writeStructEnd();
19924
    }
19925
 
19926
    @Override
19927
    public String toString() {
19928
      StringBuilder sb = new StringBuilder("closePO_args(");
19929
      boolean first = true;
19930
 
19931
      sb.append("poId:");
19932
      sb.append(this.poId);
19933
      first = false;
19934
      sb.append(")");
19935
      return sb.toString();
19936
    }
19937
 
19938
    public void validate() throws org.apache.thrift.TException {
19939
      // check for required fields
19940
    }
19941
 
19942
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19943
      try {
19944
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19945
      } catch (org.apache.thrift.TException te) {
19946
        throw new java.io.IOException(te);
19947
      }
19948
    }
19949
 
19950
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19951
      try {
19952
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19953
      } catch (org.apache.thrift.TException te) {
19954
        throw new java.io.IOException(te);
19955
      }
19956
    }
19957
 
19958
  }
19959
 
19960
  public static class closePO_result implements org.apache.thrift.TBase<closePO_result, closePO_result._Fields>, java.io.Serializable, Cloneable   {
19961
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePO_result");
19962
 
19963
    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);
19964
 
19965
    private PurchaseServiceException e; // required
19966
 
19967
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19968
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19969
      E((short)1, "e");
19970
 
19971
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19972
 
19973
      static {
19974
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19975
          byName.put(field.getFieldName(), field);
19976
        }
19977
      }
19978
 
19979
      /**
19980
       * Find the _Fields constant that matches fieldId, or null if its not found.
19981
       */
19982
      public static _Fields findByThriftId(int fieldId) {
19983
        switch(fieldId) {
19984
          case 1: // E
19985
            return E;
19986
          default:
19987
            return null;
19988
        }
19989
      }
19990
 
19991
      /**
19992
       * Find the _Fields constant that matches fieldId, throwing an exception
19993
       * if it is not found.
19994
       */
19995
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19996
        _Fields fields = findByThriftId(fieldId);
19997
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19998
        return fields;
19999
      }
20000
 
20001
      /**
20002
       * Find the _Fields constant that matches name, or null if its not found.
20003
       */
20004
      public static _Fields findByName(String name) {
20005
        return byName.get(name);
20006
      }
20007
 
20008
      private final short _thriftId;
20009
      private final String _fieldName;
20010
 
20011
      _Fields(short thriftId, String fieldName) {
20012
        _thriftId = thriftId;
20013
        _fieldName = fieldName;
20014
      }
20015
 
20016
      public short getThriftFieldId() {
20017
        return _thriftId;
20018
      }
20019
 
20020
      public String getFieldName() {
20021
        return _fieldName;
20022
      }
20023
    }
20024
 
20025
    // isset id assignments
20026
 
20027
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20028
    static {
20029
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20030
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20031
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
20032
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20033
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePO_result.class, metaDataMap);
20034
    }
20035
 
20036
    public closePO_result() {
20037
    }
20038
 
20039
    public closePO_result(
20040
      PurchaseServiceException e)
20041
    {
20042
      this();
20043
      this.e = e;
20044
    }
20045
 
20046
    /**
20047
     * Performs a deep copy on <i>other</i>.
20048
     */
20049
    public closePO_result(closePO_result other) {
20050
      if (other.isSetE()) {
20051
        this.e = new PurchaseServiceException(other.e);
20052
      }
20053
    }
20054
 
20055
    public closePO_result deepCopy() {
20056
      return new closePO_result(this);
20057
    }
20058
 
20059
    @Override
20060
    public void clear() {
20061
      this.e = null;
20062
    }
20063
 
20064
    public PurchaseServiceException getE() {
20065
      return this.e;
20066
    }
20067
 
20068
    public void setE(PurchaseServiceException e) {
20069
      this.e = e;
20070
    }
20071
 
20072
    public void unsetE() {
20073
      this.e = null;
20074
    }
20075
 
20076
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
20077
    public boolean isSetE() {
20078
      return this.e != null;
20079
    }
20080
 
20081
    public void setEIsSet(boolean value) {
20082
      if (!value) {
20083
        this.e = null;
20084
      }
20085
    }
20086
 
20087
    public void setFieldValue(_Fields field, Object value) {
20088
      switch (field) {
20089
      case E:
20090
        if (value == null) {
20091
          unsetE();
20092
        } else {
20093
          setE((PurchaseServiceException)value);
20094
        }
20095
        break;
20096
 
20097
      }
20098
    }
20099
 
20100
    public Object getFieldValue(_Fields field) {
20101
      switch (field) {
20102
      case E:
20103
        return getE();
20104
 
20105
      }
20106
      throw new IllegalStateException();
20107
    }
20108
 
20109
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20110
    public boolean isSet(_Fields field) {
20111
      if (field == null) {
20112
        throw new IllegalArgumentException();
20113
      }
20114
 
20115
      switch (field) {
20116
      case E:
20117
        return isSetE();
20118
      }
20119
      throw new IllegalStateException();
20120
    }
20121
 
20122
    @Override
20123
    public boolean equals(Object that) {
20124
      if (that == null)
20125
        return false;
20126
      if (that instanceof closePO_result)
20127
        return this.equals((closePO_result)that);
20128
      return false;
20129
    }
20130
 
20131
    public boolean equals(closePO_result that) {
20132
      if (that == null)
20133
        return false;
20134
 
20135
      boolean this_present_e = true && this.isSetE();
20136
      boolean that_present_e = true && that.isSetE();
20137
      if (this_present_e || that_present_e) {
20138
        if (!(this_present_e && that_present_e))
20139
          return false;
20140
        if (!this.e.equals(that.e))
20141
          return false;
20142
      }
20143
 
20144
      return true;
20145
    }
20146
 
20147
    @Override
20148
    public int hashCode() {
20149
      return 0;
20150
    }
20151
 
20152
    public int compareTo(closePO_result other) {
20153
      if (!getClass().equals(other.getClass())) {
20154
        return getClass().getName().compareTo(other.getClass().getName());
20155
      }
20156
 
20157
      int lastComparison = 0;
20158
      closePO_result typedOther = (closePO_result)other;
20159
 
20160
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
20161
      if (lastComparison != 0) {
20162
        return lastComparison;
20163
      }
20164
      if (isSetE()) {
20165
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
20166
        if (lastComparison != 0) {
20167
          return lastComparison;
20168
        }
20169
      }
20170
      return 0;
20171
    }
20172
 
20173
    public _Fields fieldForId(int fieldId) {
20174
      return _Fields.findByThriftId(fieldId);
20175
    }
20176
 
20177
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20178
      org.apache.thrift.protocol.TField field;
20179
      iprot.readStructBegin();
20180
      while (true)
20181
      {
20182
        field = iprot.readFieldBegin();
20183
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20184
          break;
20185
        }
20186
        switch (field.id) {
20187
          case 1: // E
20188
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
20189
              this.e = new PurchaseServiceException();
20190
              this.e.read(iprot);
20191
            } else { 
20192
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20193
            }
20194
            break;
20195
          default:
20196
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20197
        }
20198
        iprot.readFieldEnd();
20199
      }
20200
      iprot.readStructEnd();
20201
      validate();
20202
    }
20203
 
20204
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20205
      oprot.writeStructBegin(STRUCT_DESC);
20206
 
20207
      if (this.isSetE()) {
20208
        oprot.writeFieldBegin(E_FIELD_DESC);
20209
        this.e.write(oprot);
20210
        oprot.writeFieldEnd();
20211
      }
20212
      oprot.writeFieldStop();
20213
      oprot.writeStructEnd();
20214
    }
20215
 
20216
    @Override
20217
    public String toString() {
20218
      StringBuilder sb = new StringBuilder("closePO_result(");
20219
      boolean first = true;
20220
 
20221
      sb.append("e:");
20222
      if (this.e == null) {
20223
        sb.append("null");
20224
      } else {
20225
        sb.append(this.e);
20226
      }
20227
      first = false;
20228
      sb.append(")");
20229
      return sb.toString();
20230
    }
20231
 
20232
    public void validate() throws org.apache.thrift.TException {
20233
      // check for required fields
20234
    }
20235
 
20236
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20237
      try {
20238
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20239
      } catch (org.apache.thrift.TException te) {
20240
        throw new java.io.IOException(te);
20241
      }
20242
    }
20243
 
20244
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20245
      try {
20246
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20247
      } catch (org.apache.thrift.TException te) {
20248
        throw new java.io.IOException(te);
20249
      }
20250
    }
20251
 
20252
  }
20253
 
20254
  public static class isInvoiceReceived_args implements org.apache.thrift.TBase<isInvoiceReceived_args, isInvoiceReceived_args._Fields>, java.io.Serializable, Cloneable   {
20255
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isInvoiceReceived_args");
20256
 
20257
    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);
20258
    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);
20259
 
20260
    private String invoiceNumber; // required
20261
    private long supplierId; // required
20262
 
20263
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20264
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20265
      INVOICE_NUMBER((short)1, "invoiceNumber"),
20266
      SUPPLIER_ID((short)2, "supplierId");
20267
 
20268
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20269
 
20270
      static {
20271
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20272
          byName.put(field.getFieldName(), field);
20273
        }
20274
      }
20275
 
20276
      /**
20277
       * Find the _Fields constant that matches fieldId, or null if its not found.
20278
       */
20279
      public static _Fields findByThriftId(int fieldId) {
20280
        switch(fieldId) {
20281
          case 1: // INVOICE_NUMBER
20282
            return INVOICE_NUMBER;
20283
          case 2: // SUPPLIER_ID
20284
            return SUPPLIER_ID;
20285
          default:
20286
            return null;
20287
        }
20288
      }
20289
 
20290
      /**
20291
       * Find the _Fields constant that matches fieldId, throwing an exception
20292
       * if it is not found.
20293
       */
20294
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20295
        _Fields fields = findByThriftId(fieldId);
20296
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20297
        return fields;
20298
      }
20299
 
20300
      /**
20301
       * Find the _Fields constant that matches name, or null if its not found.
20302
       */
20303
      public static _Fields findByName(String name) {
20304
        return byName.get(name);
20305
      }
20306
 
20307
      private final short _thriftId;
20308
      private final String _fieldName;
20309
 
20310
      _Fields(short thriftId, String fieldName) {
20311
        _thriftId = thriftId;
20312
        _fieldName = fieldName;
20313
      }
20314
 
20315
      public short getThriftFieldId() {
20316
        return _thriftId;
20317
      }
20318
 
20319
      public String getFieldName() {
20320
        return _fieldName;
20321
      }
20322
    }
20323
 
20324
    // isset id assignments
20325
    private static final int __SUPPLIERID_ISSET_ID = 0;
20326
    private BitSet __isset_bit_vector = new BitSet(1);
20327
 
20328
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20329
    static {
20330
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20331
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20332
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
20333
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20334
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
20335
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20336
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isInvoiceReceived_args.class, metaDataMap);
20337
    }
20338
 
20339
    public isInvoiceReceived_args() {
20340
    }
20341
 
20342
    public isInvoiceReceived_args(
20343
      String invoiceNumber,
20344
      long supplierId)
20345
    {
20346
      this();
20347
      this.invoiceNumber = invoiceNumber;
20348
      this.supplierId = supplierId;
20349
      setSupplierIdIsSet(true);
20350
    }
20351
 
20352
    /**
20353
     * Performs a deep copy on <i>other</i>.
20354
     */
20355
    public isInvoiceReceived_args(isInvoiceReceived_args other) {
20356
      __isset_bit_vector.clear();
20357
      __isset_bit_vector.or(other.__isset_bit_vector);
20358
      if (other.isSetInvoiceNumber()) {
20359
        this.invoiceNumber = other.invoiceNumber;
20360
      }
20361
      this.supplierId = other.supplierId;
20362
    }
20363
 
20364
    public isInvoiceReceived_args deepCopy() {
20365
      return new isInvoiceReceived_args(this);
20366
    }
20367
 
20368
    @Override
20369
    public void clear() {
20370
      this.invoiceNumber = null;
20371
      setSupplierIdIsSet(false);
20372
      this.supplierId = 0;
20373
    }
20374
 
20375
    public String getInvoiceNumber() {
20376
      return this.invoiceNumber;
20377
    }
20378
 
20379
    public void setInvoiceNumber(String invoiceNumber) {
20380
      this.invoiceNumber = invoiceNumber;
20381
    }
20382
 
20383
    public void unsetInvoiceNumber() {
20384
      this.invoiceNumber = null;
20385
    }
20386
 
20387
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
20388
    public boolean isSetInvoiceNumber() {
20389
      return this.invoiceNumber != null;
20390
    }
20391
 
20392
    public void setInvoiceNumberIsSet(boolean value) {
20393
      if (!value) {
20394
        this.invoiceNumber = null;
20395
      }
20396
    }
20397
 
20398
    public long getSupplierId() {
20399
      return this.supplierId;
20400
    }
20401
 
20402
    public void setSupplierId(long supplierId) {
20403
      this.supplierId = supplierId;
20404
      setSupplierIdIsSet(true);
20405
    }
20406
 
20407
    public void unsetSupplierId() {
20408
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
20409
    }
20410
 
20411
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
20412
    public boolean isSetSupplierId() {
20413
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
20414
    }
20415
 
20416
    public void setSupplierIdIsSet(boolean value) {
20417
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
20418
    }
20419
 
20420
    public void setFieldValue(_Fields field, Object value) {
20421
      switch (field) {
20422
      case INVOICE_NUMBER:
20423
        if (value == null) {
20424
          unsetInvoiceNumber();
20425
        } else {
20426
          setInvoiceNumber((String)value);
20427
        }
20428
        break;
20429
 
20430
      case SUPPLIER_ID:
20431
        if (value == null) {
20432
          unsetSupplierId();
20433
        } else {
20434
          setSupplierId((Long)value);
20435
        }
20436
        break;
20437
 
20438
      }
20439
    }
20440
 
20441
    public Object getFieldValue(_Fields field) {
20442
      switch (field) {
20443
      case INVOICE_NUMBER:
20444
        return getInvoiceNumber();
20445
 
20446
      case SUPPLIER_ID:
20447
        return Long.valueOf(getSupplierId());
20448
 
20449
      }
20450
      throw new IllegalStateException();
20451
    }
20452
 
20453
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20454
    public boolean isSet(_Fields field) {
20455
      if (field == null) {
20456
        throw new IllegalArgumentException();
20457
      }
20458
 
20459
      switch (field) {
20460
      case INVOICE_NUMBER:
20461
        return isSetInvoiceNumber();
20462
      case SUPPLIER_ID:
20463
        return isSetSupplierId();
20464
      }
20465
      throw new IllegalStateException();
20466
    }
20467
 
20468
    @Override
20469
    public boolean equals(Object that) {
20470
      if (that == null)
20471
        return false;
20472
      if (that instanceof isInvoiceReceived_args)
20473
        return this.equals((isInvoiceReceived_args)that);
20474
      return false;
20475
    }
20476
 
20477
    public boolean equals(isInvoiceReceived_args that) {
20478
      if (that == null)
20479
        return false;
20480
 
20481
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
20482
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
20483
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
20484
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
20485
          return false;
20486
        if (!this.invoiceNumber.equals(that.invoiceNumber))
20487
          return false;
20488
      }
20489
 
20490
      boolean this_present_supplierId = true;
20491
      boolean that_present_supplierId = true;
20492
      if (this_present_supplierId || that_present_supplierId) {
20493
        if (!(this_present_supplierId && that_present_supplierId))
20494
          return false;
20495
        if (this.supplierId != that.supplierId)
20496
          return false;
20497
      }
20498
 
20499
      return true;
20500
    }
20501
 
20502
    @Override
20503
    public int hashCode() {
20504
      return 0;
20505
    }
20506
 
20507
    public int compareTo(isInvoiceReceived_args other) {
20508
      if (!getClass().equals(other.getClass())) {
20509
        return getClass().getName().compareTo(other.getClass().getName());
20510
      }
20511
 
20512
      int lastComparison = 0;
20513
      isInvoiceReceived_args typedOther = (isInvoiceReceived_args)other;
20514
 
20515
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
20516
      if (lastComparison != 0) {
20517
        return lastComparison;
20518
      }
20519
      if (isSetInvoiceNumber()) {
20520
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
20521
        if (lastComparison != 0) {
20522
          return lastComparison;
20523
        }
20524
      }
20525
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
20526
      if (lastComparison != 0) {
20527
        return lastComparison;
20528
      }
20529
      if (isSetSupplierId()) {
20530
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
20531
        if (lastComparison != 0) {
20532
          return lastComparison;
20533
        }
20534
      }
20535
      return 0;
20536
    }
20537
 
20538
    public _Fields fieldForId(int fieldId) {
20539
      return _Fields.findByThriftId(fieldId);
20540
    }
20541
 
20542
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20543
      org.apache.thrift.protocol.TField field;
20544
      iprot.readStructBegin();
20545
      while (true)
20546
      {
20547
        field = iprot.readFieldBegin();
20548
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20549
          break;
20550
        }
20551
        switch (field.id) {
20552
          case 1: // INVOICE_NUMBER
20553
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
20554
              this.invoiceNumber = iprot.readString();
20555
            } else { 
20556
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20557
            }
20558
            break;
20559
          case 2: // SUPPLIER_ID
20560
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20561
              this.supplierId = iprot.readI64();
20562
              setSupplierIdIsSet(true);
20563
            } else { 
20564
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20565
            }
20566
            break;
20567
          default:
20568
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20569
        }
20570
        iprot.readFieldEnd();
20571
      }
20572
      iprot.readStructEnd();
20573
      validate();
20574
    }
20575
 
20576
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20577
      validate();
20578
 
20579
      oprot.writeStructBegin(STRUCT_DESC);
20580
      if (this.invoiceNumber != null) {
20581
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
20582
        oprot.writeString(this.invoiceNumber);
20583
        oprot.writeFieldEnd();
20584
      }
20585
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
20586
      oprot.writeI64(this.supplierId);
20587
      oprot.writeFieldEnd();
20588
      oprot.writeFieldStop();
20589
      oprot.writeStructEnd();
20590
    }
20591
 
20592
    @Override
20593
    public String toString() {
20594
      StringBuilder sb = new StringBuilder("isInvoiceReceived_args(");
20595
      boolean first = true;
20596
 
20597
      sb.append("invoiceNumber:");
20598
      if (this.invoiceNumber == null) {
20599
        sb.append("null");
20600
      } else {
20601
        sb.append(this.invoiceNumber);
20602
      }
20603
      first = false;
20604
      if (!first) sb.append(", ");
20605
      sb.append("supplierId:");
20606
      sb.append(this.supplierId);
20607
      first = false;
20608
      sb.append(")");
20609
      return sb.toString();
20610
    }
20611
 
20612
    public void validate() throws org.apache.thrift.TException {
20613
      // check for required fields
20614
    }
20615
 
20616
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20617
      try {
20618
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20619
      } catch (org.apache.thrift.TException te) {
20620
        throw new java.io.IOException(te);
20621
      }
20622
    }
20623
 
20624
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20625
      try {
20626
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20627
      } catch (org.apache.thrift.TException te) {
20628
        throw new java.io.IOException(te);
20629
      }
20630
    }
20631
 
20632
  }
20633
 
20634
  public static class isInvoiceReceived_result implements org.apache.thrift.TBase<isInvoiceReceived_result, isInvoiceReceived_result._Fields>, java.io.Serializable, Cloneable   {
20635
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isInvoiceReceived_result");
20636
 
20637
    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);
20638
 
20639
    private boolean success; // required
20640
 
20641
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20642
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20643
      SUCCESS((short)0, "success");
20644
 
20645
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20646
 
20647
      static {
20648
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20649
          byName.put(field.getFieldName(), field);
20650
        }
20651
      }
20652
 
20653
      /**
20654
       * Find the _Fields constant that matches fieldId, or null if its not found.
20655
       */
20656
      public static _Fields findByThriftId(int fieldId) {
20657
        switch(fieldId) {
20658
          case 0: // SUCCESS
20659
            return SUCCESS;
20660
          default:
20661
            return null;
20662
        }
20663
      }
20664
 
20665
      /**
20666
       * Find the _Fields constant that matches fieldId, throwing an exception
20667
       * if it is not found.
20668
       */
20669
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20670
        _Fields fields = findByThriftId(fieldId);
20671
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20672
        return fields;
20673
      }
20674
 
20675
      /**
20676
       * Find the _Fields constant that matches name, or null if its not found.
20677
       */
20678
      public static _Fields findByName(String name) {
20679
        return byName.get(name);
20680
      }
20681
 
20682
      private final short _thriftId;
20683
      private final String _fieldName;
20684
 
20685
      _Fields(short thriftId, String fieldName) {
20686
        _thriftId = thriftId;
20687
        _fieldName = fieldName;
20688
      }
20689
 
20690
      public short getThriftFieldId() {
20691
        return _thriftId;
20692
      }
20693
 
20694
      public String getFieldName() {
20695
        return _fieldName;
20696
      }
20697
    }
20698
 
20699
    // isset id assignments
20700
    private static final int __SUCCESS_ISSET_ID = 0;
20701
    private BitSet __isset_bit_vector = new BitSet(1);
20702
 
20703
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20704
    static {
20705
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20706
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20707
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
20708
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20709
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isInvoiceReceived_result.class, metaDataMap);
20710
    }
20711
 
20712
    public isInvoiceReceived_result() {
20713
    }
20714
 
20715
    public isInvoiceReceived_result(
20716
      boolean success)
20717
    {
20718
      this();
20719
      this.success = success;
20720
      setSuccessIsSet(true);
20721
    }
20722
 
20723
    /**
20724
     * Performs a deep copy on <i>other</i>.
20725
     */
20726
    public isInvoiceReceived_result(isInvoiceReceived_result other) {
20727
      __isset_bit_vector.clear();
20728
      __isset_bit_vector.or(other.__isset_bit_vector);
20729
      this.success = other.success;
20730
    }
20731
 
20732
    public isInvoiceReceived_result deepCopy() {
20733
      return new isInvoiceReceived_result(this);
20734
    }
20735
 
20736
    @Override
20737
    public void clear() {
20738
      setSuccessIsSet(false);
20739
      this.success = false;
20740
    }
20741
 
20742
    public boolean isSuccess() {
20743
      return this.success;
20744
    }
20745
 
20746
    public void setSuccess(boolean success) {
20747
      this.success = success;
20748
      setSuccessIsSet(true);
20749
    }
20750
 
20751
    public void unsetSuccess() {
20752
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
20753
    }
20754
 
20755
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
20756
    public boolean isSetSuccess() {
20757
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
20758
    }
20759
 
20760
    public void setSuccessIsSet(boolean value) {
20761
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
20762
    }
20763
 
20764
    public void setFieldValue(_Fields field, Object value) {
20765
      switch (field) {
20766
      case SUCCESS:
20767
        if (value == null) {
20768
          unsetSuccess();
20769
        } else {
20770
          setSuccess((Boolean)value);
20771
        }
20772
        break;
20773
 
20774
      }
20775
    }
20776
 
20777
    public Object getFieldValue(_Fields field) {
20778
      switch (field) {
20779
      case SUCCESS:
20780
        return Boolean.valueOf(isSuccess());
20781
 
20782
      }
20783
      throw new IllegalStateException();
20784
    }
20785
 
20786
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20787
    public boolean isSet(_Fields field) {
20788
      if (field == null) {
20789
        throw new IllegalArgumentException();
20790
      }
20791
 
20792
      switch (field) {
20793
      case SUCCESS:
20794
        return isSetSuccess();
20795
      }
20796
      throw new IllegalStateException();
20797
    }
20798
 
20799
    @Override
20800
    public boolean equals(Object that) {
20801
      if (that == null)
20802
        return false;
20803
      if (that instanceof isInvoiceReceived_result)
20804
        return this.equals((isInvoiceReceived_result)that);
20805
      return false;
20806
    }
20807
 
20808
    public boolean equals(isInvoiceReceived_result that) {
20809
      if (that == null)
20810
        return false;
20811
 
20812
      boolean this_present_success = true;
20813
      boolean that_present_success = true;
20814
      if (this_present_success || that_present_success) {
20815
        if (!(this_present_success && that_present_success))
20816
          return false;
20817
        if (this.success != that.success)
20818
          return false;
20819
      }
20820
 
20821
      return true;
20822
    }
20823
 
20824
    @Override
20825
    public int hashCode() {
20826
      return 0;
20827
    }
20828
 
20829
    public int compareTo(isInvoiceReceived_result other) {
20830
      if (!getClass().equals(other.getClass())) {
20831
        return getClass().getName().compareTo(other.getClass().getName());
20832
      }
20833
 
20834
      int lastComparison = 0;
20835
      isInvoiceReceived_result typedOther = (isInvoiceReceived_result)other;
20836
 
20837
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
20838
      if (lastComparison != 0) {
20839
        return lastComparison;
20840
      }
20841
      if (isSetSuccess()) {
20842
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
20843
        if (lastComparison != 0) {
20844
          return lastComparison;
20845
        }
20846
      }
20847
      return 0;
20848
    }
20849
 
20850
    public _Fields fieldForId(int fieldId) {
20851
      return _Fields.findByThriftId(fieldId);
20852
    }
20853
 
20854
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20855
      org.apache.thrift.protocol.TField field;
20856
      iprot.readStructBegin();
20857
      while (true)
20858
      {
20859
        field = iprot.readFieldBegin();
20860
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20861
          break;
20862
        }
20863
        switch (field.id) {
20864
          case 0: // SUCCESS
20865
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
20866
              this.success = iprot.readBool();
20867
              setSuccessIsSet(true);
20868
            } else { 
20869
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20870
            }
20871
            break;
20872
          default:
20873
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20874
        }
20875
        iprot.readFieldEnd();
20876
      }
20877
      iprot.readStructEnd();
20878
      validate();
20879
    }
20880
 
20881
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20882
      oprot.writeStructBegin(STRUCT_DESC);
20883
 
20884
      if (this.isSetSuccess()) {
20885
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20886
        oprot.writeBool(this.success);
20887
        oprot.writeFieldEnd();
20888
      }
20889
      oprot.writeFieldStop();
20890
      oprot.writeStructEnd();
20891
    }
20892
 
20893
    @Override
20894
    public String toString() {
20895
      StringBuilder sb = new StringBuilder("isInvoiceReceived_result(");
20896
      boolean first = true;
20897
 
20898
      sb.append("success:");
20899
      sb.append(this.success);
20900
      first = false;
20901
      sb.append(")");
20902
      return sb.toString();
20903
    }
20904
 
20905
    public void validate() throws org.apache.thrift.TException {
20906
      // check for required fields
20907
    }
20908
 
20909
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20910
      try {
20911
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20912
      } catch (org.apache.thrift.TException te) {
20913
        throw new java.io.IOException(te);
20914
      }
20915
    }
20916
 
20917
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20918
      try {
20919
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20920
      } catch (org.apache.thrift.TException te) {
20921
        throw new java.io.IOException(te);
20922
      }
20923
    }
20924
 
20925
  }
20926
 
9829 amar.kumar 20927
  public static class changeWarehouseForPO_args implements org.apache.thrift.TBase<changeWarehouseForPO_args, changeWarehouseForPO_args._Fields>, java.io.Serializable, Cloneable   {
20928
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changeWarehouseForPO_args");
20929
 
20930
    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);
20931
    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);
20932
 
20933
    private long id; // required
20934
    private long warehouseId; // required
20935
 
20936
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20937
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20938
      ID((short)1, "id"),
20939
      WAREHOUSE_ID((short)2, "warehouseId");
20940
 
20941
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20942
 
20943
      static {
20944
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20945
          byName.put(field.getFieldName(), field);
20946
        }
20947
      }
20948
 
20949
      /**
20950
       * Find the _Fields constant that matches fieldId, or null if its not found.
20951
       */
20952
      public static _Fields findByThriftId(int fieldId) {
20953
        switch(fieldId) {
20954
          case 1: // ID
20955
            return ID;
20956
          case 2: // WAREHOUSE_ID
20957
            return WAREHOUSE_ID;
20958
          default:
20959
            return null;
20960
        }
20961
      }
20962
 
20963
      /**
20964
       * Find the _Fields constant that matches fieldId, throwing an exception
20965
       * if it is not found.
20966
       */
20967
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20968
        _Fields fields = findByThriftId(fieldId);
20969
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20970
        return fields;
20971
      }
20972
 
20973
      /**
20974
       * Find the _Fields constant that matches name, or null if its not found.
20975
       */
20976
      public static _Fields findByName(String name) {
20977
        return byName.get(name);
20978
      }
20979
 
20980
      private final short _thriftId;
20981
      private final String _fieldName;
20982
 
20983
      _Fields(short thriftId, String fieldName) {
20984
        _thriftId = thriftId;
20985
        _fieldName = fieldName;
20986
      }
20987
 
20988
      public short getThriftFieldId() {
20989
        return _thriftId;
20990
      }
20991
 
20992
      public String getFieldName() {
20993
        return _fieldName;
20994
      }
20995
    }
20996
 
20997
    // isset id assignments
20998
    private static final int __ID_ISSET_ID = 0;
20999
    private static final int __WAREHOUSEID_ISSET_ID = 1;
21000
    private BitSet __isset_bit_vector = new BitSet(2);
21001
 
21002
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21003
    static {
21004
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
21005
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21006
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
21007
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21008
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
21009
      metaDataMap = Collections.unmodifiableMap(tmpMap);
21010
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changeWarehouseForPO_args.class, metaDataMap);
21011
    }
21012
 
21013
    public changeWarehouseForPO_args() {
21014
    }
21015
 
21016
    public changeWarehouseForPO_args(
21017
      long id,
21018
      long warehouseId)
21019
    {
21020
      this();
21021
      this.id = id;
21022
      setIdIsSet(true);
21023
      this.warehouseId = warehouseId;
21024
      setWarehouseIdIsSet(true);
21025
    }
21026
 
21027
    /**
21028
     * Performs a deep copy on <i>other</i>.
21029
     */
21030
    public changeWarehouseForPO_args(changeWarehouseForPO_args other) {
21031
      __isset_bit_vector.clear();
21032
      __isset_bit_vector.or(other.__isset_bit_vector);
21033
      this.id = other.id;
21034
      this.warehouseId = other.warehouseId;
21035
    }
21036
 
21037
    public changeWarehouseForPO_args deepCopy() {
21038
      return new changeWarehouseForPO_args(this);
21039
    }
21040
 
21041
    @Override
21042
    public void clear() {
21043
      setIdIsSet(false);
21044
      this.id = 0;
21045
      setWarehouseIdIsSet(false);
21046
      this.warehouseId = 0;
21047
    }
21048
 
21049
    public long getId() {
21050
      return this.id;
21051
    }
21052
 
21053
    public void setId(long id) {
21054
      this.id = id;
21055
      setIdIsSet(true);
21056
    }
21057
 
21058
    public void unsetId() {
21059
      __isset_bit_vector.clear(__ID_ISSET_ID);
21060
    }
21061
 
21062
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
21063
    public boolean isSetId() {
21064
      return __isset_bit_vector.get(__ID_ISSET_ID);
21065
    }
21066
 
21067
    public void setIdIsSet(boolean value) {
21068
      __isset_bit_vector.set(__ID_ISSET_ID, value);
21069
    }
21070
 
21071
    public long getWarehouseId() {
21072
      return this.warehouseId;
21073
    }
21074
 
21075
    public void setWarehouseId(long warehouseId) {
21076
      this.warehouseId = warehouseId;
21077
      setWarehouseIdIsSet(true);
21078
    }
21079
 
21080
    public void unsetWarehouseId() {
21081
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
21082
    }
21083
 
21084
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
21085
    public boolean isSetWarehouseId() {
21086
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
21087
    }
21088
 
21089
    public void setWarehouseIdIsSet(boolean value) {
21090
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
21091
    }
21092
 
21093
    public void setFieldValue(_Fields field, Object value) {
21094
      switch (field) {
21095
      case ID:
21096
        if (value == null) {
21097
          unsetId();
21098
        } else {
21099
          setId((Long)value);
21100
        }
21101
        break;
21102
 
21103
      case WAREHOUSE_ID:
21104
        if (value == null) {
21105
          unsetWarehouseId();
21106
        } else {
21107
          setWarehouseId((Long)value);
21108
        }
21109
        break;
21110
 
21111
      }
21112
    }
21113
 
21114
    public Object getFieldValue(_Fields field) {
21115
      switch (field) {
21116
      case ID:
21117
        return Long.valueOf(getId());
21118
 
21119
      case WAREHOUSE_ID:
21120
        return Long.valueOf(getWarehouseId());
21121
 
21122
      }
21123
      throw new IllegalStateException();
21124
    }
21125
 
21126
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21127
    public boolean isSet(_Fields field) {
21128
      if (field == null) {
21129
        throw new IllegalArgumentException();
21130
      }
21131
 
21132
      switch (field) {
21133
      case ID:
21134
        return isSetId();
21135
      case WAREHOUSE_ID:
21136
        return isSetWarehouseId();
21137
      }
21138
      throw new IllegalStateException();
21139
    }
21140
 
21141
    @Override
21142
    public boolean equals(Object that) {
21143
      if (that == null)
21144
        return false;
21145
      if (that instanceof changeWarehouseForPO_args)
21146
        return this.equals((changeWarehouseForPO_args)that);
21147
      return false;
21148
    }
21149
 
21150
    public boolean equals(changeWarehouseForPO_args that) {
21151
      if (that == null)
21152
        return false;
21153
 
21154
      boolean this_present_id = true;
21155
      boolean that_present_id = true;
21156
      if (this_present_id || that_present_id) {
21157
        if (!(this_present_id && that_present_id))
21158
          return false;
21159
        if (this.id != that.id)
21160
          return false;
21161
      }
21162
 
21163
      boolean this_present_warehouseId = true;
21164
      boolean that_present_warehouseId = true;
21165
      if (this_present_warehouseId || that_present_warehouseId) {
21166
        if (!(this_present_warehouseId && that_present_warehouseId))
21167
          return false;
21168
        if (this.warehouseId != that.warehouseId)
21169
          return false;
21170
      }
21171
 
21172
      return true;
21173
    }
21174
 
21175
    @Override
21176
    public int hashCode() {
21177
      return 0;
21178
    }
21179
 
21180
    public int compareTo(changeWarehouseForPO_args other) {
21181
      if (!getClass().equals(other.getClass())) {
21182
        return getClass().getName().compareTo(other.getClass().getName());
21183
      }
21184
 
21185
      int lastComparison = 0;
21186
      changeWarehouseForPO_args typedOther = (changeWarehouseForPO_args)other;
21187
 
21188
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
21189
      if (lastComparison != 0) {
21190
        return lastComparison;
21191
      }
21192
      if (isSetId()) {
21193
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
21194
        if (lastComparison != 0) {
21195
          return lastComparison;
21196
        }
21197
      }
21198
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
21199
      if (lastComparison != 0) {
21200
        return lastComparison;
21201
      }
21202
      if (isSetWarehouseId()) {
21203
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
21204
        if (lastComparison != 0) {
21205
          return lastComparison;
21206
        }
21207
      }
21208
      return 0;
21209
    }
21210
 
21211
    public _Fields fieldForId(int fieldId) {
21212
      return _Fields.findByThriftId(fieldId);
21213
    }
21214
 
21215
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
21216
      org.apache.thrift.protocol.TField field;
21217
      iprot.readStructBegin();
21218
      while (true)
21219
      {
21220
        field = iprot.readFieldBegin();
21221
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
21222
          break;
21223
        }
21224
        switch (field.id) {
21225
          case 1: // ID
21226
            if (field.type == org.apache.thrift.protocol.TType.I64) {
21227
              this.id = iprot.readI64();
21228
              setIdIsSet(true);
21229
            } else { 
21230
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21231
            }
21232
            break;
21233
          case 2: // WAREHOUSE_ID
21234
            if (field.type == org.apache.thrift.protocol.TType.I64) {
21235
              this.warehouseId = iprot.readI64();
21236
              setWarehouseIdIsSet(true);
21237
            } else { 
21238
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21239
            }
21240
            break;
21241
          default:
21242
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21243
        }
21244
        iprot.readFieldEnd();
21245
      }
21246
      iprot.readStructEnd();
21247
      validate();
21248
    }
21249
 
21250
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
21251
      validate();
21252
 
21253
      oprot.writeStructBegin(STRUCT_DESC);
21254
      oprot.writeFieldBegin(ID_FIELD_DESC);
21255
      oprot.writeI64(this.id);
21256
      oprot.writeFieldEnd();
21257
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
21258
      oprot.writeI64(this.warehouseId);
21259
      oprot.writeFieldEnd();
21260
      oprot.writeFieldStop();
21261
      oprot.writeStructEnd();
21262
    }
21263
 
21264
    @Override
21265
    public String toString() {
21266
      StringBuilder sb = new StringBuilder("changeWarehouseForPO_args(");
21267
      boolean first = true;
21268
 
21269
      sb.append("id:");
21270
      sb.append(this.id);
21271
      first = false;
21272
      if (!first) sb.append(", ");
21273
      sb.append("warehouseId:");
21274
      sb.append(this.warehouseId);
21275
      first = false;
21276
      sb.append(")");
21277
      return sb.toString();
21278
    }
21279
 
21280
    public void validate() throws org.apache.thrift.TException {
21281
      // check for required fields
21282
    }
21283
 
21284
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21285
      try {
21286
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21287
      } catch (org.apache.thrift.TException te) {
21288
        throw new java.io.IOException(te);
21289
      }
21290
    }
21291
 
21292
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
21293
      try {
21294
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
21295
      } catch (org.apache.thrift.TException te) {
21296
        throw new java.io.IOException(te);
21297
      }
21298
    }
21299
 
21300
  }
21301
 
21302
  public static class changeWarehouseForPO_result implements org.apache.thrift.TBase<changeWarehouseForPO_result, changeWarehouseForPO_result._Fields>, java.io.Serializable, Cloneable   {
21303
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changeWarehouseForPO_result");
21304
 
21305
    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);
21306
 
21307
    private PurchaseServiceException e; // required
21308
 
21309
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21310
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
21311
      E((short)1, "e");
21312
 
21313
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21314
 
21315
      static {
21316
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21317
          byName.put(field.getFieldName(), field);
21318
        }
21319
      }
21320
 
21321
      /**
21322
       * Find the _Fields constant that matches fieldId, or null if its not found.
21323
       */
21324
      public static _Fields findByThriftId(int fieldId) {
21325
        switch(fieldId) {
21326
          case 1: // E
21327
            return E;
21328
          default:
21329
            return null;
21330
        }
21331
      }
21332
 
21333
      /**
21334
       * Find the _Fields constant that matches fieldId, throwing an exception
21335
       * if it is not found.
21336
       */
21337
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21338
        _Fields fields = findByThriftId(fieldId);
21339
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21340
        return fields;
21341
      }
21342
 
21343
      /**
21344
       * Find the _Fields constant that matches name, or null if its not found.
21345
       */
21346
      public static _Fields findByName(String name) {
21347
        return byName.get(name);
21348
      }
21349
 
21350
      private final short _thriftId;
21351
      private final String _fieldName;
21352
 
21353
      _Fields(short thriftId, String fieldName) {
21354
        _thriftId = thriftId;
21355
        _fieldName = fieldName;
21356
      }
21357
 
21358
      public short getThriftFieldId() {
21359
        return _thriftId;
21360
      }
21361
 
21362
      public String getFieldName() {
21363
        return _fieldName;
21364
      }
21365
    }
21366
 
21367
    // isset id assignments
21368
 
21369
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21370
    static {
21371
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
21372
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21373
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
21374
      metaDataMap = Collections.unmodifiableMap(tmpMap);
21375
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changeWarehouseForPO_result.class, metaDataMap);
21376
    }
21377
 
21378
    public changeWarehouseForPO_result() {
21379
    }
21380
 
21381
    public changeWarehouseForPO_result(
21382
      PurchaseServiceException e)
21383
    {
21384
      this();
21385
      this.e = e;
21386
    }
21387
 
21388
    /**
21389
     * Performs a deep copy on <i>other</i>.
21390
     */
21391
    public changeWarehouseForPO_result(changeWarehouseForPO_result other) {
21392
      if (other.isSetE()) {
21393
        this.e = new PurchaseServiceException(other.e);
21394
      }
21395
    }
21396
 
21397
    public changeWarehouseForPO_result deepCopy() {
21398
      return new changeWarehouseForPO_result(this);
21399
    }
21400
 
21401
    @Override
21402
    public void clear() {
21403
      this.e = null;
21404
    }
21405
 
21406
    public PurchaseServiceException getE() {
21407
      return this.e;
21408
    }
21409
 
21410
    public void setE(PurchaseServiceException e) {
21411
      this.e = e;
21412
    }
21413
 
21414
    public void unsetE() {
21415
      this.e = null;
21416
    }
21417
 
21418
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
21419
    public boolean isSetE() {
21420
      return this.e != null;
21421
    }
21422
 
21423
    public void setEIsSet(boolean value) {
21424
      if (!value) {
21425
        this.e = null;
21426
      }
21427
    }
21428
 
21429
    public void setFieldValue(_Fields field, Object value) {
21430
      switch (field) {
21431
      case E:
21432
        if (value == null) {
21433
          unsetE();
21434
        } else {
21435
          setE((PurchaseServiceException)value);
21436
        }
21437
        break;
21438
 
21439
      }
21440
    }
21441
 
21442
    public Object getFieldValue(_Fields field) {
21443
      switch (field) {
21444
      case E:
21445
        return getE();
21446
 
21447
      }
21448
      throw new IllegalStateException();
21449
    }
21450
 
21451
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21452
    public boolean isSet(_Fields field) {
21453
      if (field == null) {
21454
        throw new IllegalArgumentException();
21455
      }
21456
 
21457
      switch (field) {
21458
      case E:
21459
        return isSetE();
21460
      }
21461
      throw new IllegalStateException();
21462
    }
21463
 
21464
    @Override
21465
    public boolean equals(Object that) {
21466
      if (that == null)
21467
        return false;
21468
      if (that instanceof changeWarehouseForPO_result)
21469
        return this.equals((changeWarehouseForPO_result)that);
21470
      return false;
21471
    }
21472
 
21473
    public boolean equals(changeWarehouseForPO_result that) {
21474
      if (that == null)
21475
        return false;
21476
 
21477
      boolean this_present_e = true && this.isSetE();
21478
      boolean that_present_e = true && that.isSetE();
21479
      if (this_present_e || that_present_e) {
21480
        if (!(this_present_e && that_present_e))
21481
          return false;
21482
        if (!this.e.equals(that.e))
21483
          return false;
21484
      }
21485
 
21486
      return true;
21487
    }
21488
 
21489
    @Override
21490
    public int hashCode() {
21491
      return 0;
21492
    }
21493
 
21494
    public int compareTo(changeWarehouseForPO_result other) {
21495
      if (!getClass().equals(other.getClass())) {
21496
        return getClass().getName().compareTo(other.getClass().getName());
21497
      }
21498
 
21499
      int lastComparison = 0;
21500
      changeWarehouseForPO_result typedOther = (changeWarehouseForPO_result)other;
21501
 
21502
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
21503
      if (lastComparison != 0) {
21504
        return lastComparison;
21505
      }
21506
      if (isSetE()) {
21507
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
21508
        if (lastComparison != 0) {
21509
          return lastComparison;
21510
        }
21511
      }
21512
      return 0;
21513
    }
21514
 
21515
    public _Fields fieldForId(int fieldId) {
21516
      return _Fields.findByThriftId(fieldId);
21517
    }
21518
 
21519
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
21520
      org.apache.thrift.protocol.TField field;
21521
      iprot.readStructBegin();
21522
      while (true)
21523
      {
21524
        field = iprot.readFieldBegin();
21525
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
21526
          break;
21527
        }
21528
        switch (field.id) {
21529
          case 1: // E
21530
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
21531
              this.e = new PurchaseServiceException();
21532
              this.e.read(iprot);
21533
            } else { 
21534
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21535
            }
21536
            break;
21537
          default:
21538
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21539
        }
21540
        iprot.readFieldEnd();
21541
      }
21542
      iprot.readStructEnd();
21543
      validate();
21544
    }
21545
 
21546
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
21547
      oprot.writeStructBegin(STRUCT_DESC);
21548
 
21549
      if (this.isSetE()) {
21550
        oprot.writeFieldBegin(E_FIELD_DESC);
21551
        this.e.write(oprot);
21552
        oprot.writeFieldEnd();
21553
      }
21554
      oprot.writeFieldStop();
21555
      oprot.writeStructEnd();
21556
    }
21557
 
21558
    @Override
21559
    public String toString() {
21560
      StringBuilder sb = new StringBuilder("changeWarehouseForPO_result(");
21561
      boolean first = true;
21562
 
21563
      sb.append("e:");
21564
      if (this.e == null) {
21565
        sb.append("null");
21566
      } else {
21567
        sb.append(this.e);
21568
      }
21569
      first = false;
21570
      sb.append(")");
21571
      return sb.toString();
21572
    }
21573
 
21574
    public void validate() throws org.apache.thrift.TException {
21575
      // check for required fields
21576
    }
21577
 
21578
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21579
      try {
21580
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21581
      } catch (org.apache.thrift.TException te) {
21582
        throw new java.io.IOException(te);
21583
      }
21584
    }
21585
 
21586
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
21587
      try {
21588
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
21589
      } catch (org.apache.thrift.TException te) {
21590
        throw new java.io.IOException(te);
21591
      }
21592
    }
21593
 
21594
  }
21595
 
9925 amar.kumar 21596
  public static class changePOStatus_args implements org.apache.thrift.TBase<changePOStatus_args, changePOStatus_args._Fields>, java.io.Serializable, Cloneable   {
21597
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changePOStatus_args");
21598
 
21599
    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);
21600
    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);
21601
 
21602
    private long id; // required
21603
    private POStatus poStatus; // required
21604
 
21605
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21606
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
21607
      ID((short)1, "id"),
21608
      /**
21609
       * 
21610
       * @see POStatus
21611
       */
21612
      PO_STATUS((short)2, "poStatus");
21613
 
21614
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21615
 
21616
      static {
21617
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21618
          byName.put(field.getFieldName(), field);
21619
        }
21620
      }
21621
 
21622
      /**
21623
       * Find the _Fields constant that matches fieldId, or null if its not found.
21624
       */
21625
      public static _Fields findByThriftId(int fieldId) {
21626
        switch(fieldId) {
21627
          case 1: // ID
21628
            return ID;
21629
          case 2: // PO_STATUS
21630
            return PO_STATUS;
21631
          default:
21632
            return null;
21633
        }
21634
      }
21635
 
21636
      /**
21637
       * Find the _Fields constant that matches fieldId, throwing an exception
21638
       * if it is not found.
21639
       */
21640
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21641
        _Fields fields = findByThriftId(fieldId);
21642
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21643
        return fields;
21644
      }
21645
 
21646
      /**
21647
       * Find the _Fields constant that matches name, or null if its not found.
21648
       */
21649
      public static _Fields findByName(String name) {
21650
        return byName.get(name);
21651
      }
21652
 
21653
      private final short _thriftId;
21654
      private final String _fieldName;
21655
 
21656
      _Fields(short thriftId, String fieldName) {
21657
        _thriftId = thriftId;
21658
        _fieldName = fieldName;
21659
      }
21660
 
21661
      public short getThriftFieldId() {
21662
        return _thriftId;
21663
      }
21664
 
21665
      public String getFieldName() {
21666
        return _fieldName;
21667
      }
21668
    }
21669
 
21670
    // isset id assignments
21671
    private static final int __ID_ISSET_ID = 0;
21672
    private BitSet __isset_bit_vector = new BitSet(1);
21673
 
21674
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21675
    static {
21676
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
21677
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21678
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
21679
      tmpMap.put(_Fields.PO_STATUS, new org.apache.thrift.meta_data.FieldMetaData("poStatus", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21680
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, POStatus.class)));
21681
      metaDataMap = Collections.unmodifiableMap(tmpMap);
21682
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changePOStatus_args.class, metaDataMap);
21683
    }
21684
 
21685
    public changePOStatus_args() {
21686
    }
21687
 
21688
    public changePOStatus_args(
21689
      long id,
21690
      POStatus poStatus)
21691
    {
21692
      this();
21693
      this.id = id;
21694
      setIdIsSet(true);
21695
      this.poStatus = poStatus;
21696
    }
21697
 
21698
    /**
21699
     * Performs a deep copy on <i>other</i>.
21700
     */
21701
    public changePOStatus_args(changePOStatus_args other) {
21702
      __isset_bit_vector.clear();
21703
      __isset_bit_vector.or(other.__isset_bit_vector);
21704
      this.id = other.id;
21705
      if (other.isSetPoStatus()) {
21706
        this.poStatus = other.poStatus;
21707
      }
21708
    }
21709
 
21710
    public changePOStatus_args deepCopy() {
21711
      return new changePOStatus_args(this);
21712
    }
21713
 
21714
    @Override
21715
    public void clear() {
21716
      setIdIsSet(false);
21717
      this.id = 0;
21718
      this.poStatus = null;
21719
    }
21720
 
21721
    public long getId() {
21722
      return this.id;
21723
    }
21724
 
21725
    public void setId(long id) {
21726
      this.id = id;
21727
      setIdIsSet(true);
21728
    }
21729
 
21730
    public void unsetId() {
21731
      __isset_bit_vector.clear(__ID_ISSET_ID);
21732
    }
21733
 
21734
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
21735
    public boolean isSetId() {
21736
      return __isset_bit_vector.get(__ID_ISSET_ID);
21737
    }
21738
 
21739
    public void setIdIsSet(boolean value) {
21740
      __isset_bit_vector.set(__ID_ISSET_ID, value);
21741
    }
21742
 
21743
    /**
21744
     * 
21745
     * @see POStatus
21746
     */
21747
    public POStatus getPoStatus() {
21748
      return this.poStatus;
21749
    }
21750
 
21751
    /**
21752
     * 
21753
     * @see POStatus
21754
     */
21755
    public void setPoStatus(POStatus poStatus) {
21756
      this.poStatus = poStatus;
21757
    }
21758
 
21759
    public void unsetPoStatus() {
21760
      this.poStatus = null;
21761
    }
21762
 
21763
    /** Returns true if field poStatus is set (has been assigned a value) and false otherwise */
21764
    public boolean isSetPoStatus() {
21765
      return this.poStatus != null;
21766
    }
21767
 
21768
    public void setPoStatusIsSet(boolean value) {
21769
      if (!value) {
21770
        this.poStatus = null;
21771
      }
21772
    }
21773
 
21774
    public void setFieldValue(_Fields field, Object value) {
21775
      switch (field) {
21776
      case ID:
21777
        if (value == null) {
21778
          unsetId();
21779
        } else {
21780
          setId((Long)value);
21781
        }
21782
        break;
21783
 
21784
      case PO_STATUS:
21785
        if (value == null) {
21786
          unsetPoStatus();
21787
        } else {
21788
          setPoStatus((POStatus)value);
21789
        }
21790
        break;
21791
 
21792
      }
21793
    }
21794
 
21795
    public Object getFieldValue(_Fields field) {
21796
      switch (field) {
21797
      case ID:
21798
        return Long.valueOf(getId());
21799
 
21800
      case PO_STATUS:
21801
        return getPoStatus();
21802
 
21803
      }
21804
      throw new IllegalStateException();
21805
    }
21806
 
21807
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21808
    public boolean isSet(_Fields field) {
21809
      if (field == null) {
21810
        throw new IllegalArgumentException();
21811
      }
21812
 
21813
      switch (field) {
21814
      case ID:
21815
        return isSetId();
21816
      case PO_STATUS:
21817
        return isSetPoStatus();
21818
      }
21819
      throw new IllegalStateException();
21820
    }
21821
 
21822
    @Override
21823
    public boolean equals(Object that) {
21824
      if (that == null)
21825
        return false;
21826
      if (that instanceof changePOStatus_args)
21827
        return this.equals((changePOStatus_args)that);
21828
      return false;
21829
    }
21830
 
21831
    public boolean equals(changePOStatus_args that) {
21832
      if (that == null)
21833
        return false;
21834
 
21835
      boolean this_present_id = true;
21836
      boolean that_present_id = true;
21837
      if (this_present_id || that_present_id) {
21838
        if (!(this_present_id && that_present_id))
21839
          return false;
21840
        if (this.id != that.id)
21841
          return false;
21842
      }
21843
 
21844
      boolean this_present_poStatus = true && this.isSetPoStatus();
21845
      boolean that_present_poStatus = true && that.isSetPoStatus();
21846
      if (this_present_poStatus || that_present_poStatus) {
21847
        if (!(this_present_poStatus && that_present_poStatus))
21848
          return false;
21849
        if (!this.poStatus.equals(that.poStatus))
21850
          return false;
21851
      }
21852
 
21853
      return true;
21854
    }
21855
 
21856
    @Override
21857
    public int hashCode() {
21858
      return 0;
21859
    }
21860
 
21861
    public int compareTo(changePOStatus_args other) {
21862
      if (!getClass().equals(other.getClass())) {
21863
        return getClass().getName().compareTo(other.getClass().getName());
21864
      }
21865
 
21866
      int lastComparison = 0;
21867
      changePOStatus_args typedOther = (changePOStatus_args)other;
21868
 
21869
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
21870
      if (lastComparison != 0) {
21871
        return lastComparison;
21872
      }
21873
      if (isSetId()) {
21874
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
21875
        if (lastComparison != 0) {
21876
          return lastComparison;
21877
        }
21878
      }
21879
      lastComparison = Boolean.valueOf(isSetPoStatus()).compareTo(typedOther.isSetPoStatus());
21880
      if (lastComparison != 0) {
21881
        return lastComparison;
21882
      }
21883
      if (isSetPoStatus()) {
21884
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.poStatus, typedOther.poStatus);
21885
        if (lastComparison != 0) {
21886
          return lastComparison;
21887
        }
21888
      }
21889
      return 0;
21890
    }
21891
 
21892
    public _Fields fieldForId(int fieldId) {
21893
      return _Fields.findByThriftId(fieldId);
21894
    }
21895
 
21896
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
21897
      org.apache.thrift.protocol.TField field;
21898
      iprot.readStructBegin();
21899
      while (true)
21900
      {
21901
        field = iprot.readFieldBegin();
21902
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
21903
          break;
21904
        }
21905
        switch (field.id) {
21906
          case 1: // ID
21907
            if (field.type == org.apache.thrift.protocol.TType.I64) {
21908
              this.id = iprot.readI64();
21909
              setIdIsSet(true);
21910
            } else { 
21911
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21912
            }
21913
            break;
21914
          case 2: // PO_STATUS
21915
            if (field.type == org.apache.thrift.protocol.TType.I32) {
21916
              this.poStatus = POStatus.findByValue(iprot.readI32());
21917
            } else { 
21918
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21919
            }
21920
            break;
21921
          default:
21922
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21923
        }
21924
        iprot.readFieldEnd();
21925
      }
21926
      iprot.readStructEnd();
21927
      validate();
21928
    }
21929
 
21930
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
21931
      validate();
21932
 
21933
      oprot.writeStructBegin(STRUCT_DESC);
21934
      oprot.writeFieldBegin(ID_FIELD_DESC);
21935
      oprot.writeI64(this.id);
21936
      oprot.writeFieldEnd();
21937
      if (this.poStatus != null) {
21938
        oprot.writeFieldBegin(PO_STATUS_FIELD_DESC);
21939
        oprot.writeI32(this.poStatus.getValue());
21940
        oprot.writeFieldEnd();
21941
      }
21942
      oprot.writeFieldStop();
21943
      oprot.writeStructEnd();
21944
    }
21945
 
21946
    @Override
21947
    public String toString() {
21948
      StringBuilder sb = new StringBuilder("changePOStatus_args(");
21949
      boolean first = true;
21950
 
21951
      sb.append("id:");
21952
      sb.append(this.id);
21953
      first = false;
21954
      if (!first) sb.append(", ");
21955
      sb.append("poStatus:");
21956
      if (this.poStatus == null) {
21957
        sb.append("null");
21958
      } else {
21959
        sb.append(this.poStatus);
21960
      }
21961
      first = false;
21962
      sb.append(")");
21963
      return sb.toString();
21964
    }
21965
 
21966
    public void validate() throws org.apache.thrift.TException {
21967
      // check for required fields
21968
    }
21969
 
21970
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21971
      try {
21972
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21973
      } catch (org.apache.thrift.TException te) {
21974
        throw new java.io.IOException(te);
21975
      }
21976
    }
21977
 
21978
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
21979
      try {
21980
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
21981
        __isset_bit_vector = new BitSet(1);
21982
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
21983
      } catch (org.apache.thrift.TException te) {
21984
        throw new java.io.IOException(te);
21985
      }
21986
    }
21987
 
21988
  }
21989
 
21990
  public static class changePOStatus_result implements org.apache.thrift.TBase<changePOStatus_result, changePOStatus_result._Fields>, java.io.Serializable, Cloneable   {
21991
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changePOStatus_result");
21992
 
21993
    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);
21994
 
21995
    private PurchaseServiceException e; // required
21996
 
21997
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21998
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
21999
      E((short)1, "e");
22000
 
22001
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22002
 
22003
      static {
22004
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22005
          byName.put(field.getFieldName(), field);
22006
        }
22007
      }
22008
 
22009
      /**
22010
       * Find the _Fields constant that matches fieldId, or null if its not found.
22011
       */
22012
      public static _Fields findByThriftId(int fieldId) {
22013
        switch(fieldId) {
22014
          case 1: // E
22015
            return E;
22016
          default:
22017
            return null;
22018
        }
22019
      }
22020
 
22021
      /**
22022
       * Find the _Fields constant that matches fieldId, throwing an exception
22023
       * if it is not found.
22024
       */
22025
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22026
        _Fields fields = findByThriftId(fieldId);
22027
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22028
        return fields;
22029
      }
22030
 
22031
      /**
22032
       * Find the _Fields constant that matches name, or null if its not found.
22033
       */
22034
      public static _Fields findByName(String name) {
22035
        return byName.get(name);
22036
      }
22037
 
22038
      private final short _thriftId;
22039
      private final String _fieldName;
22040
 
22041
      _Fields(short thriftId, String fieldName) {
22042
        _thriftId = thriftId;
22043
        _fieldName = fieldName;
22044
      }
22045
 
22046
      public short getThriftFieldId() {
22047
        return _thriftId;
22048
      }
22049
 
22050
      public String getFieldName() {
22051
        return _fieldName;
22052
      }
22053
    }
22054
 
22055
    // isset id assignments
22056
 
22057
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
22058
    static {
22059
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
22060
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22061
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
22062
      metaDataMap = Collections.unmodifiableMap(tmpMap);
22063
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changePOStatus_result.class, metaDataMap);
22064
    }
22065
 
22066
    public changePOStatus_result() {
22067
    }
22068
 
22069
    public changePOStatus_result(
22070
      PurchaseServiceException e)
22071
    {
22072
      this();
22073
      this.e = e;
22074
    }
22075
 
22076
    /**
22077
     * Performs a deep copy on <i>other</i>.
22078
     */
22079
    public changePOStatus_result(changePOStatus_result other) {
22080
      if (other.isSetE()) {
22081
        this.e = new PurchaseServiceException(other.e);
22082
      }
22083
    }
22084
 
22085
    public changePOStatus_result deepCopy() {
22086
      return new changePOStatus_result(this);
22087
    }
22088
 
22089
    @Override
22090
    public void clear() {
22091
      this.e = null;
22092
    }
22093
 
22094
    public PurchaseServiceException getE() {
22095
      return this.e;
22096
    }
22097
 
22098
    public void setE(PurchaseServiceException e) {
22099
      this.e = e;
22100
    }
22101
 
22102
    public void unsetE() {
22103
      this.e = null;
22104
    }
22105
 
22106
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
22107
    public boolean isSetE() {
22108
      return this.e != null;
22109
    }
22110
 
22111
    public void setEIsSet(boolean value) {
22112
      if (!value) {
22113
        this.e = null;
22114
      }
22115
    }
22116
 
22117
    public void setFieldValue(_Fields field, Object value) {
22118
      switch (field) {
22119
      case E:
22120
        if (value == null) {
22121
          unsetE();
22122
        } else {
22123
          setE((PurchaseServiceException)value);
22124
        }
22125
        break;
22126
 
22127
      }
22128
    }
22129
 
22130
    public Object getFieldValue(_Fields field) {
22131
      switch (field) {
22132
      case E:
22133
        return getE();
22134
 
22135
      }
22136
      throw new IllegalStateException();
22137
    }
22138
 
22139
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
22140
    public boolean isSet(_Fields field) {
22141
      if (field == null) {
22142
        throw new IllegalArgumentException();
22143
      }
22144
 
22145
      switch (field) {
22146
      case E:
22147
        return isSetE();
22148
      }
22149
      throw new IllegalStateException();
22150
    }
22151
 
22152
    @Override
22153
    public boolean equals(Object that) {
22154
      if (that == null)
22155
        return false;
22156
      if (that instanceof changePOStatus_result)
22157
        return this.equals((changePOStatus_result)that);
22158
      return false;
22159
    }
22160
 
22161
    public boolean equals(changePOStatus_result that) {
22162
      if (that == null)
22163
        return false;
22164
 
22165
      boolean this_present_e = true && this.isSetE();
22166
      boolean that_present_e = true && that.isSetE();
22167
      if (this_present_e || that_present_e) {
22168
        if (!(this_present_e && that_present_e))
22169
          return false;
22170
        if (!this.e.equals(that.e))
22171
          return false;
22172
      }
22173
 
22174
      return true;
22175
    }
22176
 
22177
    @Override
22178
    public int hashCode() {
22179
      return 0;
22180
    }
22181
 
22182
    public int compareTo(changePOStatus_result other) {
22183
      if (!getClass().equals(other.getClass())) {
22184
        return getClass().getName().compareTo(other.getClass().getName());
22185
      }
22186
 
22187
      int lastComparison = 0;
22188
      changePOStatus_result typedOther = (changePOStatus_result)other;
22189
 
22190
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
22191
      if (lastComparison != 0) {
22192
        return lastComparison;
22193
      }
22194
      if (isSetE()) {
22195
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
22196
        if (lastComparison != 0) {
22197
          return lastComparison;
22198
        }
22199
      }
22200
      return 0;
22201
    }
22202
 
22203
    public _Fields fieldForId(int fieldId) {
22204
      return _Fields.findByThriftId(fieldId);
22205
    }
22206
 
22207
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
22208
      org.apache.thrift.protocol.TField field;
22209
      iprot.readStructBegin();
22210
      while (true)
22211
      {
22212
        field = iprot.readFieldBegin();
22213
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
22214
          break;
22215
        }
22216
        switch (field.id) {
22217
          case 1: // E
22218
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
22219
              this.e = new PurchaseServiceException();
22220
              this.e.read(iprot);
22221
            } else { 
22222
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22223
            }
22224
            break;
22225
          default:
22226
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22227
        }
22228
        iprot.readFieldEnd();
22229
      }
22230
      iprot.readStructEnd();
22231
      validate();
22232
    }
22233
 
22234
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
22235
      oprot.writeStructBegin(STRUCT_DESC);
22236
 
22237
      if (this.isSetE()) {
22238
        oprot.writeFieldBegin(E_FIELD_DESC);
22239
        this.e.write(oprot);
22240
        oprot.writeFieldEnd();
22241
      }
22242
      oprot.writeFieldStop();
22243
      oprot.writeStructEnd();
22244
    }
22245
 
22246
    @Override
22247
    public String toString() {
22248
      StringBuilder sb = new StringBuilder("changePOStatus_result(");
22249
      boolean first = true;
22250
 
22251
      sb.append("e:");
22252
      if (this.e == null) {
22253
        sb.append("null");
22254
      } else {
22255
        sb.append(this.e);
22256
      }
22257
      first = false;
22258
      sb.append(")");
22259
      return sb.toString();
22260
    }
22261
 
22262
    public void validate() throws org.apache.thrift.TException {
22263
      // check for required fields
22264
    }
22265
 
22266
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
22267
      try {
22268
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
22269
      } catch (org.apache.thrift.TException te) {
22270
        throw new java.io.IOException(te);
22271
      }
22272
    }
22273
 
22274
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
22275
      try {
22276
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
22277
      } catch (org.apache.thrift.TException te) {
22278
        throw new java.io.IOException(te);
22279
      }
22280
    }
22281
 
22282
  }
22283
 
11751 manish.sha 22284
  public static class getPurchaseReturn_args implements org.apache.thrift.TBase<getPurchaseReturn_args, getPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
22285
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseReturn_args");
22286
 
22287
    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);
22288
 
22289
    private long id; // required
22290
 
22291
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22292
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
22293
      ID((short)1, "id");
22294
 
22295
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22296
 
22297
      static {
22298
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22299
          byName.put(field.getFieldName(), field);
22300
        }
22301
      }
22302
 
22303
      /**
22304
       * Find the _Fields constant that matches fieldId, or null if its not found.
22305
       */
22306
      public static _Fields findByThriftId(int fieldId) {
22307
        switch(fieldId) {
22308
          case 1: // ID
22309
            return ID;
22310
          default:
22311
            return null;
22312
        }
22313
      }
22314
 
22315
      /**
22316
       * Find the _Fields constant that matches fieldId, throwing an exception
22317
       * if it is not found.
22318
       */
22319
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22320
        _Fields fields = findByThriftId(fieldId);
22321
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22322
        return fields;
22323
      }
22324
 
22325
      /**
22326
       * Find the _Fields constant that matches name, or null if its not found.
22327
       */
22328
      public static _Fields findByName(String name) {
22329
        return byName.get(name);
22330
      }
22331
 
22332
      private final short _thriftId;
22333
      private final String _fieldName;
22334
 
22335
      _Fields(short thriftId, String fieldName) {
22336
        _thriftId = thriftId;
22337
        _fieldName = fieldName;
22338
      }
22339
 
22340
      public short getThriftFieldId() {
22341
        return _thriftId;
22342
      }
22343
 
22344
      public String getFieldName() {
22345
        return _fieldName;
22346
      }
22347
    }
22348
 
22349
    // isset id assignments
22350
    private static final int __ID_ISSET_ID = 0;
22351
    private BitSet __isset_bit_vector = new BitSet(1);
22352
 
22353
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
22354
    static {
22355
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
22356
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22357
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
22358
      metaDataMap = Collections.unmodifiableMap(tmpMap);
22359
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseReturn_args.class, metaDataMap);
22360
    }
22361
 
22362
    public getPurchaseReturn_args() {
22363
    }
22364
 
22365
    public getPurchaseReturn_args(
22366
      long id)
22367
    {
22368
      this();
22369
      this.id = id;
22370
      setIdIsSet(true);
22371
    }
22372
 
22373
    /**
22374
     * Performs a deep copy on <i>other</i>.
22375
     */
22376
    public getPurchaseReturn_args(getPurchaseReturn_args other) {
22377
      __isset_bit_vector.clear();
22378
      __isset_bit_vector.or(other.__isset_bit_vector);
22379
      this.id = other.id;
22380
    }
22381
 
22382
    public getPurchaseReturn_args deepCopy() {
22383
      return new getPurchaseReturn_args(this);
22384
    }
22385
 
22386
    @Override
22387
    public void clear() {
22388
      setIdIsSet(false);
22389
      this.id = 0;
22390
    }
22391
 
22392
    public long getId() {
22393
      return this.id;
22394
    }
22395
 
22396
    public void setId(long id) {
22397
      this.id = id;
22398
      setIdIsSet(true);
22399
    }
22400
 
22401
    public void unsetId() {
22402
      __isset_bit_vector.clear(__ID_ISSET_ID);
22403
    }
22404
 
22405
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
22406
    public boolean isSetId() {
22407
      return __isset_bit_vector.get(__ID_ISSET_ID);
22408
    }
22409
 
22410
    public void setIdIsSet(boolean value) {
22411
      __isset_bit_vector.set(__ID_ISSET_ID, value);
22412
    }
22413
 
22414
    public void setFieldValue(_Fields field, Object value) {
22415
      switch (field) {
22416
      case ID:
22417
        if (value == null) {
22418
          unsetId();
22419
        } else {
22420
          setId((Long)value);
22421
        }
22422
        break;
22423
 
22424
      }
22425
    }
22426
 
22427
    public Object getFieldValue(_Fields field) {
22428
      switch (field) {
22429
      case ID:
22430
        return Long.valueOf(getId());
22431
 
22432
      }
22433
      throw new IllegalStateException();
22434
    }
22435
 
22436
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
22437
    public boolean isSet(_Fields field) {
22438
      if (field == null) {
22439
        throw new IllegalArgumentException();
22440
      }
22441
 
22442
      switch (field) {
22443
      case ID:
22444
        return isSetId();
22445
      }
22446
      throw new IllegalStateException();
22447
    }
22448
 
22449
    @Override
22450
    public boolean equals(Object that) {
22451
      if (that == null)
22452
        return false;
22453
      if (that instanceof getPurchaseReturn_args)
22454
        return this.equals((getPurchaseReturn_args)that);
22455
      return false;
22456
    }
22457
 
22458
    public boolean equals(getPurchaseReturn_args that) {
22459
      if (that == null)
22460
        return false;
22461
 
22462
      boolean this_present_id = true;
22463
      boolean that_present_id = true;
22464
      if (this_present_id || that_present_id) {
22465
        if (!(this_present_id && that_present_id))
22466
          return false;
22467
        if (this.id != that.id)
22468
          return false;
22469
      }
22470
 
22471
      return true;
22472
    }
22473
 
22474
    @Override
22475
    public int hashCode() {
22476
      return 0;
22477
    }
22478
 
22479
    public int compareTo(getPurchaseReturn_args other) {
22480
      if (!getClass().equals(other.getClass())) {
22481
        return getClass().getName().compareTo(other.getClass().getName());
22482
      }
22483
 
22484
      int lastComparison = 0;
22485
      getPurchaseReturn_args typedOther = (getPurchaseReturn_args)other;
22486
 
22487
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
22488
      if (lastComparison != 0) {
22489
        return lastComparison;
22490
      }
22491
      if (isSetId()) {
22492
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
22493
        if (lastComparison != 0) {
22494
          return lastComparison;
22495
        }
22496
      }
22497
      return 0;
22498
    }
22499
 
22500
    public _Fields fieldForId(int fieldId) {
22501
      return _Fields.findByThriftId(fieldId);
22502
    }
22503
 
22504
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
22505
      org.apache.thrift.protocol.TField field;
22506
      iprot.readStructBegin();
22507
      while (true)
22508
      {
22509
        field = iprot.readFieldBegin();
22510
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
22511
          break;
22512
        }
22513
        switch (field.id) {
22514
          case 1: // ID
22515
            if (field.type == org.apache.thrift.protocol.TType.I64) {
22516
              this.id = iprot.readI64();
22517
              setIdIsSet(true);
22518
            } else { 
22519
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22520
            }
22521
            break;
22522
          default:
22523
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22524
        }
22525
        iprot.readFieldEnd();
22526
      }
22527
      iprot.readStructEnd();
22528
      validate();
22529
    }
22530
 
22531
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
22532
      validate();
22533
 
22534
      oprot.writeStructBegin(STRUCT_DESC);
22535
      oprot.writeFieldBegin(ID_FIELD_DESC);
22536
      oprot.writeI64(this.id);
22537
      oprot.writeFieldEnd();
22538
      oprot.writeFieldStop();
22539
      oprot.writeStructEnd();
22540
    }
22541
 
22542
    @Override
22543
    public String toString() {
22544
      StringBuilder sb = new StringBuilder("getPurchaseReturn_args(");
22545
      boolean first = true;
22546
 
22547
      sb.append("id:");
22548
      sb.append(this.id);
22549
      first = false;
22550
      sb.append(")");
22551
      return sb.toString();
22552
    }
22553
 
22554
    public void validate() throws org.apache.thrift.TException {
22555
      // check for required fields
22556
    }
22557
 
22558
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
22559
      try {
22560
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
22561
      } catch (org.apache.thrift.TException te) {
22562
        throw new java.io.IOException(te);
22563
      }
22564
    }
22565
 
22566
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
22567
      try {
22568
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
22569
        __isset_bit_vector = new BitSet(1);
22570
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
22571
      } catch (org.apache.thrift.TException te) {
22572
        throw new java.io.IOException(te);
22573
      }
22574
    }
22575
 
22576
  }
22577
 
22578
  public static class getPurchaseReturn_result implements org.apache.thrift.TBase<getPurchaseReturn_result, getPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
22579
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseReturn_result");
22580
 
22581
    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);
22582
    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);
22583
 
22584
    private PurchaseReturn success; // required
22585
    private PurchaseServiceException e; // required
22586
 
22587
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22588
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
22589
      SUCCESS((short)0, "success"),
22590
      E((short)1, "e");
22591
 
22592
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22593
 
22594
      static {
22595
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22596
          byName.put(field.getFieldName(), field);
22597
        }
22598
      }
22599
 
22600
      /**
22601
       * Find the _Fields constant that matches fieldId, or null if its not found.
22602
       */
22603
      public static _Fields findByThriftId(int fieldId) {
22604
        switch(fieldId) {
22605
          case 0: // SUCCESS
22606
            return SUCCESS;
22607
          case 1: // E
22608
            return E;
22609
          default:
22610
            return null;
22611
        }
22612
      }
22613
 
22614
      /**
22615
       * Find the _Fields constant that matches fieldId, throwing an exception
22616
       * if it is not found.
22617
       */
22618
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22619
        _Fields fields = findByThriftId(fieldId);
22620
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22621
        return fields;
22622
      }
22623
 
22624
      /**
22625
       * Find the _Fields constant that matches name, or null if its not found.
22626
       */
22627
      public static _Fields findByName(String name) {
22628
        return byName.get(name);
22629
      }
22630
 
22631
      private final short _thriftId;
22632
      private final String _fieldName;
22633
 
22634
      _Fields(short thriftId, String fieldName) {
22635
        _thriftId = thriftId;
22636
        _fieldName = fieldName;
22637
      }
22638
 
22639
      public short getThriftFieldId() {
22640
        return _thriftId;
22641
      }
22642
 
22643
      public String getFieldName() {
22644
        return _fieldName;
22645
      }
22646
    }
22647
 
22648
    // isset id assignments
22649
 
22650
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
22651
    static {
22652
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
22653
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22654
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class)));
22655
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22656
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
22657
      metaDataMap = Collections.unmodifiableMap(tmpMap);
22658
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseReturn_result.class, metaDataMap);
22659
    }
22660
 
22661
    public getPurchaseReturn_result() {
22662
    }
22663
 
22664
    public getPurchaseReturn_result(
22665
      PurchaseReturn success,
22666
      PurchaseServiceException e)
22667
    {
22668
      this();
22669
      this.success = success;
22670
      this.e = e;
22671
    }
22672
 
22673
    /**
22674
     * Performs a deep copy on <i>other</i>.
22675
     */
22676
    public getPurchaseReturn_result(getPurchaseReturn_result other) {
22677
      if (other.isSetSuccess()) {
22678
        this.success = new PurchaseReturn(other.success);
22679
      }
22680
      if (other.isSetE()) {
22681
        this.e = new PurchaseServiceException(other.e);
22682
      }
22683
    }
22684
 
22685
    public getPurchaseReturn_result deepCopy() {
22686
      return new getPurchaseReturn_result(this);
22687
    }
22688
 
22689
    @Override
22690
    public void clear() {
22691
      this.success = null;
22692
      this.e = null;
22693
    }
22694
 
22695
    public PurchaseReturn getSuccess() {
22696
      return this.success;
22697
    }
22698
 
22699
    public void setSuccess(PurchaseReturn success) {
22700
      this.success = success;
22701
    }
22702
 
22703
    public void unsetSuccess() {
22704
      this.success = null;
22705
    }
22706
 
22707
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
22708
    public boolean isSetSuccess() {
22709
      return this.success != null;
22710
    }
22711
 
22712
    public void setSuccessIsSet(boolean value) {
22713
      if (!value) {
22714
        this.success = null;
22715
      }
22716
    }
22717
 
22718
    public PurchaseServiceException getE() {
22719
      return this.e;
22720
    }
22721
 
22722
    public void setE(PurchaseServiceException e) {
22723
      this.e = e;
22724
    }
22725
 
22726
    public void unsetE() {
22727
      this.e = null;
22728
    }
22729
 
22730
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
22731
    public boolean isSetE() {
22732
      return this.e != null;
22733
    }
22734
 
22735
    public void setEIsSet(boolean value) {
22736
      if (!value) {
22737
        this.e = null;
22738
      }
22739
    }
22740
 
22741
    public void setFieldValue(_Fields field, Object value) {
22742
      switch (field) {
22743
      case SUCCESS:
22744
        if (value == null) {
22745
          unsetSuccess();
22746
        } else {
22747
          setSuccess((PurchaseReturn)value);
22748
        }
22749
        break;
22750
 
22751
      case E:
22752
        if (value == null) {
22753
          unsetE();
22754
        } else {
22755
          setE((PurchaseServiceException)value);
22756
        }
22757
        break;
22758
 
22759
      }
22760
    }
22761
 
22762
    public Object getFieldValue(_Fields field) {
22763
      switch (field) {
22764
      case SUCCESS:
22765
        return getSuccess();
22766
 
22767
      case E:
22768
        return getE();
22769
 
22770
      }
22771
      throw new IllegalStateException();
22772
    }
22773
 
22774
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
22775
    public boolean isSet(_Fields field) {
22776
      if (field == null) {
22777
        throw new IllegalArgumentException();
22778
      }
22779
 
22780
      switch (field) {
22781
      case SUCCESS:
22782
        return isSetSuccess();
22783
      case E:
22784
        return isSetE();
22785
      }
22786
      throw new IllegalStateException();
22787
    }
22788
 
22789
    @Override
22790
    public boolean equals(Object that) {
22791
      if (that == null)
22792
        return false;
22793
      if (that instanceof getPurchaseReturn_result)
22794
        return this.equals((getPurchaseReturn_result)that);
22795
      return false;
22796
    }
22797
 
22798
    public boolean equals(getPurchaseReturn_result that) {
22799
      if (that == null)
22800
        return false;
22801
 
22802
      boolean this_present_success = true && this.isSetSuccess();
22803
      boolean that_present_success = true && that.isSetSuccess();
22804
      if (this_present_success || that_present_success) {
22805
        if (!(this_present_success && that_present_success))
22806
          return false;
22807
        if (!this.success.equals(that.success))
22808
          return false;
22809
      }
22810
 
22811
      boolean this_present_e = true && this.isSetE();
22812
      boolean that_present_e = true && that.isSetE();
22813
      if (this_present_e || that_present_e) {
22814
        if (!(this_present_e && that_present_e))
22815
          return false;
22816
        if (!this.e.equals(that.e))
22817
          return false;
22818
      }
22819
 
22820
      return true;
22821
    }
22822
 
22823
    @Override
22824
    public int hashCode() {
22825
      return 0;
22826
    }
22827
 
22828
    public int compareTo(getPurchaseReturn_result other) {
22829
      if (!getClass().equals(other.getClass())) {
22830
        return getClass().getName().compareTo(other.getClass().getName());
22831
      }
22832
 
22833
      int lastComparison = 0;
22834
      getPurchaseReturn_result typedOther = (getPurchaseReturn_result)other;
22835
 
22836
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
22837
      if (lastComparison != 0) {
22838
        return lastComparison;
22839
      }
22840
      if (isSetSuccess()) {
22841
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
22842
        if (lastComparison != 0) {
22843
          return lastComparison;
22844
        }
22845
      }
22846
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
22847
      if (lastComparison != 0) {
22848
        return lastComparison;
22849
      }
22850
      if (isSetE()) {
22851
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
22852
        if (lastComparison != 0) {
22853
          return lastComparison;
22854
        }
22855
      }
22856
      return 0;
22857
    }
22858
 
22859
    public _Fields fieldForId(int fieldId) {
22860
      return _Fields.findByThriftId(fieldId);
22861
    }
22862
 
22863
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
22864
      org.apache.thrift.protocol.TField field;
22865
      iprot.readStructBegin();
22866
      while (true)
22867
      {
22868
        field = iprot.readFieldBegin();
22869
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
22870
          break;
22871
        }
22872
        switch (field.id) {
22873
          case 0: // SUCCESS
22874
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
22875
              this.success = new PurchaseReturn();
22876
              this.success.read(iprot);
22877
            } else { 
22878
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22879
            }
22880
            break;
22881
          case 1: // E
22882
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
22883
              this.e = new PurchaseServiceException();
22884
              this.e.read(iprot);
22885
            } else { 
22886
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22887
            }
22888
            break;
22889
          default:
22890
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22891
        }
22892
        iprot.readFieldEnd();
22893
      }
22894
      iprot.readStructEnd();
22895
      validate();
22896
    }
22897
 
22898
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
22899
      oprot.writeStructBegin(STRUCT_DESC);
22900
 
22901
      if (this.isSetSuccess()) {
22902
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
22903
        this.success.write(oprot);
22904
        oprot.writeFieldEnd();
22905
      } else if (this.isSetE()) {
22906
        oprot.writeFieldBegin(E_FIELD_DESC);
22907
        this.e.write(oprot);
22908
        oprot.writeFieldEnd();
22909
      }
22910
      oprot.writeFieldStop();
22911
      oprot.writeStructEnd();
22912
    }
22913
 
22914
    @Override
22915
    public String toString() {
22916
      StringBuilder sb = new StringBuilder("getPurchaseReturn_result(");
22917
      boolean first = true;
22918
 
22919
      sb.append("success:");
22920
      if (this.success == null) {
22921
        sb.append("null");
22922
      } else {
22923
        sb.append(this.success);
22924
      }
22925
      first = false;
22926
      if (!first) sb.append(", ");
22927
      sb.append("e:");
22928
      if (this.e == null) {
22929
        sb.append("null");
22930
      } else {
22931
        sb.append(this.e);
22932
      }
22933
      first = false;
22934
      sb.append(")");
22935
      return sb.toString();
22936
    }
22937
 
22938
    public void validate() throws org.apache.thrift.TException {
22939
      // check for required fields
22940
    }
22941
 
22942
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
22943
      try {
22944
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
22945
      } catch (org.apache.thrift.TException te) {
22946
        throw new java.io.IOException(te);
22947
      }
22948
    }
22949
 
22950
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
22951
      try {
22952
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
22953
      } catch (org.apache.thrift.TException te) {
22954
        throw new java.io.IOException(te);
22955
      }
22956
    }
22957
 
22958
  }
22959
 
13600 manish.sha 22960
  public static class markPurchasereturnSettled_args implements org.apache.thrift.TBase<markPurchasereturnSettled_args, markPurchasereturnSettled_args._Fields>, java.io.Serializable, Cloneable   {
22961
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markPurchasereturnSettled_args");
22962
 
22963
    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);
22964
    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);
22965
    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);
22966
    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);
22967
    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);
22968
 
22969
    private long id; // required
22970
    private SettlementType settlementType; // required
22971
    private String documentNumber; // required
22972
    private String settlementBy; // required
22973
    private long settledAmount; // required
22974
 
22975
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22976
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
22977
      ID((short)1, "id"),
22978
      /**
22979
       * 
22980
       * @see SettlementType
22981
       */
22982
      SETTLEMENT_TYPE((short)2, "settlementType"),
22983
      DOCUMENT_NUMBER((short)3, "documentNumber"),
22984
      SETTLEMENT_BY((short)4, "settlementBy"),
22985
      SETTLED_AMOUNT((short)5, "settledAmount");
22986
 
22987
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22988
 
22989
      static {
22990
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22991
          byName.put(field.getFieldName(), field);
22992
        }
22993
      }
22994
 
22995
      /**
22996
       * Find the _Fields constant that matches fieldId, or null if its not found.
22997
       */
22998
      public static _Fields findByThriftId(int fieldId) {
22999
        switch(fieldId) {
23000
          case 1: // ID
23001
            return ID;
23002
          case 2: // SETTLEMENT_TYPE
23003
            return SETTLEMENT_TYPE;
23004
          case 3: // DOCUMENT_NUMBER
23005
            return DOCUMENT_NUMBER;
23006
          case 4: // SETTLEMENT_BY
23007
            return SETTLEMENT_BY;
23008
          case 5: // SETTLED_AMOUNT
23009
            return SETTLED_AMOUNT;
23010
          default:
23011
            return null;
23012
        }
23013
      }
23014
 
23015
      /**
23016
       * Find the _Fields constant that matches fieldId, throwing an exception
23017
       * if it is not found.
23018
       */
23019
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23020
        _Fields fields = findByThriftId(fieldId);
23021
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23022
        return fields;
23023
      }
23024
 
23025
      /**
23026
       * Find the _Fields constant that matches name, or null if its not found.
23027
       */
23028
      public static _Fields findByName(String name) {
23029
        return byName.get(name);
23030
      }
23031
 
23032
      private final short _thriftId;
23033
      private final String _fieldName;
23034
 
23035
      _Fields(short thriftId, String fieldName) {
23036
        _thriftId = thriftId;
23037
        _fieldName = fieldName;
23038
      }
23039
 
23040
      public short getThriftFieldId() {
23041
        return _thriftId;
23042
      }
23043
 
23044
      public String getFieldName() {
23045
        return _fieldName;
23046
      }
23047
    }
23048
 
23049
    // isset id assignments
23050
    private static final int __ID_ISSET_ID = 0;
23051
    private static final int __SETTLEDAMOUNT_ISSET_ID = 1;
23052
    private BitSet __isset_bit_vector = new BitSet(2);
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
      tmpMap.put(_Fields.SETTLEMENT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("settlementType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23060
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SettlementType.class)));
23061
      tmpMap.put(_Fields.DOCUMENT_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("documentNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23062
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
23063
      tmpMap.put(_Fields.SETTLEMENT_BY, new org.apache.thrift.meta_data.FieldMetaData("settlementBy", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23064
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
23065
      tmpMap.put(_Fields.SETTLED_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("settledAmount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23066
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
23067
      metaDataMap = Collections.unmodifiableMap(tmpMap);
23068
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markPurchasereturnSettled_args.class, metaDataMap);
23069
    }
23070
 
23071
    public markPurchasereturnSettled_args() {
23072
    }
23073
 
23074
    public markPurchasereturnSettled_args(
23075
      long id,
23076
      SettlementType settlementType,
23077
      String documentNumber,
23078
      String settlementBy,
23079
      long settledAmount)
23080
    {
23081
      this();
23082
      this.id = id;
23083
      setIdIsSet(true);
23084
      this.settlementType = settlementType;
23085
      this.documentNumber = documentNumber;
23086
      this.settlementBy = settlementBy;
23087
      this.settledAmount = settledAmount;
23088
      setSettledAmountIsSet(true);
23089
    }
23090
 
23091
    /**
23092
     * Performs a deep copy on <i>other</i>.
23093
     */
23094
    public markPurchasereturnSettled_args(markPurchasereturnSettled_args other) {
23095
      __isset_bit_vector.clear();
23096
      __isset_bit_vector.or(other.__isset_bit_vector);
23097
      this.id = other.id;
23098
      if (other.isSetSettlementType()) {
23099
        this.settlementType = other.settlementType;
23100
      }
23101
      if (other.isSetDocumentNumber()) {
23102
        this.documentNumber = other.documentNumber;
23103
      }
23104
      if (other.isSetSettlementBy()) {
23105
        this.settlementBy = other.settlementBy;
23106
      }
23107
      this.settledAmount = other.settledAmount;
23108
    }
23109
 
23110
    public markPurchasereturnSettled_args deepCopy() {
23111
      return new markPurchasereturnSettled_args(this);
23112
    }
23113
 
23114
    @Override
23115
    public void clear() {
23116
      setIdIsSet(false);
23117
      this.id = 0;
23118
      this.settlementType = null;
23119
      this.documentNumber = null;
23120
      this.settlementBy = null;
23121
      setSettledAmountIsSet(false);
23122
      this.settledAmount = 0;
23123
    }
23124
 
23125
    public long getId() {
23126
      return this.id;
23127
    }
23128
 
23129
    public void setId(long id) {
23130
      this.id = id;
23131
      setIdIsSet(true);
23132
    }
23133
 
23134
    public void unsetId() {
23135
      __isset_bit_vector.clear(__ID_ISSET_ID);
23136
    }
23137
 
23138
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
23139
    public boolean isSetId() {
23140
      return __isset_bit_vector.get(__ID_ISSET_ID);
23141
    }
23142
 
23143
    public void setIdIsSet(boolean value) {
23144
      __isset_bit_vector.set(__ID_ISSET_ID, value);
23145
    }
23146
 
23147
    /**
23148
     * 
23149
     * @see SettlementType
23150
     */
23151
    public SettlementType getSettlementType() {
23152
      return this.settlementType;
23153
    }
23154
 
23155
    /**
23156
     * 
23157
     * @see SettlementType
23158
     */
23159
    public void setSettlementType(SettlementType settlementType) {
23160
      this.settlementType = settlementType;
23161
    }
23162
 
23163
    public void unsetSettlementType() {
23164
      this.settlementType = null;
23165
    }
23166
 
23167
    /** Returns true if field settlementType is set (has been assigned a value) and false otherwise */
23168
    public boolean isSetSettlementType() {
23169
      return this.settlementType != null;
23170
    }
23171
 
23172
    public void setSettlementTypeIsSet(boolean value) {
23173
      if (!value) {
23174
        this.settlementType = null;
23175
      }
23176
    }
23177
 
23178
    public String getDocumentNumber() {
23179
      return this.documentNumber;
23180
    }
23181
 
23182
    public void setDocumentNumber(String documentNumber) {
23183
      this.documentNumber = documentNumber;
23184
    }
23185
 
23186
    public void unsetDocumentNumber() {
23187
      this.documentNumber = null;
23188
    }
23189
 
23190
    /** Returns true if field documentNumber is set (has been assigned a value) and false otherwise */
23191
    public boolean isSetDocumentNumber() {
23192
      return this.documentNumber != null;
23193
    }
23194
 
23195
    public void setDocumentNumberIsSet(boolean value) {
23196
      if (!value) {
23197
        this.documentNumber = null;
23198
      }
23199
    }
23200
 
23201
    public String getSettlementBy() {
23202
      return this.settlementBy;
23203
    }
23204
 
23205
    public void setSettlementBy(String settlementBy) {
23206
      this.settlementBy = settlementBy;
23207
    }
23208
 
23209
    public void unsetSettlementBy() {
23210
      this.settlementBy = null;
23211
    }
23212
 
23213
    /** Returns true if field settlementBy is set (has been assigned a value) and false otherwise */
23214
    public boolean isSetSettlementBy() {
23215
      return this.settlementBy != null;
23216
    }
23217
 
23218
    public void setSettlementByIsSet(boolean value) {
23219
      if (!value) {
23220
        this.settlementBy = null;
23221
      }
23222
    }
23223
 
23224
    public long getSettledAmount() {
23225
      return this.settledAmount;
23226
    }
23227
 
23228
    public void setSettledAmount(long settledAmount) {
23229
      this.settledAmount = settledAmount;
23230
      setSettledAmountIsSet(true);
23231
    }
23232
 
23233
    public void unsetSettledAmount() {
23234
      __isset_bit_vector.clear(__SETTLEDAMOUNT_ISSET_ID);
23235
    }
23236
 
23237
    /** Returns true if field settledAmount is set (has been assigned a value) and false otherwise */
23238
    public boolean isSetSettledAmount() {
23239
      return __isset_bit_vector.get(__SETTLEDAMOUNT_ISSET_ID);
23240
    }
23241
 
23242
    public void setSettledAmountIsSet(boolean value) {
23243
      __isset_bit_vector.set(__SETTLEDAMOUNT_ISSET_ID, value);
23244
    }
23245
 
23246
    public void setFieldValue(_Fields field, Object value) {
23247
      switch (field) {
23248
      case ID:
23249
        if (value == null) {
23250
          unsetId();
23251
        } else {
23252
          setId((Long)value);
23253
        }
23254
        break;
23255
 
23256
      case SETTLEMENT_TYPE:
23257
        if (value == null) {
23258
          unsetSettlementType();
23259
        } else {
23260
          setSettlementType((SettlementType)value);
23261
        }
23262
        break;
23263
 
23264
      case DOCUMENT_NUMBER:
23265
        if (value == null) {
23266
          unsetDocumentNumber();
23267
        } else {
23268
          setDocumentNumber((String)value);
23269
        }
23270
        break;
23271
 
23272
      case SETTLEMENT_BY:
23273
        if (value == null) {
23274
          unsetSettlementBy();
23275
        } else {
23276
          setSettlementBy((String)value);
23277
        }
23278
        break;
23279
 
23280
      case SETTLED_AMOUNT:
23281
        if (value == null) {
23282
          unsetSettledAmount();
23283
        } else {
23284
          setSettledAmount((Long)value);
23285
        }
23286
        break;
23287
 
23288
      }
23289
    }
23290
 
23291
    public Object getFieldValue(_Fields field) {
23292
      switch (field) {
23293
      case ID:
23294
        return Long.valueOf(getId());
23295
 
23296
      case SETTLEMENT_TYPE:
23297
        return getSettlementType();
23298
 
23299
      case DOCUMENT_NUMBER:
23300
        return getDocumentNumber();
23301
 
23302
      case SETTLEMENT_BY:
23303
        return getSettlementBy();
23304
 
23305
      case SETTLED_AMOUNT:
23306
        return Long.valueOf(getSettledAmount());
23307
 
23308
      }
23309
      throw new IllegalStateException();
23310
    }
23311
 
23312
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
23313
    public boolean isSet(_Fields field) {
23314
      if (field == null) {
23315
        throw new IllegalArgumentException();
23316
      }
23317
 
23318
      switch (field) {
23319
      case ID:
23320
        return isSetId();
23321
      case SETTLEMENT_TYPE:
23322
        return isSetSettlementType();
23323
      case DOCUMENT_NUMBER:
23324
        return isSetDocumentNumber();
23325
      case SETTLEMENT_BY:
23326
        return isSetSettlementBy();
23327
      case SETTLED_AMOUNT:
23328
        return isSetSettledAmount();
23329
      }
23330
      throw new IllegalStateException();
23331
    }
23332
 
23333
    @Override
23334
    public boolean equals(Object that) {
23335
      if (that == null)
23336
        return false;
23337
      if (that instanceof markPurchasereturnSettled_args)
23338
        return this.equals((markPurchasereturnSettled_args)that);
23339
      return false;
23340
    }
23341
 
23342
    public boolean equals(markPurchasereturnSettled_args that) {
23343
      if (that == null)
23344
        return false;
23345
 
23346
      boolean this_present_id = true;
23347
      boolean that_present_id = true;
23348
      if (this_present_id || that_present_id) {
23349
        if (!(this_present_id && that_present_id))
23350
          return false;
23351
        if (this.id != that.id)
23352
          return false;
23353
      }
23354
 
23355
      boolean this_present_settlementType = true && this.isSetSettlementType();
23356
      boolean that_present_settlementType = true && that.isSetSettlementType();
23357
      if (this_present_settlementType || that_present_settlementType) {
23358
        if (!(this_present_settlementType && that_present_settlementType))
23359
          return false;
23360
        if (!this.settlementType.equals(that.settlementType))
23361
          return false;
23362
      }
23363
 
23364
      boolean this_present_documentNumber = true && this.isSetDocumentNumber();
23365
      boolean that_present_documentNumber = true && that.isSetDocumentNumber();
23366
      if (this_present_documentNumber || that_present_documentNumber) {
23367
        if (!(this_present_documentNumber && that_present_documentNumber))
23368
          return false;
23369
        if (!this.documentNumber.equals(that.documentNumber))
23370
          return false;
23371
      }
23372
 
23373
      boolean this_present_settlementBy = true && this.isSetSettlementBy();
23374
      boolean that_present_settlementBy = true && that.isSetSettlementBy();
23375
      if (this_present_settlementBy || that_present_settlementBy) {
23376
        if (!(this_present_settlementBy && that_present_settlementBy))
23377
          return false;
23378
        if (!this.settlementBy.equals(that.settlementBy))
23379
          return false;
23380
      }
23381
 
23382
      boolean this_present_settledAmount = true;
23383
      boolean that_present_settledAmount = true;
23384
      if (this_present_settledAmount || that_present_settledAmount) {
23385
        if (!(this_present_settledAmount && that_present_settledAmount))
23386
          return false;
23387
        if (this.settledAmount != that.settledAmount)
23388
          return false;
23389
      }
23390
 
23391
      return true;
23392
    }
23393
 
23394
    @Override
23395
    public int hashCode() {
23396
      return 0;
23397
    }
23398
 
23399
    public int compareTo(markPurchasereturnSettled_args other) {
23400
      if (!getClass().equals(other.getClass())) {
23401
        return getClass().getName().compareTo(other.getClass().getName());
23402
      }
23403
 
23404
      int lastComparison = 0;
23405
      markPurchasereturnSettled_args typedOther = (markPurchasereturnSettled_args)other;
23406
 
23407
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
23408
      if (lastComparison != 0) {
23409
        return lastComparison;
23410
      }
23411
      if (isSetId()) {
23412
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
23413
        if (lastComparison != 0) {
23414
          return lastComparison;
23415
        }
23416
      }
23417
      lastComparison = Boolean.valueOf(isSetSettlementType()).compareTo(typedOther.isSetSettlementType());
23418
      if (lastComparison != 0) {
23419
        return lastComparison;
23420
      }
23421
      if (isSetSettlementType()) {
23422
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.settlementType, typedOther.settlementType);
23423
        if (lastComparison != 0) {
23424
          return lastComparison;
23425
        }
23426
      }
23427
      lastComparison = Boolean.valueOf(isSetDocumentNumber()).compareTo(typedOther.isSetDocumentNumber());
23428
      if (lastComparison != 0) {
23429
        return lastComparison;
23430
      }
23431
      if (isSetDocumentNumber()) {
23432
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.documentNumber, typedOther.documentNumber);
23433
        if (lastComparison != 0) {
23434
          return lastComparison;
23435
        }
23436
      }
23437
      lastComparison = Boolean.valueOf(isSetSettlementBy()).compareTo(typedOther.isSetSettlementBy());
23438
      if (lastComparison != 0) {
23439
        return lastComparison;
23440
      }
23441
      if (isSetSettlementBy()) {
23442
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.settlementBy, typedOther.settlementBy);
23443
        if (lastComparison != 0) {
23444
          return lastComparison;
23445
        }
23446
      }
23447
      lastComparison = Boolean.valueOf(isSetSettledAmount()).compareTo(typedOther.isSetSettledAmount());
23448
      if (lastComparison != 0) {
23449
        return lastComparison;
23450
      }
23451
      if (isSetSettledAmount()) {
23452
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.settledAmount, typedOther.settledAmount);
23453
        if (lastComparison != 0) {
23454
          return lastComparison;
23455
        }
23456
      }
23457
      return 0;
23458
    }
23459
 
23460
    public _Fields fieldForId(int fieldId) {
23461
      return _Fields.findByThriftId(fieldId);
23462
    }
23463
 
23464
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
23465
      org.apache.thrift.protocol.TField field;
23466
      iprot.readStructBegin();
23467
      while (true)
23468
      {
23469
        field = iprot.readFieldBegin();
23470
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
23471
          break;
23472
        }
23473
        switch (field.id) {
23474
          case 1: // ID
23475
            if (field.type == org.apache.thrift.protocol.TType.I64) {
23476
              this.id = iprot.readI64();
23477
              setIdIsSet(true);
23478
            } else { 
23479
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23480
            }
23481
            break;
23482
          case 2: // SETTLEMENT_TYPE
23483
            if (field.type == org.apache.thrift.protocol.TType.I32) {
23484
              this.settlementType = SettlementType.findByValue(iprot.readI32());
23485
            } else { 
23486
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23487
            }
23488
            break;
23489
          case 3: // DOCUMENT_NUMBER
23490
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
23491
              this.documentNumber = iprot.readString();
23492
            } else { 
23493
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23494
            }
23495
            break;
23496
          case 4: // SETTLEMENT_BY
23497
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
23498
              this.settlementBy = iprot.readString();
23499
            } else { 
23500
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23501
            }
23502
            break;
23503
          case 5: // SETTLED_AMOUNT
23504
            if (field.type == org.apache.thrift.protocol.TType.I64) {
23505
              this.settledAmount = iprot.readI64();
23506
              setSettledAmountIsSet(true);
23507
            } else { 
23508
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23509
            }
23510
            break;
23511
          default:
23512
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23513
        }
23514
        iprot.readFieldEnd();
23515
      }
23516
      iprot.readStructEnd();
23517
      validate();
23518
    }
23519
 
23520
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
23521
      validate();
23522
 
23523
      oprot.writeStructBegin(STRUCT_DESC);
23524
      oprot.writeFieldBegin(ID_FIELD_DESC);
23525
      oprot.writeI64(this.id);
23526
      oprot.writeFieldEnd();
23527
      if (this.settlementType != null) {
23528
        oprot.writeFieldBegin(SETTLEMENT_TYPE_FIELD_DESC);
23529
        oprot.writeI32(this.settlementType.getValue());
23530
        oprot.writeFieldEnd();
23531
      }
23532
      if (this.documentNumber != null) {
23533
        oprot.writeFieldBegin(DOCUMENT_NUMBER_FIELD_DESC);
23534
        oprot.writeString(this.documentNumber);
23535
        oprot.writeFieldEnd();
23536
      }
23537
      if (this.settlementBy != null) {
23538
        oprot.writeFieldBegin(SETTLEMENT_BY_FIELD_DESC);
23539
        oprot.writeString(this.settlementBy);
23540
        oprot.writeFieldEnd();
23541
      }
23542
      oprot.writeFieldBegin(SETTLED_AMOUNT_FIELD_DESC);
23543
      oprot.writeI64(this.settledAmount);
23544
      oprot.writeFieldEnd();
23545
      oprot.writeFieldStop();
23546
      oprot.writeStructEnd();
23547
    }
23548
 
23549
    @Override
23550
    public String toString() {
23551
      StringBuilder sb = new StringBuilder("markPurchasereturnSettled_args(");
23552
      boolean first = true;
23553
 
23554
      sb.append("id:");
23555
      sb.append(this.id);
23556
      first = false;
23557
      if (!first) sb.append(", ");
23558
      sb.append("settlementType:");
23559
      if (this.settlementType == null) {
23560
        sb.append("null");
23561
      } else {
23562
        sb.append(this.settlementType);
23563
      }
23564
      first = false;
23565
      if (!first) sb.append(", ");
23566
      sb.append("documentNumber:");
23567
      if (this.documentNumber == null) {
23568
        sb.append("null");
23569
      } else {
23570
        sb.append(this.documentNumber);
23571
      }
23572
      first = false;
23573
      if (!first) sb.append(", ");
23574
      sb.append("settlementBy:");
23575
      if (this.settlementBy == null) {
23576
        sb.append("null");
23577
      } else {
23578
        sb.append(this.settlementBy);
23579
      }
23580
      first = false;
23581
      if (!first) sb.append(", ");
23582
      sb.append("settledAmount:");
23583
      sb.append(this.settledAmount);
23584
      first = false;
23585
      sb.append(")");
23586
      return sb.toString();
23587
    }
23588
 
23589
    public void validate() throws org.apache.thrift.TException {
23590
      // check for required fields
23591
    }
23592
 
23593
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
23594
      try {
23595
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
23596
      } catch (org.apache.thrift.TException te) {
23597
        throw new java.io.IOException(te);
23598
      }
23599
    }
23600
 
23601
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
23602
      try {
23603
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
23604
        __isset_bit_vector = new BitSet(1);
23605
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
23606
      } catch (org.apache.thrift.TException te) {
23607
        throw new java.io.IOException(te);
23608
      }
23609
    }
23610
 
23611
  }
23612
 
23613
  public static class markPurchasereturnSettled_result implements org.apache.thrift.TBase<markPurchasereturnSettled_result, markPurchasereturnSettled_result._Fields>, java.io.Serializable, Cloneable   {
23614
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markPurchasereturnSettled_result");
23615
 
23616
    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);
23617
    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);
23618
 
23619
    private boolean success; // required
23620
    private PurchaseServiceException e; // required
23621
 
23622
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23623
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
23624
      SUCCESS((short)0, "success"),
23625
      E((short)1, "e");
23626
 
23627
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23628
 
23629
      static {
23630
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23631
          byName.put(field.getFieldName(), field);
23632
        }
23633
      }
23634
 
23635
      /**
23636
       * Find the _Fields constant that matches fieldId, or null if its not found.
23637
       */
23638
      public static _Fields findByThriftId(int fieldId) {
23639
        switch(fieldId) {
23640
          case 0: // SUCCESS
23641
            return SUCCESS;
23642
          case 1: // E
23643
            return E;
23644
          default:
23645
            return null;
23646
        }
23647
      }
23648
 
23649
      /**
23650
       * Find the _Fields constant that matches fieldId, throwing an exception
23651
       * if it is not found.
23652
       */
23653
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23654
        _Fields fields = findByThriftId(fieldId);
23655
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23656
        return fields;
23657
      }
23658
 
23659
      /**
23660
       * Find the _Fields constant that matches name, or null if its not found.
23661
       */
23662
      public static _Fields findByName(String name) {
23663
        return byName.get(name);
23664
      }
23665
 
23666
      private final short _thriftId;
23667
      private final String _fieldName;
23668
 
23669
      _Fields(short thriftId, String fieldName) {
23670
        _thriftId = thriftId;
23671
        _fieldName = fieldName;
23672
      }
23673
 
23674
      public short getThriftFieldId() {
23675
        return _thriftId;
23676
      }
23677
 
23678
      public String getFieldName() {
23679
        return _fieldName;
23680
      }
23681
    }
23682
 
23683
    // isset id assignments
23684
    private static final int __SUCCESS_ISSET_ID = 0;
23685
    private BitSet __isset_bit_vector = new BitSet(1);
23686
 
23687
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
23688
    static {
23689
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
23690
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23691
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
23692
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23693
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
23694
      metaDataMap = Collections.unmodifiableMap(tmpMap);
23695
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markPurchasereturnSettled_result.class, metaDataMap);
23696
    }
23697
 
23698
    public markPurchasereturnSettled_result() {
23699
    }
23700
 
23701
    public markPurchasereturnSettled_result(
23702
      boolean success,
23703
      PurchaseServiceException e)
23704
    {
23705
      this();
23706
      this.success = success;
23707
      setSuccessIsSet(true);
23708
      this.e = e;
23709
    }
23710
 
23711
    /**
23712
     * Performs a deep copy on <i>other</i>.
23713
     */
23714
    public markPurchasereturnSettled_result(markPurchasereturnSettled_result other) {
23715
      __isset_bit_vector.clear();
23716
      __isset_bit_vector.or(other.__isset_bit_vector);
23717
      this.success = other.success;
23718
      if (other.isSetE()) {
23719
        this.e = new PurchaseServiceException(other.e);
23720
      }
23721
    }
23722
 
23723
    public markPurchasereturnSettled_result deepCopy() {
23724
      return new markPurchasereturnSettled_result(this);
23725
    }
23726
 
23727
    @Override
23728
    public void clear() {
23729
      setSuccessIsSet(false);
23730
      this.success = false;
23731
      this.e = null;
23732
    }
23733
 
23734
    public boolean isSuccess() {
23735
      return this.success;
23736
    }
23737
 
23738
    public void setSuccess(boolean success) {
23739
      this.success = success;
23740
      setSuccessIsSet(true);
23741
    }
23742
 
23743
    public void unsetSuccess() {
23744
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
23745
    }
23746
 
23747
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
23748
    public boolean isSetSuccess() {
23749
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
23750
    }
23751
 
23752
    public void setSuccessIsSet(boolean value) {
23753
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
23754
    }
23755
 
23756
    public PurchaseServiceException getE() {
23757
      return this.e;
23758
    }
23759
 
23760
    public void setE(PurchaseServiceException e) {
23761
      this.e = e;
23762
    }
23763
 
23764
    public void unsetE() {
23765
      this.e = null;
23766
    }
23767
 
23768
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
23769
    public boolean isSetE() {
23770
      return this.e != null;
23771
    }
23772
 
23773
    public void setEIsSet(boolean value) {
23774
      if (!value) {
23775
        this.e = null;
23776
      }
23777
    }
23778
 
23779
    public void setFieldValue(_Fields field, Object value) {
23780
      switch (field) {
23781
      case SUCCESS:
23782
        if (value == null) {
23783
          unsetSuccess();
23784
        } else {
23785
          setSuccess((Boolean)value);
23786
        }
23787
        break;
23788
 
23789
      case E:
23790
        if (value == null) {
23791
          unsetE();
23792
        } else {
23793
          setE((PurchaseServiceException)value);
23794
        }
23795
        break;
23796
 
23797
      }
23798
    }
23799
 
23800
    public Object getFieldValue(_Fields field) {
23801
      switch (field) {
23802
      case SUCCESS:
23803
        return Boolean.valueOf(isSuccess());
23804
 
23805
      case E:
23806
        return getE();
23807
 
23808
      }
23809
      throw new IllegalStateException();
23810
    }
23811
 
23812
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
23813
    public boolean isSet(_Fields field) {
23814
      if (field == null) {
23815
        throw new IllegalArgumentException();
23816
      }
23817
 
23818
      switch (field) {
23819
      case SUCCESS:
23820
        return isSetSuccess();
23821
      case E:
23822
        return isSetE();
23823
      }
23824
      throw new IllegalStateException();
23825
    }
23826
 
23827
    @Override
23828
    public boolean equals(Object that) {
23829
      if (that == null)
23830
        return false;
23831
      if (that instanceof markPurchasereturnSettled_result)
23832
        return this.equals((markPurchasereturnSettled_result)that);
23833
      return false;
23834
    }
23835
 
23836
    public boolean equals(markPurchasereturnSettled_result that) {
23837
      if (that == null)
23838
        return false;
23839
 
23840
      boolean this_present_success = true;
23841
      boolean that_present_success = true;
23842
      if (this_present_success || that_present_success) {
23843
        if (!(this_present_success && that_present_success))
23844
          return false;
23845
        if (this.success != that.success)
23846
          return false;
23847
      }
23848
 
23849
      boolean this_present_e = true && this.isSetE();
23850
      boolean that_present_e = true && that.isSetE();
23851
      if (this_present_e || that_present_e) {
23852
        if (!(this_present_e && that_present_e))
23853
          return false;
23854
        if (!this.e.equals(that.e))
23855
          return false;
23856
      }
23857
 
23858
      return true;
23859
    }
23860
 
23861
    @Override
23862
    public int hashCode() {
23863
      return 0;
23864
    }
23865
 
23866
    public int compareTo(markPurchasereturnSettled_result other) {
23867
      if (!getClass().equals(other.getClass())) {
23868
        return getClass().getName().compareTo(other.getClass().getName());
23869
      }
23870
 
23871
      int lastComparison = 0;
23872
      markPurchasereturnSettled_result typedOther = (markPurchasereturnSettled_result)other;
23873
 
23874
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
23875
      if (lastComparison != 0) {
23876
        return lastComparison;
23877
      }
23878
      if (isSetSuccess()) {
23879
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
23880
        if (lastComparison != 0) {
23881
          return lastComparison;
23882
        }
23883
      }
23884
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
23885
      if (lastComparison != 0) {
23886
        return lastComparison;
23887
      }
23888
      if (isSetE()) {
23889
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
23890
        if (lastComparison != 0) {
23891
          return lastComparison;
23892
        }
23893
      }
23894
      return 0;
23895
    }
23896
 
23897
    public _Fields fieldForId(int fieldId) {
23898
      return _Fields.findByThriftId(fieldId);
23899
    }
23900
 
23901
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
23902
      org.apache.thrift.protocol.TField field;
23903
      iprot.readStructBegin();
23904
      while (true)
23905
      {
23906
        field = iprot.readFieldBegin();
23907
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
23908
          break;
23909
        }
23910
        switch (field.id) {
23911
          case 0: // SUCCESS
23912
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
23913
              this.success = iprot.readBool();
23914
              setSuccessIsSet(true);
23915
            } else { 
23916
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23917
            }
23918
            break;
23919
          case 1: // E
23920
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
23921
              this.e = new PurchaseServiceException();
23922
              this.e.read(iprot);
23923
            } else { 
23924
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23925
            }
23926
            break;
23927
          default:
23928
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23929
        }
23930
        iprot.readFieldEnd();
23931
      }
23932
      iprot.readStructEnd();
23933
      validate();
23934
    }
23935
 
23936
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
23937
      oprot.writeStructBegin(STRUCT_DESC);
23938
 
23939
      if (this.isSetSuccess()) {
23940
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
23941
        oprot.writeBool(this.success);
23942
        oprot.writeFieldEnd();
23943
      } else if (this.isSetE()) {
23944
        oprot.writeFieldBegin(E_FIELD_DESC);
23945
        this.e.write(oprot);
23946
        oprot.writeFieldEnd();
23947
      }
23948
      oprot.writeFieldStop();
23949
      oprot.writeStructEnd();
23950
    }
23951
 
23952
    @Override
23953
    public String toString() {
23954
      StringBuilder sb = new StringBuilder("markPurchasereturnSettled_result(");
23955
      boolean first = true;
23956
 
23957
      sb.append("success:");
23958
      sb.append(this.success);
23959
      first = false;
23960
      if (!first) sb.append(", ");
23961
      sb.append("e:");
23962
      if (this.e == null) {
23963
        sb.append("null");
23964
      } else {
23965
        sb.append(this.e);
23966
      }
23967
      first = false;
23968
      sb.append(")");
23969
      return sb.toString();
23970
    }
23971
 
23972
    public void validate() throws org.apache.thrift.TException {
23973
      // check for required fields
23974
    }
23975
 
23976
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
23977
      try {
23978
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
23979
      } catch (org.apache.thrift.TException te) {
23980
        throw new java.io.IOException(te);
23981
      }
23982
    }
23983
 
23984
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
23985
      try {
23986
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
23987
      } catch (org.apache.thrift.TException te) {
23988
        throw new java.io.IOException(te);
23989
      }
23990
    }
23991
 
23992
  }
23993
 
23994
  public static class getPrSettlementsForPurchaseReturn_args implements org.apache.thrift.TBase<getPrSettlementsForPurchaseReturn_args, getPrSettlementsForPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
23995
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPrSettlementsForPurchaseReturn_args");
23996
 
23997
    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);
23998
 
23999
    private long purchaseReturnId; // required
24000
 
24001
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24002
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
24003
      PURCHASE_RETURN_ID((short)1, "purchaseReturnId");
24004
 
24005
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24006
 
24007
      static {
24008
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24009
          byName.put(field.getFieldName(), field);
24010
        }
24011
      }
24012
 
24013
      /**
24014
       * Find the _Fields constant that matches fieldId, or null if its not found.
24015
       */
24016
      public static _Fields findByThriftId(int fieldId) {
24017
        switch(fieldId) {
24018
          case 1: // PURCHASE_RETURN_ID
24019
            return PURCHASE_RETURN_ID;
24020
          default:
24021
            return null;
24022
        }
24023
      }
24024
 
24025
      /**
24026
       * Find the _Fields constant that matches fieldId, throwing an exception
24027
       * if it is not found.
24028
       */
24029
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24030
        _Fields fields = findByThriftId(fieldId);
24031
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24032
        return fields;
24033
      }
24034
 
24035
      /**
24036
       * Find the _Fields constant that matches name, or null if its not found.
24037
       */
24038
      public static _Fields findByName(String name) {
24039
        return byName.get(name);
24040
      }
24041
 
24042
      private final short _thriftId;
24043
      private final String _fieldName;
24044
 
24045
      _Fields(short thriftId, String fieldName) {
24046
        _thriftId = thriftId;
24047
        _fieldName = fieldName;
24048
      }
24049
 
24050
      public short getThriftFieldId() {
24051
        return _thriftId;
24052
      }
24053
 
24054
      public String getFieldName() {
24055
        return _fieldName;
24056
      }
24057
    }
24058
 
24059
    // isset id assignments
24060
    private static final int __PURCHASERETURNID_ISSET_ID = 0;
24061
    private BitSet __isset_bit_vector = new BitSet(1);
24062
 
24063
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
24064
    static {
24065
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
24066
      tmpMap.put(_Fields.PURCHASE_RETURN_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseReturnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
24067
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
24068
      metaDataMap = Collections.unmodifiableMap(tmpMap);
24069
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPrSettlementsForPurchaseReturn_args.class, metaDataMap);
24070
    }
24071
 
24072
    public getPrSettlementsForPurchaseReturn_args() {
24073
    }
24074
 
24075
    public getPrSettlementsForPurchaseReturn_args(
24076
      long purchaseReturnId)
24077
    {
24078
      this();
24079
      this.purchaseReturnId = purchaseReturnId;
24080
      setPurchaseReturnIdIsSet(true);
24081
    }
24082
 
24083
    /**
24084
     * Performs a deep copy on <i>other</i>.
24085
     */
24086
    public getPrSettlementsForPurchaseReturn_args(getPrSettlementsForPurchaseReturn_args other) {
24087
      __isset_bit_vector.clear();
24088
      __isset_bit_vector.or(other.__isset_bit_vector);
24089
      this.purchaseReturnId = other.purchaseReturnId;
24090
    }
24091
 
24092
    public getPrSettlementsForPurchaseReturn_args deepCopy() {
24093
      return new getPrSettlementsForPurchaseReturn_args(this);
24094
    }
24095
 
24096
    @Override
24097
    public void clear() {
24098
      setPurchaseReturnIdIsSet(false);
24099
      this.purchaseReturnId = 0;
24100
    }
24101
 
24102
    public long getPurchaseReturnId() {
24103
      return this.purchaseReturnId;
24104
    }
24105
 
24106
    public void setPurchaseReturnId(long purchaseReturnId) {
24107
      this.purchaseReturnId = purchaseReturnId;
24108
      setPurchaseReturnIdIsSet(true);
24109
    }
24110
 
24111
    public void unsetPurchaseReturnId() {
24112
      __isset_bit_vector.clear(__PURCHASERETURNID_ISSET_ID);
24113
    }
24114
 
24115
    /** Returns true if field purchaseReturnId is set (has been assigned a value) and false otherwise */
24116
    public boolean isSetPurchaseReturnId() {
24117
      return __isset_bit_vector.get(__PURCHASERETURNID_ISSET_ID);
24118
    }
24119
 
24120
    public void setPurchaseReturnIdIsSet(boolean value) {
24121
      __isset_bit_vector.set(__PURCHASERETURNID_ISSET_ID, value);
24122
    }
24123
 
24124
    public void setFieldValue(_Fields field, Object value) {
24125
      switch (field) {
24126
      case PURCHASE_RETURN_ID:
24127
        if (value == null) {
24128
          unsetPurchaseReturnId();
24129
        } else {
24130
          setPurchaseReturnId((Long)value);
24131
        }
24132
        break;
24133
 
24134
      }
24135
    }
24136
 
24137
    public Object getFieldValue(_Fields field) {
24138
      switch (field) {
24139
      case PURCHASE_RETURN_ID:
24140
        return Long.valueOf(getPurchaseReturnId());
24141
 
24142
      }
24143
      throw new IllegalStateException();
24144
    }
24145
 
24146
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
24147
    public boolean isSet(_Fields field) {
24148
      if (field == null) {
24149
        throw new IllegalArgumentException();
24150
      }
24151
 
24152
      switch (field) {
24153
      case PURCHASE_RETURN_ID:
24154
        return isSetPurchaseReturnId();
24155
      }
24156
      throw new IllegalStateException();
24157
    }
24158
 
24159
    @Override
24160
    public boolean equals(Object that) {
24161
      if (that == null)
24162
        return false;
24163
      if (that instanceof getPrSettlementsForPurchaseReturn_args)
24164
        return this.equals((getPrSettlementsForPurchaseReturn_args)that);
24165
      return false;
24166
    }
24167
 
24168
    public boolean equals(getPrSettlementsForPurchaseReturn_args that) {
24169
      if (that == null)
24170
        return false;
24171
 
24172
      boolean this_present_purchaseReturnId = true;
24173
      boolean that_present_purchaseReturnId = true;
24174
      if (this_present_purchaseReturnId || that_present_purchaseReturnId) {
24175
        if (!(this_present_purchaseReturnId && that_present_purchaseReturnId))
24176
          return false;
24177
        if (this.purchaseReturnId != that.purchaseReturnId)
24178
          return false;
24179
      }
24180
 
24181
      return true;
24182
    }
24183
 
24184
    @Override
24185
    public int hashCode() {
24186
      return 0;
24187
    }
24188
 
24189
    public int compareTo(getPrSettlementsForPurchaseReturn_args other) {
24190
      if (!getClass().equals(other.getClass())) {
24191
        return getClass().getName().compareTo(other.getClass().getName());
24192
      }
24193
 
24194
      int lastComparison = 0;
24195
      getPrSettlementsForPurchaseReturn_args typedOther = (getPrSettlementsForPurchaseReturn_args)other;
24196
 
24197
      lastComparison = Boolean.valueOf(isSetPurchaseReturnId()).compareTo(typedOther.isSetPurchaseReturnId());
24198
      if (lastComparison != 0) {
24199
        return lastComparison;
24200
      }
24201
      if (isSetPurchaseReturnId()) {
24202
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseReturnId, typedOther.purchaseReturnId);
24203
        if (lastComparison != 0) {
24204
          return lastComparison;
24205
        }
24206
      }
24207
      return 0;
24208
    }
24209
 
24210
    public _Fields fieldForId(int fieldId) {
24211
      return _Fields.findByThriftId(fieldId);
24212
    }
24213
 
24214
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
24215
      org.apache.thrift.protocol.TField field;
24216
      iprot.readStructBegin();
24217
      while (true)
24218
      {
24219
        field = iprot.readFieldBegin();
24220
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
24221
          break;
24222
        }
24223
        switch (field.id) {
24224
          case 1: // PURCHASE_RETURN_ID
24225
            if (field.type == org.apache.thrift.protocol.TType.I64) {
24226
              this.purchaseReturnId = iprot.readI64();
24227
              setPurchaseReturnIdIsSet(true);
24228
            } else { 
24229
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24230
            }
24231
            break;
24232
          default:
24233
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24234
        }
24235
        iprot.readFieldEnd();
24236
      }
24237
      iprot.readStructEnd();
24238
      validate();
24239
    }
24240
 
24241
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
24242
      validate();
24243
 
24244
      oprot.writeStructBegin(STRUCT_DESC);
24245
      oprot.writeFieldBegin(PURCHASE_RETURN_ID_FIELD_DESC);
24246
      oprot.writeI64(this.purchaseReturnId);
24247
      oprot.writeFieldEnd();
24248
      oprot.writeFieldStop();
24249
      oprot.writeStructEnd();
24250
    }
24251
 
24252
    @Override
24253
    public String toString() {
24254
      StringBuilder sb = new StringBuilder("getPrSettlementsForPurchaseReturn_args(");
24255
      boolean first = true;
24256
 
24257
      sb.append("purchaseReturnId:");
24258
      sb.append(this.purchaseReturnId);
24259
      first = false;
24260
      sb.append(")");
24261
      return sb.toString();
24262
    }
24263
 
24264
    public void validate() throws org.apache.thrift.TException {
24265
      // check for required fields
24266
    }
24267
 
24268
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
24269
      try {
24270
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
24271
      } catch (org.apache.thrift.TException te) {
24272
        throw new java.io.IOException(te);
24273
      }
24274
    }
24275
 
24276
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
24277
      try {
24278
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
24279
        __isset_bit_vector = new BitSet(1);
24280
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
24281
      } catch (org.apache.thrift.TException te) {
24282
        throw new java.io.IOException(te);
24283
      }
24284
    }
24285
 
24286
  }
24287
 
24288
  public static class getPrSettlementsForPurchaseReturn_result implements org.apache.thrift.TBase<getPrSettlementsForPurchaseReturn_result, getPrSettlementsForPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
24289
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPrSettlementsForPurchaseReturn_result");
24290
 
24291
    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);
24292
    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);
24293
 
24294
    private List<PurchaseReturnSettlement> success; // required
24295
    private PurchaseServiceException e; // required
24296
 
24297
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24298
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
24299
      SUCCESS((short)0, "success"),
24300
      E((short)1, "e");
24301
 
24302
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24303
 
24304
      static {
24305
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24306
          byName.put(field.getFieldName(), field);
24307
        }
24308
      }
24309
 
24310
      /**
24311
       * Find the _Fields constant that matches fieldId, or null if its not found.
24312
       */
24313
      public static _Fields findByThriftId(int fieldId) {
24314
        switch(fieldId) {
24315
          case 0: // SUCCESS
24316
            return SUCCESS;
24317
          case 1: // E
24318
            return E;
24319
          default:
24320
            return null;
24321
        }
24322
      }
24323
 
24324
      /**
24325
       * Find the _Fields constant that matches fieldId, throwing an exception
24326
       * if it is not found.
24327
       */
24328
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24329
        _Fields fields = findByThriftId(fieldId);
24330
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24331
        return fields;
24332
      }
24333
 
24334
      /**
24335
       * Find the _Fields constant that matches name, or null if its not found.
24336
       */
24337
      public static _Fields findByName(String name) {
24338
        return byName.get(name);
24339
      }
24340
 
24341
      private final short _thriftId;
24342
      private final String _fieldName;
24343
 
24344
      _Fields(short thriftId, String fieldName) {
24345
        _thriftId = thriftId;
24346
        _fieldName = fieldName;
24347
      }
24348
 
24349
      public short getThriftFieldId() {
24350
        return _thriftId;
24351
      }
24352
 
24353
      public String getFieldName() {
24354
        return _fieldName;
24355
      }
24356
    }
24357
 
24358
    // isset id assignments
24359
 
24360
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
24361
    static {
24362
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
24363
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
24364
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
24365
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturnSettlement.class))));
24366
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
24367
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
24368
      metaDataMap = Collections.unmodifiableMap(tmpMap);
24369
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPrSettlementsForPurchaseReturn_result.class, metaDataMap);
24370
    }
24371
 
24372
    public getPrSettlementsForPurchaseReturn_result() {
24373
    }
24374
 
24375
    public getPrSettlementsForPurchaseReturn_result(
24376
      List<PurchaseReturnSettlement> success,
24377
      PurchaseServiceException e)
24378
    {
24379
      this();
24380
      this.success = success;
24381
      this.e = e;
24382
    }
24383
 
24384
    /**
24385
     * Performs a deep copy on <i>other</i>.
24386
     */
24387
    public getPrSettlementsForPurchaseReturn_result(getPrSettlementsForPurchaseReturn_result other) {
24388
      if (other.isSetSuccess()) {
24389
        List<PurchaseReturnSettlement> __this__success = new ArrayList<PurchaseReturnSettlement>();
24390
        for (PurchaseReturnSettlement other_element : other.success) {
24391
          __this__success.add(new PurchaseReturnSettlement(other_element));
24392
        }
24393
        this.success = __this__success;
24394
      }
24395
      if (other.isSetE()) {
24396
        this.e = new PurchaseServiceException(other.e);
24397
      }
24398
    }
24399
 
24400
    public getPrSettlementsForPurchaseReturn_result deepCopy() {
24401
      return new getPrSettlementsForPurchaseReturn_result(this);
24402
    }
24403
 
24404
    @Override
24405
    public void clear() {
24406
      this.success = null;
24407
      this.e = null;
24408
    }
24409
 
24410
    public int getSuccessSize() {
24411
      return (this.success == null) ? 0 : this.success.size();
24412
    }
24413
 
24414
    public java.util.Iterator<PurchaseReturnSettlement> getSuccessIterator() {
24415
      return (this.success == null) ? null : this.success.iterator();
24416
    }
24417
 
24418
    public void addToSuccess(PurchaseReturnSettlement elem) {
24419
      if (this.success == null) {
24420
        this.success = new ArrayList<PurchaseReturnSettlement>();
24421
      }
24422
      this.success.add(elem);
24423
    }
24424
 
24425
    public List<PurchaseReturnSettlement> getSuccess() {
24426
      return this.success;
24427
    }
24428
 
24429
    public void setSuccess(List<PurchaseReturnSettlement> success) {
24430
      this.success = success;
24431
    }
24432
 
24433
    public void unsetSuccess() {
24434
      this.success = null;
24435
    }
24436
 
24437
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
24438
    public boolean isSetSuccess() {
24439
      return this.success != null;
24440
    }
24441
 
24442
    public void setSuccessIsSet(boolean value) {
24443
      if (!value) {
24444
        this.success = null;
24445
      }
24446
    }
24447
 
24448
    public PurchaseServiceException getE() {
24449
      return this.e;
24450
    }
24451
 
24452
    public void setE(PurchaseServiceException e) {
24453
      this.e = e;
24454
    }
24455
 
24456
    public void unsetE() {
24457
      this.e = null;
24458
    }
24459
 
24460
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
24461
    public boolean isSetE() {
24462
      return this.e != null;
24463
    }
24464
 
24465
    public void setEIsSet(boolean value) {
24466
      if (!value) {
24467
        this.e = null;
24468
      }
24469
    }
24470
 
24471
    public void setFieldValue(_Fields field, Object value) {
24472
      switch (field) {
24473
      case SUCCESS:
24474
        if (value == null) {
24475
          unsetSuccess();
24476
        } else {
24477
          setSuccess((List<PurchaseReturnSettlement>)value);
24478
        }
24479
        break;
24480
 
24481
      case E:
24482
        if (value == null) {
24483
          unsetE();
24484
        } else {
24485
          setE((PurchaseServiceException)value);
24486
        }
24487
        break;
24488
 
24489
      }
24490
    }
24491
 
24492
    public Object getFieldValue(_Fields field) {
24493
      switch (field) {
24494
      case SUCCESS:
24495
        return getSuccess();
24496
 
24497
      case E:
24498
        return getE();
24499
 
24500
      }
24501
      throw new IllegalStateException();
24502
    }
24503
 
24504
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
24505
    public boolean isSet(_Fields field) {
24506
      if (field == null) {
24507
        throw new IllegalArgumentException();
24508
      }
24509
 
24510
      switch (field) {
24511
      case SUCCESS:
24512
        return isSetSuccess();
24513
      case E:
24514
        return isSetE();
24515
      }
24516
      throw new IllegalStateException();
24517
    }
24518
 
24519
    @Override
24520
    public boolean equals(Object that) {
24521
      if (that == null)
24522
        return false;
24523
      if (that instanceof getPrSettlementsForPurchaseReturn_result)
24524
        return this.equals((getPrSettlementsForPurchaseReturn_result)that);
24525
      return false;
24526
    }
24527
 
24528
    public boolean equals(getPrSettlementsForPurchaseReturn_result that) {
24529
      if (that == null)
24530
        return false;
24531
 
24532
      boolean this_present_success = true && this.isSetSuccess();
24533
      boolean that_present_success = true && that.isSetSuccess();
24534
      if (this_present_success || that_present_success) {
24535
        if (!(this_present_success && that_present_success))
24536
          return false;
24537
        if (!this.success.equals(that.success))
24538
          return false;
24539
      }
24540
 
24541
      boolean this_present_e = true && this.isSetE();
24542
      boolean that_present_e = true && that.isSetE();
24543
      if (this_present_e || that_present_e) {
24544
        if (!(this_present_e && that_present_e))
24545
          return false;
24546
        if (!this.e.equals(that.e))
24547
          return false;
24548
      }
24549
 
24550
      return true;
24551
    }
24552
 
24553
    @Override
24554
    public int hashCode() {
24555
      return 0;
24556
    }
24557
 
24558
    public int compareTo(getPrSettlementsForPurchaseReturn_result other) {
24559
      if (!getClass().equals(other.getClass())) {
24560
        return getClass().getName().compareTo(other.getClass().getName());
24561
      }
24562
 
24563
      int lastComparison = 0;
24564
      getPrSettlementsForPurchaseReturn_result typedOther = (getPrSettlementsForPurchaseReturn_result)other;
24565
 
24566
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
24567
      if (lastComparison != 0) {
24568
        return lastComparison;
24569
      }
24570
      if (isSetSuccess()) {
24571
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
24572
        if (lastComparison != 0) {
24573
          return lastComparison;
24574
        }
24575
      }
24576
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
24577
      if (lastComparison != 0) {
24578
        return lastComparison;
24579
      }
24580
      if (isSetE()) {
24581
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
24582
        if (lastComparison != 0) {
24583
          return lastComparison;
24584
        }
24585
      }
24586
      return 0;
24587
    }
24588
 
24589
    public _Fields fieldForId(int fieldId) {
24590
      return _Fields.findByThriftId(fieldId);
24591
    }
24592
 
24593
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
24594
      org.apache.thrift.protocol.TField field;
24595
      iprot.readStructBegin();
24596
      while (true)
24597
      {
24598
        field = iprot.readFieldBegin();
24599
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
24600
          break;
24601
        }
24602
        switch (field.id) {
24603
          case 0: // SUCCESS
24604
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
24605
              {
24606
                org.apache.thrift.protocol.TList _list40 = iprot.readListBegin();
24607
                this.success = new ArrayList<PurchaseReturnSettlement>(_list40.size);
24608
                for (int _i41 = 0; _i41 < _list40.size; ++_i41)
24609
                {
24610
                  PurchaseReturnSettlement _elem42; // required
24611
                  _elem42 = new PurchaseReturnSettlement();
24612
                  _elem42.read(iprot);
24613
                  this.success.add(_elem42);
24614
                }
24615
                iprot.readListEnd();
24616
              }
24617
            } else { 
24618
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24619
            }
24620
            break;
24621
          case 1: // E
24622
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
24623
              this.e = new PurchaseServiceException();
24624
              this.e.read(iprot);
24625
            } else { 
24626
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24627
            }
24628
            break;
24629
          default:
24630
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24631
        }
24632
        iprot.readFieldEnd();
24633
      }
24634
      iprot.readStructEnd();
24635
      validate();
24636
    }
24637
 
24638
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
24639
      oprot.writeStructBegin(STRUCT_DESC);
24640
 
24641
      if (this.isSetSuccess()) {
24642
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
24643
        {
24644
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
24645
          for (PurchaseReturnSettlement _iter43 : this.success)
24646
          {
24647
            _iter43.write(oprot);
24648
          }
24649
          oprot.writeListEnd();
24650
        }
24651
        oprot.writeFieldEnd();
24652
      } else if (this.isSetE()) {
24653
        oprot.writeFieldBegin(E_FIELD_DESC);
24654
        this.e.write(oprot);
24655
        oprot.writeFieldEnd();
24656
      }
24657
      oprot.writeFieldStop();
24658
      oprot.writeStructEnd();
24659
    }
24660
 
24661
    @Override
24662
    public String toString() {
24663
      StringBuilder sb = new StringBuilder("getPrSettlementsForPurchaseReturn_result(");
24664
      boolean first = true;
24665
 
24666
      sb.append("success:");
24667
      if (this.success == null) {
24668
        sb.append("null");
24669
      } else {
24670
        sb.append(this.success);
24671
      }
24672
      first = false;
24673
      if (!first) sb.append(", ");
24674
      sb.append("e:");
24675
      if (this.e == null) {
24676
        sb.append("null");
24677
      } else {
24678
        sb.append(this.e);
24679
      }
24680
      first = false;
24681
      sb.append(")");
24682
      return sb.toString();
24683
    }
24684
 
24685
    public void validate() throws org.apache.thrift.TException {
24686
      // check for required fields
24687
    }
24688
 
24689
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
24690
      try {
24691
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
24692
      } catch (org.apache.thrift.TException te) {
24693
        throw new java.io.IOException(te);
24694
      }
24695
    }
24696
 
24697
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
24698
      try {
24699
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
24700
      } catch (org.apache.thrift.TException te) {
24701
        throw new java.io.IOException(te);
24702
      }
24703
    }
24704
 
24705
  }
24706
 
24707
  public static class updatePurchaseReturn_args implements org.apache.thrift.TBase<updatePurchaseReturn_args, updatePurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
24708
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseReturn_args");
24709
 
24710
    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);
24711
 
24712
    private PurchaseReturn purchaseReturn; // required
24713
 
24714
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24715
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
24716
      PURCHASE_RETURN((short)1, "purchaseReturn");
24717
 
24718
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24719
 
24720
      static {
24721
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24722
          byName.put(field.getFieldName(), field);
24723
        }
24724
      }
24725
 
24726
      /**
24727
       * Find the _Fields constant that matches fieldId, or null if its not found.
24728
       */
24729
      public static _Fields findByThriftId(int fieldId) {
24730
        switch(fieldId) {
24731
          case 1: // PURCHASE_RETURN
24732
            return PURCHASE_RETURN;
24733
          default:
24734
            return null;
24735
        }
24736
      }
24737
 
24738
      /**
24739
       * Find the _Fields constant that matches fieldId, throwing an exception
24740
       * if it is not found.
24741
       */
24742
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24743
        _Fields fields = findByThriftId(fieldId);
24744
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24745
        return fields;
24746
      }
24747
 
24748
      /**
24749
       * Find the _Fields constant that matches name, or null if its not found.
24750
       */
24751
      public static _Fields findByName(String name) {
24752
        return byName.get(name);
24753
      }
24754
 
24755
      private final short _thriftId;
24756
      private final String _fieldName;
24757
 
24758
      _Fields(short thriftId, String fieldName) {
24759
        _thriftId = thriftId;
24760
        _fieldName = fieldName;
24761
      }
24762
 
24763
      public short getThriftFieldId() {
24764
        return _thriftId;
24765
      }
24766
 
24767
      public String getFieldName() {
24768
        return _fieldName;
24769
      }
24770
    }
24771
 
24772
    // isset id assignments
24773
 
24774
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
24775
    static {
24776
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
24777
      tmpMap.put(_Fields.PURCHASE_RETURN, new org.apache.thrift.meta_data.FieldMetaData("purchaseReturn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
24778
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class)));
24779
      metaDataMap = Collections.unmodifiableMap(tmpMap);
24780
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseReturn_args.class, metaDataMap);
24781
    }
24782
 
24783
    public updatePurchaseReturn_args() {
24784
    }
24785
 
24786
    public updatePurchaseReturn_args(
24787
      PurchaseReturn purchaseReturn)
24788
    {
24789
      this();
24790
      this.purchaseReturn = purchaseReturn;
24791
    }
24792
 
24793
    /**
24794
     * Performs a deep copy on <i>other</i>.
24795
     */
24796
    public updatePurchaseReturn_args(updatePurchaseReturn_args other) {
24797
      if (other.isSetPurchaseReturn()) {
24798
        this.purchaseReturn = new PurchaseReturn(other.purchaseReturn);
24799
      }
24800
    }
24801
 
24802
    public updatePurchaseReturn_args deepCopy() {
24803
      return new updatePurchaseReturn_args(this);
24804
    }
24805
 
24806
    @Override
24807
    public void clear() {
24808
      this.purchaseReturn = null;
24809
    }
24810
 
24811
    public PurchaseReturn getPurchaseReturn() {
24812
      return this.purchaseReturn;
24813
    }
24814
 
24815
    public void setPurchaseReturn(PurchaseReturn purchaseReturn) {
24816
      this.purchaseReturn = purchaseReturn;
24817
    }
24818
 
24819
    public void unsetPurchaseReturn() {
24820
      this.purchaseReturn = null;
24821
    }
24822
 
24823
    /** Returns true if field purchaseReturn is set (has been assigned a value) and false otherwise */
24824
    public boolean isSetPurchaseReturn() {
24825
      return this.purchaseReturn != null;
24826
    }
24827
 
24828
    public void setPurchaseReturnIsSet(boolean value) {
24829
      if (!value) {
24830
        this.purchaseReturn = null;
24831
      }
24832
    }
24833
 
24834
    public void setFieldValue(_Fields field, Object value) {
24835
      switch (field) {
24836
      case PURCHASE_RETURN:
24837
        if (value == null) {
24838
          unsetPurchaseReturn();
24839
        } else {
24840
          setPurchaseReturn((PurchaseReturn)value);
24841
        }
24842
        break;
24843
 
24844
      }
24845
    }
24846
 
24847
    public Object getFieldValue(_Fields field) {
24848
      switch (field) {
24849
      case PURCHASE_RETURN:
24850
        return getPurchaseReturn();
24851
 
24852
      }
24853
      throw new IllegalStateException();
24854
    }
24855
 
24856
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
24857
    public boolean isSet(_Fields field) {
24858
      if (field == null) {
24859
        throw new IllegalArgumentException();
24860
      }
24861
 
24862
      switch (field) {
24863
      case PURCHASE_RETURN:
24864
        return isSetPurchaseReturn();
24865
      }
24866
      throw new IllegalStateException();
24867
    }
24868
 
24869
    @Override
24870
    public boolean equals(Object that) {
24871
      if (that == null)
24872
        return false;
24873
      if (that instanceof updatePurchaseReturn_args)
24874
        return this.equals((updatePurchaseReturn_args)that);
24875
      return false;
24876
    }
24877
 
24878
    public boolean equals(updatePurchaseReturn_args that) {
24879
      if (that == null)
24880
        return false;
24881
 
24882
      boolean this_present_purchaseReturn = true && this.isSetPurchaseReturn();
24883
      boolean that_present_purchaseReturn = true && that.isSetPurchaseReturn();
24884
      if (this_present_purchaseReturn || that_present_purchaseReturn) {
24885
        if (!(this_present_purchaseReturn && that_present_purchaseReturn))
24886
          return false;
24887
        if (!this.purchaseReturn.equals(that.purchaseReturn))
24888
          return false;
24889
      }
24890
 
24891
      return true;
24892
    }
24893
 
24894
    @Override
24895
    public int hashCode() {
24896
      return 0;
24897
    }
24898
 
24899
    public int compareTo(updatePurchaseReturn_args other) {
24900
      if (!getClass().equals(other.getClass())) {
24901
        return getClass().getName().compareTo(other.getClass().getName());
24902
      }
24903
 
24904
      int lastComparison = 0;
24905
      updatePurchaseReturn_args typedOther = (updatePurchaseReturn_args)other;
24906
 
24907
      lastComparison = Boolean.valueOf(isSetPurchaseReturn()).compareTo(typedOther.isSetPurchaseReturn());
24908
      if (lastComparison != 0) {
24909
        return lastComparison;
24910
      }
24911
      if (isSetPurchaseReturn()) {
24912
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseReturn, typedOther.purchaseReturn);
24913
        if (lastComparison != 0) {
24914
          return lastComparison;
24915
        }
24916
      }
24917
      return 0;
24918
    }
24919
 
24920
    public _Fields fieldForId(int fieldId) {
24921
      return _Fields.findByThriftId(fieldId);
24922
    }
24923
 
24924
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
24925
      org.apache.thrift.protocol.TField field;
24926
      iprot.readStructBegin();
24927
      while (true)
24928
      {
24929
        field = iprot.readFieldBegin();
24930
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
24931
          break;
24932
        }
24933
        switch (field.id) {
24934
          case 1: // PURCHASE_RETURN
24935
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
24936
              this.purchaseReturn = new PurchaseReturn();
24937
              this.purchaseReturn.read(iprot);
24938
            } else { 
24939
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24940
            }
24941
            break;
24942
          default:
24943
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24944
        }
24945
        iprot.readFieldEnd();
24946
      }
24947
      iprot.readStructEnd();
24948
      validate();
24949
    }
24950
 
24951
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
24952
      validate();
24953
 
24954
      oprot.writeStructBegin(STRUCT_DESC);
24955
      if (this.purchaseReturn != null) {
24956
        oprot.writeFieldBegin(PURCHASE_RETURN_FIELD_DESC);
24957
        this.purchaseReturn.write(oprot);
24958
        oprot.writeFieldEnd();
24959
      }
24960
      oprot.writeFieldStop();
24961
      oprot.writeStructEnd();
24962
    }
24963
 
24964
    @Override
24965
    public String toString() {
24966
      StringBuilder sb = new StringBuilder("updatePurchaseReturn_args(");
24967
      boolean first = true;
24968
 
24969
      sb.append("purchaseReturn:");
24970
      if (this.purchaseReturn == null) {
24971
        sb.append("null");
24972
      } else {
24973
        sb.append(this.purchaseReturn);
24974
      }
24975
      first = false;
24976
      sb.append(")");
24977
      return sb.toString();
24978
    }
24979
 
24980
    public void validate() throws org.apache.thrift.TException {
24981
      // check for required fields
24982
    }
24983
 
24984
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
24985
      try {
24986
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
24987
      } catch (org.apache.thrift.TException te) {
24988
        throw new java.io.IOException(te);
24989
      }
24990
    }
24991
 
24992
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
24993
      try {
24994
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
24995
      } catch (org.apache.thrift.TException te) {
24996
        throw new java.io.IOException(te);
24997
      }
24998
    }
24999
 
25000
  }
25001
 
25002
  public static class updatePurchaseReturn_result implements org.apache.thrift.TBase<updatePurchaseReturn_result, updatePurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
25003
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseReturn_result");
25004
 
25005
    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);
25006
 
25007
    private PurchaseServiceException e; // required
25008
 
25009
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25010
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
25011
      E((short)1, "e");
25012
 
25013
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25014
 
25015
      static {
25016
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25017
          byName.put(field.getFieldName(), field);
25018
        }
25019
      }
25020
 
25021
      /**
25022
       * Find the _Fields constant that matches fieldId, or null if its not found.
25023
       */
25024
      public static _Fields findByThriftId(int fieldId) {
25025
        switch(fieldId) {
25026
          case 1: // E
25027
            return E;
25028
          default:
25029
            return null;
25030
        }
25031
      }
25032
 
25033
      /**
25034
       * Find the _Fields constant that matches fieldId, throwing an exception
25035
       * if it is not found.
25036
       */
25037
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25038
        _Fields fields = findByThriftId(fieldId);
25039
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25040
        return fields;
25041
      }
25042
 
25043
      /**
25044
       * Find the _Fields constant that matches name, or null if its not found.
25045
       */
25046
      public static _Fields findByName(String name) {
25047
        return byName.get(name);
25048
      }
25049
 
25050
      private final short _thriftId;
25051
      private final String _fieldName;
25052
 
25053
      _Fields(short thriftId, String fieldName) {
25054
        _thriftId = thriftId;
25055
        _fieldName = fieldName;
25056
      }
25057
 
25058
      public short getThriftFieldId() {
25059
        return _thriftId;
25060
      }
25061
 
25062
      public String getFieldName() {
25063
        return _fieldName;
25064
      }
25065
    }
25066
 
25067
    // isset id assignments
25068
 
25069
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
25070
    static {
25071
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
25072
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
25073
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
25074
      metaDataMap = Collections.unmodifiableMap(tmpMap);
25075
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseReturn_result.class, metaDataMap);
25076
    }
25077
 
25078
    public updatePurchaseReturn_result() {
25079
    }
25080
 
25081
    public updatePurchaseReturn_result(
25082
      PurchaseServiceException e)
25083
    {
25084
      this();
25085
      this.e = e;
25086
    }
25087
 
25088
    /**
25089
     * Performs a deep copy on <i>other</i>.
25090
     */
25091
    public updatePurchaseReturn_result(updatePurchaseReturn_result other) {
25092
      if (other.isSetE()) {
25093
        this.e = new PurchaseServiceException(other.e);
25094
      }
25095
    }
25096
 
25097
    public updatePurchaseReturn_result deepCopy() {
25098
      return new updatePurchaseReturn_result(this);
25099
    }
25100
 
25101
    @Override
25102
    public void clear() {
25103
      this.e = null;
25104
    }
25105
 
25106
    public PurchaseServiceException getE() {
25107
      return this.e;
25108
    }
25109
 
25110
    public void setE(PurchaseServiceException e) {
25111
      this.e = e;
25112
    }
25113
 
25114
    public void unsetE() {
25115
      this.e = null;
25116
    }
25117
 
25118
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
25119
    public boolean isSetE() {
25120
      return this.e != null;
25121
    }
25122
 
25123
    public void setEIsSet(boolean value) {
25124
      if (!value) {
25125
        this.e = null;
25126
      }
25127
    }
25128
 
25129
    public void setFieldValue(_Fields field, Object value) {
25130
      switch (field) {
25131
      case E:
25132
        if (value == null) {
25133
          unsetE();
25134
        } else {
25135
          setE((PurchaseServiceException)value);
25136
        }
25137
        break;
25138
 
25139
      }
25140
    }
25141
 
25142
    public Object getFieldValue(_Fields field) {
25143
      switch (field) {
25144
      case E:
25145
        return getE();
25146
 
25147
      }
25148
      throw new IllegalStateException();
25149
    }
25150
 
25151
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
25152
    public boolean isSet(_Fields field) {
25153
      if (field == null) {
25154
        throw new IllegalArgumentException();
25155
      }
25156
 
25157
      switch (field) {
25158
      case E:
25159
        return isSetE();
25160
      }
25161
      throw new IllegalStateException();
25162
    }
25163
 
25164
    @Override
25165
    public boolean equals(Object that) {
25166
      if (that == null)
25167
        return false;
25168
      if (that instanceof updatePurchaseReturn_result)
25169
        return this.equals((updatePurchaseReturn_result)that);
25170
      return false;
25171
    }
25172
 
25173
    public boolean equals(updatePurchaseReturn_result that) {
25174
      if (that == null)
25175
        return false;
25176
 
25177
      boolean this_present_e = true && this.isSetE();
25178
      boolean that_present_e = true && that.isSetE();
25179
      if (this_present_e || that_present_e) {
25180
        if (!(this_present_e && that_present_e))
25181
          return false;
25182
        if (!this.e.equals(that.e))
25183
          return false;
25184
      }
25185
 
25186
      return true;
25187
    }
25188
 
25189
    @Override
25190
    public int hashCode() {
25191
      return 0;
25192
    }
25193
 
25194
    public int compareTo(updatePurchaseReturn_result other) {
25195
      if (!getClass().equals(other.getClass())) {
25196
        return getClass().getName().compareTo(other.getClass().getName());
25197
      }
25198
 
25199
      int lastComparison = 0;
25200
      updatePurchaseReturn_result typedOther = (updatePurchaseReturn_result)other;
25201
 
25202
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
25203
      if (lastComparison != 0) {
25204
        return lastComparison;
25205
      }
25206
      if (isSetE()) {
25207
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
25208
        if (lastComparison != 0) {
25209
          return lastComparison;
25210
        }
25211
      }
25212
      return 0;
25213
    }
25214
 
25215
    public _Fields fieldForId(int fieldId) {
25216
      return _Fields.findByThriftId(fieldId);
25217
    }
25218
 
25219
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
25220
      org.apache.thrift.protocol.TField field;
25221
      iprot.readStructBegin();
25222
      while (true)
25223
      {
25224
        field = iprot.readFieldBegin();
25225
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
25226
          break;
25227
        }
25228
        switch (field.id) {
25229
          case 1: // E
25230
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
25231
              this.e = new PurchaseServiceException();
25232
              this.e.read(iprot);
25233
            } else { 
25234
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
25235
            }
25236
            break;
25237
          default:
25238
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
25239
        }
25240
        iprot.readFieldEnd();
25241
      }
25242
      iprot.readStructEnd();
25243
      validate();
25244
    }
25245
 
25246
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
25247
      oprot.writeStructBegin(STRUCT_DESC);
25248
 
25249
      if (this.isSetE()) {
25250
        oprot.writeFieldBegin(E_FIELD_DESC);
25251
        this.e.write(oprot);
25252
        oprot.writeFieldEnd();
25253
      }
25254
      oprot.writeFieldStop();
25255
      oprot.writeStructEnd();
25256
    }
25257
 
25258
    @Override
25259
    public String toString() {
25260
      StringBuilder sb = new StringBuilder("updatePurchaseReturn_result(");
25261
      boolean first = true;
25262
 
25263
      sb.append("e:");
25264
      if (this.e == null) {
25265
        sb.append("null");
25266
      } else {
25267
        sb.append(this.e);
25268
      }
25269
      first = false;
25270
      sb.append(")");
25271
      return sb.toString();
25272
    }
25273
 
25274
    public void validate() throws org.apache.thrift.TException {
25275
      // check for required fields
25276
    }
25277
 
25278
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
25279
      try {
25280
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
25281
      } catch (org.apache.thrift.TException te) {
25282
        throw new java.io.IOException(te);
25283
      }
25284
    }
25285
 
25286
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
25287
      try {
25288
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
25289
      } catch (org.apache.thrift.TException te) {
25290
        throw new java.io.IOException(te);
25291
      }
25292
    }
25293
 
25294
  }
25295
 
4496 mandeep.dh 25296
}