Subversion Repositories SmartDukaan

Rev

Rev 21847 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4496 mandeep.dh 1
/**
2
 * Autogenerated by Thrift Compiler (0.7.0)
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.purchase;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
18
import java.nio.ByteBuffer;
19
import java.util.Arrays;
20
import org.slf4j.Logger;
21
import org.slf4j.LoggerFactory;
22
 
23
public class PurchaseService {
24
 
25
  public interface Iface extends in.shop2020.generic.GenericService.Iface {
26
 
27
    /**
28
     * Creates a purchase order based on the data in the given purchase order object.
29
     * This method populates a nummber of missing fields
30
     * 
31
     * @param purchaseOrder
32
     */
33
    public long createPurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException;
34
 
35
    /**
36
     * Returns the purchase order with the given id. Throws an exception if there is no such purchase order.
37
     * 
38
     * @param id
39
     */
40
    public PurchaseOrder getPurchaseOrder(long id) throws PurchaseServiceException, org.apache.thrift.TException;
41
 
42
    /**
43
     * Returns a list of all the purchase orders in the given state
44
     * 
45
     * @param status
46
     */
47
    public List<PurchaseOrder> getAllPurchaseOrders(POStatus status) throws PurchaseServiceException, org.apache.thrift.TException;
48
 
49
    /**
50
     * Returns the supplier with the given order id. Throws an exception if there is no such supplier.
51
     * 
52
     * @param id
53
     */
54
    public Supplier getSupplier(long id) throws PurchaseServiceException, org.apache.thrift.TException;
55
 
56
    /**
57
     * Creates a purchase for the given purchase order.
58
     * Throws an exception if no more purchases are allowed against the given purchase order.
59
     * 
60
     * @param purchaseOrderId
61
     * @param invoiceNumber
62
     * @param freightCharges
11801 manish.sha 63
     * @param purchaseComments
4496 mandeep.dh 64
     */
11801 manish.sha 65
    public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments) throws PurchaseServiceException, org.apache.thrift.TException;
4496 mandeep.dh 66
 
67
    /**
68
     * Marks a purchase as complete and updates the receivedOn time.
69
     * Throws an exception if no such purchase exists.
70
     * 
71
     * @param purchaseId
72
     */
73
    public long closePurchase(long purchaseId) throws PurchaseServiceException, org.apache.thrift.TException;
74
 
75
    /**
76
     * Returns all open or closed purchases for the given purchase order. Throws an exception if no such purchase order exists
77
     * 
78
     * @param purchaseOrderId
79
     * @param open
80
     */
81
    public List<Purchase> getAllPurchases(long purchaseOrderId, boolean open) throws PurchaseServiceException, org.apache.thrift.TException;
82
 
83
    /**
6385 amar.kumar 84
     * Returns all purchases for the given purchase order. Throws an exception if no such purchase order exists
85
     * 
86
     * @param purchaseOrderId
87
     */
88
    public List<Purchase> getPurchasesForPO(long purchaseOrderId) throws PurchaseServiceException, org.apache.thrift.TException;
89
 
90
    /**
4555 mandeep.dh 91
     * Returns the purchase order object for a given purchase
4496 mandeep.dh 92
     * 
93
     * @param purchaseId
94
     */
4555 mandeep.dh 95
    public PurchaseOrder getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException;
4496 mandeep.dh 96
 
4754 mandeep.dh 97
    /**
98
     * Creates purchase order objects from pending orders
99
     * 
100
     * @param warehouseId
101
     */
102
    public List<PurchaseOrder> getPendingPurchaseOrders(long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException;
103
 
104
    /**
21847 amit.gupta 105
     * Returns all the valid suppliers with GST Codes
4754 mandeep.dh 106
     */
107
    public List<Supplier> getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException;
108
 
109
    /**
21847 amit.gupta 110
     * Returns all the valid suppliers
111
     */
112
    public List<Supplier> getAllSuppliers() throws PurchaseServiceException, org.apache.thrift.TException;
113
 
114
    /**
4754 mandeep.dh 115
     * Fulfills a given purchase order with an item.
116
     * 
117
     * @param purchaseOrderId
118
     * @param itemId
119
     * @param quantity
120
     */
121
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException;
122
 
123
    /**
124
     * Amends a PO as per the new lineitems passed
125
     * 
126
     * @param purchaseOrder
127
     */
128
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException;
129
 
5185 mandeep.dh 130
    /**
131
     * Fulfills a given purchase id with an item and its quantity.
132
     * 
133
     * @param purchaseId
134
     * @param itemId
135
     * @param quantity
136
     */
137
    public void unFulfillPO(long purchaseId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException;
138
 
5443 mandeep.dh 139
    /**
5530 mandeep.dh 140
     * Fetches all invoices after a given date
5443 mandeep.dh 141
     * 
142
     * @param date
143
     */
144
    public List<Invoice> getInvoices(long date) throws org.apache.thrift.TException;
145
 
146
    /**
7410 amar.kumar 147
     * Fetches all invoices after a given date
148
     * 
149
     * @param warehouseId
150
     * @param supplierId
151
     * @param date
152
     */
153
    public List<Invoice> getInvoicesForWarehouse(long warehouseId, long supplierId, long date) throws org.apache.thrift.TException;
154
 
155
    /**
5443 mandeep.dh 156
     * Creates an invoice object
157
     * 
158
     * @param invoice
159
     */
160
    public void createInvoice(Invoice invoice) throws PurchaseServiceException, org.apache.thrift.TException;
161
 
5591 mandeep.dh 162
    /**
163
     * Creates a supplier
164
     * 
165
     * @param supplier
166
     */
167
    public Supplier addSupplier(Supplier supplier) throws org.apache.thrift.TException;
168
 
169
    /**
170
     * Updates a supplier
171
     * 
172
     * @param supplier
173
     */
174
    public void updateSupplier(Supplier supplier) throws org.apache.thrift.TException;
175
 
6467 amar.kumar 176
    /**
177
     * Create a new Purchase Return
178
     * 
179
     * @param purchaseReturn
180
     */
181
    public long createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException;
182
 
183
    /**
184
     * Create a new Purchase Return
185
     * 
186
     * @param id
187
     */
188
    public void settlePurchaseReturn(long id) throws org.apache.thrift.TException;
189
 
190
    /**
191
     * Create a new Purchase Return
192
     */
193
    public List<PurchaseReturn> getUnsettledPurchaseReturns() throws org.apache.thrift.TException;
194
 
6630 amar.kumar 195
    /**
196
     * Get invoice with given supplierId and invoiceNumber
197
     * 
198
     * @param invoiceNumber
199
     * @param supplierId
200
     */
201
    public List<PurchaseReturn> getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException;
202
 
6762 amar.kumar 203
    /**
204
     *  * Inserts new Invoice/LineItem/Purchase Entries for Billed Product done through Our External Billing
205
     * *
206
     * 
207
     * @param invoiceNumber
208
     * @param unitPrice
7672 rajveer 209
     * @param nlc
6762 amar.kumar 210
     * @param itemId
211
     */
7672 rajveer 212
    public long createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId) throws org.apache.thrift.TException;
6762 amar.kumar 213
 
214
    public void fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException;
215
 
7410 amar.kumar 216
    /**
217
     * Marks a purchase order as closedcomplete and updates the receivedOn time.
218
     * 
219
     * @param poId
220
     */
221
    public void closePO(long poId) throws PurchaseServiceException, org.apache.thrift.TException;
222
 
223
    /**
224
     * Check if invoice is already received with given supplierId and invoiceNumber
225
     * 
226
     * @param invoiceNumber
227
     * @param supplierId
228
     */
229
    public boolean isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException;
230
 
9829 amar.kumar 231
    /**
232
     * Change warehouseId of PO if no items have been received yet for the PO
233
     * 
234
     * @param id
235
     * @param warehouseId
236
     */
237
    public void changeWarehouseForPO(long id, long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException;
238
 
9925 amar.kumar 239
    /**
240
     * Change status of PO
241
     * 
242
     * @param id
243
     * @param poStatus
244
     */
245
    public void changePOStatus(long id, POStatus poStatus) throws PurchaseServiceException, org.apache.thrift.TException;
246
 
11751 manish.sha 247
    /**
248
     * Get Purchase Return from Id
249
     * 
250
     * @param id
251
     */
252
    public PurchaseReturn getPurchaseReturn(long id) throws PurchaseServiceException, org.apache.thrift.TException;
253
 
13600 manish.sha 254
    public boolean markPurchasereturnSettled(long id, SettlementType settlementType, String documentNumber, String settlementBy, long settledAmount) throws PurchaseServiceException, org.apache.thrift.TException;
255
 
256
    public List<PurchaseReturnSettlement> getPrSettlementsForPurchaseReturn(long purchaseReturnId) throws PurchaseServiceException, org.apache.thrift.TException;
257
 
258
    public void updatePurchaseReturn(PurchaseReturn purchaseReturn) throws PurchaseServiceException, org.apache.thrift.TException;
259
 
4496 mandeep.dh 260
  }
261
 
262
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
263
 
264
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
265
 
266
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
267
 
268
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
269
 
270
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSupplier_call> resultHandler) throws org.apache.thrift.TException;
271
 
11801 manish.sha 272
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.startPurchase_call> resultHandler) throws org.apache.thrift.TException;
4496 mandeep.dh 273
 
274
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePurchase_call> resultHandler) throws org.apache.thrift.TException;
275
 
276
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchases_call> resultHandler) throws org.apache.thrift.TException;
277
 
6385 amar.kumar 278
    public void getPurchasesForPO(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchasesForPO_call> resultHandler) throws org.apache.thrift.TException;
279
 
4555 mandeep.dh 280
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException;
4496 mandeep.dh 281
 
4754 mandeep.dh 282
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
283
 
284
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuppliers_call> resultHandler) throws org.apache.thrift.TException;
285
 
21847 amit.gupta 286
    public void getAllSuppliers(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllSuppliers_call> resultHandler) throws org.apache.thrift.TException;
287
 
4754 mandeep.dh 288
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fulfillPO_call> resultHandler) throws org.apache.thrift.TException;
289
 
290
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
291
 
5185 mandeep.dh 292
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.unFulfillPO_call> resultHandler) throws org.apache.thrift.TException;
293
 
5443 mandeep.dh 294
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoices_call> resultHandler) throws org.apache.thrift.TException;
295
 
7410 amar.kumar 296
    public void getInvoicesForWarehouse(long warehouseId, long supplierId, long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoicesForWarehouse_call> resultHandler) throws org.apache.thrift.TException;
297
 
5443 mandeep.dh 298
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createInvoice_call> resultHandler) throws org.apache.thrift.TException;
299
 
5591 mandeep.dh 300
    public void addSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addSupplier_call> resultHandler) throws org.apache.thrift.TException;
301
 
302
    public void updateSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateSupplier_call> resultHandler) throws org.apache.thrift.TException;
303
 
6467 amar.kumar 304
    public void createPurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
305
 
306
    public void settlePurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.settlePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
307
 
308
    public void getUnsettledPurchaseReturns(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUnsettledPurchaseReturns_call> resultHandler) throws org.apache.thrift.TException;
309
 
6630 amar.kumar 310
    public void getInvoice(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoice_call> resultHandler) throws org.apache.thrift.TException;
311
 
7672 rajveer 312
    public void createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseForOurExtBilling_call> resultHandler) throws org.apache.thrift.TException;
6762 amar.kumar 313
 
314
    public void fulfillPOForExtBilling(long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fulfillPOForExtBilling_call> resultHandler) throws org.apache.thrift.TException;
315
 
7410 amar.kumar 316
    public void closePO(long poId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePO_call> resultHandler) throws org.apache.thrift.TException;
317
 
318
    public void isInvoiceReceived(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.isInvoiceReceived_call> resultHandler) throws org.apache.thrift.TException;
319
 
9829 amar.kumar 320
    public void changeWarehouseForPO(long id, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.changeWarehouseForPO_call> resultHandler) throws org.apache.thrift.TException;
321
 
9925 amar.kumar 322
    public void changePOStatus(long id, POStatus poStatus, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.changePOStatus_call> resultHandler) throws org.apache.thrift.TException;
323
 
11751 manish.sha 324
    public void getPurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
325
 
13600 manish.sha 326
    public void markPurchasereturnSettled(long id, SettlementType settlementType, String documentNumber, String settlementBy, long settledAmount, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.markPurchasereturnSettled_call> resultHandler) throws org.apache.thrift.TException;
327
 
328
    public void getPrSettlementsForPurchaseReturn(long purchaseReturnId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPrSettlementsForPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
329
 
330
    public void updatePurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updatePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
331
 
4496 mandeep.dh 332
  }
333
 
334
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
335
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
336
      public Factory() {}
337
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
338
        return new Client(prot);
339
      }
340
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
341
        return new Client(iprot, oprot);
342
      }
343
    }
344
 
345
    public Client(org.apache.thrift.protocol.TProtocol prot)
346
    {
347
      super(prot, prot);
348
    }
349
 
350
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
351
      super(iprot, oprot);
352
    }
353
 
354
    public long createPurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
355
    {
356
      send_createPurchaseOrder(purchaseOrder);
357
      return recv_createPurchaseOrder();
358
    }
359
 
360
    public void send_createPurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
361
    {
362
      createPurchaseOrder_args args = new createPurchaseOrder_args();
363
      args.setPurchaseOrder(purchaseOrder);
364
      sendBase("createPurchaseOrder", args);
365
    }
366
 
367
    public long recv_createPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
368
    {
369
      createPurchaseOrder_result result = new createPurchaseOrder_result();
370
      receiveBase(result, "createPurchaseOrder");
371
      if (result.isSetSuccess()) {
372
        return result.success;
373
      }
374
      if (result.e != null) {
375
        throw result.e;
376
      }
377
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseOrder failed: unknown result");
378
    }
379
 
380
    public PurchaseOrder getPurchaseOrder(long id) throws PurchaseServiceException, org.apache.thrift.TException
381
    {
382
      send_getPurchaseOrder(id);
383
      return recv_getPurchaseOrder();
384
    }
385
 
386
    public void send_getPurchaseOrder(long id) throws org.apache.thrift.TException
387
    {
388
      getPurchaseOrder_args args = new getPurchaseOrder_args();
389
      args.setId(id);
390
      sendBase("getPurchaseOrder", args);
391
    }
392
 
393
    public PurchaseOrder recv_getPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
394
    {
395
      getPurchaseOrder_result result = new getPurchaseOrder_result();
396
      receiveBase(result, "getPurchaseOrder");
397
      if (result.isSetSuccess()) {
398
        return result.success;
399
      }
400
      if (result.e != null) {
401
        throw result.e;
402
      }
403
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrder failed: unknown result");
404
    }
405
 
406
    public List<PurchaseOrder> getAllPurchaseOrders(POStatus status) throws PurchaseServiceException, org.apache.thrift.TException
407
    {
408
      send_getAllPurchaseOrders(status);
409
      return recv_getAllPurchaseOrders();
410
    }
411
 
412
    public void send_getAllPurchaseOrders(POStatus status) throws org.apache.thrift.TException
413
    {
414
      getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
415
      args.setStatus(status);
416
      sendBase("getAllPurchaseOrders", args);
417
    }
418
 
419
    public List<PurchaseOrder> recv_getAllPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
420
    {
421
      getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
422
      receiveBase(result, "getAllPurchaseOrders");
423
      if (result.isSetSuccess()) {
424
        return result.success;
425
      }
426
      if (result.e != null) {
427
        throw result.e;
428
      }
429
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchaseOrders failed: unknown result");
430
    }
431
 
432
    public Supplier getSupplier(long id) throws PurchaseServiceException, org.apache.thrift.TException
433
    {
434
      send_getSupplier(id);
435
      return recv_getSupplier();
436
    }
437
 
438
    public void send_getSupplier(long id) throws org.apache.thrift.TException
439
    {
440
      getSupplier_args args = new getSupplier_args();
441
      args.setId(id);
442
      sendBase("getSupplier", args);
443
    }
444
 
445
    public Supplier recv_getSupplier() throws PurchaseServiceException, org.apache.thrift.TException
446
    {
447
      getSupplier_result result = new getSupplier_result();
448
      receiveBase(result, "getSupplier");
449
      if (result.isSetSuccess()) {
450
        return result.success;
451
      }
452
      if (result.e != null) {
453
        throw result.e;
454
      }
455
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSupplier failed: unknown result");
456
    }
457
 
11801 manish.sha 458
    public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments) throws PurchaseServiceException, org.apache.thrift.TException
4496 mandeep.dh 459
    {
11801 manish.sha 460
      send_startPurchase(purchaseOrderId, invoiceNumber, freightCharges, purchaseComments);
4496 mandeep.dh 461
      return recv_startPurchase();
462
    }
463
 
11801 manish.sha 464
    public void send_startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments) throws org.apache.thrift.TException
4496 mandeep.dh 465
    {
466
      startPurchase_args args = new startPurchase_args();
467
      args.setPurchaseOrderId(purchaseOrderId);
468
      args.setInvoiceNumber(invoiceNumber);
469
      args.setFreightCharges(freightCharges);
11801 manish.sha 470
      args.setPurchaseComments(purchaseComments);
4496 mandeep.dh 471
      sendBase("startPurchase", args);
472
    }
473
 
474
    public long recv_startPurchase() throws PurchaseServiceException, org.apache.thrift.TException
475
    {
476
      startPurchase_result result = new startPurchase_result();
477
      receiveBase(result, "startPurchase");
478
      if (result.isSetSuccess()) {
479
        return result.success;
480
      }
481
      if (result.e != null) {
482
        throw result.e;
483
      }
484
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startPurchase failed: unknown result");
485
    }
486
 
487
    public long closePurchase(long purchaseId) throws PurchaseServiceException, org.apache.thrift.TException
488
    {
489
      send_closePurchase(purchaseId);
490
      return recv_closePurchase();
491
    }
492
 
493
    public void send_closePurchase(long purchaseId) throws org.apache.thrift.TException
494
    {
495
      closePurchase_args args = new closePurchase_args();
496
      args.setPurchaseId(purchaseId);
497
      sendBase("closePurchase", args);
498
    }
499
 
500
    public long recv_closePurchase() throws PurchaseServiceException, org.apache.thrift.TException
501
    {
502
      closePurchase_result result = new closePurchase_result();
503
      receiveBase(result, "closePurchase");
504
      if (result.isSetSuccess()) {
505
        return result.success;
506
      }
507
      if (result.e != null) {
508
        throw result.e;
509
      }
510
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "closePurchase failed: unknown result");
511
    }
512
 
513
    public List<Purchase> getAllPurchases(long purchaseOrderId, boolean open) throws PurchaseServiceException, org.apache.thrift.TException
514
    {
515
      send_getAllPurchases(purchaseOrderId, open);
516
      return recv_getAllPurchases();
517
    }
518
 
519
    public void send_getAllPurchases(long purchaseOrderId, boolean open) throws org.apache.thrift.TException
520
    {
521
      getAllPurchases_args args = new getAllPurchases_args();
522
      args.setPurchaseOrderId(purchaseOrderId);
523
      args.setOpen(open);
524
      sendBase("getAllPurchases", args);
525
    }
526
 
527
    public List<Purchase> recv_getAllPurchases() throws PurchaseServiceException, org.apache.thrift.TException
528
    {
529
      getAllPurchases_result result = new getAllPurchases_result();
530
      receiveBase(result, "getAllPurchases");
531
      if (result.isSetSuccess()) {
532
        return result.success;
533
      }
534
      if (result.e != null) {
535
        throw result.e;
536
      }
537
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchases failed: unknown result");
538
    }
539
 
6385 amar.kumar 540
    public List<Purchase> getPurchasesForPO(long purchaseOrderId) throws PurchaseServiceException, org.apache.thrift.TException
541
    {
542
      send_getPurchasesForPO(purchaseOrderId);
543
      return recv_getPurchasesForPO();
544
    }
545
 
546
    public void send_getPurchasesForPO(long purchaseOrderId) throws org.apache.thrift.TException
547
    {
548
      getPurchasesForPO_args args = new getPurchasesForPO_args();
549
      args.setPurchaseOrderId(purchaseOrderId);
550
      sendBase("getPurchasesForPO", args);
551
    }
552
 
553
    public List<Purchase> recv_getPurchasesForPO() throws PurchaseServiceException, org.apache.thrift.TException
554
    {
555
      getPurchasesForPO_result result = new getPurchasesForPO_result();
556
      receiveBase(result, "getPurchasesForPO");
557
      if (result.isSetSuccess()) {
558
        return result.success;
559
      }
560
      if (result.e != null) {
561
        throw result.e;
562
      }
563
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchasesForPO failed: unknown result");
564
    }
565
 
4555 mandeep.dh 566
    public PurchaseOrder getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 567
    {
4555 mandeep.dh 568
      send_getPurchaseOrderForPurchase(purchaseId);
569
      return recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 570
    }
571
 
4555 mandeep.dh 572
    public void send_getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 573
    {
4555 mandeep.dh 574
      getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 575
      args.setPurchaseId(purchaseId);
4555 mandeep.dh 576
      sendBase("getPurchaseOrderForPurchase", args);
4496 mandeep.dh 577
    }
578
 
4555 mandeep.dh 579
    public PurchaseOrder recv_getPurchaseOrderForPurchase() throws org.apache.thrift.TException
4496 mandeep.dh 580
    {
4555 mandeep.dh 581
      getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
582
      receiveBase(result, "getPurchaseOrderForPurchase");
4496 mandeep.dh 583
      if (result.isSetSuccess()) {
584
        return result.success;
585
      }
4555 mandeep.dh 586
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrderForPurchase failed: unknown result");
4496 mandeep.dh 587
    }
588
 
4754 mandeep.dh 589
    public List<PurchaseOrder> getPendingPurchaseOrders(long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException
590
    {
591
      send_getPendingPurchaseOrders(warehouseId);
592
      return recv_getPendingPurchaseOrders();
593
    }
594
 
595
    public void send_getPendingPurchaseOrders(long warehouseId) throws org.apache.thrift.TException
596
    {
597
      getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
598
      args.setWarehouseId(warehouseId);
599
      sendBase("getPendingPurchaseOrders", args);
600
    }
601
 
602
    public List<PurchaseOrder> recv_getPendingPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
603
    {
604
      getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
605
      receiveBase(result, "getPendingPurchaseOrders");
606
      if (result.isSetSuccess()) {
607
        return result.success;
608
      }
609
      if (result.e != null) {
610
        throw result.e;
611
      }
612
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPendingPurchaseOrders failed: unknown result");
613
    }
614
 
615
    public List<Supplier> getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
616
    {
617
      send_getSuppliers();
618
      return recv_getSuppliers();
619
    }
620
 
621
    public void send_getSuppliers() throws org.apache.thrift.TException
622
    {
623
      getSuppliers_args args = new getSuppliers_args();
624
      sendBase("getSuppliers", args);
625
    }
626
 
627
    public List<Supplier> recv_getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
628
    {
629
      getSuppliers_result result = new getSuppliers_result();
630
      receiveBase(result, "getSuppliers");
631
      if (result.isSetSuccess()) {
632
        return result.success;
633
      }
634
      if (result.e != null) {
635
        throw result.e;
636
      }
637
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSuppliers failed: unknown result");
638
    }
639
 
21847 amit.gupta 640
    public List<Supplier> getAllSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
641
    {
642
      send_getAllSuppliers();
643
      return recv_getAllSuppliers();
644
    }
645
 
646
    public void send_getAllSuppliers() throws org.apache.thrift.TException
647
    {
648
      getAllSuppliers_args args = new getAllSuppliers_args();
649
      sendBase("getAllSuppliers", args);
650
    }
651
 
652
    public List<Supplier> recv_getAllSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
653
    {
654
      getAllSuppliers_result result = new getAllSuppliers_result();
655
      receiveBase(result, "getAllSuppliers");
656
      if (result.isSetSuccess()) {
657
        return result.success;
658
      }
659
      if (result.e != null) {
660
        throw result.e;
661
      }
662
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllSuppliers failed: unknown result");
663
    }
664
 
4754 mandeep.dh 665
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
666
    {
667
      send_fulfillPO(purchaseOrderId, itemId, quantity);
668
      recv_fulfillPO();
669
    }
670
 
671
    public void send_fulfillPO(long purchaseOrderId, long itemId, long quantity) throws org.apache.thrift.TException
672
    {
673
      fulfillPO_args args = new fulfillPO_args();
674
      args.setPurchaseOrderId(purchaseOrderId);
675
      args.setItemId(itemId);
676
      args.setQuantity(quantity);
677
      sendBase("fulfillPO", args);
678
    }
679
 
680
    public void recv_fulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
681
    {
682
      fulfillPO_result result = new fulfillPO_result();
683
      receiveBase(result, "fulfillPO");
684
      if (result.e != null) {
685
        throw result.e;
686
      }
687
      return;
688
    }
689
 
690
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
691
    {
692
      send_updatePurchaseOrder(purchaseOrder);
693
      recv_updatePurchaseOrder();
694
    }
695
 
696
    public void send_updatePurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
697
    {
698
      updatePurchaseOrder_args args = new updatePurchaseOrder_args();
699
      args.setPurchaseOrder(purchaseOrder);
700
      sendBase("updatePurchaseOrder", args);
701
    }
702
 
703
    public void recv_updatePurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
704
    {
705
      updatePurchaseOrder_result result = new updatePurchaseOrder_result();
706
      receiveBase(result, "updatePurchaseOrder");
707
      if (result.e != null) {
708
        throw result.e;
709
      }
710
      return;
711
    }
712
 
5185 mandeep.dh 713
    public void unFulfillPO(long purchaseId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
714
    {
715
      send_unFulfillPO(purchaseId, itemId, quantity);
716
      recv_unFulfillPO();
717
    }
718
 
719
    public void send_unFulfillPO(long purchaseId, long itemId, long quantity) throws org.apache.thrift.TException
720
    {
721
      unFulfillPO_args args = new unFulfillPO_args();
722
      args.setPurchaseId(purchaseId);
723
      args.setItemId(itemId);
724
      args.setQuantity(quantity);
725
      sendBase("unFulfillPO", args);
726
    }
727
 
728
    public void recv_unFulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
729
    {
730
      unFulfillPO_result result = new unFulfillPO_result();
731
      receiveBase(result, "unFulfillPO");
732
      if (result.e != null) {
733
        throw result.e;
734
      }
735
      return;
736
    }
737
 
5443 mandeep.dh 738
    public List<Invoice> getInvoices(long date) throws org.apache.thrift.TException
739
    {
740
      send_getInvoices(date);
741
      return recv_getInvoices();
742
    }
743
 
744
    public void send_getInvoices(long date) throws org.apache.thrift.TException
745
    {
746
      getInvoices_args args = new getInvoices_args();
747
      args.setDate(date);
748
      sendBase("getInvoices", args);
749
    }
750
 
751
    public List<Invoice> recv_getInvoices() throws org.apache.thrift.TException
752
    {
753
      getInvoices_result result = new getInvoices_result();
754
      receiveBase(result, "getInvoices");
755
      if (result.isSetSuccess()) {
756
        return result.success;
757
      }
758
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoices failed: unknown result");
759
    }
760
 
7410 amar.kumar 761
    public List<Invoice> getInvoicesForWarehouse(long warehouseId, long supplierId, long date) throws org.apache.thrift.TException
762
    {
763
      send_getInvoicesForWarehouse(warehouseId, supplierId, date);
764
      return recv_getInvoicesForWarehouse();
765
    }
766
 
767
    public void send_getInvoicesForWarehouse(long warehouseId, long supplierId, long date) throws org.apache.thrift.TException
768
    {
769
      getInvoicesForWarehouse_args args = new getInvoicesForWarehouse_args();
770
      args.setWarehouseId(warehouseId);
771
      args.setSupplierId(supplierId);
772
      args.setDate(date);
773
      sendBase("getInvoicesForWarehouse", args);
774
    }
775
 
776
    public List<Invoice> recv_getInvoicesForWarehouse() throws org.apache.thrift.TException
777
    {
778
      getInvoicesForWarehouse_result result = new getInvoicesForWarehouse_result();
779
      receiveBase(result, "getInvoicesForWarehouse");
780
      if (result.isSetSuccess()) {
781
        return result.success;
782
      }
783
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoicesForWarehouse failed: unknown result");
784
    }
785
 
5443 mandeep.dh 786
    public void createInvoice(Invoice invoice) throws PurchaseServiceException, org.apache.thrift.TException
787
    {
788
      send_createInvoice(invoice);
789
      recv_createInvoice();
790
    }
791
 
792
    public void send_createInvoice(Invoice invoice) throws org.apache.thrift.TException
793
    {
794
      createInvoice_args args = new createInvoice_args();
795
      args.setInvoice(invoice);
796
      sendBase("createInvoice", args);
797
    }
798
 
799
    public void recv_createInvoice() throws PurchaseServiceException, org.apache.thrift.TException
800
    {
801
      createInvoice_result result = new createInvoice_result();
802
      receiveBase(result, "createInvoice");
803
      if (result.e != null) {
804
        throw result.e;
805
      }
806
      return;
807
    }
808
 
5591 mandeep.dh 809
    public Supplier addSupplier(Supplier supplier) throws org.apache.thrift.TException
810
    {
811
      send_addSupplier(supplier);
812
      return recv_addSupplier();
813
    }
814
 
815
    public void send_addSupplier(Supplier supplier) throws org.apache.thrift.TException
816
    {
817
      addSupplier_args args = new addSupplier_args();
818
      args.setSupplier(supplier);
819
      sendBase("addSupplier", args);
820
    }
821
 
822
    public Supplier recv_addSupplier() throws org.apache.thrift.TException
823
    {
824
      addSupplier_result result = new addSupplier_result();
825
      receiveBase(result, "addSupplier");
826
      if (result.isSetSuccess()) {
827
        return result.success;
828
      }
829
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addSupplier failed: unknown result");
830
    }
831
 
832
    public void updateSupplier(Supplier supplier) throws org.apache.thrift.TException
833
    {
834
      send_updateSupplier(supplier);
835
      recv_updateSupplier();
836
    }
837
 
838
    public void send_updateSupplier(Supplier supplier) throws org.apache.thrift.TException
839
    {
840
      updateSupplier_args args = new updateSupplier_args();
841
      args.setSupplier(supplier);
842
      sendBase("updateSupplier", args);
843
    }
844
 
845
    public void recv_updateSupplier() throws org.apache.thrift.TException
846
    {
847
      updateSupplier_result result = new updateSupplier_result();
848
      receiveBase(result, "updateSupplier");
849
      return;
850
    }
851
 
6467 amar.kumar 852
    public long createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
853
    {
854
      send_createPurchaseReturn(purchaseReturn);
855
      return recv_createPurchaseReturn();
856
    }
857
 
858
    public void send_createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
859
    {
860
      createPurchaseReturn_args args = new createPurchaseReturn_args();
861
      args.setPurchaseReturn(purchaseReturn);
862
      sendBase("createPurchaseReturn", args);
863
    }
864
 
865
    public long recv_createPurchaseReturn() throws org.apache.thrift.TException
866
    {
867
      createPurchaseReturn_result result = new createPurchaseReturn_result();
868
      receiveBase(result, "createPurchaseReturn");
869
      if (result.isSetSuccess()) {
870
        return result.success;
871
      }
872
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseReturn failed: unknown result");
873
    }
874
 
875
    public void settlePurchaseReturn(long id) throws org.apache.thrift.TException
876
    {
877
      send_settlePurchaseReturn(id);
878
      recv_settlePurchaseReturn();
879
    }
880
 
881
    public void send_settlePurchaseReturn(long id) throws org.apache.thrift.TException
882
    {
883
      settlePurchaseReturn_args args = new settlePurchaseReturn_args();
884
      args.setId(id);
885
      sendBase("settlePurchaseReturn", args);
886
    }
887
 
888
    public void recv_settlePurchaseReturn() throws org.apache.thrift.TException
889
    {
890
      settlePurchaseReturn_result result = new settlePurchaseReturn_result();
891
      receiveBase(result, "settlePurchaseReturn");
892
      return;
893
    }
894
 
895
    public List<PurchaseReturn> getUnsettledPurchaseReturns() throws org.apache.thrift.TException
896
    {
897
      send_getUnsettledPurchaseReturns();
898
      return recv_getUnsettledPurchaseReturns();
899
    }
900
 
901
    public void send_getUnsettledPurchaseReturns() throws org.apache.thrift.TException
902
    {
903
      getUnsettledPurchaseReturns_args args = new getUnsettledPurchaseReturns_args();
904
      sendBase("getUnsettledPurchaseReturns", args);
905
    }
906
 
907
    public List<PurchaseReturn> recv_getUnsettledPurchaseReturns() throws org.apache.thrift.TException
908
    {
909
      getUnsettledPurchaseReturns_result result = new getUnsettledPurchaseReturns_result();
910
      receiveBase(result, "getUnsettledPurchaseReturns");
911
      if (result.isSetSuccess()) {
912
        return result.success;
913
      }
914
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUnsettledPurchaseReturns failed: unknown result");
915
    }
916
 
6630 amar.kumar 917
    public List<PurchaseReturn> getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
918
    {
919
      send_getInvoice(invoiceNumber, supplierId);
920
      return recv_getInvoice();
921
    }
922
 
923
    public void send_getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
924
    {
925
      getInvoice_args args = new getInvoice_args();
926
      args.setInvoiceNumber(invoiceNumber);
927
      args.setSupplierId(supplierId);
928
      sendBase("getInvoice", args);
929
    }
930
 
931
    public List<PurchaseReturn> recv_getInvoice() throws org.apache.thrift.TException
932
    {
933
      getInvoice_result result = new getInvoice_result();
934
      receiveBase(result, "getInvoice");
935
      if (result.isSetSuccess()) {
936
        return result.success;
937
      }
938
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoice failed: unknown result");
939
    }
940
 
7672 rajveer 941
    public long createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId) throws org.apache.thrift.TException
6762 amar.kumar 942
    {
7672 rajveer 943
      send_createPurchaseForOurExtBilling(invoiceNumber, unitPrice, nlc, itemId);
6762 amar.kumar 944
      return recv_createPurchaseForOurExtBilling();
945
    }
946
 
7672 rajveer 947
    public void send_createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId) throws org.apache.thrift.TException
6762 amar.kumar 948
    {
949
      createPurchaseForOurExtBilling_args args = new createPurchaseForOurExtBilling_args();
950
      args.setInvoiceNumber(invoiceNumber);
951
      args.setUnitPrice(unitPrice);
7672 rajveer 952
      args.setNlc(nlc);
6762 amar.kumar 953
      args.setItemId(itemId);
954
      sendBase("createPurchaseForOurExtBilling", args);
955
    }
956
 
957
    public long recv_createPurchaseForOurExtBilling() throws org.apache.thrift.TException
958
    {
959
      createPurchaseForOurExtBilling_result result = new createPurchaseForOurExtBilling_result();
960
      receiveBase(result, "createPurchaseForOurExtBilling");
961
      if (result.isSetSuccess()) {
962
        return result.success;
963
      }
964
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseForOurExtBilling failed: unknown result");
965
    }
966
 
967
    public void fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException
968
    {
969
      send_fulfillPOForExtBilling(itemId, quantity);
970
      recv_fulfillPOForExtBilling();
971
    }
972
 
973
    public void send_fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException
974
    {
975
      fulfillPOForExtBilling_args args = new fulfillPOForExtBilling_args();
976
      args.setItemId(itemId);
977
      args.setQuantity(quantity);
978
      sendBase("fulfillPOForExtBilling", args);
979
    }
980
 
981
    public void recv_fulfillPOForExtBilling() throws org.apache.thrift.TException
982
    {
983
      fulfillPOForExtBilling_result result = new fulfillPOForExtBilling_result();
984
      receiveBase(result, "fulfillPOForExtBilling");
985
      return;
986
    }
987
 
7410 amar.kumar 988
    public void closePO(long poId) throws PurchaseServiceException, org.apache.thrift.TException
989
    {
990
      send_closePO(poId);
991
      recv_closePO();
992
    }
993
 
994
    public void send_closePO(long poId) throws org.apache.thrift.TException
995
    {
996
      closePO_args args = new closePO_args();
997
      args.setPoId(poId);
998
      sendBase("closePO", args);
999
    }
1000
 
1001
    public void recv_closePO() throws PurchaseServiceException, org.apache.thrift.TException
1002
    {
1003
      closePO_result result = new closePO_result();
1004
      receiveBase(result, "closePO");
1005
      if (result.e != null) {
1006
        throw result.e;
1007
      }
1008
      return;
1009
    }
1010
 
1011
    public boolean isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
1012
    {
1013
      send_isInvoiceReceived(invoiceNumber, supplierId);
1014
      return recv_isInvoiceReceived();
1015
    }
1016
 
1017
    public void send_isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
1018
    {
1019
      isInvoiceReceived_args args = new isInvoiceReceived_args();
1020
      args.setInvoiceNumber(invoiceNumber);
1021
      args.setSupplierId(supplierId);
1022
      sendBase("isInvoiceReceived", args);
1023
    }
1024
 
1025
    public boolean recv_isInvoiceReceived() throws org.apache.thrift.TException
1026
    {
1027
      isInvoiceReceived_result result = new isInvoiceReceived_result();
1028
      receiveBase(result, "isInvoiceReceived");
1029
      if (result.isSetSuccess()) {
1030
        return result.success;
1031
      }
1032
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isInvoiceReceived failed: unknown result");
1033
    }
1034
 
9829 amar.kumar 1035
    public void changeWarehouseForPO(long id, long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException
1036
    {
1037
      send_changeWarehouseForPO(id, warehouseId);
1038
      recv_changeWarehouseForPO();
1039
    }
1040
 
1041
    public void send_changeWarehouseForPO(long id, long warehouseId) throws org.apache.thrift.TException
1042
    {
1043
      changeWarehouseForPO_args args = new changeWarehouseForPO_args();
1044
      args.setId(id);
1045
      args.setWarehouseId(warehouseId);
1046
      sendBase("changeWarehouseForPO", args);
1047
    }
1048
 
1049
    public void recv_changeWarehouseForPO() throws PurchaseServiceException, org.apache.thrift.TException
1050
    {
1051
      changeWarehouseForPO_result result = new changeWarehouseForPO_result();
1052
      receiveBase(result, "changeWarehouseForPO");
1053
      if (result.e != null) {
1054
        throw result.e;
1055
      }
1056
      return;
1057
    }
1058
 
9925 amar.kumar 1059
    public void changePOStatus(long id, POStatus poStatus) throws PurchaseServiceException, org.apache.thrift.TException
1060
    {
1061
      send_changePOStatus(id, poStatus);
1062
      recv_changePOStatus();
1063
    }
1064
 
1065
    public void send_changePOStatus(long id, POStatus poStatus) throws org.apache.thrift.TException
1066
    {
1067
      changePOStatus_args args = new changePOStatus_args();
1068
      args.setId(id);
1069
      args.setPoStatus(poStatus);
1070
      sendBase("changePOStatus", args);
1071
    }
1072
 
1073
    public void recv_changePOStatus() throws PurchaseServiceException, org.apache.thrift.TException
1074
    {
1075
      changePOStatus_result result = new changePOStatus_result();
1076
      receiveBase(result, "changePOStatus");
1077
      if (result.e != null) {
1078
        throw result.e;
1079
      }
1080
      return;
1081
    }
1082
 
11751 manish.sha 1083
    public PurchaseReturn getPurchaseReturn(long id) throws PurchaseServiceException, org.apache.thrift.TException
1084
    {
1085
      send_getPurchaseReturn(id);
1086
      return recv_getPurchaseReturn();
1087
    }
1088
 
1089
    public void send_getPurchaseReturn(long id) throws org.apache.thrift.TException
1090
    {
1091
      getPurchaseReturn_args args = new getPurchaseReturn_args();
1092
      args.setId(id);
1093
      sendBase("getPurchaseReturn", args);
1094
    }
1095
 
1096
    public PurchaseReturn recv_getPurchaseReturn() throws PurchaseServiceException, org.apache.thrift.TException
1097
    {
1098
      getPurchaseReturn_result result = new getPurchaseReturn_result();
1099
      receiveBase(result, "getPurchaseReturn");
1100
      if (result.isSetSuccess()) {
1101
        return result.success;
1102
      }
1103
      if (result.e != null) {
1104
        throw result.e;
1105
      }
1106
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseReturn failed: unknown result");
1107
    }
1108
 
13600 manish.sha 1109
    public boolean markPurchasereturnSettled(long id, SettlementType settlementType, String documentNumber, String settlementBy, long settledAmount) throws PurchaseServiceException, org.apache.thrift.TException
1110
    {
1111
      send_markPurchasereturnSettled(id, settlementType, documentNumber, settlementBy, settledAmount);
1112
      return recv_markPurchasereturnSettled();
1113
    }
1114
 
1115
    public void send_markPurchasereturnSettled(long id, SettlementType settlementType, String documentNumber, String settlementBy, long settledAmount) throws org.apache.thrift.TException
1116
    {
1117
      markPurchasereturnSettled_args args = new markPurchasereturnSettled_args();
1118
      args.setId(id);
1119
      args.setSettlementType(settlementType);
1120
      args.setDocumentNumber(documentNumber);
1121
      args.setSettlementBy(settlementBy);
1122
      args.setSettledAmount(settledAmount);
1123
      sendBase("markPurchasereturnSettled", args);
1124
    }
1125
 
1126
    public boolean recv_markPurchasereturnSettled() throws PurchaseServiceException, org.apache.thrift.TException
1127
    {
1128
      markPurchasereturnSettled_result result = new markPurchasereturnSettled_result();
1129
      receiveBase(result, "markPurchasereturnSettled");
1130
      if (result.isSetSuccess()) {
1131
        return result.success;
1132
      }
1133
      if (result.e != null) {
1134
        throw result.e;
1135
      }
1136
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "markPurchasereturnSettled failed: unknown result");
1137
    }
1138
 
1139
    public List<PurchaseReturnSettlement> getPrSettlementsForPurchaseReturn(long purchaseReturnId) throws PurchaseServiceException, org.apache.thrift.TException
1140
    {
1141
      send_getPrSettlementsForPurchaseReturn(purchaseReturnId);
1142
      return recv_getPrSettlementsForPurchaseReturn();
1143
    }
1144
 
1145
    public void send_getPrSettlementsForPurchaseReturn(long purchaseReturnId) throws org.apache.thrift.TException
1146
    {
1147
      getPrSettlementsForPurchaseReturn_args args = new getPrSettlementsForPurchaseReturn_args();
1148
      args.setPurchaseReturnId(purchaseReturnId);
1149
      sendBase("getPrSettlementsForPurchaseReturn", args);
1150
    }
1151
 
1152
    public List<PurchaseReturnSettlement> recv_getPrSettlementsForPurchaseReturn() throws PurchaseServiceException, org.apache.thrift.TException
1153
    {
1154
      getPrSettlementsForPurchaseReturn_result result = new getPrSettlementsForPurchaseReturn_result();
1155
      receiveBase(result, "getPrSettlementsForPurchaseReturn");
1156
      if (result.isSetSuccess()) {
1157
        return result.success;
1158
      }
1159
      if (result.e != null) {
1160
        throw result.e;
1161
      }
1162
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPrSettlementsForPurchaseReturn failed: unknown result");
1163
    }
1164
 
1165
    public void updatePurchaseReturn(PurchaseReturn purchaseReturn) throws PurchaseServiceException, org.apache.thrift.TException
1166
    {
1167
      send_updatePurchaseReturn(purchaseReturn);
1168
      recv_updatePurchaseReturn();
1169
    }
1170
 
1171
    public void send_updatePurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
1172
    {
1173
      updatePurchaseReturn_args args = new updatePurchaseReturn_args();
1174
      args.setPurchaseReturn(purchaseReturn);
1175
      sendBase("updatePurchaseReturn", args);
1176
    }
1177
 
1178
    public void recv_updatePurchaseReturn() throws PurchaseServiceException, org.apache.thrift.TException
1179
    {
1180
      updatePurchaseReturn_result result = new updatePurchaseReturn_result();
1181
      receiveBase(result, "updatePurchaseReturn");
1182
      if (result.e != null) {
1183
        throw result.e;
1184
      }
1185
      return;
1186
    }
1187
 
4496 mandeep.dh 1188
  }
1189
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
1190
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
1191
      private org.apache.thrift.async.TAsyncClientManager clientManager;
1192
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
1193
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
1194
        this.clientManager = clientManager;
1195
        this.protocolFactory = protocolFactory;
1196
      }
1197
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
1198
        return new AsyncClient(protocolFactory, clientManager, transport);
1199
      }
1200
    }
1201
 
1202
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
1203
      super(protocolFactory, clientManager, transport);
1204
    }
1205
 
1206
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1207
      checkReady();
1208
      createPurchaseOrder_call method_call = new createPurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
1209
      this.___currentMethod = method_call;
1210
      ___manager.call(method_call);
1211
    }
1212
 
1213
    public static class createPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1214
      private PurchaseOrder purchaseOrder;
1215
      public createPurchaseOrder_call(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<createPurchaseOrder_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1216
        super(client, protocolFactory, transport, resultHandler, false);
1217
        this.purchaseOrder = purchaseOrder;
1218
      }
1219
 
1220
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1221
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1222
        createPurchaseOrder_args args = new createPurchaseOrder_args();
1223
        args.setPurchaseOrder(purchaseOrder);
1224
        args.write(prot);
1225
        prot.writeMessageEnd();
1226
      }
1227
 
1228
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1229
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1230
          throw new IllegalStateException("Method call not finished!");
1231
        }
1232
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1233
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1234
        return (new Client(prot)).recv_createPurchaseOrder();
1235
      }
1236
    }
1237
 
1238
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1239
      checkReady();
1240
      getPurchaseOrder_call method_call = new getPurchaseOrder_call(id, resultHandler, this, ___protocolFactory, ___transport);
1241
      this.___currentMethod = method_call;
1242
      ___manager.call(method_call);
1243
    }
1244
 
1245
    public static class getPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1246
      private long id;
1247
      public getPurchaseOrder_call(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrder_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1248
        super(client, protocolFactory, transport, resultHandler, false);
1249
        this.id = id;
1250
      }
1251
 
1252
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1253
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1254
        getPurchaseOrder_args args = new getPurchaseOrder_args();
1255
        args.setId(id);
1256
        args.write(prot);
1257
        prot.writeMessageEnd();
1258
      }
1259
 
1260
      public PurchaseOrder getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1261
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1262
          throw new IllegalStateException("Method call not finished!");
1263
        }
1264
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1265
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1266
        return (new Client(prot)).recv_getPurchaseOrder();
1267
      }
1268
    }
1269
 
1270
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
1271
      checkReady();
1272
      getAllPurchaseOrders_call method_call = new getAllPurchaseOrders_call(status, resultHandler, this, ___protocolFactory, ___transport);
1273
      this.___currentMethod = method_call;
1274
      ___manager.call(method_call);
1275
    }
1276
 
1277
    public static class getAllPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
1278
      private POStatus status;
1279
      public getAllPurchaseOrders_call(POStatus status, org.apache.thrift.async.AsyncMethodCallback<getAllPurchaseOrders_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1280
        super(client, protocolFactory, transport, resultHandler, false);
1281
        this.status = status;
1282
      }
1283
 
1284
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1285
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
1286
        getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
1287
        args.setStatus(status);
1288
        args.write(prot);
1289
        prot.writeMessageEnd();
1290
      }
1291
 
1292
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1293
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1294
          throw new IllegalStateException("Method call not finished!");
1295
        }
1296
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1297
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1298
        return (new Client(prot)).recv_getAllPurchaseOrders();
1299
      }
1300
    }
1301
 
1302
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<getSupplier_call> resultHandler) throws org.apache.thrift.TException {
1303
      checkReady();
1304
      getSupplier_call method_call = new getSupplier_call(id, resultHandler, this, ___protocolFactory, ___transport);
1305
      this.___currentMethod = method_call;
1306
      ___manager.call(method_call);
1307
    }
1308
 
1309
    public static class getSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1310
      private long id;
1311
      public getSupplier_call(long id, org.apache.thrift.async.AsyncMethodCallback<getSupplier_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1312
        super(client, protocolFactory, transport, resultHandler, false);
1313
        this.id = id;
1314
      }
1315
 
1316
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1317
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1318
        getSupplier_args args = new getSupplier_args();
1319
        args.setId(id);
1320
        args.write(prot);
1321
        prot.writeMessageEnd();
1322
      }
1323
 
1324
      public Supplier getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1325
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1326
          throw new IllegalStateException("Method call not finished!");
1327
        }
1328
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1329
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1330
        return (new Client(prot)).recv_getSupplier();
1331
      }
1332
    }
1333
 
11801 manish.sha 1334
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments, org.apache.thrift.async.AsyncMethodCallback<startPurchase_call> resultHandler) throws org.apache.thrift.TException {
4496 mandeep.dh 1335
      checkReady();
11801 manish.sha 1336
      startPurchase_call method_call = new startPurchase_call(purchaseOrderId, invoiceNumber, freightCharges, purchaseComments, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 1337
      this.___currentMethod = method_call;
1338
      ___manager.call(method_call);
1339
    }
1340
 
1341
    public static class startPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
1342
      private long purchaseOrderId;
1343
      private String invoiceNumber;
1344
      private double freightCharges;
11801 manish.sha 1345
      private String purchaseComments;
1346
      public startPurchase_call(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments, org.apache.thrift.async.AsyncMethodCallback<startPurchase_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
4496 mandeep.dh 1347
        super(client, protocolFactory, transport, resultHandler, false);
1348
        this.purchaseOrderId = purchaseOrderId;
1349
        this.invoiceNumber = invoiceNumber;
1350
        this.freightCharges = freightCharges;
11801 manish.sha 1351
        this.purchaseComments = purchaseComments;
4496 mandeep.dh 1352
      }
1353
 
1354
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1355
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1356
        startPurchase_args args = new startPurchase_args();
1357
        args.setPurchaseOrderId(purchaseOrderId);
1358
        args.setInvoiceNumber(invoiceNumber);
1359
        args.setFreightCharges(freightCharges);
11801 manish.sha 1360
        args.setPurchaseComments(purchaseComments);
4496 mandeep.dh 1361
        args.write(prot);
1362
        prot.writeMessageEnd();
1363
      }
1364
 
1365
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1366
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1367
          throw new IllegalStateException("Method call not finished!");
1368
        }
1369
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1370
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1371
        return (new Client(prot)).recv_startPurchase();
1372
      }
1373
    }
1374
 
1375
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<closePurchase_call> resultHandler) throws org.apache.thrift.TException {
1376
      checkReady();
1377
      closePurchase_call method_call = new closePurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
1378
      this.___currentMethod = method_call;
1379
      ___manager.call(method_call);
1380
    }
1381
 
1382
    public static class closePurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
1383
      private long purchaseId;
1384
      public closePurchase_call(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<closePurchase_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1385
        super(client, protocolFactory, transport, resultHandler, false);
1386
        this.purchaseId = purchaseId;
1387
      }
1388
 
1389
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1390
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closePurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1391
        closePurchase_args args = new closePurchase_args();
1392
        args.setPurchaseId(purchaseId);
1393
        args.write(prot);
1394
        prot.writeMessageEnd();
1395
      }
1396
 
1397
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1398
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1399
          throw new IllegalStateException("Method call not finished!");
1400
        }
1401
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1402
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1403
        return (new Client(prot)).recv_closePurchase();
1404
      }
1405
    }
1406
 
1407
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<getAllPurchases_call> resultHandler) throws org.apache.thrift.TException {
1408
      checkReady();
1409
      getAllPurchases_call method_call = new getAllPurchases_call(purchaseOrderId, open, resultHandler, this, ___protocolFactory, ___transport);
1410
      this.___currentMethod = method_call;
1411
      ___manager.call(method_call);
1412
    }
1413
 
1414
    public static class getAllPurchases_call extends org.apache.thrift.async.TAsyncMethodCall {
1415
      private long purchaseOrderId;
1416
      private boolean open;
1417
      public getAllPurchases_call(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<getAllPurchases_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1418
        super(client, protocolFactory, transport, resultHandler, false);
1419
        this.purchaseOrderId = purchaseOrderId;
1420
        this.open = open;
1421
      }
1422
 
1423
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1424
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPurchases", org.apache.thrift.protocol.TMessageType.CALL, 0));
1425
        getAllPurchases_args args = new getAllPurchases_args();
1426
        args.setPurchaseOrderId(purchaseOrderId);
1427
        args.setOpen(open);
1428
        args.write(prot);
1429
        prot.writeMessageEnd();
1430
      }
1431
 
1432
      public List<Purchase> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1433
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1434
          throw new IllegalStateException("Method call not finished!");
1435
        }
1436
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1437
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1438
        return (new Client(prot)).recv_getAllPurchases();
1439
      }
1440
    }
1441
 
6385 amar.kumar 1442
    public void getPurchasesForPO(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<getPurchasesForPO_call> resultHandler) throws org.apache.thrift.TException {
1443
      checkReady();
1444
      getPurchasesForPO_call method_call = new getPurchasesForPO_call(purchaseOrderId, resultHandler, this, ___protocolFactory, ___transport);
1445
      this.___currentMethod = method_call;
1446
      ___manager.call(method_call);
1447
    }
1448
 
1449
    public static class getPurchasesForPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1450
      private long purchaseOrderId;
1451
      public getPurchasesForPO_call(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<getPurchasesForPO_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1452
        super(client, protocolFactory, transport, resultHandler, false);
1453
        this.purchaseOrderId = purchaseOrderId;
1454
      }
1455
 
1456
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1457
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchasesForPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1458
        getPurchasesForPO_args args = new getPurchasesForPO_args();
1459
        args.setPurchaseOrderId(purchaseOrderId);
1460
        args.write(prot);
1461
        prot.writeMessageEnd();
1462
      }
1463
 
1464
      public List<Purchase> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1465
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1466
          throw new IllegalStateException("Method call not finished!");
1467
        }
1468
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1469
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1470
        return (new Client(prot)).recv_getPurchasesForPO();
1471
      }
1472
    }
1473
 
4555 mandeep.dh 1474
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException {
4496 mandeep.dh 1475
      checkReady();
4555 mandeep.dh 1476
      getPurchaseOrderForPurchase_call method_call = new getPurchaseOrderForPurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 1477
      this.___currentMethod = method_call;
1478
      ___manager.call(method_call);
1479
    }
1480
 
4555 mandeep.dh 1481
    public static class getPurchaseOrderForPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
4496 mandeep.dh 1482
      private long purchaseId;
4555 mandeep.dh 1483
      public getPurchaseOrderForPurchase_call(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrderForPurchase_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
4496 mandeep.dh 1484
        super(client, protocolFactory, transport, resultHandler, false);
1485
        this.purchaseId = purchaseId;
1486
      }
1487
 
1488
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4555 mandeep.dh 1489
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrderForPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1490
        getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 1491
        args.setPurchaseId(purchaseId);
1492
        args.write(prot);
1493
        prot.writeMessageEnd();
1494
      }
1495
 
4555 mandeep.dh 1496
      public PurchaseOrder getResult() throws org.apache.thrift.TException {
4496 mandeep.dh 1497
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1498
          throw new IllegalStateException("Method call not finished!");
1499
        }
1500
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1501
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4555 mandeep.dh 1502
        return (new Client(prot)).recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 1503
      }
1504
    }
1505
 
4754 mandeep.dh 1506
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
1507
      checkReady();
1508
      getPendingPurchaseOrders_call method_call = new getPendingPurchaseOrders_call(warehouseId, resultHandler, this, ___protocolFactory, ___transport);
1509
      this.___currentMethod = method_call;
1510
      ___manager.call(method_call);
1511
    }
1512
 
1513
    public static class getPendingPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
1514
      private long warehouseId;
1515
      public getPendingPurchaseOrders_call(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<getPendingPurchaseOrders_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1516
        super(client, protocolFactory, transport, resultHandler, false);
1517
        this.warehouseId = warehouseId;
1518
      }
1519
 
1520
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1521
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPendingPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
1522
        getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
1523
        args.setWarehouseId(warehouseId);
1524
        args.write(prot);
1525
        prot.writeMessageEnd();
1526
      }
1527
 
1528
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1529
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1530
          throw new IllegalStateException("Method call not finished!");
1531
        }
1532
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1533
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1534
        return (new Client(prot)).recv_getPendingPurchaseOrders();
1535
      }
1536
    }
1537
 
1538
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<getSuppliers_call> resultHandler) throws org.apache.thrift.TException {
1539
      checkReady();
1540
      getSuppliers_call method_call = new getSuppliers_call(resultHandler, this, ___protocolFactory, ___transport);
1541
      this.___currentMethod = method_call;
1542
      ___manager.call(method_call);
1543
    }
1544
 
1545
    public static class getSuppliers_call extends org.apache.thrift.async.TAsyncMethodCall {
1546
      public getSuppliers_call(org.apache.thrift.async.AsyncMethodCallback<getSuppliers_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1547
        super(client, protocolFactory, transport, resultHandler, false);
1548
      }
1549
 
1550
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1551
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSuppliers", org.apache.thrift.protocol.TMessageType.CALL, 0));
1552
        getSuppliers_args args = new getSuppliers_args();
1553
        args.write(prot);
1554
        prot.writeMessageEnd();
1555
      }
1556
 
1557
      public List<Supplier> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1558
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1559
          throw new IllegalStateException("Method call not finished!");
1560
        }
1561
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1562
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1563
        return (new Client(prot)).recv_getSuppliers();
1564
      }
1565
    }
1566
 
21847 amit.gupta 1567
    public void getAllSuppliers(org.apache.thrift.async.AsyncMethodCallback<getAllSuppliers_call> resultHandler) throws org.apache.thrift.TException {
1568
      checkReady();
1569
      getAllSuppliers_call method_call = new getAllSuppliers_call(resultHandler, this, ___protocolFactory, ___transport);
1570
      this.___currentMethod = method_call;
1571
      ___manager.call(method_call);
1572
    }
1573
 
1574
    public static class getAllSuppliers_call extends org.apache.thrift.async.TAsyncMethodCall {
1575
      public getAllSuppliers_call(org.apache.thrift.async.AsyncMethodCallback<getAllSuppliers_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1576
        super(client, protocolFactory, transport, resultHandler, false);
1577
      }
1578
 
1579
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1580
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllSuppliers", org.apache.thrift.protocol.TMessageType.CALL, 0));
1581
        getAllSuppliers_args args = new getAllSuppliers_args();
1582
        args.write(prot);
1583
        prot.writeMessageEnd();
1584
      }
1585
 
1586
      public List<Supplier> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1587
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1588
          throw new IllegalStateException("Method call not finished!");
1589
        }
1590
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1591
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1592
        return (new Client(prot)).recv_getAllSuppliers();
1593
      }
1594
    }
1595
 
4754 mandeep.dh 1596
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPO_call> resultHandler) throws org.apache.thrift.TException {
1597
      checkReady();
1598
      fulfillPO_call method_call = new fulfillPO_call(purchaseOrderId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1599
      this.___currentMethod = method_call;
1600
      ___manager.call(method_call);
1601
    }
1602
 
1603
    public static class fulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1604
      private long purchaseOrderId;
1605
      private long itemId;
1606
      private long quantity;
1607
      public fulfillPO_call(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPO_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1608
        super(client, protocolFactory, transport, resultHandler, false);
1609
        this.purchaseOrderId = purchaseOrderId;
1610
        this.itemId = itemId;
1611
        this.quantity = quantity;
1612
      }
1613
 
1614
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1615
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1616
        fulfillPO_args args = new fulfillPO_args();
1617
        args.setPurchaseOrderId(purchaseOrderId);
1618
        args.setItemId(itemId);
1619
        args.setQuantity(quantity);
1620
        args.write(prot);
1621
        prot.writeMessageEnd();
1622
      }
1623
 
1624
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1625
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1626
          throw new IllegalStateException("Method call not finished!");
1627
        }
1628
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1629
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1630
        (new Client(prot)).recv_fulfillPO();
1631
      }
1632
    }
1633
 
1634
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1635
      checkReady();
1636
      updatePurchaseOrder_call method_call = new updatePurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
1637
      this.___currentMethod = method_call;
1638
      ___manager.call(method_call);
1639
    }
1640
 
1641
    public static class updatePurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1642
      private PurchaseOrder purchaseOrder;
1643
      public updatePurchaseOrder_call(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<updatePurchaseOrder_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1644
        super(client, protocolFactory, transport, resultHandler, false);
1645
        this.purchaseOrder = purchaseOrder;
1646
      }
1647
 
1648
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1649
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updatePurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1650
        updatePurchaseOrder_args args = new updatePurchaseOrder_args();
1651
        args.setPurchaseOrder(purchaseOrder);
1652
        args.write(prot);
1653
        prot.writeMessageEnd();
1654
      }
1655
 
1656
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1657
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1658
          throw new IllegalStateException("Method call not finished!");
1659
        }
1660
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1661
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1662
        (new Client(prot)).recv_updatePurchaseOrder();
1663
      }
1664
    }
1665
 
5185 mandeep.dh 1666
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<unFulfillPO_call> resultHandler) throws org.apache.thrift.TException {
1667
      checkReady();
1668
      unFulfillPO_call method_call = new unFulfillPO_call(purchaseId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1669
      this.___currentMethod = method_call;
1670
      ___manager.call(method_call);
1671
    }
1672
 
1673
    public static class unFulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1674
      private long purchaseId;
1675
      private long itemId;
1676
      private long quantity;
1677
      public unFulfillPO_call(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<unFulfillPO_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1678
        super(client, protocolFactory, transport, resultHandler, false);
1679
        this.purchaseId = purchaseId;
1680
        this.itemId = itemId;
1681
        this.quantity = quantity;
1682
      }
1683
 
1684
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1685
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unFulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1686
        unFulfillPO_args args = new unFulfillPO_args();
1687
        args.setPurchaseId(purchaseId);
1688
        args.setItemId(itemId);
1689
        args.setQuantity(quantity);
1690
        args.write(prot);
1691
        prot.writeMessageEnd();
1692
      }
1693
 
1694
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1695
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1696
          throw new IllegalStateException("Method call not finished!");
1697
        }
1698
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1699
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1700
        (new Client(prot)).recv_unFulfillPO();
1701
      }
1702
    }
1703
 
5443 mandeep.dh 1704
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<getInvoices_call> resultHandler) throws org.apache.thrift.TException {
1705
      checkReady();
1706
      getInvoices_call method_call = new getInvoices_call(date, resultHandler, this, ___protocolFactory, ___transport);
1707
      this.___currentMethod = method_call;
1708
      ___manager.call(method_call);
1709
    }
1710
 
1711
    public static class getInvoices_call extends org.apache.thrift.async.TAsyncMethodCall {
1712
      private long date;
1713
      public getInvoices_call(long date, org.apache.thrift.async.AsyncMethodCallback<getInvoices_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1714
        super(client, protocolFactory, transport, resultHandler, false);
1715
        this.date = date;
1716
      }
1717
 
1718
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1719
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoices", org.apache.thrift.protocol.TMessageType.CALL, 0));
1720
        getInvoices_args args = new getInvoices_args();
1721
        args.setDate(date);
1722
        args.write(prot);
1723
        prot.writeMessageEnd();
1724
      }
1725
 
1726
      public List<Invoice> getResult() throws org.apache.thrift.TException {
1727
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1728
          throw new IllegalStateException("Method call not finished!");
1729
        }
1730
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1731
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1732
        return (new Client(prot)).recv_getInvoices();
1733
      }
1734
    }
1735
 
7410 amar.kumar 1736
    public void getInvoicesForWarehouse(long warehouseId, long supplierId, long date, org.apache.thrift.async.AsyncMethodCallback<getInvoicesForWarehouse_call> resultHandler) throws org.apache.thrift.TException {
1737
      checkReady();
1738
      getInvoicesForWarehouse_call method_call = new getInvoicesForWarehouse_call(warehouseId, supplierId, date, resultHandler, this, ___protocolFactory, ___transport);
1739
      this.___currentMethod = method_call;
1740
      ___manager.call(method_call);
1741
    }
1742
 
1743
    public static class getInvoicesForWarehouse_call extends org.apache.thrift.async.TAsyncMethodCall {
1744
      private long warehouseId;
1745
      private long supplierId;
1746
      private long date;
1747
      public getInvoicesForWarehouse_call(long warehouseId, long supplierId, long date, org.apache.thrift.async.AsyncMethodCallback<getInvoicesForWarehouse_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1748
        super(client, protocolFactory, transport, resultHandler, false);
1749
        this.warehouseId = warehouseId;
1750
        this.supplierId = supplierId;
1751
        this.date = date;
1752
      }
1753
 
1754
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1755
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoicesForWarehouse", org.apache.thrift.protocol.TMessageType.CALL, 0));
1756
        getInvoicesForWarehouse_args args = new getInvoicesForWarehouse_args();
1757
        args.setWarehouseId(warehouseId);
1758
        args.setSupplierId(supplierId);
1759
        args.setDate(date);
1760
        args.write(prot);
1761
        prot.writeMessageEnd();
1762
      }
1763
 
1764
      public List<Invoice> getResult() throws org.apache.thrift.TException {
1765
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1766
          throw new IllegalStateException("Method call not finished!");
1767
        }
1768
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1769
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1770
        return (new Client(prot)).recv_getInvoicesForWarehouse();
1771
      }
1772
    }
1773
 
5443 mandeep.dh 1774
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<createInvoice_call> resultHandler) throws org.apache.thrift.TException {
1775
      checkReady();
1776
      createInvoice_call method_call = new createInvoice_call(invoice, resultHandler, this, ___protocolFactory, ___transport);
1777
      this.___currentMethod = method_call;
1778
      ___manager.call(method_call);
1779
    }
1780
 
1781
    public static class createInvoice_call extends org.apache.thrift.async.TAsyncMethodCall {
1782
      private Invoice invoice;
1783
      public createInvoice_call(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<createInvoice_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1784
        super(client, protocolFactory, transport, resultHandler, false);
1785
        this.invoice = invoice;
1786
      }
1787
 
1788
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1789
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createInvoice", org.apache.thrift.protocol.TMessageType.CALL, 0));
1790
        createInvoice_args args = new createInvoice_args();
1791
        args.setInvoice(invoice);
1792
        args.write(prot);
1793
        prot.writeMessageEnd();
1794
      }
1795
 
1796
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1797
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1798
          throw new IllegalStateException("Method call not finished!");
1799
        }
1800
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1801
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1802
        (new Client(prot)).recv_createInvoice();
1803
      }
1804
    }
1805
 
5591 mandeep.dh 1806
    public void addSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<addSupplier_call> resultHandler) throws org.apache.thrift.TException {
1807
      checkReady();
1808
      addSupplier_call method_call = new addSupplier_call(supplier, resultHandler, this, ___protocolFactory, ___transport);
1809
      this.___currentMethod = method_call;
1810
      ___manager.call(method_call);
1811
    }
1812
 
1813
    public static class addSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1814
      private Supplier supplier;
1815
      public addSupplier_call(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<addSupplier_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1816
        super(client, protocolFactory, transport, resultHandler, false);
1817
        this.supplier = supplier;
1818
      }
1819
 
1820
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1821
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1822
        addSupplier_args args = new addSupplier_args();
1823
        args.setSupplier(supplier);
1824
        args.write(prot);
1825
        prot.writeMessageEnd();
1826
      }
1827
 
1828
      public Supplier getResult() throws org.apache.thrift.TException {
1829
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1830
          throw new IllegalStateException("Method call not finished!");
1831
        }
1832
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1833
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1834
        return (new Client(prot)).recv_addSupplier();
1835
      }
1836
    }
1837
 
1838
    public void updateSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<updateSupplier_call> resultHandler) throws org.apache.thrift.TException {
1839
      checkReady();
1840
      updateSupplier_call method_call = new updateSupplier_call(supplier, resultHandler, this, ___protocolFactory, ___transport);
1841
      this.___currentMethod = method_call;
1842
      ___manager.call(method_call);
1843
    }
1844
 
1845
    public static class updateSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1846
      private Supplier supplier;
1847
      public updateSupplier_call(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<updateSupplier_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1848
        super(client, protocolFactory, transport, resultHandler, false);
1849
        this.supplier = supplier;
1850
      }
1851
 
1852
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1853
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1854
        updateSupplier_args args = new updateSupplier_args();
1855
        args.setSupplier(supplier);
1856
        args.write(prot);
1857
        prot.writeMessageEnd();
1858
      }
1859
 
1860
      public void getResult() throws org.apache.thrift.TException {
1861
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1862
          throw new IllegalStateException("Method call not finished!");
1863
        }
1864
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1865
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1866
        (new Client(prot)).recv_updateSupplier();
1867
      }
1868
    }
1869
 
6467 amar.kumar 1870
    public void createPurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<createPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1871
      checkReady();
1872
      createPurchaseReturn_call method_call = new createPurchaseReturn_call(purchaseReturn, resultHandler, this, ___protocolFactory, ___transport);
1873
      this.___currentMethod = method_call;
1874
      ___manager.call(method_call);
1875
    }
1876
 
1877
    public static class createPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1878
      private PurchaseReturn purchaseReturn;
1879
      public createPurchaseReturn_call(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<createPurchaseReturn_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1880
        super(client, protocolFactory, transport, resultHandler, false);
1881
        this.purchaseReturn = purchaseReturn;
1882
      }
1883
 
1884
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1885
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1886
        createPurchaseReturn_args args = new createPurchaseReturn_args();
1887
        args.setPurchaseReturn(purchaseReturn);
1888
        args.write(prot);
1889
        prot.writeMessageEnd();
1890
      }
1891
 
1892
      public long getResult() throws org.apache.thrift.TException {
1893
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1894
          throw new IllegalStateException("Method call not finished!");
1895
        }
1896
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1897
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1898
        return (new Client(prot)).recv_createPurchaseReturn();
1899
      }
1900
    }
1901
 
1902
    public void settlePurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<settlePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1903
      checkReady();
1904
      settlePurchaseReturn_call method_call = new settlePurchaseReturn_call(id, resultHandler, this, ___protocolFactory, ___transport);
1905
      this.___currentMethod = method_call;
1906
      ___manager.call(method_call);
1907
    }
1908
 
1909
    public static class settlePurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1910
      private long id;
1911
      public settlePurchaseReturn_call(long id, org.apache.thrift.async.AsyncMethodCallback<settlePurchaseReturn_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1912
        super(client, protocolFactory, transport, resultHandler, false);
1913
        this.id = id;
1914
      }
1915
 
1916
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1917
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("settlePurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1918
        settlePurchaseReturn_args args = new settlePurchaseReturn_args();
1919
        args.setId(id);
1920
        args.write(prot);
1921
        prot.writeMessageEnd();
1922
      }
1923
 
1924
      public void getResult() throws org.apache.thrift.TException {
1925
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1926
          throw new IllegalStateException("Method call not finished!");
1927
        }
1928
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1929
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1930
        (new Client(prot)).recv_settlePurchaseReturn();
1931
      }
1932
    }
1933
 
1934
    public void getUnsettledPurchaseReturns(org.apache.thrift.async.AsyncMethodCallback<getUnsettledPurchaseReturns_call> resultHandler) throws org.apache.thrift.TException {
1935
      checkReady();
1936
      getUnsettledPurchaseReturns_call method_call = new getUnsettledPurchaseReturns_call(resultHandler, this, ___protocolFactory, ___transport);
1937
      this.___currentMethod = method_call;
1938
      ___manager.call(method_call);
1939
    }
1940
 
1941
    public static class getUnsettledPurchaseReturns_call extends org.apache.thrift.async.TAsyncMethodCall {
1942
      public getUnsettledPurchaseReturns_call(org.apache.thrift.async.AsyncMethodCallback<getUnsettledPurchaseReturns_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1943
        super(client, protocolFactory, transport, resultHandler, false);
1944
      }
1945
 
1946
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1947
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUnsettledPurchaseReturns", org.apache.thrift.protocol.TMessageType.CALL, 0));
1948
        getUnsettledPurchaseReturns_args args = new getUnsettledPurchaseReturns_args();
1949
        args.write(prot);
1950
        prot.writeMessageEnd();
1951
      }
1952
 
1953
      public List<PurchaseReturn> getResult() throws org.apache.thrift.TException {
1954
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1955
          throw new IllegalStateException("Method call not finished!");
1956
        }
1957
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1958
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1959
        return (new Client(prot)).recv_getUnsettledPurchaseReturns();
1960
      }
1961
    }
1962
 
6630 amar.kumar 1963
    public void getInvoice(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<getInvoice_call> resultHandler) throws org.apache.thrift.TException {
1964
      checkReady();
1965
      getInvoice_call method_call = new getInvoice_call(invoiceNumber, supplierId, resultHandler, this, ___protocolFactory, ___transport);
1966
      this.___currentMethod = method_call;
1967
      ___manager.call(method_call);
1968
    }
1969
 
1970
    public static class getInvoice_call extends org.apache.thrift.async.TAsyncMethodCall {
1971
      private String invoiceNumber;
1972
      private long supplierId;
1973
      public getInvoice_call(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<getInvoice_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1974
        super(client, protocolFactory, transport, resultHandler, false);
1975
        this.invoiceNumber = invoiceNumber;
1976
        this.supplierId = supplierId;
1977
      }
1978
 
1979
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1980
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoice", org.apache.thrift.protocol.TMessageType.CALL, 0));
1981
        getInvoice_args args = new getInvoice_args();
1982
        args.setInvoiceNumber(invoiceNumber);
1983
        args.setSupplierId(supplierId);
1984
        args.write(prot);
1985
        prot.writeMessageEnd();
1986
      }
1987
 
1988
      public List<PurchaseReturn> getResult() throws org.apache.thrift.TException {
1989
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1990
          throw new IllegalStateException("Method call not finished!");
1991
        }
1992
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1993
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1994
        return (new Client(prot)).recv_getInvoice();
1995
      }
1996
    }
1997
 
7672 rajveer 1998
    public void createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId, org.apache.thrift.async.AsyncMethodCallback<createPurchaseForOurExtBilling_call> resultHandler) throws org.apache.thrift.TException {
6762 amar.kumar 1999
      checkReady();
7672 rajveer 2000
      createPurchaseForOurExtBilling_call method_call = new createPurchaseForOurExtBilling_call(invoiceNumber, unitPrice, nlc, itemId, resultHandler, this, ___protocolFactory, ___transport);
6762 amar.kumar 2001
      this.___currentMethod = method_call;
2002
      ___manager.call(method_call);
2003
    }
2004
 
2005
    public static class createPurchaseForOurExtBilling_call extends org.apache.thrift.async.TAsyncMethodCall {
2006
      private String invoiceNumber;
2007
      private double unitPrice;
7672 rajveer 2008
      private double nlc;
6762 amar.kumar 2009
      private long itemId;
7672 rajveer 2010
      public createPurchaseForOurExtBilling_call(String invoiceNumber, double unitPrice, double nlc, long itemId, org.apache.thrift.async.AsyncMethodCallback<createPurchaseForOurExtBilling_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
6762 amar.kumar 2011
        super(client, protocolFactory, transport, resultHandler, false);
2012
        this.invoiceNumber = invoiceNumber;
2013
        this.unitPrice = unitPrice;
7672 rajveer 2014
        this.nlc = nlc;
6762 amar.kumar 2015
        this.itemId = itemId;
2016
      }
2017
 
2018
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2019
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseForOurExtBilling", org.apache.thrift.protocol.TMessageType.CALL, 0));
2020
        createPurchaseForOurExtBilling_args args = new createPurchaseForOurExtBilling_args();
2021
        args.setInvoiceNumber(invoiceNumber);
2022
        args.setUnitPrice(unitPrice);
7672 rajveer 2023
        args.setNlc(nlc);
6762 amar.kumar 2024
        args.setItemId(itemId);
2025
        args.write(prot);
2026
        prot.writeMessageEnd();
2027
      }
2028
 
2029
      public long getResult() throws org.apache.thrift.TException {
2030
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2031
          throw new IllegalStateException("Method call not finished!");
2032
        }
2033
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2034
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2035
        return (new Client(prot)).recv_createPurchaseForOurExtBilling();
2036
      }
2037
    }
2038
 
2039
    public void fulfillPOForExtBilling(long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPOForExtBilling_call> resultHandler) throws org.apache.thrift.TException {
2040
      checkReady();
2041
      fulfillPOForExtBilling_call method_call = new fulfillPOForExtBilling_call(itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
2042
      this.___currentMethod = method_call;
2043
      ___manager.call(method_call);
2044
    }
2045
 
2046
    public static class fulfillPOForExtBilling_call extends org.apache.thrift.async.TAsyncMethodCall {
2047
      private long itemId;
2048
      private long quantity;
2049
      public fulfillPOForExtBilling_call(long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPOForExtBilling_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
2050
        super(client, protocolFactory, transport, resultHandler, false);
2051
        this.itemId = itemId;
2052
        this.quantity = quantity;
2053
      }
2054
 
2055
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2056
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fulfillPOForExtBilling", org.apache.thrift.protocol.TMessageType.CALL, 0));
2057
        fulfillPOForExtBilling_args args = new fulfillPOForExtBilling_args();
2058
        args.setItemId(itemId);
2059
        args.setQuantity(quantity);
2060
        args.write(prot);
2061
        prot.writeMessageEnd();
2062
      }
2063
 
2064
      public void getResult() throws org.apache.thrift.TException {
2065
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2066
          throw new IllegalStateException("Method call not finished!");
2067
        }
2068
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2069
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2070
        (new Client(prot)).recv_fulfillPOForExtBilling();
2071
      }
2072
    }
2073
 
7410 amar.kumar 2074
    public void closePO(long poId, org.apache.thrift.async.AsyncMethodCallback<closePO_call> resultHandler) throws org.apache.thrift.TException {
2075
      checkReady();
2076
      closePO_call method_call = new closePO_call(poId, resultHandler, this, ___protocolFactory, ___transport);
2077
      this.___currentMethod = method_call;
2078
      ___manager.call(method_call);
2079
    }
2080
 
2081
    public static class closePO_call extends org.apache.thrift.async.TAsyncMethodCall {
2082
      private long poId;
2083
      public closePO_call(long poId, org.apache.thrift.async.AsyncMethodCallback<closePO_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
2084
        super(client, protocolFactory, transport, resultHandler, false);
2085
        this.poId = poId;
2086
      }
2087
 
2088
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2089
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closePO", org.apache.thrift.protocol.TMessageType.CALL, 0));
2090
        closePO_args args = new closePO_args();
2091
        args.setPoId(poId);
2092
        args.write(prot);
2093
        prot.writeMessageEnd();
2094
      }
2095
 
2096
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2097
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2098
          throw new IllegalStateException("Method call not finished!");
2099
        }
2100
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2101
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2102
        (new Client(prot)).recv_closePO();
2103
      }
2104
    }
2105
 
2106
    public void isInvoiceReceived(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<isInvoiceReceived_call> resultHandler) throws org.apache.thrift.TException {
2107
      checkReady();
2108
      isInvoiceReceived_call method_call = new isInvoiceReceived_call(invoiceNumber, supplierId, resultHandler, this, ___protocolFactory, ___transport);
2109
      this.___currentMethod = method_call;
2110
      ___manager.call(method_call);
2111
    }
2112
 
2113
    public static class isInvoiceReceived_call extends org.apache.thrift.async.TAsyncMethodCall {
2114
      private String invoiceNumber;
2115
      private long supplierId;
2116
      public isInvoiceReceived_call(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<isInvoiceReceived_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
2117
        super(client, protocolFactory, transport, resultHandler, false);
2118
        this.invoiceNumber = invoiceNumber;
2119
        this.supplierId = supplierId;
2120
      }
2121
 
2122
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2123
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isInvoiceReceived", org.apache.thrift.protocol.TMessageType.CALL, 0));
2124
        isInvoiceReceived_args args = new isInvoiceReceived_args();
2125
        args.setInvoiceNumber(invoiceNumber);
2126
        args.setSupplierId(supplierId);
2127
        args.write(prot);
2128
        prot.writeMessageEnd();
2129
      }
2130
 
2131
      public boolean getResult() throws org.apache.thrift.TException {
2132
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2133
          throw new IllegalStateException("Method call not finished!");
2134
        }
2135
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2136
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2137
        return (new Client(prot)).recv_isInvoiceReceived();
2138
      }
2139
    }
2140
 
9829 amar.kumar 2141
    public void changeWarehouseForPO(long id, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<changeWarehouseForPO_call> resultHandler) throws org.apache.thrift.TException {
2142
      checkReady();
2143
      changeWarehouseForPO_call method_call = new changeWarehouseForPO_call(id, warehouseId, resultHandler, this, ___protocolFactory, ___transport);
2144
      this.___currentMethod = method_call;
2145
      ___manager.call(method_call);
2146
    }
2147
 
2148
    public static class changeWarehouseForPO_call extends org.apache.thrift.async.TAsyncMethodCall {
2149
      private long id;
2150
      private long warehouseId;
2151
      public changeWarehouseForPO_call(long id, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<changeWarehouseForPO_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
2152
        super(client, protocolFactory, transport, resultHandler, false);
2153
        this.id = id;
2154
        this.warehouseId = warehouseId;
2155
      }
2156
 
2157
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2158
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("changeWarehouseForPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
2159
        changeWarehouseForPO_args args = new changeWarehouseForPO_args();
2160
        args.setId(id);
2161
        args.setWarehouseId(warehouseId);
2162
        args.write(prot);
2163
        prot.writeMessageEnd();
2164
      }
2165
 
2166
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2167
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2168
          throw new IllegalStateException("Method call not finished!");
2169
        }
2170
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2171
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2172
        (new Client(prot)).recv_changeWarehouseForPO();
2173
      }
2174
    }
2175
 
9925 amar.kumar 2176
    public void changePOStatus(long id, POStatus poStatus, org.apache.thrift.async.AsyncMethodCallback<changePOStatus_call> resultHandler) throws org.apache.thrift.TException {
2177
      checkReady();
2178
      changePOStatus_call method_call = new changePOStatus_call(id, poStatus, resultHandler, this, ___protocolFactory, ___transport);
2179
      this.___currentMethod = method_call;
2180
      ___manager.call(method_call);
2181
    }
2182
 
2183
    public static class changePOStatus_call extends org.apache.thrift.async.TAsyncMethodCall {
2184
      private long id;
2185
      private POStatus poStatus;
2186
      public changePOStatus_call(long id, POStatus poStatus, org.apache.thrift.async.AsyncMethodCallback<changePOStatus_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
2187
        super(client, protocolFactory, transport, resultHandler, false);
2188
        this.id = id;
2189
        this.poStatus = poStatus;
2190
      }
2191
 
2192
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2193
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("changePOStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
2194
        changePOStatus_args args = new changePOStatus_args();
2195
        args.setId(id);
2196
        args.setPoStatus(poStatus);
2197
        args.write(prot);
2198
        prot.writeMessageEnd();
2199
      }
2200
 
2201
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2202
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2203
          throw new IllegalStateException("Method call not finished!");
2204
        }
2205
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2206
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2207
        (new Client(prot)).recv_changePOStatus();
2208
      }
2209
    }
2210
 
11751 manish.sha 2211
    public void getPurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
2212
      checkReady();
2213
      getPurchaseReturn_call method_call = new getPurchaseReturn_call(id, resultHandler, this, ___protocolFactory, ___transport);
2214
      this.___currentMethod = method_call;
2215
      ___manager.call(method_call);
2216
    }
2217
 
2218
    public static class getPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
2219
      private long id;
2220
      public getPurchaseReturn_call(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseReturn_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
2221
        super(client, protocolFactory, transport, resultHandler, false);
2222
        this.id = id;
2223
      }
2224
 
2225
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2226
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
2227
        getPurchaseReturn_args args = new getPurchaseReturn_args();
2228
        args.setId(id);
2229
        args.write(prot);
2230
        prot.writeMessageEnd();
2231
      }
2232
 
2233
      public PurchaseReturn getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2234
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2235
          throw new IllegalStateException("Method call not finished!");
2236
        }
2237
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2238
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2239
        return (new Client(prot)).recv_getPurchaseReturn();
2240
      }
2241
    }
2242
 
13600 manish.sha 2243
    public void markPurchasereturnSettled(long id, SettlementType settlementType, String documentNumber, String settlementBy, long settledAmount, org.apache.thrift.async.AsyncMethodCallback<markPurchasereturnSettled_call> resultHandler) throws org.apache.thrift.TException {
2244
      checkReady();
2245
      markPurchasereturnSettled_call method_call = new markPurchasereturnSettled_call(id, settlementType, documentNumber, settlementBy, settledAmount, resultHandler, this, ___protocolFactory, ___transport);
2246
      this.___currentMethod = method_call;
2247
      ___manager.call(method_call);
2248
    }
2249
 
2250
    public static class markPurchasereturnSettled_call extends org.apache.thrift.async.TAsyncMethodCall {
2251
      private long id;
2252
      private SettlementType settlementType;
2253
      private String documentNumber;
2254
      private String settlementBy;
2255
      private long settledAmount;
2256
      public markPurchasereturnSettled_call(long id, SettlementType settlementType, String documentNumber, String settlementBy, long settledAmount, org.apache.thrift.async.AsyncMethodCallback<markPurchasereturnSettled_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
2257
        super(client, protocolFactory, transport, resultHandler, false);
2258
        this.id = id;
2259
        this.settlementType = settlementType;
2260
        this.documentNumber = documentNumber;
2261
        this.settlementBy = settlementBy;
2262
        this.settledAmount = settledAmount;
2263
      }
2264
 
2265
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2266
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("markPurchasereturnSettled", org.apache.thrift.protocol.TMessageType.CALL, 0));
2267
        markPurchasereturnSettled_args args = new markPurchasereturnSettled_args();
2268
        args.setId(id);
2269
        args.setSettlementType(settlementType);
2270
        args.setDocumentNumber(documentNumber);
2271
        args.setSettlementBy(settlementBy);
2272
        args.setSettledAmount(settledAmount);
2273
        args.write(prot);
2274
        prot.writeMessageEnd();
2275
      }
2276
 
2277
      public boolean getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2278
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2279
          throw new IllegalStateException("Method call not finished!");
2280
        }
2281
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2282
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2283
        return (new Client(prot)).recv_markPurchasereturnSettled();
2284
      }
2285
    }
2286
 
2287
    public void getPrSettlementsForPurchaseReturn(long purchaseReturnId, org.apache.thrift.async.AsyncMethodCallback<getPrSettlementsForPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
2288
      checkReady();
2289
      getPrSettlementsForPurchaseReturn_call method_call = new getPrSettlementsForPurchaseReturn_call(purchaseReturnId, resultHandler, this, ___protocolFactory, ___transport);
2290
      this.___currentMethod = method_call;
2291
      ___manager.call(method_call);
2292
    }
2293
 
2294
    public static class getPrSettlementsForPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
2295
      private long purchaseReturnId;
2296
      public getPrSettlementsForPurchaseReturn_call(long purchaseReturnId, org.apache.thrift.async.AsyncMethodCallback<getPrSettlementsForPurchaseReturn_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
2297
        super(client, protocolFactory, transport, resultHandler, false);
2298
        this.purchaseReturnId = purchaseReturnId;
2299
      }
2300
 
2301
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2302
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPrSettlementsForPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
2303
        getPrSettlementsForPurchaseReturn_args args = new getPrSettlementsForPurchaseReturn_args();
2304
        args.setPurchaseReturnId(purchaseReturnId);
2305
        args.write(prot);
2306
        prot.writeMessageEnd();
2307
      }
2308
 
2309
      public List<PurchaseReturnSettlement> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2310
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2311
          throw new IllegalStateException("Method call not finished!");
2312
        }
2313
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2314
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2315
        return (new Client(prot)).recv_getPrSettlementsForPurchaseReturn();
2316
      }
2317
    }
2318
 
2319
    public void updatePurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<updatePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
2320
      checkReady();
2321
      updatePurchaseReturn_call method_call = new updatePurchaseReturn_call(purchaseReturn, resultHandler, this, ___protocolFactory, ___transport);
2322
      this.___currentMethod = method_call;
2323
      ___manager.call(method_call);
2324
    }
2325
 
2326
    public static class updatePurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
2327
      private PurchaseReturn purchaseReturn;
2328
      public updatePurchaseReturn_call(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<updatePurchaseReturn_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
2329
        super(client, protocolFactory, transport, resultHandler, false);
2330
        this.purchaseReturn = purchaseReturn;
2331
      }
2332
 
2333
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2334
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updatePurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
2335
        updatePurchaseReturn_args args = new updatePurchaseReturn_args();
2336
        args.setPurchaseReturn(purchaseReturn);
2337
        args.write(prot);
2338
        prot.writeMessageEnd();
2339
      }
2340
 
2341
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2342
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2343
          throw new IllegalStateException("Method call not finished!");
2344
        }
2345
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2346
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2347
        (new Client(prot)).recv_updatePurchaseReturn();
2348
      }
2349
    }
2350
 
4496 mandeep.dh 2351
  }
2352
 
2353
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
2354
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
2355
    public Processor(I iface) {
2356
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
2357
    }
2358
 
2359
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
2360
      super(iface, getProcessMap(processMap));
2361
    }
2362
 
2363
    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
2364
      processMap.put("createPurchaseOrder", new createPurchaseOrder());
2365
      processMap.put("getPurchaseOrder", new getPurchaseOrder());
2366
      processMap.put("getAllPurchaseOrders", new getAllPurchaseOrders());
2367
      processMap.put("getSupplier", new getSupplier());
2368
      processMap.put("startPurchase", new startPurchase());
2369
      processMap.put("closePurchase", new closePurchase());
2370
      processMap.put("getAllPurchases", new getAllPurchases());
6385 amar.kumar 2371
      processMap.put("getPurchasesForPO", new getPurchasesForPO());
4555 mandeep.dh 2372
      processMap.put("getPurchaseOrderForPurchase", new getPurchaseOrderForPurchase());
4754 mandeep.dh 2373
      processMap.put("getPendingPurchaseOrders", new getPendingPurchaseOrders());
2374
      processMap.put("getSuppliers", new getSuppliers());
21847 amit.gupta 2375
      processMap.put("getAllSuppliers", new getAllSuppliers());
4754 mandeep.dh 2376
      processMap.put("fulfillPO", new fulfillPO());
2377
      processMap.put("updatePurchaseOrder", new updatePurchaseOrder());
5185 mandeep.dh 2378
      processMap.put("unFulfillPO", new unFulfillPO());
5443 mandeep.dh 2379
      processMap.put("getInvoices", new getInvoices());
7410 amar.kumar 2380
      processMap.put("getInvoicesForWarehouse", new getInvoicesForWarehouse());
5443 mandeep.dh 2381
      processMap.put("createInvoice", new createInvoice());
5591 mandeep.dh 2382
      processMap.put("addSupplier", new addSupplier());
2383
      processMap.put("updateSupplier", new updateSupplier());
6467 amar.kumar 2384
      processMap.put("createPurchaseReturn", new createPurchaseReturn());
2385
      processMap.put("settlePurchaseReturn", new settlePurchaseReturn());
2386
      processMap.put("getUnsettledPurchaseReturns", new getUnsettledPurchaseReturns());
6630 amar.kumar 2387
      processMap.put("getInvoice", new getInvoice());
6762 amar.kumar 2388
      processMap.put("createPurchaseForOurExtBilling", new createPurchaseForOurExtBilling());
2389
      processMap.put("fulfillPOForExtBilling", new fulfillPOForExtBilling());
7410 amar.kumar 2390
      processMap.put("closePO", new closePO());
2391
      processMap.put("isInvoiceReceived", new isInvoiceReceived());
9829 amar.kumar 2392
      processMap.put("changeWarehouseForPO", new changeWarehouseForPO());
9925 amar.kumar 2393
      processMap.put("changePOStatus", new changePOStatus());
11751 manish.sha 2394
      processMap.put("getPurchaseReturn", new getPurchaseReturn());
13600 manish.sha 2395
      processMap.put("markPurchasereturnSettled", new markPurchasereturnSettled());
2396
      processMap.put("getPrSettlementsForPurchaseReturn", new getPrSettlementsForPurchaseReturn());
2397
      processMap.put("updatePurchaseReturn", new updatePurchaseReturn());
4496 mandeep.dh 2398
      return processMap;
2399
    }
2400
 
2401
    private static class createPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseOrder_args> {
2402
      public createPurchaseOrder() {
2403
        super("createPurchaseOrder");
2404
      }
2405
 
2406
      protected createPurchaseOrder_args getEmptyArgsInstance() {
2407
        return new createPurchaseOrder_args();
2408
      }
2409
 
2410
      protected createPurchaseOrder_result getResult(I iface, createPurchaseOrder_args args) throws org.apache.thrift.TException {
2411
        createPurchaseOrder_result result = new createPurchaseOrder_result();
2412
        try {
2413
          result.success = iface.createPurchaseOrder(args.purchaseOrder);
2414
          result.setSuccessIsSet(true);
2415
        } catch (PurchaseServiceException e) {
2416
          result.e = e;
2417
        }
2418
        return result;
2419
      }
2420
    }
2421
 
2422
    private static class getPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrder_args> {
2423
      public getPurchaseOrder() {
2424
        super("getPurchaseOrder");
2425
      }
2426
 
2427
      protected getPurchaseOrder_args getEmptyArgsInstance() {
2428
        return new getPurchaseOrder_args();
2429
      }
2430
 
2431
      protected getPurchaseOrder_result getResult(I iface, getPurchaseOrder_args args) throws org.apache.thrift.TException {
2432
        getPurchaseOrder_result result = new getPurchaseOrder_result();
2433
        try {
2434
          result.success = iface.getPurchaseOrder(args.id);
2435
        } catch (PurchaseServiceException e) {
2436
          result.e = e;
2437
        }
2438
        return result;
2439
      }
2440
    }
2441
 
2442
    private static class getAllPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchaseOrders_args> {
2443
      public getAllPurchaseOrders() {
2444
        super("getAllPurchaseOrders");
2445
      }
2446
 
2447
      protected getAllPurchaseOrders_args getEmptyArgsInstance() {
2448
        return new getAllPurchaseOrders_args();
2449
      }
2450
 
2451
      protected getAllPurchaseOrders_result getResult(I iface, getAllPurchaseOrders_args args) throws org.apache.thrift.TException {
2452
        getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
2453
        try {
2454
          result.success = iface.getAllPurchaseOrders(args.status);
2455
        } catch (PurchaseServiceException e) {
2456
          result.e = e;
2457
        }
2458
        return result;
2459
      }
2460
    }
2461
 
2462
    private static class getSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSupplier_args> {
2463
      public getSupplier() {
2464
        super("getSupplier");
2465
      }
2466
 
2467
      protected getSupplier_args getEmptyArgsInstance() {
2468
        return new getSupplier_args();
2469
      }
2470
 
2471
      protected getSupplier_result getResult(I iface, getSupplier_args args) throws org.apache.thrift.TException {
2472
        getSupplier_result result = new getSupplier_result();
2473
        try {
2474
          result.success = iface.getSupplier(args.id);
2475
        } catch (PurchaseServiceException e) {
2476
          result.e = e;
2477
        }
2478
        return result;
2479
      }
2480
    }
2481
 
2482
    private static class startPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startPurchase_args> {
2483
      public startPurchase() {
2484
        super("startPurchase");
2485
      }
2486
 
2487
      protected startPurchase_args getEmptyArgsInstance() {
2488
        return new startPurchase_args();
2489
      }
2490
 
2491
      protected startPurchase_result getResult(I iface, startPurchase_args args) throws org.apache.thrift.TException {
2492
        startPurchase_result result = new startPurchase_result();
2493
        try {
11801 manish.sha 2494
          result.success = iface.startPurchase(args.purchaseOrderId, args.invoiceNumber, args.freightCharges, args.purchaseComments);
4496 mandeep.dh 2495
          result.setSuccessIsSet(true);
2496
        } catch (PurchaseServiceException e) {
2497
          result.e = e;
2498
        }
2499
        return result;
2500
      }
2501
    }
2502
 
2503
    private static class closePurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closePurchase_args> {
2504
      public closePurchase() {
2505
        super("closePurchase");
2506
      }
2507
 
2508
      protected closePurchase_args getEmptyArgsInstance() {
2509
        return new closePurchase_args();
2510
      }
2511
 
2512
      protected closePurchase_result getResult(I iface, closePurchase_args args) throws org.apache.thrift.TException {
2513
        closePurchase_result result = new closePurchase_result();
2514
        try {
2515
          result.success = iface.closePurchase(args.purchaseId);
2516
          result.setSuccessIsSet(true);
2517
        } catch (PurchaseServiceException e) {
2518
          result.e = e;
2519
        }
2520
        return result;
2521
      }
2522
    }
2523
 
2524
    private static class getAllPurchases<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchases_args> {
2525
      public getAllPurchases() {
2526
        super("getAllPurchases");
2527
      }
2528
 
2529
      protected getAllPurchases_args getEmptyArgsInstance() {
2530
        return new getAllPurchases_args();
2531
      }
2532
 
2533
      protected getAllPurchases_result getResult(I iface, getAllPurchases_args args) throws org.apache.thrift.TException {
2534
        getAllPurchases_result result = new getAllPurchases_result();
2535
        try {
2536
          result.success = iface.getAllPurchases(args.purchaseOrderId, args.open);
2537
        } catch (PurchaseServiceException e) {
2538
          result.e = e;
2539
        }
2540
        return result;
2541
      }
2542
    }
2543
 
6385 amar.kumar 2544
    private static class getPurchasesForPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchasesForPO_args> {
2545
      public getPurchasesForPO() {
2546
        super("getPurchasesForPO");
2547
      }
2548
 
2549
      protected getPurchasesForPO_args getEmptyArgsInstance() {
2550
        return new getPurchasesForPO_args();
2551
      }
2552
 
2553
      protected getPurchasesForPO_result getResult(I iface, getPurchasesForPO_args args) throws org.apache.thrift.TException {
2554
        getPurchasesForPO_result result = new getPurchasesForPO_result();
2555
        try {
2556
          result.success = iface.getPurchasesForPO(args.purchaseOrderId);
2557
        } catch (PurchaseServiceException e) {
2558
          result.e = e;
2559
        }
2560
        return result;
2561
      }
2562
    }
2563
 
4555 mandeep.dh 2564
    private static class getPurchaseOrderForPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrderForPurchase_args> {
2565
      public getPurchaseOrderForPurchase() {
2566
        super("getPurchaseOrderForPurchase");
4496 mandeep.dh 2567
      }
2568
 
4555 mandeep.dh 2569
      protected getPurchaseOrderForPurchase_args getEmptyArgsInstance() {
2570
        return new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 2571
      }
2572
 
4555 mandeep.dh 2573
      protected getPurchaseOrderForPurchase_result getResult(I iface, getPurchaseOrderForPurchase_args args) throws org.apache.thrift.TException {
2574
        getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
2575
        result.success = iface.getPurchaseOrderForPurchase(args.purchaseId);
4496 mandeep.dh 2576
        return result;
2577
      }
2578
    }
2579
 
4754 mandeep.dh 2580
    private static class getPendingPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPendingPurchaseOrders_args> {
2581
      public getPendingPurchaseOrders() {
2582
        super("getPendingPurchaseOrders");
2583
      }
2584
 
2585
      protected getPendingPurchaseOrders_args getEmptyArgsInstance() {
2586
        return new getPendingPurchaseOrders_args();
2587
      }
2588
 
2589
      protected getPendingPurchaseOrders_result getResult(I iface, getPendingPurchaseOrders_args args) throws org.apache.thrift.TException {
2590
        getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
2591
        try {
2592
          result.success = iface.getPendingPurchaseOrders(args.warehouseId);
2593
        } catch (PurchaseServiceException e) {
2594
          result.e = e;
2595
        }
2596
        return result;
2597
      }
2598
    }
2599
 
2600
    private static class getSuppliers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSuppliers_args> {
2601
      public getSuppliers() {
2602
        super("getSuppliers");
2603
      }
2604
 
2605
      protected getSuppliers_args getEmptyArgsInstance() {
2606
        return new getSuppliers_args();
2607
      }
2608
 
2609
      protected getSuppliers_result getResult(I iface, getSuppliers_args args) throws org.apache.thrift.TException {
2610
        getSuppliers_result result = new getSuppliers_result();
2611
        try {
2612
          result.success = iface.getSuppliers();
2613
        } catch (PurchaseServiceException e) {
2614
          result.e = e;
2615
        }
2616
        return result;
2617
      }
2618
    }
2619
 
21847 amit.gupta 2620
    private static class getAllSuppliers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllSuppliers_args> {
2621
      public getAllSuppliers() {
2622
        super("getAllSuppliers");
2623
      }
2624
 
2625
      protected getAllSuppliers_args getEmptyArgsInstance() {
2626
        return new getAllSuppliers_args();
2627
      }
2628
 
2629
      protected getAllSuppliers_result getResult(I iface, getAllSuppliers_args args) throws org.apache.thrift.TException {
2630
        getAllSuppliers_result result = new getAllSuppliers_result();
2631
        try {
2632
          result.success = iface.getAllSuppliers();
2633
        } catch (PurchaseServiceException e) {
2634
          result.e = e;
2635
        }
2636
        return result;
2637
      }
2638
    }
2639
 
4754 mandeep.dh 2640
    private static class fulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fulfillPO_args> {
2641
      public fulfillPO() {
2642
        super("fulfillPO");
2643
      }
2644
 
2645
      protected fulfillPO_args getEmptyArgsInstance() {
2646
        return new fulfillPO_args();
2647
      }
2648
 
2649
      protected fulfillPO_result getResult(I iface, fulfillPO_args args) throws org.apache.thrift.TException {
2650
        fulfillPO_result result = new fulfillPO_result();
2651
        try {
2652
          iface.fulfillPO(args.purchaseOrderId, args.itemId, args.quantity);
2653
        } catch (PurchaseServiceException e) {
2654
          result.e = e;
2655
        }
2656
        return result;
2657
      }
2658
    }
2659
 
2660
    private static class updatePurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updatePurchaseOrder_args> {
2661
      public updatePurchaseOrder() {
2662
        super("updatePurchaseOrder");
2663
      }
2664
 
2665
      protected updatePurchaseOrder_args getEmptyArgsInstance() {
2666
        return new updatePurchaseOrder_args();
2667
      }
2668
 
2669
      protected updatePurchaseOrder_result getResult(I iface, updatePurchaseOrder_args args) throws org.apache.thrift.TException {
2670
        updatePurchaseOrder_result result = new updatePurchaseOrder_result();
2671
        try {
2672
          iface.updatePurchaseOrder(args.purchaseOrder);
2673
        } catch (PurchaseServiceException e) {
2674
          result.e = e;
2675
        }
2676
        return result;
2677
      }
2678
    }
2679
 
5185 mandeep.dh 2680
    private static class unFulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, unFulfillPO_args> {
2681
      public unFulfillPO() {
2682
        super("unFulfillPO");
2683
      }
2684
 
2685
      protected unFulfillPO_args getEmptyArgsInstance() {
2686
        return new unFulfillPO_args();
2687
      }
2688
 
2689
      protected unFulfillPO_result getResult(I iface, unFulfillPO_args args) throws org.apache.thrift.TException {
2690
        unFulfillPO_result result = new unFulfillPO_result();
2691
        try {
2692
          iface.unFulfillPO(args.purchaseId, args.itemId, args.quantity);
2693
        } catch (PurchaseServiceException e) {
2694
          result.e = e;
2695
        }
2696
        return result;
2697
      }
2698
    }
2699
 
5443 mandeep.dh 2700
    private static class getInvoices<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoices_args> {
2701
      public getInvoices() {
2702
        super("getInvoices");
2703
      }
2704
 
2705
      protected getInvoices_args getEmptyArgsInstance() {
2706
        return new getInvoices_args();
2707
      }
2708
 
2709
      protected getInvoices_result getResult(I iface, getInvoices_args args) throws org.apache.thrift.TException {
2710
        getInvoices_result result = new getInvoices_result();
2711
        result.success = iface.getInvoices(args.date);
2712
        return result;
2713
      }
2714
    }
2715
 
7410 amar.kumar 2716
    private static class getInvoicesForWarehouse<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoicesForWarehouse_args> {
2717
      public getInvoicesForWarehouse() {
2718
        super("getInvoicesForWarehouse");
2719
      }
2720
 
2721
      protected getInvoicesForWarehouse_args getEmptyArgsInstance() {
2722
        return new getInvoicesForWarehouse_args();
2723
      }
2724
 
2725
      protected getInvoicesForWarehouse_result getResult(I iface, getInvoicesForWarehouse_args args) throws org.apache.thrift.TException {
2726
        getInvoicesForWarehouse_result result = new getInvoicesForWarehouse_result();
2727
        result.success = iface.getInvoicesForWarehouse(args.warehouseId, args.supplierId, args.date);
2728
        return result;
2729
      }
2730
    }
2731
 
5443 mandeep.dh 2732
    private static class createInvoice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createInvoice_args> {
2733
      public createInvoice() {
2734
        super("createInvoice");
2735
      }
2736
 
2737
      protected createInvoice_args getEmptyArgsInstance() {
2738
        return new createInvoice_args();
2739
      }
2740
 
2741
      protected createInvoice_result getResult(I iface, createInvoice_args args) throws org.apache.thrift.TException {
2742
        createInvoice_result result = new createInvoice_result();
2743
        try {
2744
          iface.createInvoice(args.invoice);
2745
        } catch (PurchaseServiceException e) {
2746
          result.e = e;
2747
        }
2748
        return result;
2749
      }
2750
    }
2751
 
5591 mandeep.dh 2752
    private static class addSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addSupplier_args> {
2753
      public addSupplier() {
2754
        super("addSupplier");
2755
      }
2756
 
2757
      protected addSupplier_args getEmptyArgsInstance() {
2758
        return new addSupplier_args();
2759
      }
2760
 
2761
      protected addSupplier_result getResult(I iface, addSupplier_args args) throws org.apache.thrift.TException {
2762
        addSupplier_result result = new addSupplier_result();
2763
        result.success = iface.addSupplier(args.supplier);
2764
        return result;
2765
      }
2766
    }
2767
 
2768
    private static class updateSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateSupplier_args> {
2769
      public updateSupplier() {
2770
        super("updateSupplier");
2771
      }
2772
 
2773
      protected updateSupplier_args getEmptyArgsInstance() {
2774
        return new updateSupplier_args();
2775
      }
2776
 
2777
      protected updateSupplier_result getResult(I iface, updateSupplier_args args) throws org.apache.thrift.TException {
2778
        updateSupplier_result result = new updateSupplier_result();
2779
        iface.updateSupplier(args.supplier);
2780
        return result;
2781
      }
2782
    }
2783
 
6467 amar.kumar 2784
    private static class createPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseReturn_args> {
2785
      public createPurchaseReturn() {
2786
        super("createPurchaseReturn");
2787
      }
2788
 
2789
      protected createPurchaseReturn_args getEmptyArgsInstance() {
2790
        return new createPurchaseReturn_args();
2791
      }
2792
 
2793
      protected createPurchaseReturn_result getResult(I iface, createPurchaseReturn_args args) throws org.apache.thrift.TException {
2794
        createPurchaseReturn_result result = new createPurchaseReturn_result();
2795
        result.success = iface.createPurchaseReturn(args.purchaseReturn);
2796
        result.setSuccessIsSet(true);
2797
        return result;
2798
      }
2799
    }
2800
 
2801
    private static class settlePurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, settlePurchaseReturn_args> {
2802
      public settlePurchaseReturn() {
2803
        super("settlePurchaseReturn");
2804
      }
2805
 
2806
      protected settlePurchaseReturn_args getEmptyArgsInstance() {
2807
        return new settlePurchaseReturn_args();
2808
      }
2809
 
2810
      protected settlePurchaseReturn_result getResult(I iface, settlePurchaseReturn_args args) throws org.apache.thrift.TException {
2811
        settlePurchaseReturn_result result = new settlePurchaseReturn_result();
2812
        iface.settlePurchaseReturn(args.id);
2813
        return result;
2814
      }
2815
    }
2816
 
2817
    private static class getUnsettledPurchaseReturns<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUnsettledPurchaseReturns_args> {
2818
      public getUnsettledPurchaseReturns() {
2819
        super("getUnsettledPurchaseReturns");
2820
      }
2821
 
2822
      protected getUnsettledPurchaseReturns_args getEmptyArgsInstance() {
2823
        return new getUnsettledPurchaseReturns_args();
2824
      }
2825
 
2826
      protected getUnsettledPurchaseReturns_result getResult(I iface, getUnsettledPurchaseReturns_args args) throws org.apache.thrift.TException {
2827
        getUnsettledPurchaseReturns_result result = new getUnsettledPurchaseReturns_result();
2828
        result.success = iface.getUnsettledPurchaseReturns();
2829
        return result;
2830
      }
2831
    }
2832
 
6630 amar.kumar 2833
    private static class getInvoice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoice_args> {
2834
      public getInvoice() {
2835
        super("getInvoice");
2836
      }
2837
 
2838
      protected getInvoice_args getEmptyArgsInstance() {
2839
        return new getInvoice_args();
2840
      }
2841
 
2842
      protected getInvoice_result getResult(I iface, getInvoice_args args) throws org.apache.thrift.TException {
2843
        getInvoice_result result = new getInvoice_result();
2844
        result.success = iface.getInvoice(args.invoiceNumber, args.supplierId);
2845
        return result;
2846
      }
2847
    }
2848
 
6762 amar.kumar 2849
    private static class createPurchaseForOurExtBilling<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseForOurExtBilling_args> {
2850
      public createPurchaseForOurExtBilling() {
2851
        super("createPurchaseForOurExtBilling");
2852
      }
2853
 
2854
      protected createPurchaseForOurExtBilling_args getEmptyArgsInstance() {
2855
        return new createPurchaseForOurExtBilling_args();
2856
      }
2857
 
2858
      protected createPurchaseForOurExtBilling_result getResult(I iface, createPurchaseForOurExtBilling_args args) throws org.apache.thrift.TException {
2859
        createPurchaseForOurExtBilling_result result = new createPurchaseForOurExtBilling_result();
7672 rajveer 2860
        result.success = iface.createPurchaseForOurExtBilling(args.invoiceNumber, args.unitPrice, args.nlc, args.itemId);
6762 amar.kumar 2861
        result.setSuccessIsSet(true);
2862
        return result;
2863
      }
2864
    }
2865
 
2866
    private static class fulfillPOForExtBilling<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fulfillPOForExtBilling_args> {
2867
      public fulfillPOForExtBilling() {
2868
        super("fulfillPOForExtBilling");
2869
      }
2870
 
2871
      protected fulfillPOForExtBilling_args getEmptyArgsInstance() {
2872
        return new fulfillPOForExtBilling_args();
2873
      }
2874
 
2875
      protected fulfillPOForExtBilling_result getResult(I iface, fulfillPOForExtBilling_args args) throws org.apache.thrift.TException {
2876
        fulfillPOForExtBilling_result result = new fulfillPOForExtBilling_result();
2877
        iface.fulfillPOForExtBilling(args.itemId, args.quantity);
2878
        return result;
2879
      }
2880
    }
2881
 
7410 amar.kumar 2882
    private static class closePO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closePO_args> {
2883
      public closePO() {
2884
        super("closePO");
2885
      }
2886
 
2887
      protected closePO_args getEmptyArgsInstance() {
2888
        return new closePO_args();
2889
      }
2890
 
2891
      protected closePO_result getResult(I iface, closePO_args args) throws org.apache.thrift.TException {
2892
        closePO_result result = new closePO_result();
2893
        try {
2894
          iface.closePO(args.poId);
2895
        } catch (PurchaseServiceException e) {
2896
          result.e = e;
2897
        }
2898
        return result;
2899
      }
2900
    }
2901
 
2902
    private static class isInvoiceReceived<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isInvoiceReceived_args> {
2903
      public isInvoiceReceived() {
2904
        super("isInvoiceReceived");
2905
      }
2906
 
2907
      protected isInvoiceReceived_args getEmptyArgsInstance() {
2908
        return new isInvoiceReceived_args();
2909
      }
2910
 
2911
      protected isInvoiceReceived_result getResult(I iface, isInvoiceReceived_args args) throws org.apache.thrift.TException {
2912
        isInvoiceReceived_result result = new isInvoiceReceived_result();
2913
        result.success = iface.isInvoiceReceived(args.invoiceNumber, args.supplierId);
2914
        result.setSuccessIsSet(true);
2915
        return result;
2916
      }
2917
    }
2918
 
9829 amar.kumar 2919
    private static class changeWarehouseForPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, changeWarehouseForPO_args> {
2920
      public changeWarehouseForPO() {
2921
        super("changeWarehouseForPO");
2922
      }
2923
 
2924
      protected changeWarehouseForPO_args getEmptyArgsInstance() {
2925
        return new changeWarehouseForPO_args();
2926
      }
2927
 
2928
      protected changeWarehouseForPO_result getResult(I iface, changeWarehouseForPO_args args) throws org.apache.thrift.TException {
2929
        changeWarehouseForPO_result result = new changeWarehouseForPO_result();
2930
        try {
2931
          iface.changeWarehouseForPO(args.id, args.warehouseId);
2932
        } catch (PurchaseServiceException e) {
2933
          result.e = e;
2934
        }
2935
        return result;
2936
      }
2937
    }
2938
 
9925 amar.kumar 2939
    private static class changePOStatus<I extends Iface> extends org.apache.thrift.ProcessFunction<I, changePOStatus_args> {
2940
      public changePOStatus() {
2941
        super("changePOStatus");
2942
      }
2943
 
2944
      protected changePOStatus_args getEmptyArgsInstance() {
2945
        return new changePOStatus_args();
2946
      }
2947
 
2948
      protected changePOStatus_result getResult(I iface, changePOStatus_args args) throws org.apache.thrift.TException {
2949
        changePOStatus_result result = new changePOStatus_result();
2950
        try {
2951
          iface.changePOStatus(args.id, args.poStatus);
2952
        } catch (PurchaseServiceException e) {
2953
          result.e = e;
2954
        }
2955
        return result;
2956
      }
2957
    }
2958
 
11751 manish.sha 2959
    private static class getPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseReturn_args> {
2960
      public getPurchaseReturn() {
2961
        super("getPurchaseReturn");
2962
      }
2963
 
2964
      protected getPurchaseReturn_args getEmptyArgsInstance() {
2965
        return new getPurchaseReturn_args();
2966
      }
2967
 
2968
      protected getPurchaseReturn_result getResult(I iface, getPurchaseReturn_args args) throws org.apache.thrift.TException {
2969
        getPurchaseReturn_result result = new getPurchaseReturn_result();
2970
        try {
2971
          result.success = iface.getPurchaseReturn(args.id);
2972
        } catch (PurchaseServiceException e) {
2973
          result.e = e;
2974
        }
2975
        return result;
2976
      }
2977
    }
2978
 
13600 manish.sha 2979
    private static class markPurchasereturnSettled<I extends Iface> extends org.apache.thrift.ProcessFunction<I, markPurchasereturnSettled_args> {
2980
      public markPurchasereturnSettled() {
2981
        super("markPurchasereturnSettled");
2982
      }
2983
 
2984
      protected markPurchasereturnSettled_args getEmptyArgsInstance() {
2985
        return new markPurchasereturnSettled_args();
2986
      }
2987
 
2988
      protected markPurchasereturnSettled_result getResult(I iface, markPurchasereturnSettled_args args) throws org.apache.thrift.TException {
2989
        markPurchasereturnSettled_result result = new markPurchasereturnSettled_result();
2990
        try {
2991
          result.success = iface.markPurchasereturnSettled(args.id, args.settlementType, args.documentNumber, args.settlementBy, args.settledAmount);
2992
          result.setSuccessIsSet(true);
2993
        } catch (PurchaseServiceException e) {
2994
          result.e = e;
2995
        }
2996
        return result;
2997
      }
2998
    }
2999
 
3000
    private static class getPrSettlementsForPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPrSettlementsForPurchaseReturn_args> {
3001
      public getPrSettlementsForPurchaseReturn() {
3002
        super("getPrSettlementsForPurchaseReturn");
3003
      }
3004
 
3005
      protected getPrSettlementsForPurchaseReturn_args getEmptyArgsInstance() {
3006
        return new getPrSettlementsForPurchaseReturn_args();
3007
      }
3008
 
3009
      protected getPrSettlementsForPurchaseReturn_result getResult(I iface, getPrSettlementsForPurchaseReturn_args args) throws org.apache.thrift.TException {
3010
        getPrSettlementsForPurchaseReturn_result result = new getPrSettlementsForPurchaseReturn_result();
3011
        try {
3012
          result.success = iface.getPrSettlementsForPurchaseReturn(args.purchaseReturnId);
3013
        } catch (PurchaseServiceException e) {
3014
          result.e = e;
3015
        }
3016
        return result;
3017
      }
3018
    }
3019
 
3020
    private static class updatePurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updatePurchaseReturn_args> {
3021
      public updatePurchaseReturn() {
3022
        super("updatePurchaseReturn");
3023
      }
3024
 
3025
      protected updatePurchaseReturn_args getEmptyArgsInstance() {
3026
        return new updatePurchaseReturn_args();
3027
      }
3028
 
3029
      protected updatePurchaseReturn_result getResult(I iface, updatePurchaseReturn_args args) throws org.apache.thrift.TException {
3030
        updatePurchaseReturn_result result = new updatePurchaseReturn_result();
3031
        try {
3032
          iface.updatePurchaseReturn(args.purchaseReturn);
3033
        } catch (PurchaseServiceException e) {
3034
          result.e = e;
3035
        }
3036
        return result;
3037
      }
3038
    }
3039
 
4496 mandeep.dh 3040
  }
3041
 
3042
  public static class createPurchaseOrder_args implements org.apache.thrift.TBase<createPurchaseOrder_args, createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
3043
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_args");
3044
 
3045
    private static final org.apache.thrift.protocol.TField PURCHASE_ORDER_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseOrder", org.apache.thrift.protocol.TType.STRUCT, (short)1);
3046
 
3047
    private PurchaseOrder purchaseOrder; // required
3048
 
3049
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3050
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3051
      PURCHASE_ORDER((short)1, "purchaseOrder");
3052
 
3053
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3054
 
3055
      static {
3056
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3057
          byName.put(field.getFieldName(), field);
3058
        }
3059
      }
3060
 
3061
      /**
3062
       * Find the _Fields constant that matches fieldId, or null if its not found.
3063
       */
3064
      public static _Fields findByThriftId(int fieldId) {
3065
        switch(fieldId) {
3066
          case 1: // PURCHASE_ORDER
3067
            return PURCHASE_ORDER;
3068
          default:
3069
            return null;
3070
        }
3071
      }
3072
 
3073
      /**
3074
       * Find the _Fields constant that matches fieldId, throwing an exception
3075
       * if it is not found.
3076
       */
3077
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3078
        _Fields fields = findByThriftId(fieldId);
3079
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3080
        return fields;
3081
      }
3082
 
3083
      /**
3084
       * Find the _Fields constant that matches name, or null if its not found.
3085
       */
3086
      public static _Fields findByName(String name) {
3087
        return byName.get(name);
3088
      }
3089
 
3090
      private final short _thriftId;
3091
      private final String _fieldName;
3092
 
3093
      _Fields(short thriftId, String fieldName) {
3094
        _thriftId = thriftId;
3095
        _fieldName = fieldName;
3096
      }
3097
 
3098
      public short getThriftFieldId() {
3099
        return _thriftId;
3100
      }
3101
 
3102
      public String getFieldName() {
3103
        return _fieldName;
3104
      }
3105
    }
3106
 
3107
    // isset id assignments
3108
 
3109
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3110
    static {
3111
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3112
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3113
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
3114
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3115
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_args.class, metaDataMap);
3116
    }
3117
 
3118
    public createPurchaseOrder_args() {
3119
    }
3120
 
3121
    public createPurchaseOrder_args(
3122
      PurchaseOrder purchaseOrder)
3123
    {
3124
      this();
3125
      this.purchaseOrder = purchaseOrder;
3126
    }
3127
 
3128
    /**
3129
     * Performs a deep copy on <i>other</i>.
3130
     */
3131
    public createPurchaseOrder_args(createPurchaseOrder_args other) {
3132
      if (other.isSetPurchaseOrder()) {
3133
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
3134
      }
3135
    }
3136
 
3137
    public createPurchaseOrder_args deepCopy() {
3138
      return new createPurchaseOrder_args(this);
3139
    }
3140
 
3141
    @Override
3142
    public void clear() {
3143
      this.purchaseOrder = null;
3144
    }
3145
 
3146
    public PurchaseOrder getPurchaseOrder() {
3147
      return this.purchaseOrder;
3148
    }
3149
 
3150
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
3151
      this.purchaseOrder = purchaseOrder;
3152
    }
3153
 
3154
    public void unsetPurchaseOrder() {
3155
      this.purchaseOrder = null;
3156
    }
3157
 
3158
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
3159
    public boolean isSetPurchaseOrder() {
3160
      return this.purchaseOrder != null;
3161
    }
3162
 
3163
    public void setPurchaseOrderIsSet(boolean value) {
3164
      if (!value) {
3165
        this.purchaseOrder = null;
3166
      }
3167
    }
3168
 
3169
    public void setFieldValue(_Fields field, Object value) {
3170
      switch (field) {
3171
      case PURCHASE_ORDER:
3172
        if (value == null) {
3173
          unsetPurchaseOrder();
3174
        } else {
3175
          setPurchaseOrder((PurchaseOrder)value);
3176
        }
3177
        break;
3178
 
3179
      }
3180
    }
3181
 
3182
    public Object getFieldValue(_Fields field) {
3183
      switch (field) {
3184
      case PURCHASE_ORDER:
3185
        return getPurchaseOrder();
3186
 
3187
      }
3188
      throw new IllegalStateException();
3189
    }
3190
 
3191
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3192
    public boolean isSet(_Fields field) {
3193
      if (field == null) {
3194
        throw new IllegalArgumentException();
3195
      }
3196
 
3197
      switch (field) {
3198
      case PURCHASE_ORDER:
3199
        return isSetPurchaseOrder();
3200
      }
3201
      throw new IllegalStateException();
3202
    }
3203
 
3204
    @Override
3205
    public boolean equals(Object that) {
3206
      if (that == null)
3207
        return false;
3208
      if (that instanceof createPurchaseOrder_args)
3209
        return this.equals((createPurchaseOrder_args)that);
3210
      return false;
3211
    }
3212
 
3213
    public boolean equals(createPurchaseOrder_args that) {
3214
      if (that == null)
3215
        return false;
3216
 
3217
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
3218
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
3219
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
3220
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
3221
          return false;
3222
        if (!this.purchaseOrder.equals(that.purchaseOrder))
3223
          return false;
3224
      }
3225
 
3226
      return true;
3227
    }
3228
 
3229
    @Override
3230
    public int hashCode() {
3231
      return 0;
3232
    }
3233
 
3234
    public int compareTo(createPurchaseOrder_args other) {
3235
      if (!getClass().equals(other.getClass())) {
3236
        return getClass().getName().compareTo(other.getClass().getName());
3237
      }
3238
 
3239
      int lastComparison = 0;
3240
      createPurchaseOrder_args typedOther = (createPurchaseOrder_args)other;
3241
 
3242
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
3243
      if (lastComparison != 0) {
3244
        return lastComparison;
3245
      }
3246
      if (isSetPurchaseOrder()) {
3247
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
3248
        if (lastComparison != 0) {
3249
          return lastComparison;
3250
        }
3251
      }
3252
      return 0;
3253
    }
3254
 
3255
    public _Fields fieldForId(int fieldId) {
3256
      return _Fields.findByThriftId(fieldId);
3257
    }
3258
 
3259
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3260
      org.apache.thrift.protocol.TField field;
3261
      iprot.readStructBegin();
3262
      while (true)
3263
      {
3264
        field = iprot.readFieldBegin();
3265
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3266
          break;
3267
        }
3268
        switch (field.id) {
3269
          case 1: // PURCHASE_ORDER
3270
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3271
              this.purchaseOrder = new PurchaseOrder();
3272
              this.purchaseOrder.read(iprot);
3273
            } else { 
3274
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3275
            }
3276
            break;
3277
          default:
3278
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3279
        }
3280
        iprot.readFieldEnd();
3281
      }
3282
      iprot.readStructEnd();
3283
      validate();
3284
    }
3285
 
3286
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3287
      validate();
3288
 
3289
      oprot.writeStructBegin(STRUCT_DESC);
3290
      if (this.purchaseOrder != null) {
3291
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
3292
        this.purchaseOrder.write(oprot);
3293
        oprot.writeFieldEnd();
3294
      }
3295
      oprot.writeFieldStop();
3296
      oprot.writeStructEnd();
3297
    }
3298
 
3299
    @Override
3300
    public String toString() {
3301
      StringBuilder sb = new StringBuilder("createPurchaseOrder_args(");
3302
      boolean first = true;
3303
 
3304
      sb.append("purchaseOrder:");
3305
      if (this.purchaseOrder == null) {
3306
        sb.append("null");
3307
      } else {
3308
        sb.append(this.purchaseOrder);
3309
      }
3310
      first = false;
3311
      sb.append(")");
3312
      return sb.toString();
3313
    }
3314
 
3315
    public void validate() throws org.apache.thrift.TException {
3316
      // check for required fields
3317
    }
3318
 
3319
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3320
      try {
3321
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3322
      } catch (org.apache.thrift.TException te) {
3323
        throw new java.io.IOException(te);
3324
      }
3325
    }
3326
 
3327
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3328
      try {
3329
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3330
      } catch (org.apache.thrift.TException te) {
3331
        throw new java.io.IOException(te);
3332
      }
3333
    }
3334
 
3335
  }
3336
 
3337
  public static class createPurchaseOrder_result implements org.apache.thrift.TBase<createPurchaseOrder_result, createPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
3338
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_result");
3339
 
3340
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);
3341
    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
3342
 
3343
    private long success; // required
3344
    private PurchaseServiceException e; // required
3345
 
3346
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3347
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3348
      SUCCESS((short)0, "success"),
3349
      E((short)1, "e");
3350
 
3351
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3352
 
3353
      static {
3354
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3355
          byName.put(field.getFieldName(), field);
3356
        }
3357
      }
3358
 
3359
      /**
3360
       * Find the _Fields constant that matches fieldId, or null if its not found.
3361
       */
3362
      public static _Fields findByThriftId(int fieldId) {
3363
        switch(fieldId) {
3364
          case 0: // SUCCESS
3365
            return SUCCESS;
3366
          case 1: // E
3367
            return E;
3368
          default:
3369
            return null;
3370
        }
3371
      }
3372
 
3373
      /**
3374
       * Find the _Fields constant that matches fieldId, throwing an exception
3375
       * if it is not found.
3376
       */
3377
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3378
        _Fields fields = findByThriftId(fieldId);
3379
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3380
        return fields;
3381
      }
3382
 
3383
      /**
3384
       * Find the _Fields constant that matches name, or null if its not found.
3385
       */
3386
      public static _Fields findByName(String name) {
3387
        return byName.get(name);
3388
      }
3389
 
3390
      private final short _thriftId;
3391
      private final String _fieldName;
3392
 
3393
      _Fields(short thriftId, String fieldName) {
3394
        _thriftId = thriftId;
3395
        _fieldName = fieldName;
3396
      }
3397
 
3398
      public short getThriftFieldId() {
3399
        return _thriftId;
3400
      }
3401
 
3402
      public String getFieldName() {
3403
        return _fieldName;
3404
      }
3405
    }
3406
 
3407
    // isset id assignments
3408
    private static final int __SUCCESS_ISSET_ID = 0;
3409
    private BitSet __isset_bit_vector = new BitSet(1);
3410
 
3411
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3412
    static {
3413
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3414
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3415
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3416
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3417
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3418
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3419
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_result.class, metaDataMap);
3420
    }
3421
 
3422
    public createPurchaseOrder_result() {
3423
    }
3424
 
3425
    public createPurchaseOrder_result(
3426
      long success,
3427
      PurchaseServiceException e)
3428
    {
3429
      this();
3430
      this.success = success;
3431
      setSuccessIsSet(true);
3432
      this.e = e;
3433
    }
3434
 
3435
    /**
3436
     * Performs a deep copy on <i>other</i>.
3437
     */
3438
    public createPurchaseOrder_result(createPurchaseOrder_result other) {
3439
      __isset_bit_vector.clear();
3440
      __isset_bit_vector.or(other.__isset_bit_vector);
3441
      this.success = other.success;
3442
      if (other.isSetE()) {
3443
        this.e = new PurchaseServiceException(other.e);
3444
      }
3445
    }
3446
 
3447
    public createPurchaseOrder_result deepCopy() {
3448
      return new createPurchaseOrder_result(this);
3449
    }
3450
 
3451
    @Override
3452
    public void clear() {
3453
      setSuccessIsSet(false);
3454
      this.success = 0;
3455
      this.e = null;
3456
    }
3457
 
3458
    public long getSuccess() {
3459
      return this.success;
3460
    }
3461
 
3462
    public void setSuccess(long success) {
3463
      this.success = success;
3464
      setSuccessIsSet(true);
3465
    }
3466
 
3467
    public void unsetSuccess() {
3468
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
3469
    }
3470
 
3471
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
3472
    public boolean isSetSuccess() {
3473
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
3474
    }
3475
 
3476
    public void setSuccessIsSet(boolean value) {
3477
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
3478
    }
3479
 
3480
    public PurchaseServiceException getE() {
3481
      return this.e;
3482
    }
3483
 
3484
    public void setE(PurchaseServiceException e) {
3485
      this.e = e;
3486
    }
3487
 
3488
    public void unsetE() {
3489
      this.e = null;
3490
    }
3491
 
3492
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
3493
    public boolean isSetE() {
3494
      return this.e != null;
3495
    }
3496
 
3497
    public void setEIsSet(boolean value) {
3498
      if (!value) {
3499
        this.e = null;
3500
      }
3501
    }
3502
 
3503
    public void setFieldValue(_Fields field, Object value) {
3504
      switch (field) {
3505
      case SUCCESS:
3506
        if (value == null) {
3507
          unsetSuccess();
3508
        } else {
3509
          setSuccess((Long)value);
3510
        }
3511
        break;
3512
 
3513
      case E:
3514
        if (value == null) {
3515
          unsetE();
3516
        } else {
3517
          setE((PurchaseServiceException)value);
3518
        }
3519
        break;
3520
 
3521
      }
3522
    }
3523
 
3524
    public Object getFieldValue(_Fields field) {
3525
      switch (field) {
3526
      case SUCCESS:
3527
        return Long.valueOf(getSuccess());
3528
 
3529
      case E:
3530
        return getE();
3531
 
3532
      }
3533
      throw new IllegalStateException();
3534
    }
3535
 
3536
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3537
    public boolean isSet(_Fields field) {
3538
      if (field == null) {
3539
        throw new IllegalArgumentException();
3540
      }
3541
 
3542
      switch (field) {
3543
      case SUCCESS:
3544
        return isSetSuccess();
3545
      case E:
3546
        return isSetE();
3547
      }
3548
      throw new IllegalStateException();
3549
    }
3550
 
3551
    @Override
3552
    public boolean equals(Object that) {
3553
      if (that == null)
3554
        return false;
3555
      if (that instanceof createPurchaseOrder_result)
3556
        return this.equals((createPurchaseOrder_result)that);
3557
      return false;
3558
    }
3559
 
3560
    public boolean equals(createPurchaseOrder_result that) {
3561
      if (that == null)
3562
        return false;
3563
 
3564
      boolean this_present_success = true;
3565
      boolean that_present_success = true;
3566
      if (this_present_success || that_present_success) {
3567
        if (!(this_present_success && that_present_success))
3568
          return false;
3569
        if (this.success != that.success)
3570
          return false;
3571
      }
3572
 
3573
      boolean this_present_e = true && this.isSetE();
3574
      boolean that_present_e = true && that.isSetE();
3575
      if (this_present_e || that_present_e) {
3576
        if (!(this_present_e && that_present_e))
3577
          return false;
3578
        if (!this.e.equals(that.e))
3579
          return false;
3580
      }
3581
 
3582
      return true;
3583
    }
3584
 
3585
    @Override
3586
    public int hashCode() {
3587
      return 0;
3588
    }
3589
 
3590
    public int compareTo(createPurchaseOrder_result other) {
3591
      if (!getClass().equals(other.getClass())) {
3592
        return getClass().getName().compareTo(other.getClass().getName());
3593
      }
3594
 
3595
      int lastComparison = 0;
3596
      createPurchaseOrder_result typedOther = (createPurchaseOrder_result)other;
3597
 
3598
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3599
      if (lastComparison != 0) {
3600
        return lastComparison;
3601
      }
3602
      if (isSetSuccess()) {
3603
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3604
        if (lastComparison != 0) {
3605
          return lastComparison;
3606
        }
3607
      }
3608
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
3609
      if (lastComparison != 0) {
3610
        return lastComparison;
3611
      }
3612
      if (isSetE()) {
3613
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
3614
        if (lastComparison != 0) {
3615
          return lastComparison;
3616
        }
3617
      }
3618
      return 0;
3619
    }
3620
 
3621
    public _Fields fieldForId(int fieldId) {
3622
      return _Fields.findByThriftId(fieldId);
3623
    }
3624
 
3625
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3626
      org.apache.thrift.protocol.TField field;
3627
      iprot.readStructBegin();
3628
      while (true)
3629
      {
3630
        field = iprot.readFieldBegin();
3631
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3632
          break;
3633
        }
3634
        switch (field.id) {
3635
          case 0: // SUCCESS
3636
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3637
              this.success = iprot.readI64();
3638
              setSuccessIsSet(true);
3639
            } else { 
3640
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3641
            }
3642
            break;
3643
          case 1: // E
3644
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3645
              this.e = new PurchaseServiceException();
3646
              this.e.read(iprot);
3647
            } else { 
3648
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3649
            }
3650
            break;
3651
          default:
3652
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3653
        }
3654
        iprot.readFieldEnd();
3655
      }
3656
      iprot.readStructEnd();
3657
      validate();
3658
    }
3659
 
3660
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3661
      oprot.writeStructBegin(STRUCT_DESC);
3662
 
3663
      if (this.isSetSuccess()) {
3664
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3665
        oprot.writeI64(this.success);
3666
        oprot.writeFieldEnd();
3667
      } else if (this.isSetE()) {
3668
        oprot.writeFieldBegin(E_FIELD_DESC);
3669
        this.e.write(oprot);
3670
        oprot.writeFieldEnd();
3671
      }
3672
      oprot.writeFieldStop();
3673
      oprot.writeStructEnd();
3674
    }
3675
 
3676
    @Override
3677
    public String toString() {
3678
      StringBuilder sb = new StringBuilder("createPurchaseOrder_result(");
3679
      boolean first = true;
3680
 
3681
      sb.append("success:");
3682
      sb.append(this.success);
3683
      first = false;
3684
      if (!first) sb.append(", ");
3685
      sb.append("e:");
3686
      if (this.e == null) {
3687
        sb.append("null");
3688
      } else {
3689
        sb.append(this.e);
3690
      }
3691
      first = false;
3692
      sb.append(")");
3693
      return sb.toString();
3694
    }
3695
 
3696
    public void validate() throws org.apache.thrift.TException {
3697
      // check for required fields
3698
    }
3699
 
3700
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3701
      try {
3702
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3703
      } catch (org.apache.thrift.TException te) {
3704
        throw new java.io.IOException(te);
3705
      }
3706
    }
3707
 
3708
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3709
      try {
3710
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3711
      } catch (org.apache.thrift.TException te) {
3712
        throw new java.io.IOException(te);
3713
      }
3714
    }
3715
 
3716
  }
3717
 
3718
  public static class getPurchaseOrder_args implements org.apache.thrift.TBase<getPurchaseOrder_args, getPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
3719
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_args");
3720
 
3721
    private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);
3722
 
3723
    private long id; // required
3724
 
3725
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3726
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3727
      ID((short)1, "id");
3728
 
3729
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3730
 
3731
      static {
3732
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3733
          byName.put(field.getFieldName(), field);
3734
        }
3735
      }
3736
 
3737
      /**
3738
       * Find the _Fields constant that matches fieldId, or null if its not found.
3739
       */
3740
      public static _Fields findByThriftId(int fieldId) {
3741
        switch(fieldId) {
3742
          case 1: // ID
3743
            return ID;
3744
          default:
3745
            return null;
3746
        }
3747
      }
3748
 
3749
      /**
3750
       * Find the _Fields constant that matches fieldId, throwing an exception
3751
       * if it is not found.
3752
       */
3753
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3754
        _Fields fields = findByThriftId(fieldId);
3755
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3756
        return fields;
3757
      }
3758
 
3759
      /**
3760
       * Find the _Fields constant that matches name, or null if its not found.
3761
       */
3762
      public static _Fields findByName(String name) {
3763
        return byName.get(name);
3764
      }
3765
 
3766
      private final short _thriftId;
3767
      private final String _fieldName;
3768
 
3769
      _Fields(short thriftId, String fieldName) {
3770
        _thriftId = thriftId;
3771
        _fieldName = fieldName;
3772
      }
3773
 
3774
      public short getThriftFieldId() {
3775
        return _thriftId;
3776
      }
3777
 
3778
      public String getFieldName() {
3779
        return _fieldName;
3780
      }
3781
    }
3782
 
3783
    // isset id assignments
3784
    private static final int __ID_ISSET_ID = 0;
3785
    private BitSet __isset_bit_vector = new BitSet(1);
3786
 
3787
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3788
    static {
3789
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3790
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3791
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3792
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3793
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_args.class, metaDataMap);
3794
    }
3795
 
3796
    public getPurchaseOrder_args() {
3797
    }
3798
 
3799
    public getPurchaseOrder_args(
3800
      long id)
3801
    {
3802
      this();
3803
      this.id = id;
3804
      setIdIsSet(true);
3805
    }
3806
 
3807
    /**
3808
     * Performs a deep copy on <i>other</i>.
3809
     */
3810
    public getPurchaseOrder_args(getPurchaseOrder_args other) {
3811
      __isset_bit_vector.clear();
3812
      __isset_bit_vector.or(other.__isset_bit_vector);
3813
      this.id = other.id;
3814
    }
3815
 
3816
    public getPurchaseOrder_args deepCopy() {
3817
      return new getPurchaseOrder_args(this);
3818
    }
3819
 
3820
    @Override
3821
    public void clear() {
3822
      setIdIsSet(false);
3823
      this.id = 0;
3824
    }
3825
 
3826
    public long getId() {
3827
      return this.id;
3828
    }
3829
 
3830
    public void setId(long id) {
3831
      this.id = id;
3832
      setIdIsSet(true);
3833
    }
3834
 
3835
    public void unsetId() {
3836
      __isset_bit_vector.clear(__ID_ISSET_ID);
3837
    }
3838
 
3839
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
3840
    public boolean isSetId() {
3841
      return __isset_bit_vector.get(__ID_ISSET_ID);
3842
    }
3843
 
3844
    public void setIdIsSet(boolean value) {
3845
      __isset_bit_vector.set(__ID_ISSET_ID, value);
3846
    }
3847
 
3848
    public void setFieldValue(_Fields field, Object value) {
3849
      switch (field) {
3850
      case ID:
3851
        if (value == null) {
3852
          unsetId();
3853
        } else {
3854
          setId((Long)value);
3855
        }
3856
        break;
3857
 
3858
      }
3859
    }
3860
 
3861
    public Object getFieldValue(_Fields field) {
3862
      switch (field) {
3863
      case ID:
3864
        return Long.valueOf(getId());
3865
 
3866
      }
3867
      throw new IllegalStateException();
3868
    }
3869
 
3870
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3871
    public boolean isSet(_Fields field) {
3872
      if (field == null) {
3873
        throw new IllegalArgumentException();
3874
      }
3875
 
3876
      switch (field) {
3877
      case ID:
3878
        return isSetId();
3879
      }
3880
      throw new IllegalStateException();
3881
    }
3882
 
3883
    @Override
3884
    public boolean equals(Object that) {
3885
      if (that == null)
3886
        return false;
3887
      if (that instanceof getPurchaseOrder_args)
3888
        return this.equals((getPurchaseOrder_args)that);
3889
      return false;
3890
    }
3891
 
3892
    public boolean equals(getPurchaseOrder_args that) {
3893
      if (that == null)
3894
        return false;
3895
 
3896
      boolean this_present_id = true;
3897
      boolean that_present_id = true;
3898
      if (this_present_id || that_present_id) {
3899
        if (!(this_present_id && that_present_id))
3900
          return false;
3901
        if (this.id != that.id)
3902
          return false;
3903
      }
3904
 
3905
      return true;
3906
    }
3907
 
3908
    @Override
3909
    public int hashCode() {
3910
      return 0;
3911
    }
3912
 
3913
    public int compareTo(getPurchaseOrder_args other) {
3914
      if (!getClass().equals(other.getClass())) {
3915
        return getClass().getName().compareTo(other.getClass().getName());
3916
      }
3917
 
3918
      int lastComparison = 0;
3919
      getPurchaseOrder_args typedOther = (getPurchaseOrder_args)other;
3920
 
3921
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
3922
      if (lastComparison != 0) {
3923
        return lastComparison;
3924
      }
3925
      if (isSetId()) {
3926
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
3927
        if (lastComparison != 0) {
3928
          return lastComparison;
3929
        }
3930
      }
3931
      return 0;
3932
    }
3933
 
3934
    public _Fields fieldForId(int fieldId) {
3935
      return _Fields.findByThriftId(fieldId);
3936
    }
3937
 
3938
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3939
      org.apache.thrift.protocol.TField field;
3940
      iprot.readStructBegin();
3941
      while (true)
3942
      {
3943
        field = iprot.readFieldBegin();
3944
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3945
          break;
3946
        }
3947
        switch (field.id) {
3948
          case 1: // ID
3949
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3950
              this.id = iprot.readI64();
3951
              setIdIsSet(true);
3952
            } else { 
3953
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3954
            }
3955
            break;
3956
          default:
3957
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3958
        }
3959
        iprot.readFieldEnd();
3960
      }
3961
      iprot.readStructEnd();
3962
      validate();
3963
    }
3964
 
3965
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3966
      validate();
3967
 
3968
      oprot.writeStructBegin(STRUCT_DESC);
3969
      oprot.writeFieldBegin(ID_FIELD_DESC);
3970
      oprot.writeI64(this.id);
3971
      oprot.writeFieldEnd();
3972
      oprot.writeFieldStop();
3973
      oprot.writeStructEnd();
3974
    }
3975
 
3976
    @Override
3977
    public String toString() {
3978
      StringBuilder sb = new StringBuilder("getPurchaseOrder_args(");
3979
      boolean first = true;
3980
 
3981
      sb.append("id:");
3982
      sb.append(this.id);
3983
      first = false;
3984
      sb.append(")");
3985
      return sb.toString();
3986
    }
3987
 
3988
    public void validate() throws org.apache.thrift.TException {
3989
      // check for required fields
3990
    }
3991
 
3992
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3993
      try {
3994
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3995
      } catch (org.apache.thrift.TException te) {
3996
        throw new java.io.IOException(te);
3997
      }
3998
    }
3999
 
4000
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4001
      try {
24832 tejbeer 4002
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
4003
        __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 4004
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4005
      } catch (org.apache.thrift.TException te) {
4006
        throw new java.io.IOException(te);
4007
      }
4008
    }
4009
 
4010
  }
4011
 
4012
  public static class getPurchaseOrder_result implements org.apache.thrift.TBase<getPurchaseOrder_result, getPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
4013
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_result");
4014
 
4015
    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);
4016
    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);
4017
 
4018
    private PurchaseOrder success; // required
4019
    private PurchaseServiceException e; // required
4020
 
4021
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4022
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4023
      SUCCESS((short)0, "success"),
4024
      E((short)1, "e");
4025
 
4026
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4027
 
4028
      static {
4029
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4030
          byName.put(field.getFieldName(), field);
4031
        }
4032
      }
4033
 
4034
      /**
4035
       * Find the _Fields constant that matches fieldId, or null if its not found.
4036
       */
4037
      public static _Fields findByThriftId(int fieldId) {
4038
        switch(fieldId) {
4039
          case 0: // SUCCESS
4040
            return SUCCESS;
4041
          case 1: // E
4042
            return E;
4043
          default:
4044
            return null;
4045
        }
4046
      }
4047
 
4048
      /**
4049
       * Find the _Fields constant that matches fieldId, throwing an exception
4050
       * if it is not found.
4051
       */
4052
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4053
        _Fields fields = findByThriftId(fieldId);
4054
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4055
        return fields;
4056
      }
4057
 
4058
      /**
4059
       * Find the _Fields constant that matches name, or null if its not found.
4060
       */
4061
      public static _Fields findByName(String name) {
4062
        return byName.get(name);
4063
      }
4064
 
4065
      private final short _thriftId;
4066
      private final String _fieldName;
4067
 
4068
      _Fields(short thriftId, String fieldName) {
4069
        _thriftId = thriftId;
4070
        _fieldName = fieldName;
4071
      }
4072
 
4073
      public short getThriftFieldId() {
4074
        return _thriftId;
4075
      }
4076
 
4077
      public String getFieldName() {
4078
        return _fieldName;
4079
      }
4080
    }
4081
 
4082
    // isset id assignments
4083
 
4084
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4085
    static {
4086
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4087
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4088
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
4089
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4090
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4091
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4092
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_result.class, metaDataMap);
4093
    }
4094
 
4095
    public getPurchaseOrder_result() {
4096
    }
4097
 
4098
    public getPurchaseOrder_result(
4099
      PurchaseOrder success,
4100
      PurchaseServiceException e)
4101
    {
4102
      this();
4103
      this.success = success;
4104
      this.e = e;
4105
    }
4106
 
4107
    /**
4108
     * Performs a deep copy on <i>other</i>.
4109
     */
4110
    public getPurchaseOrder_result(getPurchaseOrder_result other) {
4111
      if (other.isSetSuccess()) {
4112
        this.success = new PurchaseOrder(other.success);
4113
      }
4114
      if (other.isSetE()) {
4115
        this.e = new PurchaseServiceException(other.e);
4116
      }
4117
    }
4118
 
4119
    public getPurchaseOrder_result deepCopy() {
4120
      return new getPurchaseOrder_result(this);
4121
    }
4122
 
4123
    @Override
4124
    public void clear() {
4125
      this.success = null;
4126
      this.e = null;
4127
    }
4128
 
4129
    public PurchaseOrder getSuccess() {
4130
      return this.success;
4131
    }
4132
 
4133
    public void setSuccess(PurchaseOrder success) {
4134
      this.success = success;
4135
    }
4136
 
4137
    public void unsetSuccess() {
4138
      this.success = null;
4139
    }
4140
 
4141
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
4142
    public boolean isSetSuccess() {
4143
      return this.success != null;
4144
    }
4145
 
4146
    public void setSuccessIsSet(boolean value) {
4147
      if (!value) {
4148
        this.success = null;
4149
      }
4150
    }
4151
 
4152
    public PurchaseServiceException getE() {
4153
      return this.e;
4154
    }
4155
 
4156
    public void setE(PurchaseServiceException e) {
4157
      this.e = e;
4158
    }
4159
 
4160
    public void unsetE() {
4161
      this.e = null;
4162
    }
4163
 
4164
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
4165
    public boolean isSetE() {
4166
      return this.e != null;
4167
    }
4168
 
4169
    public void setEIsSet(boolean value) {
4170
      if (!value) {
4171
        this.e = null;
4172
      }
4173
    }
4174
 
4175
    public void setFieldValue(_Fields field, Object value) {
4176
      switch (field) {
4177
      case SUCCESS:
4178
        if (value == null) {
4179
          unsetSuccess();
4180
        } else {
4181
          setSuccess((PurchaseOrder)value);
4182
        }
4183
        break;
4184
 
4185
      case E:
4186
        if (value == null) {
4187
          unsetE();
4188
        } else {
4189
          setE((PurchaseServiceException)value);
4190
        }
4191
        break;
4192
 
4193
      }
4194
    }
4195
 
4196
    public Object getFieldValue(_Fields field) {
4197
      switch (field) {
4198
      case SUCCESS:
4199
        return getSuccess();
4200
 
4201
      case E:
4202
        return getE();
4203
 
4204
      }
4205
      throw new IllegalStateException();
4206
    }
4207
 
4208
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4209
    public boolean isSet(_Fields field) {
4210
      if (field == null) {
4211
        throw new IllegalArgumentException();
4212
      }
4213
 
4214
      switch (field) {
4215
      case SUCCESS:
4216
        return isSetSuccess();
4217
      case E:
4218
        return isSetE();
4219
      }
4220
      throw new IllegalStateException();
4221
    }
4222
 
4223
    @Override
4224
    public boolean equals(Object that) {
4225
      if (that == null)
4226
        return false;
4227
      if (that instanceof getPurchaseOrder_result)
4228
        return this.equals((getPurchaseOrder_result)that);
4229
      return false;
4230
    }
4231
 
4232
    public boolean equals(getPurchaseOrder_result that) {
4233
      if (that == null)
4234
        return false;
4235
 
4236
      boolean this_present_success = true && this.isSetSuccess();
4237
      boolean that_present_success = true && that.isSetSuccess();
4238
      if (this_present_success || that_present_success) {
4239
        if (!(this_present_success && that_present_success))
4240
          return false;
4241
        if (!this.success.equals(that.success))
4242
          return false;
4243
      }
4244
 
4245
      boolean this_present_e = true && this.isSetE();
4246
      boolean that_present_e = true && that.isSetE();
4247
      if (this_present_e || that_present_e) {
4248
        if (!(this_present_e && that_present_e))
4249
          return false;
4250
        if (!this.e.equals(that.e))
4251
          return false;
4252
      }
4253
 
4254
      return true;
4255
    }
4256
 
4257
    @Override
4258
    public int hashCode() {
4259
      return 0;
4260
    }
4261
 
4262
    public int compareTo(getPurchaseOrder_result other) {
4263
      if (!getClass().equals(other.getClass())) {
4264
        return getClass().getName().compareTo(other.getClass().getName());
4265
      }
4266
 
4267
      int lastComparison = 0;
4268
      getPurchaseOrder_result typedOther = (getPurchaseOrder_result)other;
4269
 
4270
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
4271
      if (lastComparison != 0) {
4272
        return lastComparison;
4273
      }
4274
      if (isSetSuccess()) {
4275
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4276
        if (lastComparison != 0) {
4277
          return lastComparison;
4278
        }
4279
      }
4280
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
4281
      if (lastComparison != 0) {
4282
        return lastComparison;
4283
      }
4284
      if (isSetE()) {
4285
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
4286
        if (lastComparison != 0) {
4287
          return lastComparison;
4288
        }
4289
      }
4290
      return 0;
4291
    }
4292
 
4293
    public _Fields fieldForId(int fieldId) {
4294
      return _Fields.findByThriftId(fieldId);
4295
    }
4296
 
4297
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4298
      org.apache.thrift.protocol.TField field;
4299
      iprot.readStructBegin();
4300
      while (true)
4301
      {
4302
        field = iprot.readFieldBegin();
4303
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4304
          break;
4305
        }
4306
        switch (field.id) {
4307
          case 0: // SUCCESS
4308
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4309
              this.success = new PurchaseOrder();
4310
              this.success.read(iprot);
4311
            } else { 
4312
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4313
            }
4314
            break;
4315
          case 1: // E
4316
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4317
              this.e = new PurchaseServiceException();
4318
              this.e.read(iprot);
4319
            } else { 
4320
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4321
            }
4322
            break;
4323
          default:
4324
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4325
        }
4326
        iprot.readFieldEnd();
4327
      }
4328
      iprot.readStructEnd();
4329
      validate();
4330
    }
4331
 
4332
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4333
      oprot.writeStructBegin(STRUCT_DESC);
4334
 
4335
      if (this.isSetSuccess()) {
4336
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4337
        this.success.write(oprot);
4338
        oprot.writeFieldEnd();
4339
      } else if (this.isSetE()) {
4340
        oprot.writeFieldBegin(E_FIELD_DESC);
4341
        this.e.write(oprot);
4342
        oprot.writeFieldEnd();
4343
      }
4344
      oprot.writeFieldStop();
4345
      oprot.writeStructEnd();
4346
    }
4347
 
4348
    @Override
4349
    public String toString() {
4350
      StringBuilder sb = new StringBuilder("getPurchaseOrder_result(");
4351
      boolean first = true;
4352
 
4353
      sb.append("success:");
4354
      if (this.success == null) {
4355
        sb.append("null");
4356
      } else {
4357
        sb.append(this.success);
4358
      }
4359
      first = false;
4360
      if (!first) sb.append(", ");
4361
      sb.append("e:");
4362
      if (this.e == null) {
4363
        sb.append("null");
4364
      } else {
4365
        sb.append(this.e);
4366
      }
4367
      first = false;
4368
      sb.append(")");
4369
      return sb.toString();
4370
    }
4371
 
4372
    public void validate() throws org.apache.thrift.TException {
4373
      // check for required fields
4374
    }
4375
 
4376
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4377
      try {
4378
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4379
      } catch (org.apache.thrift.TException te) {
4380
        throw new java.io.IOException(te);
4381
      }
4382
    }
4383
 
4384
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4385
      try {
4386
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4387
      } catch (org.apache.thrift.TException te) {
4388
        throw new java.io.IOException(te);
4389
      }
4390
    }
4391
 
4392
  }
4393
 
4394
  public static class getAllPurchaseOrders_args implements org.apache.thrift.TBase<getAllPurchaseOrders_args, getAllPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
4395
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_args");
4396
 
4397
    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);
4398
 
4399
    private POStatus status; // required
4400
 
4401
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4402
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4403
      /**
4404
       * 
4405
       * @see POStatus
4406
       */
4407
      STATUS((short)1, "status");
4408
 
4409
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4410
 
4411
      static {
4412
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4413
          byName.put(field.getFieldName(), field);
4414
        }
4415
      }
4416
 
4417
      /**
4418
       * Find the _Fields constant that matches fieldId, or null if its not found.
4419
       */
4420
      public static _Fields findByThriftId(int fieldId) {
4421
        switch(fieldId) {
4422
          case 1: // STATUS
4423
            return STATUS;
4424
          default:
4425
            return null;
4426
        }
4427
      }
4428
 
4429
      /**
4430
       * Find the _Fields constant that matches fieldId, throwing an exception
4431
       * if it is not found.
4432
       */
4433
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4434
        _Fields fields = findByThriftId(fieldId);
4435
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4436
        return fields;
4437
      }
4438
 
4439
      /**
4440
       * Find the _Fields constant that matches name, or null if its not found.
4441
       */
4442
      public static _Fields findByName(String name) {
4443
        return byName.get(name);
4444
      }
4445
 
4446
      private final short _thriftId;
4447
      private final String _fieldName;
4448
 
4449
      _Fields(short thriftId, String fieldName) {
4450
        _thriftId = thriftId;
4451
        _fieldName = fieldName;
4452
      }
4453
 
4454
      public short getThriftFieldId() {
4455
        return _thriftId;
4456
      }
4457
 
4458
      public String getFieldName() {
4459
        return _fieldName;
4460
      }
4461
    }
4462
 
4463
    // isset id assignments
4464
 
4465
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4466
    static {
4467
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4468
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4469
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, POStatus.class)));
4470
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4471
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_args.class, metaDataMap);
4472
    }
4473
 
4474
    public getAllPurchaseOrders_args() {
4475
    }
4476
 
4477
    public getAllPurchaseOrders_args(
4478
      POStatus status)
4479
    {
4480
      this();
4481
      this.status = status;
4482
    }
4483
 
4484
    /**
4485
     * Performs a deep copy on <i>other</i>.
4486
     */
4487
    public getAllPurchaseOrders_args(getAllPurchaseOrders_args other) {
4488
      if (other.isSetStatus()) {
4489
        this.status = other.status;
4490
      }
4491
    }
4492
 
4493
    public getAllPurchaseOrders_args deepCopy() {
4494
      return new getAllPurchaseOrders_args(this);
4495
    }
4496
 
4497
    @Override
4498
    public void clear() {
4499
      this.status = null;
4500
    }
4501
 
4502
    /**
4503
     * 
4504
     * @see POStatus
4505
     */
4506
    public POStatus getStatus() {
4507
      return this.status;
4508
    }
4509
 
4510
    /**
4511
     * 
4512
     * @see POStatus
4513
     */
4514
    public void setStatus(POStatus status) {
4515
      this.status = status;
4516
    }
4517
 
4518
    public void unsetStatus() {
4519
      this.status = null;
4520
    }
4521
 
4522
    /** Returns true if field status is set (has been assigned a value) and false otherwise */
4523
    public boolean isSetStatus() {
4524
      return this.status != null;
4525
    }
4526
 
4527
    public void setStatusIsSet(boolean value) {
4528
      if (!value) {
4529
        this.status = null;
4530
      }
4531
    }
4532
 
4533
    public void setFieldValue(_Fields field, Object value) {
4534
      switch (field) {
4535
      case STATUS:
4536
        if (value == null) {
4537
          unsetStatus();
4538
        } else {
4539
          setStatus((POStatus)value);
4540
        }
4541
        break;
4542
 
4543
      }
4544
    }
4545
 
4546
    public Object getFieldValue(_Fields field) {
4547
      switch (field) {
4548
      case STATUS:
4549
        return getStatus();
4550
 
4551
      }
4552
      throw new IllegalStateException();
4553
    }
4554
 
4555
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4556
    public boolean isSet(_Fields field) {
4557
      if (field == null) {
4558
        throw new IllegalArgumentException();
4559
      }
4560
 
4561
      switch (field) {
4562
      case STATUS:
4563
        return isSetStatus();
4564
      }
4565
      throw new IllegalStateException();
4566
    }
4567
 
4568
    @Override
4569
    public boolean equals(Object that) {
4570
      if (that == null)
4571
        return false;
4572
      if (that instanceof getAllPurchaseOrders_args)
4573
        return this.equals((getAllPurchaseOrders_args)that);
4574
      return false;
4575
    }
4576
 
4577
    public boolean equals(getAllPurchaseOrders_args that) {
4578
      if (that == null)
4579
        return false;
4580
 
4581
      boolean this_present_status = true && this.isSetStatus();
4582
      boolean that_present_status = true && that.isSetStatus();
4583
      if (this_present_status || that_present_status) {
4584
        if (!(this_present_status && that_present_status))
4585
          return false;
4586
        if (!this.status.equals(that.status))
4587
          return false;
4588
      }
4589
 
4590
      return true;
4591
    }
4592
 
4593
    @Override
4594
    public int hashCode() {
4595
      return 0;
4596
    }
4597
 
4598
    public int compareTo(getAllPurchaseOrders_args other) {
4599
      if (!getClass().equals(other.getClass())) {
4600
        return getClass().getName().compareTo(other.getClass().getName());
4601
      }
4602
 
4603
      int lastComparison = 0;
4604
      getAllPurchaseOrders_args typedOther = (getAllPurchaseOrders_args)other;
4605
 
4606
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
4607
      if (lastComparison != 0) {
4608
        return lastComparison;
4609
      }
4610
      if (isSetStatus()) {
4611
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
4612
        if (lastComparison != 0) {
4613
          return lastComparison;
4614
        }
4615
      }
4616
      return 0;
4617
    }
4618
 
4619
    public _Fields fieldForId(int fieldId) {
4620
      return _Fields.findByThriftId(fieldId);
4621
    }
4622
 
4623
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4624
      org.apache.thrift.protocol.TField field;
4625
      iprot.readStructBegin();
4626
      while (true)
4627
      {
4628
        field = iprot.readFieldBegin();
4629
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4630
          break;
4631
        }
4632
        switch (field.id) {
4633
          case 1: // STATUS
4634
            if (field.type == org.apache.thrift.protocol.TType.I32) {
4635
              this.status = POStatus.findByValue(iprot.readI32());
4636
            } else { 
4637
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4638
            }
4639
            break;
4640
          default:
4641
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4642
        }
4643
        iprot.readFieldEnd();
4644
      }
4645
      iprot.readStructEnd();
4646
      validate();
4647
    }
4648
 
4649
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4650
      validate();
4651
 
4652
      oprot.writeStructBegin(STRUCT_DESC);
4653
      if (this.status != null) {
4654
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4655
        oprot.writeI32(this.status.getValue());
4656
        oprot.writeFieldEnd();
4657
      }
4658
      oprot.writeFieldStop();
4659
      oprot.writeStructEnd();
4660
    }
4661
 
4662
    @Override
4663
    public String toString() {
4664
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_args(");
4665
      boolean first = true;
4666
 
4667
      sb.append("status:");
4668
      if (this.status == null) {
4669
        sb.append("null");
4670
      } else {
4671
        sb.append(this.status);
4672
      }
4673
      first = false;
4674
      sb.append(")");
4675
      return sb.toString();
4676
    }
4677
 
4678
    public void validate() throws org.apache.thrift.TException {
4679
      // check for required fields
4680
    }
4681
 
4682
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4683
      try {
4684
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4685
      } catch (org.apache.thrift.TException te) {
4686
        throw new java.io.IOException(te);
4687
      }
4688
    }
4689
 
4690
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4691
      try {
4692
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4693
      } catch (org.apache.thrift.TException te) {
4694
        throw new java.io.IOException(te);
4695
      }
4696
    }
4697
 
4698
  }
4699
 
4700
  public static class getAllPurchaseOrders_result implements org.apache.thrift.TBase<getAllPurchaseOrders_result, getAllPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
4701
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_result");
4702
 
4703
    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);
4704
    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);
4705
 
4706
    private List<PurchaseOrder> success; // required
4707
    private PurchaseServiceException e; // required
4708
 
4709
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4710
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4711
      SUCCESS((short)0, "success"),
4712
      E((short)1, "e");
4713
 
4714
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4715
 
4716
      static {
4717
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4718
          byName.put(field.getFieldName(), field);
4719
        }
4720
      }
4721
 
4722
      /**
4723
       * Find the _Fields constant that matches fieldId, or null if its not found.
4724
       */
4725
      public static _Fields findByThriftId(int fieldId) {
4726
        switch(fieldId) {
4727
          case 0: // SUCCESS
4728
            return SUCCESS;
4729
          case 1: // E
4730
            return E;
4731
          default:
4732
            return null;
4733
        }
4734
      }
4735
 
4736
      /**
4737
       * Find the _Fields constant that matches fieldId, throwing an exception
4738
       * if it is not found.
4739
       */
4740
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4741
        _Fields fields = findByThriftId(fieldId);
4742
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4743
        return fields;
4744
      }
4745
 
4746
      /**
4747
       * Find the _Fields constant that matches name, or null if its not found.
4748
       */
4749
      public static _Fields findByName(String name) {
4750
        return byName.get(name);
4751
      }
4752
 
4753
      private final short _thriftId;
4754
      private final String _fieldName;
4755
 
4756
      _Fields(short thriftId, String fieldName) {
4757
        _thriftId = thriftId;
4758
        _fieldName = fieldName;
4759
      }
4760
 
4761
      public short getThriftFieldId() {
4762
        return _thriftId;
4763
      }
4764
 
4765
      public String getFieldName() {
4766
        return _fieldName;
4767
      }
4768
    }
4769
 
4770
    // isset id assignments
4771
 
4772
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4773
    static {
4774
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4775
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4776
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
4777
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
4778
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4779
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4780
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4781
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_result.class, metaDataMap);
4782
    }
4783
 
4784
    public getAllPurchaseOrders_result() {
4785
    }
4786
 
4787
    public getAllPurchaseOrders_result(
4788
      List<PurchaseOrder> success,
4789
      PurchaseServiceException e)
4790
    {
4791
      this();
4792
      this.success = success;
4793
      this.e = e;
4794
    }
4795
 
4796
    /**
4797
     * Performs a deep copy on <i>other</i>.
4798
     */
4799
    public getAllPurchaseOrders_result(getAllPurchaseOrders_result other) {
4800
      if (other.isSetSuccess()) {
4801
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
4802
        for (PurchaseOrder other_element : other.success) {
4803
          __this__success.add(new PurchaseOrder(other_element));
4804
        }
4805
        this.success = __this__success;
4806
      }
4807
      if (other.isSetE()) {
4808
        this.e = new PurchaseServiceException(other.e);
4809
      }
4810
    }
4811
 
4812
    public getAllPurchaseOrders_result deepCopy() {
4813
      return new getAllPurchaseOrders_result(this);
4814
    }
4815
 
4816
    @Override
4817
    public void clear() {
4818
      this.success = null;
4819
      this.e = null;
4820
    }
4821
 
4822
    public int getSuccessSize() {
4823
      return (this.success == null) ? 0 : this.success.size();
4824
    }
4825
 
4826
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
4827
      return (this.success == null) ? null : this.success.iterator();
4828
    }
4829
 
4830
    public void addToSuccess(PurchaseOrder elem) {
4831
      if (this.success == null) {
4832
        this.success = new ArrayList<PurchaseOrder>();
4833
      }
4834
      this.success.add(elem);
4835
    }
4836
 
4837
    public List<PurchaseOrder> getSuccess() {
4838
      return this.success;
4839
    }
4840
 
4841
    public void setSuccess(List<PurchaseOrder> success) {
4842
      this.success = success;
4843
    }
4844
 
4845
    public void unsetSuccess() {
4846
      this.success = null;
4847
    }
4848
 
4849
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
4850
    public boolean isSetSuccess() {
4851
      return this.success != null;
4852
    }
4853
 
4854
    public void setSuccessIsSet(boolean value) {
4855
      if (!value) {
4856
        this.success = null;
4857
      }
4858
    }
4859
 
4860
    public PurchaseServiceException getE() {
4861
      return this.e;
4862
    }
4863
 
4864
    public void setE(PurchaseServiceException e) {
4865
      this.e = e;
4866
    }
4867
 
4868
    public void unsetE() {
4869
      this.e = null;
4870
    }
4871
 
4872
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
4873
    public boolean isSetE() {
4874
      return this.e != null;
4875
    }
4876
 
4877
    public void setEIsSet(boolean value) {
4878
      if (!value) {
4879
        this.e = null;
4880
      }
4881
    }
4882
 
4883
    public void setFieldValue(_Fields field, Object value) {
4884
      switch (field) {
4885
      case SUCCESS:
4886
        if (value == null) {
4887
          unsetSuccess();
4888
        } else {
4889
          setSuccess((List<PurchaseOrder>)value);
4890
        }
4891
        break;
4892
 
4893
      case E:
4894
        if (value == null) {
4895
          unsetE();
4896
        } else {
4897
          setE((PurchaseServiceException)value);
4898
        }
4899
        break;
4900
 
4901
      }
4902
    }
4903
 
4904
    public Object getFieldValue(_Fields field) {
4905
      switch (field) {
4906
      case SUCCESS:
4907
        return getSuccess();
4908
 
4909
      case E:
4910
        return getE();
4911
 
4912
      }
4913
      throw new IllegalStateException();
4914
    }
4915
 
4916
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4917
    public boolean isSet(_Fields field) {
4918
      if (field == null) {
4919
        throw new IllegalArgumentException();
4920
      }
4921
 
4922
      switch (field) {
4923
      case SUCCESS:
4924
        return isSetSuccess();
4925
      case E:
4926
        return isSetE();
4927
      }
4928
      throw new IllegalStateException();
4929
    }
4930
 
4931
    @Override
4932
    public boolean equals(Object that) {
4933
      if (that == null)
4934
        return false;
4935
      if (that instanceof getAllPurchaseOrders_result)
4936
        return this.equals((getAllPurchaseOrders_result)that);
4937
      return false;
4938
    }
4939
 
4940
    public boolean equals(getAllPurchaseOrders_result that) {
4941
      if (that == null)
4942
        return false;
4943
 
4944
      boolean this_present_success = true && this.isSetSuccess();
4945
      boolean that_present_success = true && that.isSetSuccess();
4946
      if (this_present_success || that_present_success) {
4947
        if (!(this_present_success && that_present_success))
4948
          return false;
4949
        if (!this.success.equals(that.success))
4950
          return false;
4951
      }
4952
 
4953
      boolean this_present_e = true && this.isSetE();
4954
      boolean that_present_e = true && that.isSetE();
4955
      if (this_present_e || that_present_e) {
4956
        if (!(this_present_e && that_present_e))
4957
          return false;
4958
        if (!this.e.equals(that.e))
4959
          return false;
4960
      }
4961
 
4962
      return true;
4963
    }
4964
 
4965
    @Override
4966
    public int hashCode() {
4967
      return 0;
4968
    }
4969
 
4970
    public int compareTo(getAllPurchaseOrders_result other) {
4971
      if (!getClass().equals(other.getClass())) {
4972
        return getClass().getName().compareTo(other.getClass().getName());
4973
      }
4974
 
4975
      int lastComparison = 0;
4976
      getAllPurchaseOrders_result typedOther = (getAllPurchaseOrders_result)other;
4977
 
4978
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
4979
      if (lastComparison != 0) {
4980
        return lastComparison;
4981
      }
4982
      if (isSetSuccess()) {
4983
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4984
        if (lastComparison != 0) {
4985
          return lastComparison;
4986
        }
4987
      }
4988
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
4989
      if (lastComparison != 0) {
4990
        return lastComparison;
4991
      }
4992
      if (isSetE()) {
4993
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
4994
        if (lastComparison != 0) {
4995
          return lastComparison;
4996
        }
4997
      }
4998
      return 0;
4999
    }
5000
 
5001
    public _Fields fieldForId(int fieldId) {
5002
      return _Fields.findByThriftId(fieldId);
5003
    }
5004
 
5005
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5006
      org.apache.thrift.protocol.TField field;
5007
      iprot.readStructBegin();
5008
      while (true)
5009
      {
5010
        field = iprot.readFieldBegin();
5011
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5012
          break;
5013
        }
5014
        switch (field.id) {
5015
          case 0: // SUCCESS
5016
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
5017
              {
5018
                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
5019
                this.success = new ArrayList<PurchaseOrder>(_list4.size);
5020
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
5021
                {
5022
                  PurchaseOrder _elem6; // required
5023
                  _elem6 = new PurchaseOrder();
5024
                  _elem6.read(iprot);
5025
                  this.success.add(_elem6);
5026
                }
5027
                iprot.readListEnd();
5028
              }
5029
            } else { 
5030
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5031
            }
5032
            break;
5033
          case 1: // E
5034
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5035
              this.e = new PurchaseServiceException();
5036
              this.e.read(iprot);
5037
            } else { 
5038
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5039
            }
5040
            break;
5041
          default:
5042
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5043
        }
5044
        iprot.readFieldEnd();
5045
      }
5046
      iprot.readStructEnd();
5047
      validate();
5048
    }
5049
 
5050
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5051
      oprot.writeStructBegin(STRUCT_DESC);
5052
 
5053
      if (this.isSetSuccess()) {
5054
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5055
        {
5056
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
5057
          for (PurchaseOrder _iter7 : this.success)
5058
          {
5059
            _iter7.write(oprot);
5060
          }
5061
          oprot.writeListEnd();
5062
        }
5063
        oprot.writeFieldEnd();
5064
      } else if (this.isSetE()) {
5065
        oprot.writeFieldBegin(E_FIELD_DESC);
5066
        this.e.write(oprot);
5067
        oprot.writeFieldEnd();
5068
      }
5069
      oprot.writeFieldStop();
5070
      oprot.writeStructEnd();
5071
    }
5072
 
5073
    @Override
5074
    public String toString() {
5075
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_result(");
5076
      boolean first = true;
5077
 
5078
      sb.append("success:");
5079
      if (this.success == null) {
5080
        sb.append("null");
5081
      } else {
5082
        sb.append(this.success);
5083
      }
5084
      first = false;
5085
      if (!first) sb.append(", ");
5086
      sb.append("e:");
5087
      if (this.e == null) {
5088
        sb.append("null");
5089
      } else {
5090
        sb.append(this.e);
5091
      }
5092
      first = false;
5093
      sb.append(")");
5094
      return sb.toString();
5095
    }
5096
 
5097
    public void validate() throws org.apache.thrift.TException {
5098
      // check for required fields
5099
    }
5100
 
5101
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5102
      try {
5103
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5104
      } catch (org.apache.thrift.TException te) {
5105
        throw new java.io.IOException(te);
5106
      }
5107
    }
5108
 
5109
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5110
      try {
5111
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5112
      } catch (org.apache.thrift.TException te) {
5113
        throw new java.io.IOException(te);
5114
      }
5115
    }
5116
 
5117
  }
5118
 
5119
  public static class getSupplier_args implements org.apache.thrift.TBase<getSupplier_args, getSupplier_args._Fields>, java.io.Serializable, Cloneable   {
5120
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_args");
5121
 
5122
    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);
5123
 
5124
    private long id; // required
5125
 
5126
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5127
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5128
      ID((short)1, "id");
5129
 
5130
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5131
 
5132
      static {
5133
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5134
          byName.put(field.getFieldName(), field);
5135
        }
5136
      }
5137
 
5138
      /**
5139
       * Find the _Fields constant that matches fieldId, or null if its not found.
5140
       */
5141
      public static _Fields findByThriftId(int fieldId) {
5142
        switch(fieldId) {
5143
          case 1: // ID
5144
            return ID;
5145
          default:
5146
            return null;
5147
        }
5148
      }
5149
 
5150
      /**
5151
       * Find the _Fields constant that matches fieldId, throwing an exception
5152
       * if it is not found.
5153
       */
5154
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5155
        _Fields fields = findByThriftId(fieldId);
5156
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5157
        return fields;
5158
      }
5159
 
5160
      /**
5161
       * Find the _Fields constant that matches name, or null if its not found.
5162
       */
5163
      public static _Fields findByName(String name) {
5164
        return byName.get(name);
5165
      }
5166
 
5167
      private final short _thriftId;
5168
      private final String _fieldName;
5169
 
5170
      _Fields(short thriftId, String fieldName) {
5171
        _thriftId = thriftId;
5172
        _fieldName = fieldName;
5173
      }
5174
 
5175
      public short getThriftFieldId() {
5176
        return _thriftId;
5177
      }
5178
 
5179
      public String getFieldName() {
5180
        return _fieldName;
5181
      }
5182
    }
5183
 
5184
    // isset id assignments
5185
    private static final int __ID_ISSET_ID = 0;
5186
    private BitSet __isset_bit_vector = new BitSet(1);
5187
 
5188
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5189
    static {
5190
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5191
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5192
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5193
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5194
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_args.class, metaDataMap);
5195
    }
5196
 
5197
    public getSupplier_args() {
5198
    }
5199
 
5200
    public getSupplier_args(
5201
      long id)
5202
    {
5203
      this();
5204
      this.id = id;
5205
      setIdIsSet(true);
5206
    }
5207
 
5208
    /**
5209
     * Performs a deep copy on <i>other</i>.
5210
     */
5211
    public getSupplier_args(getSupplier_args other) {
5212
      __isset_bit_vector.clear();
5213
      __isset_bit_vector.or(other.__isset_bit_vector);
5214
      this.id = other.id;
5215
    }
5216
 
5217
    public getSupplier_args deepCopy() {
5218
      return new getSupplier_args(this);
5219
    }
5220
 
5221
    @Override
5222
    public void clear() {
5223
      setIdIsSet(false);
5224
      this.id = 0;
5225
    }
5226
 
5227
    public long getId() {
5228
      return this.id;
5229
    }
5230
 
5231
    public void setId(long id) {
5232
      this.id = id;
5233
      setIdIsSet(true);
5234
    }
5235
 
5236
    public void unsetId() {
5237
      __isset_bit_vector.clear(__ID_ISSET_ID);
5238
    }
5239
 
5240
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
5241
    public boolean isSetId() {
5242
      return __isset_bit_vector.get(__ID_ISSET_ID);
5243
    }
5244
 
5245
    public void setIdIsSet(boolean value) {
5246
      __isset_bit_vector.set(__ID_ISSET_ID, value);
5247
    }
5248
 
5249
    public void setFieldValue(_Fields field, Object value) {
5250
      switch (field) {
5251
      case ID:
5252
        if (value == null) {
5253
          unsetId();
5254
        } else {
5255
          setId((Long)value);
5256
        }
5257
        break;
5258
 
5259
      }
5260
    }
5261
 
5262
    public Object getFieldValue(_Fields field) {
5263
      switch (field) {
5264
      case ID:
5265
        return Long.valueOf(getId());
5266
 
5267
      }
5268
      throw new IllegalStateException();
5269
    }
5270
 
5271
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5272
    public boolean isSet(_Fields field) {
5273
      if (field == null) {
5274
        throw new IllegalArgumentException();
5275
      }
5276
 
5277
      switch (field) {
5278
      case ID:
5279
        return isSetId();
5280
      }
5281
      throw new IllegalStateException();
5282
    }
5283
 
5284
    @Override
5285
    public boolean equals(Object that) {
5286
      if (that == null)
5287
        return false;
5288
      if (that instanceof getSupplier_args)
5289
        return this.equals((getSupplier_args)that);
5290
      return false;
5291
    }
5292
 
5293
    public boolean equals(getSupplier_args that) {
5294
      if (that == null)
5295
        return false;
5296
 
5297
      boolean this_present_id = true;
5298
      boolean that_present_id = true;
5299
      if (this_present_id || that_present_id) {
5300
        if (!(this_present_id && that_present_id))
5301
          return false;
5302
        if (this.id != that.id)
5303
          return false;
5304
      }
5305
 
5306
      return true;
5307
    }
5308
 
5309
    @Override
5310
    public int hashCode() {
5311
      return 0;
5312
    }
5313
 
5314
    public int compareTo(getSupplier_args other) {
5315
      if (!getClass().equals(other.getClass())) {
5316
        return getClass().getName().compareTo(other.getClass().getName());
5317
      }
5318
 
5319
      int lastComparison = 0;
5320
      getSupplier_args typedOther = (getSupplier_args)other;
5321
 
5322
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
5323
      if (lastComparison != 0) {
5324
        return lastComparison;
5325
      }
5326
      if (isSetId()) {
5327
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
5328
        if (lastComparison != 0) {
5329
          return lastComparison;
5330
        }
5331
      }
5332
      return 0;
5333
    }
5334
 
5335
    public _Fields fieldForId(int fieldId) {
5336
      return _Fields.findByThriftId(fieldId);
5337
    }
5338
 
5339
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5340
      org.apache.thrift.protocol.TField field;
5341
      iprot.readStructBegin();
5342
      while (true)
5343
      {
5344
        field = iprot.readFieldBegin();
5345
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5346
          break;
5347
        }
5348
        switch (field.id) {
5349
          case 1: // ID
5350
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5351
              this.id = iprot.readI64();
5352
              setIdIsSet(true);
5353
            } else { 
5354
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5355
            }
5356
            break;
5357
          default:
5358
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5359
        }
5360
        iprot.readFieldEnd();
5361
      }
5362
      iprot.readStructEnd();
5363
      validate();
5364
    }
5365
 
5366
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5367
      validate();
5368
 
5369
      oprot.writeStructBegin(STRUCT_DESC);
5370
      oprot.writeFieldBegin(ID_FIELD_DESC);
5371
      oprot.writeI64(this.id);
5372
      oprot.writeFieldEnd();
5373
      oprot.writeFieldStop();
5374
      oprot.writeStructEnd();
5375
    }
5376
 
5377
    @Override
5378
    public String toString() {
5379
      StringBuilder sb = new StringBuilder("getSupplier_args(");
5380
      boolean first = true;
5381
 
5382
      sb.append("id:");
5383
      sb.append(this.id);
5384
      first = false;
5385
      sb.append(")");
5386
      return sb.toString();
5387
    }
5388
 
5389
    public void validate() throws org.apache.thrift.TException {
5390
      // check for required fields
5391
    }
5392
 
5393
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5394
      try {
5395
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5396
      } catch (org.apache.thrift.TException te) {
5397
        throw new java.io.IOException(te);
5398
      }
5399
    }
5400
 
5401
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5402
      try {
21844 amit.gupta 5403
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
5404
        __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 5405
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5406
      } catch (org.apache.thrift.TException te) {
5407
        throw new java.io.IOException(te);
5408
      }
5409
    }
5410
 
5411
  }
5412
 
5413
  public static class getSupplier_result implements org.apache.thrift.TBase<getSupplier_result, getSupplier_result._Fields>, java.io.Serializable, Cloneable   {
5414
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_result");
5415
 
5416
    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);
5417
    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);
5418
 
5419
    private Supplier success; // required
5420
    private PurchaseServiceException e; // required
5421
 
5422
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5423
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5424
      SUCCESS((short)0, "success"),
5425
      E((short)1, "e");
5426
 
5427
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5428
 
5429
      static {
5430
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5431
          byName.put(field.getFieldName(), field);
5432
        }
5433
      }
5434
 
5435
      /**
5436
       * Find the _Fields constant that matches fieldId, or null if its not found.
5437
       */
5438
      public static _Fields findByThriftId(int fieldId) {
5439
        switch(fieldId) {
5440
          case 0: // SUCCESS
5441
            return SUCCESS;
5442
          case 1: // E
5443
            return E;
5444
          default:
5445
            return null;
5446
        }
5447
      }
5448
 
5449
      /**
5450
       * Find the _Fields constant that matches fieldId, throwing an exception
5451
       * if it is not found.
5452
       */
5453
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5454
        _Fields fields = findByThriftId(fieldId);
5455
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5456
        return fields;
5457
      }
5458
 
5459
      /**
5460
       * Find the _Fields constant that matches name, or null if its not found.
5461
       */
5462
      public static _Fields findByName(String name) {
5463
        return byName.get(name);
5464
      }
5465
 
5466
      private final short _thriftId;
5467
      private final String _fieldName;
5468
 
5469
      _Fields(short thriftId, String fieldName) {
5470
        _thriftId = thriftId;
5471
        _fieldName = fieldName;
5472
      }
5473
 
5474
      public short getThriftFieldId() {
5475
        return _thriftId;
5476
      }
5477
 
5478
      public String getFieldName() {
5479
        return _fieldName;
5480
      }
5481
    }
5482
 
5483
    // isset id assignments
5484
 
5485
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5486
    static {
5487
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5488
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5489
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
5490
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5491
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5492
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5493
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_result.class, metaDataMap);
5494
    }
5495
 
5496
    public getSupplier_result() {
5497
    }
5498
 
5499
    public getSupplier_result(
5500
      Supplier success,
5501
      PurchaseServiceException e)
5502
    {
5503
      this();
5504
      this.success = success;
5505
      this.e = e;
5506
    }
5507
 
5508
    /**
5509
     * Performs a deep copy on <i>other</i>.
5510
     */
5511
    public getSupplier_result(getSupplier_result other) {
5512
      if (other.isSetSuccess()) {
5513
        this.success = new Supplier(other.success);
5514
      }
5515
      if (other.isSetE()) {
5516
        this.e = new PurchaseServiceException(other.e);
5517
      }
5518
    }
5519
 
5520
    public getSupplier_result deepCopy() {
5521
      return new getSupplier_result(this);
5522
    }
5523
 
5524
    @Override
5525
    public void clear() {
5526
      this.success = null;
5527
      this.e = null;
5528
    }
5529
 
5530
    public Supplier getSuccess() {
5531
      return this.success;
5532
    }
5533
 
5534
    public void setSuccess(Supplier success) {
5535
      this.success = success;
5536
    }
5537
 
5538
    public void unsetSuccess() {
5539
      this.success = null;
5540
    }
5541
 
5542
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5543
    public boolean isSetSuccess() {
5544
      return this.success != null;
5545
    }
5546
 
5547
    public void setSuccessIsSet(boolean value) {
5548
      if (!value) {
5549
        this.success = null;
5550
      }
5551
    }
5552
 
5553
    public PurchaseServiceException getE() {
5554
      return this.e;
5555
    }
5556
 
5557
    public void setE(PurchaseServiceException e) {
5558
      this.e = e;
5559
    }
5560
 
5561
    public void unsetE() {
5562
      this.e = null;
5563
    }
5564
 
5565
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
5566
    public boolean isSetE() {
5567
      return this.e != null;
5568
    }
5569
 
5570
    public void setEIsSet(boolean value) {
5571
      if (!value) {
5572
        this.e = null;
5573
      }
5574
    }
5575
 
5576
    public void setFieldValue(_Fields field, Object value) {
5577
      switch (field) {
5578
      case SUCCESS:
5579
        if (value == null) {
5580
          unsetSuccess();
5581
        } else {
5582
          setSuccess((Supplier)value);
5583
        }
5584
        break;
5585
 
5586
      case E:
5587
        if (value == null) {
5588
          unsetE();
5589
        } else {
5590
          setE((PurchaseServiceException)value);
5591
        }
5592
        break;
5593
 
5594
      }
5595
    }
5596
 
5597
    public Object getFieldValue(_Fields field) {
5598
      switch (field) {
5599
      case SUCCESS:
5600
        return getSuccess();
5601
 
5602
      case E:
5603
        return getE();
5604
 
5605
      }
5606
      throw new IllegalStateException();
5607
    }
5608
 
5609
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5610
    public boolean isSet(_Fields field) {
5611
      if (field == null) {
5612
        throw new IllegalArgumentException();
5613
      }
5614
 
5615
      switch (field) {
5616
      case SUCCESS:
5617
        return isSetSuccess();
5618
      case E:
5619
        return isSetE();
5620
      }
5621
      throw new IllegalStateException();
5622
    }
5623
 
5624
    @Override
5625
    public boolean equals(Object that) {
5626
      if (that == null)
5627
        return false;
5628
      if (that instanceof getSupplier_result)
5629
        return this.equals((getSupplier_result)that);
5630
      return false;
5631
    }
5632
 
5633
    public boolean equals(getSupplier_result that) {
5634
      if (that == null)
5635
        return false;
5636
 
5637
      boolean this_present_success = true && this.isSetSuccess();
5638
      boolean that_present_success = true && that.isSetSuccess();
5639
      if (this_present_success || that_present_success) {
5640
        if (!(this_present_success && that_present_success))
5641
          return false;
5642
        if (!this.success.equals(that.success))
5643
          return false;
5644
      }
5645
 
5646
      boolean this_present_e = true && this.isSetE();
5647
      boolean that_present_e = true && that.isSetE();
5648
      if (this_present_e || that_present_e) {
5649
        if (!(this_present_e && that_present_e))
5650
          return false;
5651
        if (!this.e.equals(that.e))
5652
          return false;
5653
      }
5654
 
5655
      return true;
5656
    }
5657
 
5658
    @Override
5659
    public int hashCode() {
5660
      return 0;
5661
    }
5662
 
5663
    public int compareTo(getSupplier_result other) {
5664
      if (!getClass().equals(other.getClass())) {
5665
        return getClass().getName().compareTo(other.getClass().getName());
5666
      }
5667
 
5668
      int lastComparison = 0;
5669
      getSupplier_result typedOther = (getSupplier_result)other;
5670
 
5671
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5672
      if (lastComparison != 0) {
5673
        return lastComparison;
5674
      }
5675
      if (isSetSuccess()) {
5676
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5677
        if (lastComparison != 0) {
5678
          return lastComparison;
5679
        }
5680
      }
5681
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
5682
      if (lastComparison != 0) {
5683
        return lastComparison;
5684
      }
5685
      if (isSetE()) {
5686
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
5687
        if (lastComparison != 0) {
5688
          return lastComparison;
5689
        }
5690
      }
5691
      return 0;
5692
    }
5693
 
5694
    public _Fields fieldForId(int fieldId) {
5695
      return _Fields.findByThriftId(fieldId);
5696
    }
5697
 
5698
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5699
      org.apache.thrift.protocol.TField field;
5700
      iprot.readStructBegin();
5701
      while (true)
5702
      {
5703
        field = iprot.readFieldBegin();
5704
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5705
          break;
5706
        }
5707
        switch (field.id) {
5708
          case 0: // SUCCESS
5709
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5710
              this.success = new Supplier();
5711
              this.success.read(iprot);
5712
            } else { 
5713
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5714
            }
5715
            break;
5716
          case 1: // E
5717
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5718
              this.e = new PurchaseServiceException();
5719
              this.e.read(iprot);
5720
            } else { 
5721
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5722
            }
5723
            break;
5724
          default:
5725
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5726
        }
5727
        iprot.readFieldEnd();
5728
      }
5729
      iprot.readStructEnd();
5730
      validate();
5731
    }
5732
 
5733
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5734
      oprot.writeStructBegin(STRUCT_DESC);
5735
 
5736
      if (this.isSetSuccess()) {
5737
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5738
        this.success.write(oprot);
5739
        oprot.writeFieldEnd();
5740
      } else if (this.isSetE()) {
5741
        oprot.writeFieldBegin(E_FIELD_DESC);
5742
        this.e.write(oprot);
5743
        oprot.writeFieldEnd();
5744
      }
5745
      oprot.writeFieldStop();
5746
      oprot.writeStructEnd();
5747
    }
5748
 
5749
    @Override
5750
    public String toString() {
5751
      StringBuilder sb = new StringBuilder("getSupplier_result(");
5752
      boolean first = true;
5753
 
5754
      sb.append("success:");
5755
      if (this.success == null) {
5756
        sb.append("null");
5757
      } else {
5758
        sb.append(this.success);
5759
      }
5760
      first = false;
5761
      if (!first) sb.append(", ");
5762
      sb.append("e:");
5763
      if (this.e == null) {
5764
        sb.append("null");
5765
      } else {
5766
        sb.append(this.e);
5767
      }
5768
      first = false;
5769
      sb.append(")");
5770
      return sb.toString();
5771
    }
5772
 
5773
    public void validate() throws org.apache.thrift.TException {
5774
      // check for required fields
5775
    }
5776
 
5777
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5778
      try {
5779
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5780
      } catch (org.apache.thrift.TException te) {
5781
        throw new java.io.IOException(te);
5782
      }
5783
    }
5784
 
5785
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5786
      try {
5787
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5788
      } catch (org.apache.thrift.TException te) {
5789
        throw new java.io.IOException(te);
5790
      }
5791
    }
5792
 
5793
  }
5794
 
5795
  public static class startPurchase_args implements org.apache.thrift.TBase<startPurchase_args, startPurchase_args._Fields>, java.io.Serializable, Cloneable   {
5796
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_args");
5797
 
5798
    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);
5799
    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);
5800
    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 5801
    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 5802
 
5803
    private long purchaseOrderId; // required
5804
    private String invoiceNumber; // required
5805
    private double freightCharges; // required
11801 manish.sha 5806
    private String purchaseComments; // required
4496 mandeep.dh 5807
 
5808
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5809
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5810
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
5811
      INVOICE_NUMBER((short)2, "invoiceNumber"),
11801 manish.sha 5812
      FREIGHT_CHARGES((short)3, "freightCharges"),
5813
      PURCHASE_COMMENTS((short)4, "purchaseComments");
4496 mandeep.dh 5814
 
5815
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5816
 
5817
      static {
5818
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5819
          byName.put(field.getFieldName(), field);
5820
        }
5821
      }
5822
 
5823
      /**
5824
       * Find the _Fields constant that matches fieldId, or null if its not found.
5825
       */
5826
      public static _Fields findByThriftId(int fieldId) {
5827
        switch(fieldId) {
5828
          case 1: // PURCHASE_ORDER_ID
5829
            return PURCHASE_ORDER_ID;
5830
          case 2: // INVOICE_NUMBER
5831
            return INVOICE_NUMBER;
5832
          case 3: // FREIGHT_CHARGES
5833
            return FREIGHT_CHARGES;
11801 manish.sha 5834
          case 4: // PURCHASE_COMMENTS
5835
            return PURCHASE_COMMENTS;
4496 mandeep.dh 5836
          default:
5837
            return null;
5838
        }
5839
      }
5840
 
5841
      /**
5842
       * Find the _Fields constant that matches fieldId, throwing an exception
5843
       * if it is not found.
5844
       */
5845
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5846
        _Fields fields = findByThriftId(fieldId);
5847
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5848
        return fields;
5849
      }
5850
 
5851
      /**
5852
       * Find the _Fields constant that matches name, or null if its not found.
5853
       */
5854
      public static _Fields findByName(String name) {
5855
        return byName.get(name);
5856
      }
5857
 
5858
      private final short _thriftId;
5859
      private final String _fieldName;
5860
 
5861
      _Fields(short thriftId, String fieldName) {
5862
        _thriftId = thriftId;
5863
        _fieldName = fieldName;
5864
      }
5865
 
5866
      public short getThriftFieldId() {
5867
        return _thriftId;
5868
      }
5869
 
5870
      public String getFieldName() {
5871
        return _fieldName;
5872
      }
5873
    }
5874
 
5875
    // isset id assignments
5876
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
5877
    private static final int __FREIGHTCHARGES_ISSET_ID = 1;
5878
    private BitSet __isset_bit_vector = new BitSet(2);
5879
 
5880
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5881
    static {
5882
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5883
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5884
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5885
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5886
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
5887
      tmpMap.put(_Fields.FREIGHT_CHARGES, new org.apache.thrift.meta_data.FieldMetaData("freightCharges", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5888
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
11801 manish.sha 5889
      tmpMap.put(_Fields.PURCHASE_COMMENTS, new org.apache.thrift.meta_data.FieldMetaData("purchaseComments", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5890
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
4496 mandeep.dh 5891
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5892
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_args.class, metaDataMap);
5893
    }
5894
 
5895
    public startPurchase_args() {
5896
    }
5897
 
5898
    public startPurchase_args(
5899
      long purchaseOrderId,
5900
      String invoiceNumber,
11801 manish.sha 5901
      double freightCharges,
5902
      String purchaseComments)
4496 mandeep.dh 5903
    {
5904
      this();
5905
      this.purchaseOrderId = purchaseOrderId;
5906
      setPurchaseOrderIdIsSet(true);
5907
      this.invoiceNumber = invoiceNumber;
5908
      this.freightCharges = freightCharges;
5909
      setFreightChargesIsSet(true);
11801 manish.sha 5910
      this.purchaseComments = purchaseComments;
4496 mandeep.dh 5911
    }
5912
 
5913
    /**
5914
     * Performs a deep copy on <i>other</i>.
5915
     */
5916
    public startPurchase_args(startPurchase_args other) {
5917
      __isset_bit_vector.clear();
5918
      __isset_bit_vector.or(other.__isset_bit_vector);
5919
      this.purchaseOrderId = other.purchaseOrderId;
5920
      if (other.isSetInvoiceNumber()) {
5921
        this.invoiceNumber = other.invoiceNumber;
5922
      }
5923
      this.freightCharges = other.freightCharges;
11801 manish.sha 5924
      if (other.isSetPurchaseComments()) {
5925
        this.purchaseComments = other.purchaseComments;
5926
      }
4496 mandeep.dh 5927
    }
5928
 
5929
    public startPurchase_args deepCopy() {
5930
      return new startPurchase_args(this);
5931
    }
5932
 
5933
    @Override
5934
    public void clear() {
5935
      setPurchaseOrderIdIsSet(false);
5936
      this.purchaseOrderId = 0;
5937
      this.invoiceNumber = null;
5938
      setFreightChargesIsSet(false);
5939
      this.freightCharges = 0.0;
11801 manish.sha 5940
      this.purchaseComments = null;
4496 mandeep.dh 5941
    }
5942
 
5943
    public long getPurchaseOrderId() {
5944
      return this.purchaseOrderId;
5945
    }
5946
 
5947
    public void setPurchaseOrderId(long purchaseOrderId) {
5948
      this.purchaseOrderId = purchaseOrderId;
5949
      setPurchaseOrderIdIsSet(true);
5950
    }
5951
 
5952
    public void unsetPurchaseOrderId() {
5953
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
5954
    }
5955
 
5956
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
5957
    public boolean isSetPurchaseOrderId() {
5958
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
5959
    }
5960
 
5961
    public void setPurchaseOrderIdIsSet(boolean value) {
5962
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
5963
    }
5964
 
5965
    public String getInvoiceNumber() {
5966
      return this.invoiceNumber;
5967
    }
5968
 
5969
    public void setInvoiceNumber(String invoiceNumber) {
5970
      this.invoiceNumber = invoiceNumber;
5971
    }
5972
 
5973
    public void unsetInvoiceNumber() {
5974
      this.invoiceNumber = null;
5975
    }
5976
 
5977
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
5978
    public boolean isSetInvoiceNumber() {
5979
      return this.invoiceNumber != null;
5980
    }
5981
 
5982
    public void setInvoiceNumberIsSet(boolean value) {
5983
      if (!value) {
5984
        this.invoiceNumber = null;
5985
      }
5986
    }
5987
 
5988
    public double getFreightCharges() {
5989
      return this.freightCharges;
5990
    }
5991
 
5992
    public void setFreightCharges(double freightCharges) {
5993
      this.freightCharges = freightCharges;
5994
      setFreightChargesIsSet(true);
5995
    }
5996
 
5997
    public void unsetFreightCharges() {
5998
      __isset_bit_vector.clear(__FREIGHTCHARGES_ISSET_ID);
5999
    }
6000
 
6001
    /** Returns true if field freightCharges is set (has been assigned a value) and false otherwise */
6002
    public boolean isSetFreightCharges() {
6003
      return __isset_bit_vector.get(__FREIGHTCHARGES_ISSET_ID);
6004
    }
6005
 
6006
    public void setFreightChargesIsSet(boolean value) {
6007
      __isset_bit_vector.set(__FREIGHTCHARGES_ISSET_ID, value);
6008
    }
6009
 
11801 manish.sha 6010
    public String getPurchaseComments() {
6011
      return this.purchaseComments;
6012
    }
6013
 
6014
    public void setPurchaseComments(String purchaseComments) {
6015
      this.purchaseComments = purchaseComments;
6016
    }
6017
 
6018
    public void unsetPurchaseComments() {
6019
      this.purchaseComments = null;
6020
    }
6021
 
6022
    /** Returns true if field purchaseComments is set (has been assigned a value) and false otherwise */
6023
    public boolean isSetPurchaseComments() {
6024
      return this.purchaseComments != null;
6025
    }
6026
 
6027
    public void setPurchaseCommentsIsSet(boolean value) {
6028
      if (!value) {
6029
        this.purchaseComments = null;
6030
      }
6031
    }
6032
 
4496 mandeep.dh 6033
    public void setFieldValue(_Fields field, Object value) {
6034
      switch (field) {
6035
      case PURCHASE_ORDER_ID:
6036
        if (value == null) {
6037
          unsetPurchaseOrderId();
6038
        } else {
6039
          setPurchaseOrderId((Long)value);
6040
        }
6041
        break;
6042
 
6043
      case INVOICE_NUMBER:
6044
        if (value == null) {
6045
          unsetInvoiceNumber();
6046
        } else {
6047
          setInvoiceNumber((String)value);
6048
        }
6049
        break;
6050
 
6051
      case FREIGHT_CHARGES:
6052
        if (value == null) {
6053
          unsetFreightCharges();
6054
        } else {
6055
          setFreightCharges((Double)value);
6056
        }
6057
        break;
6058
 
11801 manish.sha 6059
      case PURCHASE_COMMENTS:
6060
        if (value == null) {
6061
          unsetPurchaseComments();
6062
        } else {
6063
          setPurchaseComments((String)value);
6064
        }
6065
        break;
6066
 
4496 mandeep.dh 6067
      }
6068
    }
6069
 
6070
    public Object getFieldValue(_Fields field) {
6071
      switch (field) {
6072
      case PURCHASE_ORDER_ID:
6073
        return Long.valueOf(getPurchaseOrderId());
6074
 
6075
      case INVOICE_NUMBER:
6076
        return getInvoiceNumber();
6077
 
6078
      case FREIGHT_CHARGES:
6079
        return Double.valueOf(getFreightCharges());
6080
 
11801 manish.sha 6081
      case PURCHASE_COMMENTS:
6082
        return getPurchaseComments();
6083
 
4496 mandeep.dh 6084
      }
6085
      throw new IllegalStateException();
6086
    }
6087
 
6088
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6089
    public boolean isSet(_Fields field) {
6090
      if (field == null) {
6091
        throw new IllegalArgumentException();
6092
      }
6093
 
6094
      switch (field) {
6095
      case PURCHASE_ORDER_ID:
6096
        return isSetPurchaseOrderId();
6097
      case INVOICE_NUMBER:
6098
        return isSetInvoiceNumber();
6099
      case FREIGHT_CHARGES:
6100
        return isSetFreightCharges();
11801 manish.sha 6101
      case PURCHASE_COMMENTS:
6102
        return isSetPurchaseComments();
4496 mandeep.dh 6103
      }
6104
      throw new IllegalStateException();
6105
    }
6106
 
6107
    @Override
6108
    public boolean equals(Object that) {
6109
      if (that == null)
6110
        return false;
6111
      if (that instanceof startPurchase_args)
6112
        return this.equals((startPurchase_args)that);
6113
      return false;
6114
    }
6115
 
6116
    public boolean equals(startPurchase_args that) {
6117
      if (that == null)
6118
        return false;
6119
 
6120
      boolean this_present_purchaseOrderId = true;
6121
      boolean that_present_purchaseOrderId = true;
6122
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
6123
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
6124
          return false;
6125
        if (this.purchaseOrderId != that.purchaseOrderId)
6126
          return false;
6127
      }
6128
 
6129
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
6130
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
6131
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
6132
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
6133
          return false;
6134
        if (!this.invoiceNumber.equals(that.invoiceNumber))
6135
          return false;
6136
      }
6137
 
6138
      boolean this_present_freightCharges = true;
6139
      boolean that_present_freightCharges = true;
6140
      if (this_present_freightCharges || that_present_freightCharges) {
6141
        if (!(this_present_freightCharges && that_present_freightCharges))
6142
          return false;
6143
        if (this.freightCharges != that.freightCharges)
6144
          return false;
6145
      }
6146
 
11801 manish.sha 6147
      boolean this_present_purchaseComments = true && this.isSetPurchaseComments();
6148
      boolean that_present_purchaseComments = true && that.isSetPurchaseComments();
6149
      if (this_present_purchaseComments || that_present_purchaseComments) {
6150
        if (!(this_present_purchaseComments && that_present_purchaseComments))
6151
          return false;
6152
        if (!this.purchaseComments.equals(that.purchaseComments))
6153
          return false;
6154
      }
6155
 
4496 mandeep.dh 6156
      return true;
6157
    }
6158
 
6159
    @Override
6160
    public int hashCode() {
6161
      return 0;
6162
    }
6163
 
6164
    public int compareTo(startPurchase_args other) {
6165
      if (!getClass().equals(other.getClass())) {
6166
        return getClass().getName().compareTo(other.getClass().getName());
6167
      }
6168
 
6169
      int lastComparison = 0;
6170
      startPurchase_args typedOther = (startPurchase_args)other;
6171
 
6172
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
6173
      if (lastComparison != 0) {
6174
        return lastComparison;
6175
      }
6176
      if (isSetPurchaseOrderId()) {
6177
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
6178
        if (lastComparison != 0) {
6179
          return lastComparison;
6180
        }
6181
      }
6182
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
6183
      if (lastComparison != 0) {
6184
        return lastComparison;
6185
      }
6186
      if (isSetInvoiceNumber()) {
6187
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
6188
        if (lastComparison != 0) {
6189
          return lastComparison;
6190
        }
6191
      }
6192
      lastComparison = Boolean.valueOf(isSetFreightCharges()).compareTo(typedOther.isSetFreightCharges());
6193
      if (lastComparison != 0) {
6194
        return lastComparison;
6195
      }
6196
      if (isSetFreightCharges()) {
6197
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freightCharges, typedOther.freightCharges);
6198
        if (lastComparison != 0) {
6199
          return lastComparison;
6200
        }
6201
      }
11801 manish.sha 6202
      lastComparison = Boolean.valueOf(isSetPurchaseComments()).compareTo(typedOther.isSetPurchaseComments());
6203
      if (lastComparison != 0) {
6204
        return lastComparison;
6205
      }
6206
      if (isSetPurchaseComments()) {
6207
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseComments, typedOther.purchaseComments);
6208
        if (lastComparison != 0) {
6209
          return lastComparison;
6210
        }
6211
      }
4496 mandeep.dh 6212
      return 0;
6213
    }
6214
 
6215
    public _Fields fieldForId(int fieldId) {
6216
      return _Fields.findByThriftId(fieldId);
6217
    }
6218
 
6219
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6220
      org.apache.thrift.protocol.TField field;
6221
      iprot.readStructBegin();
6222
      while (true)
6223
      {
6224
        field = iprot.readFieldBegin();
6225
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6226
          break;
6227
        }
6228
        switch (field.id) {
6229
          case 1: // PURCHASE_ORDER_ID
6230
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6231
              this.purchaseOrderId = iprot.readI64();
6232
              setPurchaseOrderIdIsSet(true);
6233
            } else { 
6234
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6235
            }
6236
            break;
6237
          case 2: // INVOICE_NUMBER
6238
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
6239
              this.invoiceNumber = iprot.readString();
6240
            } else { 
6241
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6242
            }
6243
            break;
6244
          case 3: // FREIGHT_CHARGES
6245
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
6246
              this.freightCharges = iprot.readDouble();
6247
              setFreightChargesIsSet(true);
6248
            } else { 
6249
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6250
            }
6251
            break;
11801 manish.sha 6252
          case 4: // PURCHASE_COMMENTS
6253
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
6254
              this.purchaseComments = iprot.readString();
6255
            } else { 
6256
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6257
            }
6258
            break;
4496 mandeep.dh 6259
          default:
6260
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6261
        }
6262
        iprot.readFieldEnd();
6263
      }
6264
      iprot.readStructEnd();
6265
      validate();
6266
    }
6267
 
6268
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6269
      validate();
6270
 
6271
      oprot.writeStructBegin(STRUCT_DESC);
6272
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
6273
      oprot.writeI64(this.purchaseOrderId);
6274
      oprot.writeFieldEnd();
6275
      if (this.invoiceNumber != null) {
6276
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
6277
        oprot.writeString(this.invoiceNumber);
6278
        oprot.writeFieldEnd();
6279
      }
6280
      oprot.writeFieldBegin(FREIGHT_CHARGES_FIELD_DESC);
6281
      oprot.writeDouble(this.freightCharges);
6282
      oprot.writeFieldEnd();
11801 manish.sha 6283
      if (this.purchaseComments != null) {
6284
        oprot.writeFieldBegin(PURCHASE_COMMENTS_FIELD_DESC);
6285
        oprot.writeString(this.purchaseComments);
6286
        oprot.writeFieldEnd();
6287
      }
4496 mandeep.dh 6288
      oprot.writeFieldStop();
6289
      oprot.writeStructEnd();
6290
    }
6291
 
6292
    @Override
6293
    public String toString() {
6294
      StringBuilder sb = new StringBuilder("startPurchase_args(");
6295
      boolean first = true;
6296
 
6297
      sb.append("purchaseOrderId:");
6298
      sb.append(this.purchaseOrderId);
6299
      first = false;
6300
      if (!first) sb.append(", ");
6301
      sb.append("invoiceNumber:");
6302
      if (this.invoiceNumber == null) {
6303
        sb.append("null");
6304
      } else {
6305
        sb.append(this.invoiceNumber);
6306
      }
6307
      first = false;
6308
      if (!first) sb.append(", ");
6309
      sb.append("freightCharges:");
6310
      sb.append(this.freightCharges);
6311
      first = false;
11801 manish.sha 6312
      if (!first) sb.append(", ");
6313
      sb.append("purchaseComments:");
6314
      if (this.purchaseComments == null) {
6315
        sb.append("null");
6316
      } else {
6317
        sb.append(this.purchaseComments);
6318
      }
6319
      first = false;
4496 mandeep.dh 6320
      sb.append(")");
6321
      return sb.toString();
6322
    }
6323
 
6324
    public void validate() throws org.apache.thrift.TException {
6325
      // check for required fields
6326
    }
6327
 
6328
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6329
      try {
6330
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6331
      } catch (org.apache.thrift.TException te) {
6332
        throw new java.io.IOException(te);
6333
      }
6334
    }
6335
 
6336
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6337
      try {
24832 tejbeer 6338
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
6339
        __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 6340
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6341
      } catch (org.apache.thrift.TException te) {
6342
        throw new java.io.IOException(te);
6343
      }
6344
    }
6345
 
6346
  }
6347
 
6348
  public static class startPurchase_result implements org.apache.thrift.TBase<startPurchase_result, startPurchase_result._Fields>, java.io.Serializable, Cloneable   {
6349
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_result");
6350
 
6351
    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);
6352
    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);
6353
 
6354
    private long success; // required
6355
    private PurchaseServiceException e; // required
6356
 
6357
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6358
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6359
      SUCCESS((short)0, "success"),
6360
      E((short)1, "e");
6361
 
6362
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6363
 
6364
      static {
6365
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6366
          byName.put(field.getFieldName(), field);
6367
        }
6368
      }
6369
 
6370
      /**
6371
       * Find the _Fields constant that matches fieldId, or null if its not found.
6372
       */
6373
      public static _Fields findByThriftId(int fieldId) {
6374
        switch(fieldId) {
6375
          case 0: // SUCCESS
6376
            return SUCCESS;
6377
          case 1: // E
6378
            return E;
6379
          default:
6380
            return null;
6381
        }
6382
      }
6383
 
6384
      /**
6385
       * Find the _Fields constant that matches fieldId, throwing an exception
6386
       * if it is not found.
6387
       */
6388
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6389
        _Fields fields = findByThriftId(fieldId);
6390
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6391
        return fields;
6392
      }
6393
 
6394
      /**
6395
       * Find the _Fields constant that matches name, or null if its not found.
6396
       */
6397
      public static _Fields findByName(String name) {
6398
        return byName.get(name);
6399
      }
6400
 
6401
      private final short _thriftId;
6402
      private final String _fieldName;
6403
 
6404
      _Fields(short thriftId, String fieldName) {
6405
        _thriftId = thriftId;
6406
        _fieldName = fieldName;
6407
      }
6408
 
6409
      public short getThriftFieldId() {
6410
        return _thriftId;
6411
      }
6412
 
6413
      public String getFieldName() {
6414
        return _fieldName;
6415
      }
6416
    }
6417
 
6418
    // isset id assignments
6419
    private static final int __SUCCESS_ISSET_ID = 0;
6420
    private BitSet __isset_bit_vector = new BitSet(1);
6421
 
6422
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6423
    static {
6424
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6425
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6426
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6427
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6428
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6429
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6430
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_result.class, metaDataMap);
6431
    }
6432
 
6433
    public startPurchase_result() {
6434
    }
6435
 
6436
    public startPurchase_result(
6437
      long success,
6438
      PurchaseServiceException e)
6439
    {
6440
      this();
6441
      this.success = success;
6442
      setSuccessIsSet(true);
6443
      this.e = e;
6444
    }
6445
 
6446
    /**
6447
     * Performs a deep copy on <i>other</i>.
6448
     */
6449
    public startPurchase_result(startPurchase_result other) {
6450
      __isset_bit_vector.clear();
6451
      __isset_bit_vector.or(other.__isset_bit_vector);
6452
      this.success = other.success;
6453
      if (other.isSetE()) {
6454
        this.e = new PurchaseServiceException(other.e);
6455
      }
6456
    }
6457
 
6458
    public startPurchase_result deepCopy() {
6459
      return new startPurchase_result(this);
6460
    }
6461
 
6462
    @Override
6463
    public void clear() {
6464
      setSuccessIsSet(false);
6465
      this.success = 0;
6466
      this.e = null;
6467
    }
6468
 
6469
    public long getSuccess() {
6470
      return this.success;
6471
    }
6472
 
6473
    public void setSuccess(long success) {
6474
      this.success = success;
6475
      setSuccessIsSet(true);
6476
    }
6477
 
6478
    public void unsetSuccess() {
6479
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
6480
    }
6481
 
6482
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
6483
    public boolean isSetSuccess() {
6484
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
6485
    }
6486
 
6487
    public void setSuccessIsSet(boolean value) {
6488
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
6489
    }
6490
 
6491
    public PurchaseServiceException getE() {
6492
      return this.e;
6493
    }
6494
 
6495
    public void setE(PurchaseServiceException e) {
6496
      this.e = e;
6497
    }
6498
 
6499
    public void unsetE() {
6500
      this.e = null;
6501
    }
6502
 
6503
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
6504
    public boolean isSetE() {
6505
      return this.e != null;
6506
    }
6507
 
6508
    public void setEIsSet(boolean value) {
6509
      if (!value) {
6510
        this.e = null;
6511
      }
6512
    }
6513
 
6514
    public void setFieldValue(_Fields field, Object value) {
6515
      switch (field) {
6516
      case SUCCESS:
6517
        if (value == null) {
6518
          unsetSuccess();
6519
        } else {
6520
          setSuccess((Long)value);
6521
        }
6522
        break;
6523
 
6524
      case E:
6525
        if (value == null) {
6526
          unsetE();
6527
        } else {
6528
          setE((PurchaseServiceException)value);
6529
        }
6530
        break;
6531
 
6532
      }
6533
    }
6534
 
6535
    public Object getFieldValue(_Fields field) {
6536
      switch (field) {
6537
      case SUCCESS:
6538
        return Long.valueOf(getSuccess());
6539
 
6540
      case E:
6541
        return getE();
6542
 
6543
      }
6544
      throw new IllegalStateException();
6545
    }
6546
 
6547
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6548
    public boolean isSet(_Fields field) {
6549
      if (field == null) {
6550
        throw new IllegalArgumentException();
6551
      }
6552
 
6553
      switch (field) {
6554
      case SUCCESS:
6555
        return isSetSuccess();
6556
      case E:
6557
        return isSetE();
6558
      }
6559
      throw new IllegalStateException();
6560
    }
6561
 
6562
    @Override
6563
    public boolean equals(Object that) {
6564
      if (that == null)
6565
        return false;
6566
      if (that instanceof startPurchase_result)
6567
        return this.equals((startPurchase_result)that);
6568
      return false;
6569
    }
6570
 
6571
    public boolean equals(startPurchase_result that) {
6572
      if (that == null)
6573
        return false;
6574
 
6575
      boolean this_present_success = true;
6576
      boolean that_present_success = true;
6577
      if (this_present_success || that_present_success) {
6578
        if (!(this_present_success && that_present_success))
6579
          return false;
6580
        if (this.success != that.success)
6581
          return false;
6582
      }
6583
 
6584
      boolean this_present_e = true && this.isSetE();
6585
      boolean that_present_e = true && that.isSetE();
6586
      if (this_present_e || that_present_e) {
6587
        if (!(this_present_e && that_present_e))
6588
          return false;
6589
        if (!this.e.equals(that.e))
6590
          return false;
6591
      }
6592
 
6593
      return true;
6594
    }
6595
 
6596
    @Override
6597
    public int hashCode() {
6598
      return 0;
6599
    }
6600
 
6601
    public int compareTo(startPurchase_result other) {
6602
      if (!getClass().equals(other.getClass())) {
6603
        return getClass().getName().compareTo(other.getClass().getName());
6604
      }
6605
 
6606
      int lastComparison = 0;
6607
      startPurchase_result typedOther = (startPurchase_result)other;
6608
 
6609
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6610
      if (lastComparison != 0) {
6611
        return lastComparison;
6612
      }
6613
      if (isSetSuccess()) {
6614
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6615
        if (lastComparison != 0) {
6616
          return lastComparison;
6617
        }
6618
      }
6619
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
6620
      if (lastComparison != 0) {
6621
        return lastComparison;
6622
      }
6623
      if (isSetE()) {
6624
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
6625
        if (lastComparison != 0) {
6626
          return lastComparison;
6627
        }
6628
      }
6629
      return 0;
6630
    }
6631
 
6632
    public _Fields fieldForId(int fieldId) {
6633
      return _Fields.findByThriftId(fieldId);
6634
    }
6635
 
6636
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6637
      org.apache.thrift.protocol.TField field;
6638
      iprot.readStructBegin();
6639
      while (true)
6640
      {
6641
        field = iprot.readFieldBegin();
6642
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6643
          break;
6644
        }
6645
        switch (field.id) {
6646
          case 0: // SUCCESS
6647
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6648
              this.success = iprot.readI64();
6649
              setSuccessIsSet(true);
6650
            } else { 
6651
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6652
            }
6653
            break;
6654
          case 1: // E
6655
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6656
              this.e = new PurchaseServiceException();
6657
              this.e.read(iprot);
6658
            } else { 
6659
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6660
            }
6661
            break;
6662
          default:
6663
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6664
        }
6665
        iprot.readFieldEnd();
6666
      }
6667
      iprot.readStructEnd();
6668
      validate();
6669
    }
6670
 
6671
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6672
      oprot.writeStructBegin(STRUCT_DESC);
6673
 
6674
      if (this.isSetSuccess()) {
6675
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6676
        oprot.writeI64(this.success);
6677
        oprot.writeFieldEnd();
6678
      } else if (this.isSetE()) {
6679
        oprot.writeFieldBegin(E_FIELD_DESC);
6680
        this.e.write(oprot);
6681
        oprot.writeFieldEnd();
6682
      }
6683
      oprot.writeFieldStop();
6684
      oprot.writeStructEnd();
6685
    }
6686
 
6687
    @Override
6688
    public String toString() {
6689
      StringBuilder sb = new StringBuilder("startPurchase_result(");
6690
      boolean first = true;
6691
 
6692
      sb.append("success:");
6693
      sb.append(this.success);
6694
      first = false;
6695
      if (!first) sb.append(", ");
6696
      sb.append("e:");
6697
      if (this.e == null) {
6698
        sb.append("null");
6699
      } else {
6700
        sb.append(this.e);
6701
      }
6702
      first = false;
6703
      sb.append(")");
6704
      return sb.toString();
6705
    }
6706
 
6707
    public void validate() throws org.apache.thrift.TException {
6708
      // check for required fields
6709
    }
6710
 
6711
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6712
      try {
6713
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6714
      } catch (org.apache.thrift.TException te) {
6715
        throw new java.io.IOException(te);
6716
      }
6717
    }
6718
 
6719
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6720
      try {
6721
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6722
      } catch (org.apache.thrift.TException te) {
6723
        throw new java.io.IOException(te);
6724
      }
6725
    }
6726
 
6727
  }
6728
 
6729
  public static class closePurchase_args implements org.apache.thrift.TBase<closePurchase_args, closePurchase_args._Fields>, java.io.Serializable, Cloneable   {
6730
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_args");
6731
 
6732
    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);
6733
 
6734
    private long purchaseId; // required
6735
 
6736
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6737
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6738
      PURCHASE_ID((short)1, "purchaseId");
6739
 
6740
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6741
 
6742
      static {
6743
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6744
          byName.put(field.getFieldName(), field);
6745
        }
6746
      }
6747
 
6748
      /**
6749
       * Find the _Fields constant that matches fieldId, or null if its not found.
6750
       */
6751
      public static _Fields findByThriftId(int fieldId) {
6752
        switch(fieldId) {
6753
          case 1: // PURCHASE_ID
6754
            return PURCHASE_ID;
6755
          default:
6756
            return null;
6757
        }
6758
      }
6759
 
6760
      /**
6761
       * Find the _Fields constant that matches fieldId, throwing an exception
6762
       * if it is not found.
6763
       */
6764
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6765
        _Fields fields = findByThriftId(fieldId);
6766
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6767
        return fields;
6768
      }
6769
 
6770
      /**
6771
       * Find the _Fields constant that matches name, or null if its not found.
6772
       */
6773
      public static _Fields findByName(String name) {
6774
        return byName.get(name);
6775
      }
6776
 
6777
      private final short _thriftId;
6778
      private final String _fieldName;
6779
 
6780
      _Fields(short thriftId, String fieldName) {
6781
        _thriftId = thriftId;
6782
        _fieldName = fieldName;
6783
      }
6784
 
6785
      public short getThriftFieldId() {
6786
        return _thriftId;
6787
      }
6788
 
6789
      public String getFieldName() {
6790
        return _fieldName;
6791
      }
6792
    }
6793
 
6794
    // isset id assignments
6795
    private static final int __PURCHASEID_ISSET_ID = 0;
6796
    private BitSet __isset_bit_vector = new BitSet(1);
6797
 
6798
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6799
    static {
6800
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6801
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6802
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6803
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6804
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_args.class, metaDataMap);
6805
    }
6806
 
6807
    public closePurchase_args() {
6808
    }
6809
 
6810
    public closePurchase_args(
6811
      long purchaseId)
6812
    {
6813
      this();
6814
      this.purchaseId = purchaseId;
6815
      setPurchaseIdIsSet(true);
6816
    }
6817
 
6818
    /**
6819
     * Performs a deep copy on <i>other</i>.
6820
     */
6821
    public closePurchase_args(closePurchase_args other) {
6822
      __isset_bit_vector.clear();
6823
      __isset_bit_vector.or(other.__isset_bit_vector);
6824
      this.purchaseId = other.purchaseId;
6825
    }
6826
 
6827
    public closePurchase_args deepCopy() {
6828
      return new closePurchase_args(this);
6829
    }
6830
 
6831
    @Override
6832
    public void clear() {
6833
      setPurchaseIdIsSet(false);
6834
      this.purchaseId = 0;
6835
    }
6836
 
6837
    public long getPurchaseId() {
6838
      return this.purchaseId;
6839
    }
6840
 
6841
    public void setPurchaseId(long purchaseId) {
6842
      this.purchaseId = purchaseId;
6843
      setPurchaseIdIsSet(true);
6844
    }
6845
 
6846
    public void unsetPurchaseId() {
6847
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
6848
    }
6849
 
6850
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
6851
    public boolean isSetPurchaseId() {
6852
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
6853
    }
6854
 
6855
    public void setPurchaseIdIsSet(boolean value) {
6856
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
6857
    }
6858
 
6859
    public void setFieldValue(_Fields field, Object value) {
6860
      switch (field) {
6861
      case PURCHASE_ID:
6862
        if (value == null) {
6863
          unsetPurchaseId();
6864
        } else {
6865
          setPurchaseId((Long)value);
6866
        }
6867
        break;
6868
 
6869
      }
6870
    }
6871
 
6872
    public Object getFieldValue(_Fields field) {
6873
      switch (field) {
6874
      case PURCHASE_ID:
6875
        return Long.valueOf(getPurchaseId());
6876
 
6877
      }
6878
      throw new IllegalStateException();
6879
    }
6880
 
6881
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6882
    public boolean isSet(_Fields field) {
6883
      if (field == null) {
6884
        throw new IllegalArgumentException();
6885
      }
6886
 
6887
      switch (field) {
6888
      case PURCHASE_ID:
6889
        return isSetPurchaseId();
6890
      }
6891
      throw new IllegalStateException();
6892
    }
6893
 
6894
    @Override
6895
    public boolean equals(Object that) {
6896
      if (that == null)
6897
        return false;
6898
      if (that instanceof closePurchase_args)
6899
        return this.equals((closePurchase_args)that);
6900
      return false;
6901
    }
6902
 
6903
    public boolean equals(closePurchase_args that) {
6904
      if (that == null)
6905
        return false;
6906
 
6907
      boolean this_present_purchaseId = true;
6908
      boolean that_present_purchaseId = true;
6909
      if (this_present_purchaseId || that_present_purchaseId) {
6910
        if (!(this_present_purchaseId && that_present_purchaseId))
6911
          return false;
6912
        if (this.purchaseId != that.purchaseId)
6913
          return false;
6914
      }
6915
 
6916
      return true;
6917
    }
6918
 
6919
    @Override
6920
    public int hashCode() {
6921
      return 0;
6922
    }
6923
 
6924
    public int compareTo(closePurchase_args other) {
6925
      if (!getClass().equals(other.getClass())) {
6926
        return getClass().getName().compareTo(other.getClass().getName());
6927
      }
6928
 
6929
      int lastComparison = 0;
6930
      closePurchase_args typedOther = (closePurchase_args)other;
6931
 
6932
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
6933
      if (lastComparison != 0) {
6934
        return lastComparison;
6935
      }
6936
      if (isSetPurchaseId()) {
6937
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
6938
        if (lastComparison != 0) {
6939
          return lastComparison;
6940
        }
6941
      }
6942
      return 0;
6943
    }
6944
 
6945
    public _Fields fieldForId(int fieldId) {
6946
      return _Fields.findByThriftId(fieldId);
6947
    }
6948
 
6949
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6950
      org.apache.thrift.protocol.TField field;
6951
      iprot.readStructBegin();
6952
      while (true)
6953
      {
6954
        field = iprot.readFieldBegin();
6955
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6956
          break;
6957
        }
6958
        switch (field.id) {
6959
          case 1: // PURCHASE_ID
6960
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6961
              this.purchaseId = iprot.readI64();
6962
              setPurchaseIdIsSet(true);
6963
            } else { 
6964
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6965
            }
6966
            break;
6967
          default:
6968
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6969
        }
6970
        iprot.readFieldEnd();
6971
      }
6972
      iprot.readStructEnd();
6973
      validate();
6974
    }
6975
 
6976
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6977
      validate();
6978
 
6979
      oprot.writeStructBegin(STRUCT_DESC);
6980
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
6981
      oprot.writeI64(this.purchaseId);
6982
      oprot.writeFieldEnd();
6983
      oprot.writeFieldStop();
6984
      oprot.writeStructEnd();
6985
    }
6986
 
6987
    @Override
6988
    public String toString() {
6989
      StringBuilder sb = new StringBuilder("closePurchase_args(");
6990
      boolean first = true;
6991
 
6992
      sb.append("purchaseId:");
6993
      sb.append(this.purchaseId);
6994
      first = false;
6995
      sb.append(")");
6996
      return sb.toString();
6997
    }
6998
 
6999
    public void validate() throws org.apache.thrift.TException {
7000
      // check for required fields
7001
    }
7002
 
7003
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7004
      try {
7005
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7006
      } catch (org.apache.thrift.TException te) {
7007
        throw new java.io.IOException(te);
7008
      }
7009
    }
7010
 
7011
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7012
      try {
7013
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7014
      } catch (org.apache.thrift.TException te) {
7015
        throw new java.io.IOException(te);
7016
      }
7017
    }
7018
 
7019
  }
7020
 
7021
  public static class closePurchase_result implements org.apache.thrift.TBase<closePurchase_result, closePurchase_result._Fields>, java.io.Serializable, Cloneable   {
7022
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_result");
7023
 
7024
    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);
7025
    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);
7026
 
7027
    private long success; // required
7028
    private PurchaseServiceException e; // required
7029
 
7030
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7031
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7032
      SUCCESS((short)0, "success"),
7033
      E((short)1, "e");
7034
 
7035
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7036
 
7037
      static {
7038
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7039
          byName.put(field.getFieldName(), field);
7040
        }
7041
      }
7042
 
7043
      /**
7044
       * Find the _Fields constant that matches fieldId, or null if its not found.
7045
       */
7046
      public static _Fields findByThriftId(int fieldId) {
7047
        switch(fieldId) {
7048
          case 0: // SUCCESS
7049
            return SUCCESS;
7050
          case 1: // E
7051
            return E;
7052
          default:
7053
            return null;
7054
        }
7055
      }
7056
 
7057
      /**
7058
       * Find the _Fields constant that matches fieldId, throwing an exception
7059
       * if it is not found.
7060
       */
7061
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7062
        _Fields fields = findByThriftId(fieldId);
7063
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7064
        return fields;
7065
      }
7066
 
7067
      /**
7068
       * Find the _Fields constant that matches name, or null if its not found.
7069
       */
7070
      public static _Fields findByName(String name) {
7071
        return byName.get(name);
7072
      }
7073
 
7074
      private final short _thriftId;
7075
      private final String _fieldName;
7076
 
7077
      _Fields(short thriftId, String fieldName) {
7078
        _thriftId = thriftId;
7079
        _fieldName = fieldName;
7080
      }
7081
 
7082
      public short getThriftFieldId() {
7083
        return _thriftId;
7084
      }
7085
 
7086
      public String getFieldName() {
7087
        return _fieldName;
7088
      }
7089
    }
7090
 
7091
    // isset id assignments
7092
    private static final int __SUCCESS_ISSET_ID = 0;
7093
    private BitSet __isset_bit_vector = new BitSet(1);
7094
 
7095
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7096
    static {
7097
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7098
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7099
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7100
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7101
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7102
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7103
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_result.class, metaDataMap);
7104
    }
7105
 
7106
    public closePurchase_result() {
7107
    }
7108
 
7109
    public closePurchase_result(
7110
      long success,
7111
      PurchaseServiceException e)
7112
    {
7113
      this();
7114
      this.success = success;
7115
      setSuccessIsSet(true);
7116
      this.e = e;
7117
    }
7118
 
7119
    /**
7120
     * Performs a deep copy on <i>other</i>.
7121
     */
7122
    public closePurchase_result(closePurchase_result other) {
7123
      __isset_bit_vector.clear();
7124
      __isset_bit_vector.or(other.__isset_bit_vector);
7125
      this.success = other.success;
7126
      if (other.isSetE()) {
7127
        this.e = new PurchaseServiceException(other.e);
7128
      }
7129
    }
7130
 
7131
    public closePurchase_result deepCopy() {
7132
      return new closePurchase_result(this);
7133
    }
7134
 
7135
    @Override
7136
    public void clear() {
7137
      setSuccessIsSet(false);
7138
      this.success = 0;
7139
      this.e = null;
7140
    }
7141
 
7142
    public long getSuccess() {
7143
      return this.success;
7144
    }
7145
 
7146
    public void setSuccess(long success) {
7147
      this.success = success;
7148
      setSuccessIsSet(true);
7149
    }
7150
 
7151
    public void unsetSuccess() {
7152
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7153
    }
7154
 
7155
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7156
    public boolean isSetSuccess() {
7157
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7158
    }
7159
 
7160
    public void setSuccessIsSet(boolean value) {
7161
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7162
    }
7163
 
7164
    public PurchaseServiceException getE() {
7165
      return this.e;
7166
    }
7167
 
7168
    public void setE(PurchaseServiceException e) {
7169
      this.e = e;
7170
    }
7171
 
7172
    public void unsetE() {
7173
      this.e = null;
7174
    }
7175
 
7176
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
7177
    public boolean isSetE() {
7178
      return this.e != null;
7179
    }
7180
 
7181
    public void setEIsSet(boolean value) {
7182
      if (!value) {
7183
        this.e = null;
7184
      }
7185
    }
7186
 
7187
    public void setFieldValue(_Fields field, Object value) {
7188
      switch (field) {
7189
      case SUCCESS:
7190
        if (value == null) {
7191
          unsetSuccess();
7192
        } else {
7193
          setSuccess((Long)value);
7194
        }
7195
        break;
7196
 
7197
      case E:
7198
        if (value == null) {
7199
          unsetE();
7200
        } else {
7201
          setE((PurchaseServiceException)value);
7202
        }
7203
        break;
7204
 
7205
      }
7206
    }
7207
 
7208
    public Object getFieldValue(_Fields field) {
7209
      switch (field) {
7210
      case SUCCESS:
7211
        return Long.valueOf(getSuccess());
7212
 
7213
      case E:
7214
        return getE();
7215
 
7216
      }
7217
      throw new IllegalStateException();
7218
    }
7219
 
7220
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7221
    public boolean isSet(_Fields field) {
7222
      if (field == null) {
7223
        throw new IllegalArgumentException();
7224
      }
7225
 
7226
      switch (field) {
7227
      case SUCCESS:
7228
        return isSetSuccess();
7229
      case E:
7230
        return isSetE();
7231
      }
7232
      throw new IllegalStateException();
7233
    }
7234
 
7235
    @Override
7236
    public boolean equals(Object that) {
7237
      if (that == null)
7238
        return false;
7239
      if (that instanceof closePurchase_result)
7240
        return this.equals((closePurchase_result)that);
7241
      return false;
7242
    }
7243
 
7244
    public boolean equals(closePurchase_result that) {
7245
      if (that == null)
7246
        return false;
7247
 
7248
      boolean this_present_success = true;
7249
      boolean that_present_success = true;
7250
      if (this_present_success || that_present_success) {
7251
        if (!(this_present_success && that_present_success))
7252
          return false;
7253
        if (this.success != that.success)
7254
          return false;
7255
      }
7256
 
7257
      boolean this_present_e = true && this.isSetE();
7258
      boolean that_present_e = true && that.isSetE();
7259
      if (this_present_e || that_present_e) {
7260
        if (!(this_present_e && that_present_e))
7261
          return false;
7262
        if (!this.e.equals(that.e))
7263
          return false;
7264
      }
7265
 
7266
      return true;
7267
    }
7268
 
7269
    @Override
7270
    public int hashCode() {
7271
      return 0;
7272
    }
7273
 
7274
    public int compareTo(closePurchase_result other) {
7275
      if (!getClass().equals(other.getClass())) {
7276
        return getClass().getName().compareTo(other.getClass().getName());
7277
      }
7278
 
7279
      int lastComparison = 0;
7280
      closePurchase_result typedOther = (closePurchase_result)other;
7281
 
7282
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7283
      if (lastComparison != 0) {
7284
        return lastComparison;
7285
      }
7286
      if (isSetSuccess()) {
7287
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7288
        if (lastComparison != 0) {
7289
          return lastComparison;
7290
        }
7291
      }
7292
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
7293
      if (lastComparison != 0) {
7294
        return lastComparison;
7295
      }
7296
      if (isSetE()) {
7297
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
7298
        if (lastComparison != 0) {
7299
          return lastComparison;
7300
        }
7301
      }
7302
      return 0;
7303
    }
7304
 
7305
    public _Fields fieldForId(int fieldId) {
7306
      return _Fields.findByThriftId(fieldId);
7307
    }
7308
 
7309
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7310
      org.apache.thrift.protocol.TField field;
7311
      iprot.readStructBegin();
7312
      while (true)
7313
      {
7314
        field = iprot.readFieldBegin();
7315
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7316
          break;
7317
        }
7318
        switch (field.id) {
7319
          case 0: // SUCCESS
7320
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7321
              this.success = iprot.readI64();
7322
              setSuccessIsSet(true);
7323
            } else { 
7324
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7325
            }
7326
            break;
7327
          case 1: // E
7328
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7329
              this.e = new PurchaseServiceException();
7330
              this.e.read(iprot);
7331
            } else { 
7332
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7333
            }
7334
            break;
7335
          default:
7336
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7337
        }
7338
        iprot.readFieldEnd();
7339
      }
7340
      iprot.readStructEnd();
7341
      validate();
7342
    }
7343
 
7344
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7345
      oprot.writeStructBegin(STRUCT_DESC);
7346
 
7347
      if (this.isSetSuccess()) {
7348
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7349
        oprot.writeI64(this.success);
7350
        oprot.writeFieldEnd();
7351
      } else if (this.isSetE()) {
7352
        oprot.writeFieldBegin(E_FIELD_DESC);
7353
        this.e.write(oprot);
7354
        oprot.writeFieldEnd();
7355
      }
7356
      oprot.writeFieldStop();
7357
      oprot.writeStructEnd();
7358
    }
7359
 
7360
    @Override
7361
    public String toString() {
7362
      StringBuilder sb = new StringBuilder("closePurchase_result(");
7363
      boolean first = true;
7364
 
7365
      sb.append("success:");
7366
      sb.append(this.success);
7367
      first = false;
7368
      if (!first) sb.append(", ");
7369
      sb.append("e:");
7370
      if (this.e == null) {
7371
        sb.append("null");
7372
      } else {
7373
        sb.append(this.e);
7374
      }
7375
      first = false;
7376
      sb.append(")");
7377
      return sb.toString();
7378
    }
7379
 
7380
    public void validate() throws org.apache.thrift.TException {
7381
      // check for required fields
7382
    }
7383
 
7384
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7385
      try {
7386
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7387
      } catch (org.apache.thrift.TException te) {
7388
        throw new java.io.IOException(te);
7389
      }
7390
    }
7391
 
7392
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7393
      try {
7394
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7395
      } catch (org.apache.thrift.TException te) {
7396
        throw new java.io.IOException(te);
7397
      }
7398
    }
7399
 
7400
  }
7401
 
7402
  public static class getAllPurchases_args implements org.apache.thrift.TBase<getAllPurchases_args, getAllPurchases_args._Fields>, java.io.Serializable, Cloneable   {
7403
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_args");
7404
 
7405
    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);
7406
    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);
7407
 
7408
    private long purchaseOrderId; // required
7409
    private boolean open; // required
7410
 
7411
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7412
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7413
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
7414
      OPEN((short)2, "open");
7415
 
7416
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7417
 
7418
      static {
7419
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7420
          byName.put(field.getFieldName(), field);
7421
        }
7422
      }
7423
 
7424
      /**
7425
       * Find the _Fields constant that matches fieldId, or null if its not found.
7426
       */
7427
      public static _Fields findByThriftId(int fieldId) {
7428
        switch(fieldId) {
7429
          case 1: // PURCHASE_ORDER_ID
7430
            return PURCHASE_ORDER_ID;
7431
          case 2: // OPEN
7432
            return OPEN;
7433
          default:
7434
            return null;
7435
        }
7436
      }
7437
 
7438
      /**
7439
       * Find the _Fields constant that matches fieldId, throwing an exception
7440
       * if it is not found.
7441
       */
7442
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7443
        _Fields fields = findByThriftId(fieldId);
7444
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7445
        return fields;
7446
      }
7447
 
7448
      /**
7449
       * Find the _Fields constant that matches name, or null if its not found.
7450
       */
7451
      public static _Fields findByName(String name) {
7452
        return byName.get(name);
7453
      }
7454
 
7455
      private final short _thriftId;
7456
      private final String _fieldName;
7457
 
7458
      _Fields(short thriftId, String fieldName) {
7459
        _thriftId = thriftId;
7460
        _fieldName = fieldName;
7461
      }
7462
 
7463
      public short getThriftFieldId() {
7464
        return _thriftId;
7465
      }
7466
 
7467
      public String getFieldName() {
7468
        return _fieldName;
7469
      }
7470
    }
7471
 
7472
    // isset id assignments
7473
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
7474
    private static final int __OPEN_ISSET_ID = 1;
7475
    private BitSet __isset_bit_vector = new BitSet(2);
7476
 
7477
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7478
    static {
7479
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7480
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7481
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7482
      tmpMap.put(_Fields.OPEN, new org.apache.thrift.meta_data.FieldMetaData("open", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7483
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
7484
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7485
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_args.class, metaDataMap);
7486
    }
7487
 
7488
    public getAllPurchases_args() {
7489
    }
7490
 
7491
    public getAllPurchases_args(
7492
      long purchaseOrderId,
7493
      boolean open)
7494
    {
7495
      this();
7496
      this.purchaseOrderId = purchaseOrderId;
7497
      setPurchaseOrderIdIsSet(true);
7498
      this.open = open;
7499
      setOpenIsSet(true);
7500
    }
7501
 
7502
    /**
7503
     * Performs a deep copy on <i>other</i>.
7504
     */
7505
    public getAllPurchases_args(getAllPurchases_args other) {
7506
      __isset_bit_vector.clear();
7507
      __isset_bit_vector.or(other.__isset_bit_vector);
7508
      this.purchaseOrderId = other.purchaseOrderId;
7509
      this.open = other.open;
7510
    }
7511
 
7512
    public getAllPurchases_args deepCopy() {
7513
      return new getAllPurchases_args(this);
7514
    }
7515
 
7516
    @Override
7517
    public void clear() {
7518
      setPurchaseOrderIdIsSet(false);
7519
      this.purchaseOrderId = 0;
7520
      setOpenIsSet(false);
7521
      this.open = false;
7522
    }
7523
 
7524
    public long getPurchaseOrderId() {
7525
      return this.purchaseOrderId;
7526
    }
7527
 
7528
    public void setPurchaseOrderId(long purchaseOrderId) {
7529
      this.purchaseOrderId = purchaseOrderId;
7530
      setPurchaseOrderIdIsSet(true);
7531
    }
7532
 
7533
    public void unsetPurchaseOrderId() {
7534
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
7535
    }
7536
 
7537
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
7538
    public boolean isSetPurchaseOrderId() {
7539
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
7540
    }
7541
 
7542
    public void setPurchaseOrderIdIsSet(boolean value) {
7543
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
7544
    }
7545
 
7546
    public boolean isOpen() {
7547
      return this.open;
7548
    }
7549
 
7550
    public void setOpen(boolean open) {
7551
      this.open = open;
7552
      setOpenIsSet(true);
7553
    }
7554
 
7555
    public void unsetOpen() {
7556
      __isset_bit_vector.clear(__OPEN_ISSET_ID);
7557
    }
7558
 
7559
    /** Returns true if field open is set (has been assigned a value) and false otherwise */
7560
    public boolean isSetOpen() {
7561
      return __isset_bit_vector.get(__OPEN_ISSET_ID);
7562
    }
7563
 
7564
    public void setOpenIsSet(boolean value) {
7565
      __isset_bit_vector.set(__OPEN_ISSET_ID, value);
7566
    }
7567
 
7568
    public void setFieldValue(_Fields field, Object value) {
7569
      switch (field) {
7570
      case PURCHASE_ORDER_ID:
7571
        if (value == null) {
7572
          unsetPurchaseOrderId();
7573
        } else {
7574
          setPurchaseOrderId((Long)value);
7575
        }
7576
        break;
7577
 
7578
      case OPEN:
7579
        if (value == null) {
7580
          unsetOpen();
7581
        } else {
7582
          setOpen((Boolean)value);
7583
        }
7584
        break;
7585
 
7586
      }
7587
    }
7588
 
7589
    public Object getFieldValue(_Fields field) {
7590
      switch (field) {
7591
      case PURCHASE_ORDER_ID:
7592
        return Long.valueOf(getPurchaseOrderId());
7593
 
7594
      case OPEN:
7595
        return Boolean.valueOf(isOpen());
7596
 
7597
      }
7598
      throw new IllegalStateException();
7599
    }
7600
 
7601
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7602
    public boolean isSet(_Fields field) {
7603
      if (field == null) {
7604
        throw new IllegalArgumentException();
7605
      }
7606
 
7607
      switch (field) {
7608
      case PURCHASE_ORDER_ID:
7609
        return isSetPurchaseOrderId();
7610
      case OPEN:
7611
        return isSetOpen();
7612
      }
7613
      throw new IllegalStateException();
7614
    }
7615
 
7616
    @Override
7617
    public boolean equals(Object that) {
7618
      if (that == null)
7619
        return false;
7620
      if (that instanceof getAllPurchases_args)
7621
        return this.equals((getAllPurchases_args)that);
7622
      return false;
7623
    }
7624
 
7625
    public boolean equals(getAllPurchases_args that) {
7626
      if (that == null)
7627
        return false;
7628
 
7629
      boolean this_present_purchaseOrderId = true;
7630
      boolean that_present_purchaseOrderId = true;
7631
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
7632
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
7633
          return false;
7634
        if (this.purchaseOrderId != that.purchaseOrderId)
7635
          return false;
7636
      }
7637
 
7638
      boolean this_present_open = true;
7639
      boolean that_present_open = true;
7640
      if (this_present_open || that_present_open) {
7641
        if (!(this_present_open && that_present_open))
7642
          return false;
7643
        if (this.open != that.open)
7644
          return false;
7645
      }
7646
 
7647
      return true;
7648
    }
7649
 
7650
    @Override
7651
    public int hashCode() {
7652
      return 0;
7653
    }
7654
 
7655
    public int compareTo(getAllPurchases_args other) {
7656
      if (!getClass().equals(other.getClass())) {
7657
        return getClass().getName().compareTo(other.getClass().getName());
7658
      }
7659
 
7660
      int lastComparison = 0;
7661
      getAllPurchases_args typedOther = (getAllPurchases_args)other;
7662
 
7663
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
7664
      if (lastComparison != 0) {
7665
        return lastComparison;
7666
      }
7667
      if (isSetPurchaseOrderId()) {
7668
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
7669
        if (lastComparison != 0) {
7670
          return lastComparison;
7671
        }
7672
      }
7673
      lastComparison = Boolean.valueOf(isSetOpen()).compareTo(typedOther.isSetOpen());
7674
      if (lastComparison != 0) {
7675
        return lastComparison;
7676
      }
7677
      if (isSetOpen()) {
7678
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.open, typedOther.open);
7679
        if (lastComparison != 0) {
7680
          return lastComparison;
7681
        }
7682
      }
7683
      return 0;
7684
    }
7685
 
7686
    public _Fields fieldForId(int fieldId) {
7687
      return _Fields.findByThriftId(fieldId);
7688
    }
7689
 
7690
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7691
      org.apache.thrift.protocol.TField field;
7692
      iprot.readStructBegin();
7693
      while (true)
7694
      {
7695
        field = iprot.readFieldBegin();
7696
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7697
          break;
7698
        }
7699
        switch (field.id) {
7700
          case 1: // PURCHASE_ORDER_ID
7701
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7702
              this.purchaseOrderId = iprot.readI64();
7703
              setPurchaseOrderIdIsSet(true);
7704
            } else { 
7705
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7706
            }
7707
            break;
7708
          case 2: // OPEN
7709
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
7710
              this.open = iprot.readBool();
7711
              setOpenIsSet(true);
7712
            } else { 
7713
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7714
            }
7715
            break;
7716
          default:
7717
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7718
        }
7719
        iprot.readFieldEnd();
7720
      }
7721
      iprot.readStructEnd();
7722
      validate();
7723
    }
7724
 
7725
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7726
      validate();
7727
 
7728
      oprot.writeStructBegin(STRUCT_DESC);
7729
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
7730
      oprot.writeI64(this.purchaseOrderId);
7731
      oprot.writeFieldEnd();
7732
      oprot.writeFieldBegin(OPEN_FIELD_DESC);
7733
      oprot.writeBool(this.open);
7734
      oprot.writeFieldEnd();
7735
      oprot.writeFieldStop();
7736
      oprot.writeStructEnd();
7737
    }
7738
 
7739
    @Override
7740
    public String toString() {
7741
      StringBuilder sb = new StringBuilder("getAllPurchases_args(");
7742
      boolean first = true;
7743
 
7744
      sb.append("purchaseOrderId:");
7745
      sb.append(this.purchaseOrderId);
7746
      first = false;
7747
      if (!first) sb.append(", ");
7748
      sb.append("open:");
7749
      sb.append(this.open);
7750
      first = false;
7751
      sb.append(")");
7752
      return sb.toString();
7753
    }
7754
 
7755
    public void validate() throws org.apache.thrift.TException {
7756
      // check for required fields
7757
    }
7758
 
7759
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7760
      try {
7761
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7762
      } catch (org.apache.thrift.TException te) {
7763
        throw new java.io.IOException(te);
7764
      }
7765
    }
7766
 
7767
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7768
      try {
7769
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7770
      } catch (org.apache.thrift.TException te) {
7771
        throw new java.io.IOException(te);
7772
      }
7773
    }
7774
 
7775
  }
7776
 
7777
  public static class getAllPurchases_result implements org.apache.thrift.TBase<getAllPurchases_result, getAllPurchases_result._Fields>, java.io.Serializable, Cloneable   {
7778
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_result");
7779
 
7780
    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);
7781
    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);
7782
 
7783
    private List<Purchase> success; // required
7784
    private PurchaseServiceException e; // required
7785
 
7786
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7787
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7788
      SUCCESS((short)0, "success"),
7789
      E((short)1, "e");
7790
 
7791
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7792
 
7793
      static {
7794
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7795
          byName.put(field.getFieldName(), field);
7796
        }
7797
      }
7798
 
7799
      /**
7800
       * Find the _Fields constant that matches fieldId, or null if its not found.
7801
       */
7802
      public static _Fields findByThriftId(int fieldId) {
7803
        switch(fieldId) {
7804
          case 0: // SUCCESS
7805
            return SUCCESS;
7806
          case 1: // E
7807
            return E;
7808
          default:
7809
            return null;
7810
        }
7811
      }
7812
 
7813
      /**
7814
       * Find the _Fields constant that matches fieldId, throwing an exception
7815
       * if it is not found.
7816
       */
7817
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7818
        _Fields fields = findByThriftId(fieldId);
7819
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7820
        return fields;
7821
      }
7822
 
7823
      /**
7824
       * Find the _Fields constant that matches name, or null if its not found.
7825
       */
7826
      public static _Fields findByName(String name) {
7827
        return byName.get(name);
7828
      }
7829
 
7830
      private final short _thriftId;
7831
      private final String _fieldName;
7832
 
7833
      _Fields(short thriftId, String fieldName) {
7834
        _thriftId = thriftId;
7835
        _fieldName = fieldName;
7836
      }
7837
 
7838
      public short getThriftFieldId() {
7839
        return _thriftId;
7840
      }
7841
 
7842
      public String getFieldName() {
7843
        return _fieldName;
7844
      }
7845
    }
7846
 
7847
    // isset id assignments
7848
 
7849
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7850
    static {
7851
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7852
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7853
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7854
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));
7855
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7856
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7857
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7858
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_result.class, metaDataMap);
7859
    }
7860
 
7861
    public getAllPurchases_result() {
7862
    }
7863
 
7864
    public getAllPurchases_result(
7865
      List<Purchase> success,
7866
      PurchaseServiceException e)
7867
    {
7868
      this();
7869
      this.success = success;
7870
      this.e = e;
7871
    }
7872
 
7873
    /**
7874
     * Performs a deep copy on <i>other</i>.
7875
     */
7876
    public getAllPurchases_result(getAllPurchases_result other) {
7877
      if (other.isSetSuccess()) {
7878
        List<Purchase> __this__success = new ArrayList<Purchase>();
7879
        for (Purchase other_element : other.success) {
7880
          __this__success.add(new Purchase(other_element));
7881
        }
7882
        this.success = __this__success;
7883
      }
7884
      if (other.isSetE()) {
7885
        this.e = new PurchaseServiceException(other.e);
7886
      }
7887
    }
7888
 
7889
    public getAllPurchases_result deepCopy() {
7890
      return new getAllPurchases_result(this);
7891
    }
7892
 
7893
    @Override
7894
    public void clear() {
7895
      this.success = null;
7896
      this.e = null;
7897
    }
7898
 
7899
    public int getSuccessSize() {
7900
      return (this.success == null) ? 0 : this.success.size();
7901
    }
7902
 
7903
    public java.util.Iterator<Purchase> getSuccessIterator() {
7904
      return (this.success == null) ? null : this.success.iterator();
7905
    }
7906
 
7907
    public void addToSuccess(Purchase elem) {
7908
      if (this.success == null) {
7909
        this.success = new ArrayList<Purchase>();
7910
      }
7911
      this.success.add(elem);
7912
    }
7913
 
7914
    public List<Purchase> getSuccess() {
7915
      return this.success;
7916
    }
7917
 
7918
    public void setSuccess(List<Purchase> success) {
7919
      this.success = success;
7920
    }
7921
 
7922
    public void unsetSuccess() {
7923
      this.success = null;
7924
    }
7925
 
7926
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7927
    public boolean isSetSuccess() {
7928
      return this.success != null;
7929
    }
7930
 
7931
    public void setSuccessIsSet(boolean value) {
7932
      if (!value) {
7933
        this.success = null;
7934
      }
7935
    }
7936
 
7937
    public PurchaseServiceException getE() {
7938
      return this.e;
7939
    }
7940
 
7941
    public void setE(PurchaseServiceException e) {
7942
      this.e = e;
7943
    }
7944
 
7945
    public void unsetE() {
7946
      this.e = null;
7947
    }
7948
 
7949
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
7950
    public boolean isSetE() {
7951
      return this.e != null;
7952
    }
7953
 
7954
    public void setEIsSet(boolean value) {
7955
      if (!value) {
7956
        this.e = null;
7957
      }
7958
    }
7959
 
7960
    public void setFieldValue(_Fields field, Object value) {
7961
      switch (field) {
7962
      case SUCCESS:
7963
        if (value == null) {
7964
          unsetSuccess();
7965
        } else {
7966
          setSuccess((List<Purchase>)value);
7967
        }
7968
        break;
7969
 
7970
      case E:
7971
        if (value == null) {
7972
          unsetE();
7973
        } else {
7974
          setE((PurchaseServiceException)value);
7975
        }
7976
        break;
7977
 
7978
      }
7979
    }
7980
 
7981
    public Object getFieldValue(_Fields field) {
7982
      switch (field) {
7983
      case SUCCESS:
7984
        return getSuccess();
7985
 
7986
      case E:
7987
        return getE();
7988
 
7989
      }
7990
      throw new IllegalStateException();
7991
    }
7992
 
7993
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7994
    public boolean isSet(_Fields field) {
7995
      if (field == null) {
7996
        throw new IllegalArgumentException();
7997
      }
7998
 
7999
      switch (field) {
8000
      case SUCCESS:
8001
        return isSetSuccess();
8002
      case E:
8003
        return isSetE();
8004
      }
8005
      throw new IllegalStateException();
8006
    }
8007
 
8008
    @Override
8009
    public boolean equals(Object that) {
8010
      if (that == null)
8011
        return false;
8012
      if (that instanceof getAllPurchases_result)
8013
        return this.equals((getAllPurchases_result)that);
8014
      return false;
8015
    }
8016
 
8017
    public boolean equals(getAllPurchases_result that) {
8018
      if (that == null)
8019
        return false;
8020
 
8021
      boolean this_present_success = true && this.isSetSuccess();
8022
      boolean that_present_success = true && that.isSetSuccess();
8023
      if (this_present_success || that_present_success) {
8024
        if (!(this_present_success && that_present_success))
8025
          return false;
8026
        if (!this.success.equals(that.success))
8027
          return false;
8028
      }
8029
 
8030
      boolean this_present_e = true && this.isSetE();
8031
      boolean that_present_e = true && that.isSetE();
8032
      if (this_present_e || that_present_e) {
8033
        if (!(this_present_e && that_present_e))
8034
          return false;
8035
        if (!this.e.equals(that.e))
8036
          return false;
8037
      }
8038
 
8039
      return true;
8040
    }
8041
 
8042
    @Override
8043
    public int hashCode() {
8044
      return 0;
8045
    }
8046
 
8047
    public int compareTo(getAllPurchases_result other) {
8048
      if (!getClass().equals(other.getClass())) {
8049
        return getClass().getName().compareTo(other.getClass().getName());
8050
      }
8051
 
8052
      int lastComparison = 0;
8053
      getAllPurchases_result typedOther = (getAllPurchases_result)other;
8054
 
8055
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8056
      if (lastComparison != 0) {
8057
        return lastComparison;
8058
      }
8059
      if (isSetSuccess()) {
8060
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8061
        if (lastComparison != 0) {
8062
          return lastComparison;
8063
        }
8064
      }
8065
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
8066
      if (lastComparison != 0) {
8067
        return lastComparison;
8068
      }
8069
      if (isSetE()) {
8070
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
8071
        if (lastComparison != 0) {
8072
          return lastComparison;
8073
        }
8074
      }
8075
      return 0;
8076
    }
8077
 
8078
    public _Fields fieldForId(int fieldId) {
8079
      return _Fields.findByThriftId(fieldId);
8080
    }
8081
 
8082
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8083
      org.apache.thrift.protocol.TField field;
8084
      iprot.readStructBegin();
8085
      while (true)
8086
      {
8087
        field = iprot.readFieldBegin();
8088
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8089
          break;
8090
        }
8091
        switch (field.id) {
8092
          case 0: // SUCCESS
8093
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8094
              {
8095
                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
8096
                this.success = new ArrayList<Purchase>(_list8.size);
8097
                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
8098
                {
8099
                  Purchase _elem10; // required
8100
                  _elem10 = new Purchase();
8101
                  _elem10.read(iprot);
8102
                  this.success.add(_elem10);
8103
                }
8104
                iprot.readListEnd();
8105
              }
8106
            } else { 
8107
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8108
            }
8109
            break;
8110
          case 1: // E
8111
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8112
              this.e = new PurchaseServiceException();
8113
              this.e.read(iprot);
8114
            } else { 
8115
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8116
            }
8117
            break;
8118
          default:
8119
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8120
        }
8121
        iprot.readFieldEnd();
8122
      }
8123
      iprot.readStructEnd();
8124
      validate();
8125
    }
8126
 
8127
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8128
      oprot.writeStructBegin(STRUCT_DESC);
8129
 
8130
      if (this.isSetSuccess()) {
8131
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8132
        {
8133
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
8134
          for (Purchase _iter11 : this.success)
8135
          {
8136
            _iter11.write(oprot);
8137
          }
8138
          oprot.writeListEnd();
8139
        }
8140
        oprot.writeFieldEnd();
8141
      } else if (this.isSetE()) {
8142
        oprot.writeFieldBegin(E_FIELD_DESC);
8143
        this.e.write(oprot);
8144
        oprot.writeFieldEnd();
8145
      }
8146
      oprot.writeFieldStop();
8147
      oprot.writeStructEnd();
8148
    }
8149
 
8150
    @Override
8151
    public String toString() {
8152
      StringBuilder sb = new StringBuilder("getAllPurchases_result(");
8153
      boolean first = true;
8154
 
8155
      sb.append("success:");
8156
      if (this.success == null) {
8157
        sb.append("null");
8158
      } else {
8159
        sb.append(this.success);
8160
      }
8161
      first = false;
8162
      if (!first) sb.append(", ");
8163
      sb.append("e:");
8164
      if (this.e == null) {
8165
        sb.append("null");
8166
      } else {
8167
        sb.append(this.e);
8168
      }
8169
      first = false;
8170
      sb.append(")");
8171
      return sb.toString();
8172
    }
8173
 
8174
    public void validate() throws org.apache.thrift.TException {
8175
      // check for required fields
8176
    }
8177
 
8178
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8179
      try {
8180
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8181
      } catch (org.apache.thrift.TException te) {
8182
        throw new java.io.IOException(te);
8183
      }
8184
    }
8185
 
8186
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8187
      try {
8188
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8189
      } catch (org.apache.thrift.TException te) {
8190
        throw new java.io.IOException(te);
8191
      }
8192
    }
8193
 
8194
  }
8195
 
6385 amar.kumar 8196
  public static class getPurchasesForPO_args implements org.apache.thrift.TBase<getPurchasesForPO_args, getPurchasesForPO_args._Fields>, java.io.Serializable, Cloneable   {
8197
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchasesForPO_args");
8198
 
8199
    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);
8200
 
8201
    private long purchaseOrderId; // required
8202
 
8203
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8204
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8205
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId");
8206
 
8207
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8208
 
8209
      static {
8210
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8211
          byName.put(field.getFieldName(), field);
8212
        }
8213
      }
8214
 
8215
      /**
8216
       * Find the _Fields constant that matches fieldId, or null if its not found.
8217
       */
8218
      public static _Fields findByThriftId(int fieldId) {
8219
        switch(fieldId) {
8220
          case 1: // PURCHASE_ORDER_ID
8221
            return PURCHASE_ORDER_ID;
8222
          default:
8223
            return null;
8224
        }
8225
      }
8226
 
8227
      /**
8228
       * Find the _Fields constant that matches fieldId, throwing an exception
8229
       * if it is not found.
8230
       */
8231
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8232
        _Fields fields = findByThriftId(fieldId);
8233
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8234
        return fields;
8235
      }
8236
 
8237
      /**
8238
       * Find the _Fields constant that matches name, or null if its not found.
8239
       */
8240
      public static _Fields findByName(String name) {
8241
        return byName.get(name);
8242
      }
8243
 
8244
      private final short _thriftId;
8245
      private final String _fieldName;
8246
 
8247
      _Fields(short thriftId, String fieldName) {
8248
        _thriftId = thriftId;
8249
        _fieldName = fieldName;
8250
      }
8251
 
8252
      public short getThriftFieldId() {
8253
        return _thriftId;
8254
      }
8255
 
8256
      public String getFieldName() {
8257
        return _fieldName;
8258
      }
8259
    }
8260
 
8261
    // isset id assignments
8262
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
8263
    private BitSet __isset_bit_vector = new BitSet(1);
8264
 
8265
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8266
    static {
8267
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8268
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8269
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8270
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8271
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchasesForPO_args.class, metaDataMap);
8272
    }
8273
 
8274
    public getPurchasesForPO_args() {
8275
    }
8276
 
8277
    public getPurchasesForPO_args(
8278
      long purchaseOrderId)
8279
    {
8280
      this();
8281
      this.purchaseOrderId = purchaseOrderId;
8282
      setPurchaseOrderIdIsSet(true);
8283
    }
8284
 
8285
    /**
8286
     * Performs a deep copy on <i>other</i>.
8287
     */
8288
    public getPurchasesForPO_args(getPurchasesForPO_args other) {
8289
      __isset_bit_vector.clear();
8290
      __isset_bit_vector.or(other.__isset_bit_vector);
8291
      this.purchaseOrderId = other.purchaseOrderId;
8292
    }
8293
 
8294
    public getPurchasesForPO_args deepCopy() {
8295
      return new getPurchasesForPO_args(this);
8296
    }
8297
 
8298
    @Override
8299
    public void clear() {
8300
      setPurchaseOrderIdIsSet(false);
8301
      this.purchaseOrderId = 0;
8302
    }
8303
 
8304
    public long getPurchaseOrderId() {
8305
      return this.purchaseOrderId;
8306
    }
8307
 
8308
    public void setPurchaseOrderId(long purchaseOrderId) {
8309
      this.purchaseOrderId = purchaseOrderId;
8310
      setPurchaseOrderIdIsSet(true);
8311
    }
8312
 
8313
    public void unsetPurchaseOrderId() {
8314
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
8315
    }
8316
 
8317
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
8318
    public boolean isSetPurchaseOrderId() {
8319
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
8320
    }
8321
 
8322
    public void setPurchaseOrderIdIsSet(boolean value) {
8323
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
8324
    }
8325
 
8326
    public void setFieldValue(_Fields field, Object value) {
8327
      switch (field) {
8328
      case PURCHASE_ORDER_ID:
8329
        if (value == null) {
8330
          unsetPurchaseOrderId();
8331
        } else {
8332
          setPurchaseOrderId((Long)value);
8333
        }
8334
        break;
8335
 
8336
      }
8337
    }
8338
 
8339
    public Object getFieldValue(_Fields field) {
8340
      switch (field) {
8341
      case PURCHASE_ORDER_ID:
8342
        return Long.valueOf(getPurchaseOrderId());
8343
 
8344
      }
8345
      throw new IllegalStateException();
8346
    }
8347
 
8348
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8349
    public boolean isSet(_Fields field) {
8350
      if (field == null) {
8351
        throw new IllegalArgumentException();
8352
      }
8353
 
8354
      switch (field) {
8355
      case PURCHASE_ORDER_ID:
8356
        return isSetPurchaseOrderId();
8357
      }
8358
      throw new IllegalStateException();
8359
    }
8360
 
8361
    @Override
8362
    public boolean equals(Object that) {
8363
      if (that == null)
8364
        return false;
8365
      if (that instanceof getPurchasesForPO_args)
8366
        return this.equals((getPurchasesForPO_args)that);
8367
      return false;
8368
    }
8369
 
8370
    public boolean equals(getPurchasesForPO_args that) {
8371
      if (that == null)
8372
        return false;
8373
 
8374
      boolean this_present_purchaseOrderId = true;
8375
      boolean that_present_purchaseOrderId = true;
8376
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
8377
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
8378
          return false;
8379
        if (this.purchaseOrderId != that.purchaseOrderId)
8380
          return false;
8381
      }
8382
 
8383
      return true;
8384
    }
8385
 
8386
    @Override
8387
    public int hashCode() {
8388
      return 0;
8389
    }
8390
 
8391
    public int compareTo(getPurchasesForPO_args other) {
8392
      if (!getClass().equals(other.getClass())) {
8393
        return getClass().getName().compareTo(other.getClass().getName());
8394
      }
8395
 
8396
      int lastComparison = 0;
8397
      getPurchasesForPO_args typedOther = (getPurchasesForPO_args)other;
8398
 
8399
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
8400
      if (lastComparison != 0) {
8401
        return lastComparison;
8402
      }
8403
      if (isSetPurchaseOrderId()) {
8404
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
8405
        if (lastComparison != 0) {
8406
          return lastComparison;
8407
        }
8408
      }
8409
      return 0;
8410
    }
8411
 
8412
    public _Fields fieldForId(int fieldId) {
8413
      return _Fields.findByThriftId(fieldId);
8414
    }
8415
 
8416
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8417
      org.apache.thrift.protocol.TField field;
8418
      iprot.readStructBegin();
8419
      while (true)
8420
      {
8421
        field = iprot.readFieldBegin();
8422
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8423
          break;
8424
        }
8425
        switch (field.id) {
8426
          case 1: // PURCHASE_ORDER_ID
8427
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8428
              this.purchaseOrderId = iprot.readI64();
8429
              setPurchaseOrderIdIsSet(true);
8430
            } else { 
8431
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8432
            }
8433
            break;
8434
          default:
8435
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8436
        }
8437
        iprot.readFieldEnd();
8438
      }
8439
      iprot.readStructEnd();
8440
      validate();
8441
    }
8442
 
8443
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8444
      validate();
8445
 
8446
      oprot.writeStructBegin(STRUCT_DESC);
8447
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
8448
      oprot.writeI64(this.purchaseOrderId);
8449
      oprot.writeFieldEnd();
8450
      oprot.writeFieldStop();
8451
      oprot.writeStructEnd();
8452
    }
8453
 
8454
    @Override
8455
    public String toString() {
8456
      StringBuilder sb = new StringBuilder("getPurchasesForPO_args(");
8457
      boolean first = true;
8458
 
8459
      sb.append("purchaseOrderId:");
8460
      sb.append(this.purchaseOrderId);
8461
      first = false;
8462
      sb.append(")");
8463
      return sb.toString();
8464
    }
8465
 
8466
    public void validate() throws org.apache.thrift.TException {
8467
      // check for required fields
8468
    }
8469
 
8470
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8471
      try {
8472
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8473
      } catch (org.apache.thrift.TException te) {
8474
        throw new java.io.IOException(te);
8475
      }
8476
    }
8477
 
8478
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8479
      try {
8480
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8481
        __isset_bit_vector = new BitSet(1);
8482
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8483
      } catch (org.apache.thrift.TException te) {
8484
        throw new java.io.IOException(te);
8485
      }
8486
    }
8487
 
8488
  }
8489
 
8490
  public static class getPurchasesForPO_result implements org.apache.thrift.TBase<getPurchasesForPO_result, getPurchasesForPO_result._Fields>, java.io.Serializable, Cloneable   {
8491
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchasesForPO_result");
8492
 
8493
    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);
8494
    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);
8495
 
8496
    private List<Purchase> success; // required
8497
    private PurchaseServiceException e; // required
8498
 
8499
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8500
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8501
      SUCCESS((short)0, "success"),
8502
      E((short)1, "e");
8503
 
8504
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8505
 
8506
      static {
8507
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8508
          byName.put(field.getFieldName(), field);
8509
        }
8510
      }
8511
 
8512
      /**
8513
       * Find the _Fields constant that matches fieldId, or null if its not found.
8514
       */
8515
      public static _Fields findByThriftId(int fieldId) {
8516
        switch(fieldId) {
8517
          case 0: // SUCCESS
8518
            return SUCCESS;
8519
          case 1: // E
8520
            return E;
8521
          default:
8522
            return null;
8523
        }
8524
      }
8525
 
8526
      /**
8527
       * Find the _Fields constant that matches fieldId, throwing an exception
8528
       * if it is not found.
8529
       */
8530
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8531
        _Fields fields = findByThriftId(fieldId);
8532
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8533
        return fields;
8534
      }
8535
 
8536
      /**
8537
       * Find the _Fields constant that matches name, or null if its not found.
8538
       */
8539
      public static _Fields findByName(String name) {
8540
        return byName.get(name);
8541
      }
8542
 
8543
      private final short _thriftId;
8544
      private final String _fieldName;
8545
 
8546
      _Fields(short thriftId, String fieldName) {
8547
        _thriftId = thriftId;
8548
        _fieldName = fieldName;
8549
      }
8550
 
8551
      public short getThriftFieldId() {
8552
        return _thriftId;
8553
      }
8554
 
8555
      public String getFieldName() {
8556
        return _fieldName;
8557
      }
8558
    }
8559
 
8560
    // isset id assignments
8561
 
8562
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8563
    static {
8564
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8565
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8566
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
8567
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));
8568
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8569
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
8570
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8571
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchasesForPO_result.class, metaDataMap);
8572
    }
8573
 
8574
    public getPurchasesForPO_result() {
8575
    }
8576
 
8577
    public getPurchasesForPO_result(
8578
      List<Purchase> success,
8579
      PurchaseServiceException e)
8580
    {
8581
      this();
8582
      this.success = success;
8583
      this.e = e;
8584
    }
8585
 
8586
    /**
8587
     * Performs a deep copy on <i>other</i>.
8588
     */
8589
    public getPurchasesForPO_result(getPurchasesForPO_result other) {
8590
      if (other.isSetSuccess()) {
8591
        List<Purchase> __this__success = new ArrayList<Purchase>();
8592
        for (Purchase other_element : other.success) {
8593
          __this__success.add(new Purchase(other_element));
8594
        }
8595
        this.success = __this__success;
8596
      }
8597
      if (other.isSetE()) {
8598
        this.e = new PurchaseServiceException(other.e);
8599
      }
8600
    }
8601
 
8602
    public getPurchasesForPO_result deepCopy() {
8603
      return new getPurchasesForPO_result(this);
8604
    }
8605
 
8606
    @Override
8607
    public void clear() {
8608
      this.success = null;
8609
      this.e = null;
8610
    }
8611
 
8612
    public int getSuccessSize() {
8613
      return (this.success == null) ? 0 : this.success.size();
8614
    }
8615
 
8616
    public java.util.Iterator<Purchase> getSuccessIterator() {
8617
      return (this.success == null) ? null : this.success.iterator();
8618
    }
8619
 
8620
    public void addToSuccess(Purchase elem) {
8621
      if (this.success == null) {
8622
        this.success = new ArrayList<Purchase>();
8623
      }
8624
      this.success.add(elem);
8625
    }
8626
 
8627
    public List<Purchase> getSuccess() {
8628
      return this.success;
8629
    }
8630
 
8631
    public void setSuccess(List<Purchase> success) {
8632
      this.success = success;
8633
    }
8634
 
8635
    public void unsetSuccess() {
8636
      this.success = null;
8637
    }
8638
 
8639
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8640
    public boolean isSetSuccess() {
8641
      return this.success != null;
8642
    }
8643
 
8644
    public void setSuccessIsSet(boolean value) {
8645
      if (!value) {
8646
        this.success = null;
8647
      }
8648
    }
8649
 
8650
    public PurchaseServiceException getE() {
8651
      return this.e;
8652
    }
8653
 
8654
    public void setE(PurchaseServiceException e) {
8655
      this.e = e;
8656
    }
8657
 
8658
    public void unsetE() {
8659
      this.e = null;
8660
    }
8661
 
8662
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
8663
    public boolean isSetE() {
8664
      return this.e != null;
8665
    }
8666
 
8667
    public void setEIsSet(boolean value) {
8668
      if (!value) {
8669
        this.e = null;
8670
      }
8671
    }
8672
 
8673
    public void setFieldValue(_Fields field, Object value) {
8674
      switch (field) {
8675
      case SUCCESS:
8676
        if (value == null) {
8677
          unsetSuccess();
8678
        } else {
8679
          setSuccess((List<Purchase>)value);
8680
        }
8681
        break;
8682
 
8683
      case E:
8684
        if (value == null) {
8685
          unsetE();
8686
        } else {
8687
          setE((PurchaseServiceException)value);
8688
        }
8689
        break;
8690
 
8691
      }
8692
    }
8693
 
8694
    public Object getFieldValue(_Fields field) {
8695
      switch (field) {
8696
      case SUCCESS:
8697
        return getSuccess();
8698
 
8699
      case E:
8700
        return getE();
8701
 
8702
      }
8703
      throw new IllegalStateException();
8704
    }
8705
 
8706
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8707
    public boolean isSet(_Fields field) {
8708
      if (field == null) {
8709
        throw new IllegalArgumentException();
8710
      }
8711
 
8712
      switch (field) {
8713
      case SUCCESS:
8714
        return isSetSuccess();
8715
      case E:
8716
        return isSetE();
8717
      }
8718
      throw new IllegalStateException();
8719
    }
8720
 
8721
    @Override
8722
    public boolean equals(Object that) {
8723
      if (that == null)
8724
        return false;
8725
      if (that instanceof getPurchasesForPO_result)
8726
        return this.equals((getPurchasesForPO_result)that);
8727
      return false;
8728
    }
8729
 
8730
    public boolean equals(getPurchasesForPO_result that) {
8731
      if (that == null)
8732
        return false;
8733
 
8734
      boolean this_present_success = true && this.isSetSuccess();
8735
      boolean that_present_success = true && that.isSetSuccess();
8736
      if (this_present_success || that_present_success) {
8737
        if (!(this_present_success && that_present_success))
8738
          return false;
8739
        if (!this.success.equals(that.success))
8740
          return false;
8741
      }
8742
 
8743
      boolean this_present_e = true && this.isSetE();
8744
      boolean that_present_e = true && that.isSetE();
8745
      if (this_present_e || that_present_e) {
8746
        if (!(this_present_e && that_present_e))
8747
          return false;
8748
        if (!this.e.equals(that.e))
8749
          return false;
8750
      }
8751
 
8752
      return true;
8753
    }
8754
 
8755
    @Override
8756
    public int hashCode() {
8757
      return 0;
8758
    }
8759
 
8760
    public int compareTo(getPurchasesForPO_result other) {
8761
      if (!getClass().equals(other.getClass())) {
8762
        return getClass().getName().compareTo(other.getClass().getName());
8763
      }
8764
 
8765
      int lastComparison = 0;
8766
      getPurchasesForPO_result typedOther = (getPurchasesForPO_result)other;
8767
 
8768
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8769
      if (lastComparison != 0) {
8770
        return lastComparison;
8771
      }
8772
      if (isSetSuccess()) {
8773
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8774
        if (lastComparison != 0) {
8775
          return lastComparison;
8776
        }
8777
      }
8778
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
8779
      if (lastComparison != 0) {
8780
        return lastComparison;
8781
      }
8782
      if (isSetE()) {
8783
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
8784
        if (lastComparison != 0) {
8785
          return lastComparison;
8786
        }
8787
      }
8788
      return 0;
8789
    }
8790
 
8791
    public _Fields fieldForId(int fieldId) {
8792
      return _Fields.findByThriftId(fieldId);
8793
    }
8794
 
8795
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8796
      org.apache.thrift.protocol.TField field;
8797
      iprot.readStructBegin();
8798
      while (true)
8799
      {
8800
        field = iprot.readFieldBegin();
8801
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8802
          break;
8803
        }
8804
        switch (field.id) {
8805
          case 0: // SUCCESS
8806
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8807
              {
8808
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
8809
                this.success = new ArrayList<Purchase>(_list12.size);
8810
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
8811
                {
8812
                  Purchase _elem14; // required
8813
                  _elem14 = new Purchase();
8814
                  _elem14.read(iprot);
8815
                  this.success.add(_elem14);
8816
                }
8817
                iprot.readListEnd();
8818
              }
8819
            } else { 
8820
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8821
            }
8822
            break;
8823
          case 1: // E
8824
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8825
              this.e = new PurchaseServiceException();
8826
              this.e.read(iprot);
8827
            } else { 
8828
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8829
            }
8830
            break;
8831
          default:
8832
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8833
        }
8834
        iprot.readFieldEnd();
8835
      }
8836
      iprot.readStructEnd();
8837
      validate();
8838
    }
8839
 
8840
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8841
      oprot.writeStructBegin(STRUCT_DESC);
8842
 
8843
      if (this.isSetSuccess()) {
8844
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8845
        {
8846
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
8847
          for (Purchase _iter15 : this.success)
8848
          {
8849
            _iter15.write(oprot);
8850
          }
8851
          oprot.writeListEnd();
8852
        }
8853
        oprot.writeFieldEnd();
8854
      } else if (this.isSetE()) {
8855
        oprot.writeFieldBegin(E_FIELD_DESC);
8856
        this.e.write(oprot);
8857
        oprot.writeFieldEnd();
8858
      }
8859
      oprot.writeFieldStop();
8860
      oprot.writeStructEnd();
8861
    }
8862
 
8863
    @Override
8864
    public String toString() {
8865
      StringBuilder sb = new StringBuilder("getPurchasesForPO_result(");
8866
      boolean first = true;
8867
 
8868
      sb.append("success:");
8869
      if (this.success == null) {
8870
        sb.append("null");
8871
      } else {
8872
        sb.append(this.success);
8873
      }
8874
      first = false;
8875
      if (!first) sb.append(", ");
8876
      sb.append("e:");
8877
      if (this.e == null) {
8878
        sb.append("null");
8879
      } else {
8880
        sb.append(this.e);
8881
      }
8882
      first = false;
8883
      sb.append(")");
8884
      return sb.toString();
8885
    }
8886
 
8887
    public void validate() throws org.apache.thrift.TException {
8888
      // check for required fields
8889
    }
8890
 
8891
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8892
      try {
8893
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8894
      } catch (org.apache.thrift.TException te) {
8895
        throw new java.io.IOException(te);
8896
      }
8897
    }
8898
 
8899
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8900
      try {
8901
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8902
      } catch (org.apache.thrift.TException te) {
8903
        throw new java.io.IOException(te);
8904
      }
8905
    }
8906
 
8907
  }
8908
 
4555 mandeep.dh 8909
  public static class getPurchaseOrderForPurchase_args implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_args, getPurchaseOrderForPurchase_args._Fields>, java.io.Serializable, Cloneable   {
8910
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_args");
4496 mandeep.dh 8911
 
8912
    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);
8913
 
8914
    private long purchaseId; // required
8915
 
8916
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8917
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4555 mandeep.dh 8918
      PURCHASE_ID((short)1, "purchaseId");
4496 mandeep.dh 8919
 
8920
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8921
 
8922
      static {
8923
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8924
          byName.put(field.getFieldName(), field);
8925
        }
8926
      }
8927
 
8928
      /**
8929
       * Find the _Fields constant that matches fieldId, or null if its not found.
8930
       */
8931
      public static _Fields findByThriftId(int fieldId) {
8932
        switch(fieldId) {
8933
          case 1: // PURCHASE_ID
8934
            return PURCHASE_ID;
8935
          default:
8936
            return null;
8937
        }
8938
      }
8939
 
8940
      /**
8941
       * Find the _Fields constant that matches fieldId, throwing an exception
8942
       * if it is not found.
8943
       */
8944
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8945
        _Fields fields = findByThriftId(fieldId);
8946
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8947
        return fields;
8948
      }
8949
 
8950
      /**
8951
       * Find the _Fields constant that matches name, or null if its not found.
8952
       */
8953
      public static _Fields findByName(String name) {
8954
        return byName.get(name);
8955
      }
8956
 
8957
      private final short _thriftId;
8958
      private final String _fieldName;
8959
 
8960
      _Fields(short thriftId, String fieldName) {
8961
        _thriftId = thriftId;
8962
        _fieldName = fieldName;
8963
      }
8964
 
8965
      public short getThriftFieldId() {
8966
        return _thriftId;
8967
      }
8968
 
8969
      public String getFieldName() {
8970
        return _fieldName;
8971
      }
8972
    }
8973
 
8974
    // isset id assignments
8975
    private static final int __PURCHASEID_ISSET_ID = 0;
4555 mandeep.dh 8976
    private BitSet __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 8977
 
8978
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8979
    static {
8980
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8981
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8982
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8983
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 8984
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_args.class, metaDataMap);
4496 mandeep.dh 8985
    }
8986
 
4555 mandeep.dh 8987
    public getPurchaseOrderForPurchase_args() {
4496 mandeep.dh 8988
    }
8989
 
4555 mandeep.dh 8990
    public getPurchaseOrderForPurchase_args(
8991
      long purchaseId)
4496 mandeep.dh 8992
    {
8993
      this();
8994
      this.purchaseId = purchaseId;
8995
      setPurchaseIdIsSet(true);
8996
    }
8997
 
8998
    /**
8999
     * Performs a deep copy on <i>other</i>.
9000
     */
4555 mandeep.dh 9001
    public getPurchaseOrderForPurchase_args(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 9002
      __isset_bit_vector.clear();
9003
      __isset_bit_vector.or(other.__isset_bit_vector);
9004
      this.purchaseId = other.purchaseId;
9005
    }
9006
 
4555 mandeep.dh 9007
    public getPurchaseOrderForPurchase_args deepCopy() {
9008
      return new getPurchaseOrderForPurchase_args(this);
4496 mandeep.dh 9009
    }
9010
 
9011
    @Override
9012
    public void clear() {
9013
      setPurchaseIdIsSet(false);
9014
      this.purchaseId = 0;
9015
    }
9016
 
9017
    public long getPurchaseId() {
9018
      return this.purchaseId;
9019
    }
9020
 
9021
    public void setPurchaseId(long purchaseId) {
9022
      this.purchaseId = purchaseId;
9023
      setPurchaseIdIsSet(true);
9024
    }
9025
 
9026
    public void unsetPurchaseId() {
9027
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
9028
    }
9029
 
9030
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
9031
    public boolean isSetPurchaseId() {
9032
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
9033
    }
9034
 
9035
    public void setPurchaseIdIsSet(boolean value) {
9036
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
9037
    }
9038
 
9039
    public void setFieldValue(_Fields field, Object value) {
9040
      switch (field) {
9041
      case PURCHASE_ID:
9042
        if (value == null) {
9043
          unsetPurchaseId();
9044
        } else {
9045
          setPurchaseId((Long)value);
9046
        }
9047
        break;
9048
 
9049
      }
9050
    }
9051
 
9052
    public Object getFieldValue(_Fields field) {
9053
      switch (field) {
9054
      case PURCHASE_ID:
9055
        return Long.valueOf(getPurchaseId());
9056
 
9057
      }
9058
      throw new IllegalStateException();
9059
    }
9060
 
9061
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9062
    public boolean isSet(_Fields field) {
9063
      if (field == null) {
9064
        throw new IllegalArgumentException();
9065
      }
9066
 
9067
      switch (field) {
9068
      case PURCHASE_ID:
9069
        return isSetPurchaseId();
9070
      }
9071
      throw new IllegalStateException();
9072
    }
9073
 
9074
    @Override
9075
    public boolean equals(Object that) {
9076
      if (that == null)
9077
        return false;
4555 mandeep.dh 9078
      if (that instanceof getPurchaseOrderForPurchase_args)
9079
        return this.equals((getPurchaseOrderForPurchase_args)that);
4496 mandeep.dh 9080
      return false;
9081
    }
9082
 
4555 mandeep.dh 9083
    public boolean equals(getPurchaseOrderForPurchase_args that) {
4496 mandeep.dh 9084
      if (that == null)
9085
        return false;
9086
 
9087
      boolean this_present_purchaseId = true;
9088
      boolean that_present_purchaseId = true;
9089
      if (this_present_purchaseId || that_present_purchaseId) {
9090
        if (!(this_present_purchaseId && that_present_purchaseId))
9091
          return false;
9092
        if (this.purchaseId != that.purchaseId)
9093
          return false;
9094
      }
9095
 
9096
      return true;
9097
    }
9098
 
9099
    @Override
9100
    public int hashCode() {
9101
      return 0;
9102
    }
9103
 
4555 mandeep.dh 9104
    public int compareTo(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 9105
      if (!getClass().equals(other.getClass())) {
9106
        return getClass().getName().compareTo(other.getClass().getName());
9107
      }
9108
 
9109
      int lastComparison = 0;
4555 mandeep.dh 9110
      getPurchaseOrderForPurchase_args typedOther = (getPurchaseOrderForPurchase_args)other;
4496 mandeep.dh 9111
 
9112
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
9113
      if (lastComparison != 0) {
9114
        return lastComparison;
9115
      }
9116
      if (isSetPurchaseId()) {
9117
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
9118
        if (lastComparison != 0) {
9119
          return lastComparison;
9120
        }
9121
      }
9122
      return 0;
9123
    }
9124
 
9125
    public _Fields fieldForId(int fieldId) {
9126
      return _Fields.findByThriftId(fieldId);
9127
    }
9128
 
9129
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9130
      org.apache.thrift.protocol.TField field;
9131
      iprot.readStructBegin();
9132
      while (true)
9133
      {
9134
        field = iprot.readFieldBegin();
9135
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9136
          break;
9137
        }
9138
        switch (field.id) {
9139
          case 1: // PURCHASE_ID
9140
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9141
              this.purchaseId = iprot.readI64();
9142
              setPurchaseIdIsSet(true);
9143
            } else { 
9144
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9145
            }
9146
            break;
9147
          default:
9148
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9149
        }
9150
        iprot.readFieldEnd();
9151
      }
9152
      iprot.readStructEnd();
9153
      validate();
9154
    }
9155
 
9156
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9157
      validate();
9158
 
9159
      oprot.writeStructBegin(STRUCT_DESC);
9160
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
9161
      oprot.writeI64(this.purchaseId);
9162
      oprot.writeFieldEnd();
9163
      oprot.writeFieldStop();
9164
      oprot.writeStructEnd();
9165
    }
9166
 
9167
    @Override
9168
    public String toString() {
4555 mandeep.dh 9169
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_args(");
4496 mandeep.dh 9170
      boolean first = true;
9171
 
9172
      sb.append("purchaseId:");
9173
      sb.append(this.purchaseId);
9174
      first = false;
9175
      sb.append(")");
9176
      return sb.toString();
9177
    }
9178
 
9179
    public void validate() throws org.apache.thrift.TException {
9180
      // check for required fields
9181
    }
9182
 
9183
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9184
      try {
9185
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9186
      } catch (org.apache.thrift.TException te) {
9187
        throw new java.io.IOException(te);
9188
      }
9189
    }
9190
 
9191
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9192
      try {
4555 mandeep.dh 9193
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9194
        __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 9195
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9196
      } catch (org.apache.thrift.TException te) {
9197
        throw new java.io.IOException(te);
9198
      }
9199
    }
9200
 
9201
  }
9202
 
4555 mandeep.dh 9203
  public static class getPurchaseOrderForPurchase_result implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_result, getPurchaseOrderForPurchase_result._Fields>, java.io.Serializable, Cloneable   {
9204
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_result");
4496 mandeep.dh 9205
 
4555 mandeep.dh 9206
    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 9207
 
4555 mandeep.dh 9208
    private PurchaseOrder success; // required
4496 mandeep.dh 9209
 
9210
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9211
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9212
      SUCCESS((short)0, "success");
9213
 
9214
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9215
 
9216
      static {
9217
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9218
          byName.put(field.getFieldName(), field);
9219
        }
9220
      }
9221
 
9222
      /**
9223
       * Find the _Fields constant that matches fieldId, or null if its not found.
9224
       */
9225
      public static _Fields findByThriftId(int fieldId) {
9226
        switch(fieldId) {
9227
          case 0: // SUCCESS
9228
            return SUCCESS;
9229
          default:
9230
            return null;
9231
        }
9232
      }
9233
 
9234
      /**
9235
       * Find the _Fields constant that matches fieldId, throwing an exception
9236
       * if it is not found.
9237
       */
9238
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9239
        _Fields fields = findByThriftId(fieldId);
9240
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9241
        return fields;
9242
      }
9243
 
9244
      /**
9245
       * Find the _Fields constant that matches name, or null if its not found.
9246
       */
9247
      public static _Fields findByName(String name) {
9248
        return byName.get(name);
9249
      }
9250
 
9251
      private final short _thriftId;
9252
      private final String _fieldName;
9253
 
9254
      _Fields(short thriftId, String fieldName) {
9255
        _thriftId = thriftId;
9256
        _fieldName = fieldName;
9257
      }
9258
 
9259
      public short getThriftFieldId() {
9260
        return _thriftId;
9261
      }
9262
 
9263
      public String getFieldName() {
9264
        return _fieldName;
9265
      }
9266
    }
9267
 
9268
    // isset id assignments
9269
 
9270
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9271
    static {
9272
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9273
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 9274
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
4496 mandeep.dh 9275
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 9276
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_result.class, metaDataMap);
4496 mandeep.dh 9277
    }
9278
 
4555 mandeep.dh 9279
    public getPurchaseOrderForPurchase_result() {
4496 mandeep.dh 9280
    }
9281
 
4555 mandeep.dh 9282
    public getPurchaseOrderForPurchase_result(
9283
      PurchaseOrder success)
4496 mandeep.dh 9284
    {
9285
      this();
9286
      this.success = success;
9287
    }
9288
 
9289
    /**
9290
     * Performs a deep copy on <i>other</i>.
9291
     */
4555 mandeep.dh 9292
    public getPurchaseOrderForPurchase_result(getPurchaseOrderForPurchase_result other) {
9293
      if (other.isSetSuccess()) {
9294
        this.success = new PurchaseOrder(other.success);
9295
      }
4496 mandeep.dh 9296
    }
9297
 
4555 mandeep.dh 9298
    public getPurchaseOrderForPurchase_result deepCopy() {
9299
      return new getPurchaseOrderForPurchase_result(this);
4496 mandeep.dh 9300
    }
9301
 
9302
    @Override
9303
    public void clear() {
4555 mandeep.dh 9304
      this.success = null;
4496 mandeep.dh 9305
    }
9306
 
4555 mandeep.dh 9307
    public PurchaseOrder getSuccess() {
4496 mandeep.dh 9308
      return this.success;
9309
    }
9310
 
4555 mandeep.dh 9311
    public void setSuccess(PurchaseOrder success) {
4496 mandeep.dh 9312
      this.success = success;
9313
    }
9314
 
9315
    public void unsetSuccess() {
4555 mandeep.dh 9316
      this.success = null;
4496 mandeep.dh 9317
    }
9318
 
9319
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9320
    public boolean isSetSuccess() {
4555 mandeep.dh 9321
      return this.success != null;
4496 mandeep.dh 9322
    }
9323
 
9324
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 9325
      if (!value) {
9326
        this.success = null;
9327
      }
4496 mandeep.dh 9328
    }
9329
 
9330
    public void setFieldValue(_Fields field, Object value) {
9331
      switch (field) {
9332
      case SUCCESS:
9333
        if (value == null) {
9334
          unsetSuccess();
9335
        } else {
4555 mandeep.dh 9336
          setSuccess((PurchaseOrder)value);
4496 mandeep.dh 9337
        }
9338
        break;
9339
 
9340
      }
9341
    }
9342
 
9343
    public Object getFieldValue(_Fields field) {
9344
      switch (field) {
9345
      case SUCCESS:
4555 mandeep.dh 9346
        return getSuccess();
4496 mandeep.dh 9347
 
9348
      }
9349
      throw new IllegalStateException();
9350
    }
9351
 
9352
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9353
    public boolean isSet(_Fields field) {
9354
      if (field == null) {
9355
        throw new IllegalArgumentException();
9356
      }
9357
 
9358
      switch (field) {
9359
      case SUCCESS:
9360
        return isSetSuccess();
9361
      }
9362
      throw new IllegalStateException();
9363
    }
9364
 
9365
    @Override
9366
    public boolean equals(Object that) {
9367
      if (that == null)
9368
        return false;
4555 mandeep.dh 9369
      if (that instanceof getPurchaseOrderForPurchase_result)
9370
        return this.equals((getPurchaseOrderForPurchase_result)that);
4496 mandeep.dh 9371
      return false;
9372
    }
9373
 
4555 mandeep.dh 9374
    public boolean equals(getPurchaseOrderForPurchase_result that) {
4496 mandeep.dh 9375
      if (that == null)
9376
        return false;
9377
 
4555 mandeep.dh 9378
      boolean this_present_success = true && this.isSetSuccess();
9379
      boolean that_present_success = true && that.isSetSuccess();
4496 mandeep.dh 9380
      if (this_present_success || that_present_success) {
9381
        if (!(this_present_success && that_present_success))
9382
          return false;
4555 mandeep.dh 9383
        if (!this.success.equals(that.success))
4496 mandeep.dh 9384
          return false;
9385
      }
9386
 
9387
      return true;
9388
    }
9389
 
9390
    @Override
9391
    public int hashCode() {
9392
      return 0;
9393
    }
9394
 
4555 mandeep.dh 9395
    public int compareTo(getPurchaseOrderForPurchase_result other) {
4496 mandeep.dh 9396
      if (!getClass().equals(other.getClass())) {
9397
        return getClass().getName().compareTo(other.getClass().getName());
9398
      }
9399
 
9400
      int lastComparison = 0;
4555 mandeep.dh 9401
      getPurchaseOrderForPurchase_result typedOther = (getPurchaseOrderForPurchase_result)other;
4496 mandeep.dh 9402
 
9403
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9404
      if (lastComparison != 0) {
9405
        return lastComparison;
9406
      }
9407
      if (isSetSuccess()) {
9408
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9409
        if (lastComparison != 0) {
9410
          return lastComparison;
9411
        }
9412
      }
9413
      return 0;
9414
    }
9415
 
9416
    public _Fields fieldForId(int fieldId) {
9417
      return _Fields.findByThriftId(fieldId);
9418
    }
9419
 
9420
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9421
      org.apache.thrift.protocol.TField field;
9422
      iprot.readStructBegin();
9423
      while (true)
9424
      {
9425
        field = iprot.readFieldBegin();
9426
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9427
          break;
9428
        }
9429
        switch (field.id) {
9430
          case 0: // SUCCESS
4555 mandeep.dh 9431
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9432
              this.success = new PurchaseOrder();
9433
              this.success.read(iprot);
4496 mandeep.dh 9434
            } else { 
9435
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9436
            }
9437
            break;
9438
          default:
9439
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9440
        }
9441
        iprot.readFieldEnd();
9442
      }
9443
      iprot.readStructEnd();
9444
      validate();
9445
    }
9446
 
9447
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9448
      oprot.writeStructBegin(STRUCT_DESC);
9449
 
9450
      if (this.isSetSuccess()) {
9451
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 9452
        this.success.write(oprot);
4496 mandeep.dh 9453
        oprot.writeFieldEnd();
9454
      }
9455
      oprot.writeFieldStop();
9456
      oprot.writeStructEnd();
9457
    }
9458
 
9459
    @Override
9460
    public String toString() {
4555 mandeep.dh 9461
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_result(");
4496 mandeep.dh 9462
      boolean first = true;
9463
 
9464
      sb.append("success:");
4555 mandeep.dh 9465
      if (this.success == null) {
9466
        sb.append("null");
9467
      } else {
9468
        sb.append(this.success);
9469
      }
4496 mandeep.dh 9470
      first = false;
9471
      sb.append(")");
9472
      return sb.toString();
9473
    }
9474
 
9475
    public void validate() throws org.apache.thrift.TException {
9476
      // check for required fields
9477
    }
9478
 
9479
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9480
      try {
9481
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9482
      } catch (org.apache.thrift.TException te) {
9483
        throw new java.io.IOException(te);
9484
      }
9485
    }
9486
 
9487
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9488
      try {
9489
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9490
      } catch (org.apache.thrift.TException te) {
9491
        throw new java.io.IOException(te);
9492
      }
9493
    }
9494
 
9495
  }
9496
 
4754 mandeep.dh 9497
  public static class getPendingPurchaseOrders_args implements org.apache.thrift.TBase<getPendingPurchaseOrders_args, getPendingPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
9498
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_args");
9499
 
9500
    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);
9501
 
9502
    private long warehouseId; // required
9503
 
9504
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9505
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9506
      WAREHOUSE_ID((short)1, "warehouseId");
9507
 
9508
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9509
 
9510
      static {
9511
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9512
          byName.put(field.getFieldName(), field);
9513
        }
9514
      }
9515
 
9516
      /**
9517
       * Find the _Fields constant that matches fieldId, or null if its not found.
9518
       */
9519
      public static _Fields findByThriftId(int fieldId) {
9520
        switch(fieldId) {
9521
          case 1: // WAREHOUSE_ID
9522
            return WAREHOUSE_ID;
9523
          default:
9524
            return null;
9525
        }
9526
      }
9527
 
9528
      /**
9529
       * Find the _Fields constant that matches fieldId, throwing an exception
9530
       * if it is not found.
9531
       */
9532
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9533
        _Fields fields = findByThriftId(fieldId);
9534
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9535
        return fields;
9536
      }
9537
 
9538
      /**
9539
       * Find the _Fields constant that matches name, or null if its not found.
9540
       */
9541
      public static _Fields findByName(String name) {
9542
        return byName.get(name);
9543
      }
9544
 
9545
      private final short _thriftId;
9546
      private final String _fieldName;
9547
 
9548
      _Fields(short thriftId, String fieldName) {
9549
        _thriftId = thriftId;
9550
        _fieldName = fieldName;
9551
      }
9552
 
9553
      public short getThriftFieldId() {
9554
        return _thriftId;
9555
      }
9556
 
9557
      public String getFieldName() {
9558
        return _fieldName;
9559
      }
9560
    }
9561
 
9562
    // isset id assignments
9563
    private static final int __WAREHOUSEID_ISSET_ID = 0;
9564
    private BitSet __isset_bit_vector = new BitSet(1);
9565
 
9566
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9567
    static {
9568
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9569
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9570
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9571
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9572
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_args.class, metaDataMap);
9573
    }
9574
 
9575
    public getPendingPurchaseOrders_args() {
9576
    }
9577
 
9578
    public getPendingPurchaseOrders_args(
9579
      long warehouseId)
9580
    {
9581
      this();
9582
      this.warehouseId = warehouseId;
9583
      setWarehouseIdIsSet(true);
9584
    }
9585
 
9586
    /**
9587
     * Performs a deep copy on <i>other</i>.
9588
     */
9589
    public getPendingPurchaseOrders_args(getPendingPurchaseOrders_args other) {
9590
      __isset_bit_vector.clear();
9591
      __isset_bit_vector.or(other.__isset_bit_vector);
9592
      this.warehouseId = other.warehouseId;
9593
    }
9594
 
9595
    public getPendingPurchaseOrders_args deepCopy() {
9596
      return new getPendingPurchaseOrders_args(this);
9597
    }
9598
 
9599
    @Override
9600
    public void clear() {
9601
      setWarehouseIdIsSet(false);
9602
      this.warehouseId = 0;
9603
    }
9604
 
9605
    public long getWarehouseId() {
9606
      return this.warehouseId;
9607
    }
9608
 
9609
    public void setWarehouseId(long warehouseId) {
9610
      this.warehouseId = warehouseId;
9611
      setWarehouseIdIsSet(true);
9612
    }
9613
 
9614
    public void unsetWarehouseId() {
9615
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
9616
    }
9617
 
9618
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
9619
    public boolean isSetWarehouseId() {
9620
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
9621
    }
9622
 
9623
    public void setWarehouseIdIsSet(boolean value) {
9624
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
9625
    }
9626
 
9627
    public void setFieldValue(_Fields field, Object value) {
9628
      switch (field) {
9629
      case WAREHOUSE_ID:
9630
        if (value == null) {
9631
          unsetWarehouseId();
9632
        } else {
9633
          setWarehouseId((Long)value);
9634
        }
9635
        break;
9636
 
9637
      }
9638
    }
9639
 
9640
    public Object getFieldValue(_Fields field) {
9641
      switch (field) {
9642
      case WAREHOUSE_ID:
9643
        return Long.valueOf(getWarehouseId());
9644
 
9645
      }
9646
      throw new IllegalStateException();
9647
    }
9648
 
9649
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9650
    public boolean isSet(_Fields field) {
9651
      if (field == null) {
9652
        throw new IllegalArgumentException();
9653
      }
9654
 
9655
      switch (field) {
9656
      case WAREHOUSE_ID:
9657
        return isSetWarehouseId();
9658
      }
9659
      throw new IllegalStateException();
9660
    }
9661
 
9662
    @Override
9663
    public boolean equals(Object that) {
9664
      if (that == null)
9665
        return false;
9666
      if (that instanceof getPendingPurchaseOrders_args)
9667
        return this.equals((getPendingPurchaseOrders_args)that);
9668
      return false;
9669
    }
9670
 
9671
    public boolean equals(getPendingPurchaseOrders_args that) {
9672
      if (that == null)
9673
        return false;
9674
 
9675
      boolean this_present_warehouseId = true;
9676
      boolean that_present_warehouseId = true;
9677
      if (this_present_warehouseId || that_present_warehouseId) {
9678
        if (!(this_present_warehouseId && that_present_warehouseId))
9679
          return false;
9680
        if (this.warehouseId != that.warehouseId)
9681
          return false;
9682
      }
9683
 
9684
      return true;
9685
    }
9686
 
9687
    @Override
9688
    public int hashCode() {
9689
      return 0;
9690
    }
9691
 
9692
    public int compareTo(getPendingPurchaseOrders_args other) {
9693
      if (!getClass().equals(other.getClass())) {
9694
        return getClass().getName().compareTo(other.getClass().getName());
9695
      }
9696
 
9697
      int lastComparison = 0;
9698
      getPendingPurchaseOrders_args typedOther = (getPendingPurchaseOrders_args)other;
9699
 
9700
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
9701
      if (lastComparison != 0) {
9702
        return lastComparison;
9703
      }
9704
      if (isSetWarehouseId()) {
9705
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
9706
        if (lastComparison != 0) {
9707
          return lastComparison;
9708
        }
9709
      }
9710
      return 0;
9711
    }
9712
 
9713
    public _Fields fieldForId(int fieldId) {
9714
      return _Fields.findByThriftId(fieldId);
9715
    }
9716
 
9717
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9718
      org.apache.thrift.protocol.TField field;
9719
      iprot.readStructBegin();
9720
      while (true)
9721
      {
9722
        field = iprot.readFieldBegin();
9723
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9724
          break;
9725
        }
9726
        switch (field.id) {
9727
          case 1: // WAREHOUSE_ID
9728
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9729
              this.warehouseId = iprot.readI64();
9730
              setWarehouseIdIsSet(true);
9731
            } else { 
9732
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9733
            }
9734
            break;
9735
          default:
9736
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9737
        }
9738
        iprot.readFieldEnd();
9739
      }
9740
      iprot.readStructEnd();
9741
      validate();
9742
    }
9743
 
9744
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9745
      validate();
9746
 
9747
      oprot.writeStructBegin(STRUCT_DESC);
9748
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
9749
      oprot.writeI64(this.warehouseId);
9750
      oprot.writeFieldEnd();
9751
      oprot.writeFieldStop();
9752
      oprot.writeStructEnd();
9753
    }
9754
 
9755
    @Override
9756
    public String toString() {
9757
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_args(");
9758
      boolean first = true;
9759
 
9760
      sb.append("warehouseId:");
9761
      sb.append(this.warehouseId);
9762
      first = false;
9763
      sb.append(")");
9764
      return sb.toString();
9765
    }
9766
 
9767
    public void validate() throws org.apache.thrift.TException {
9768
      // check for required fields
9769
    }
9770
 
9771
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9772
      try {
9773
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9774
      } catch (org.apache.thrift.TException te) {
9775
        throw new java.io.IOException(te);
9776
      }
9777
    }
9778
 
9779
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9780
      try {
9781
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9782
        __isset_bit_vector = new BitSet(1);
9783
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9784
      } catch (org.apache.thrift.TException te) {
9785
        throw new java.io.IOException(te);
9786
      }
9787
    }
9788
 
9789
  }
9790
 
9791
  public static class getPendingPurchaseOrders_result implements org.apache.thrift.TBase<getPendingPurchaseOrders_result, getPendingPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
9792
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_result");
9793
 
9794
    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);
9795
    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);
9796
 
9797
    private List<PurchaseOrder> success; // required
9798
    private PurchaseServiceException e; // required
9799
 
9800
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9801
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9802
      SUCCESS((short)0, "success"),
9803
      E((short)1, "e");
9804
 
9805
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9806
 
9807
      static {
9808
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9809
          byName.put(field.getFieldName(), field);
9810
        }
9811
      }
9812
 
9813
      /**
9814
       * Find the _Fields constant that matches fieldId, or null if its not found.
9815
       */
9816
      public static _Fields findByThriftId(int fieldId) {
9817
        switch(fieldId) {
9818
          case 0: // SUCCESS
9819
            return SUCCESS;
9820
          case 1: // E
9821
            return E;
9822
          default:
9823
            return null;
9824
        }
9825
      }
9826
 
9827
      /**
9828
       * Find the _Fields constant that matches fieldId, throwing an exception
9829
       * if it is not found.
9830
       */
9831
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9832
        _Fields fields = findByThriftId(fieldId);
9833
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9834
        return fields;
9835
      }
9836
 
9837
      /**
9838
       * Find the _Fields constant that matches name, or null if its not found.
9839
       */
9840
      public static _Fields findByName(String name) {
9841
        return byName.get(name);
9842
      }
9843
 
9844
      private final short _thriftId;
9845
      private final String _fieldName;
9846
 
9847
      _Fields(short thriftId, String fieldName) {
9848
        _thriftId = thriftId;
9849
        _fieldName = fieldName;
9850
      }
9851
 
9852
      public short getThriftFieldId() {
9853
        return _thriftId;
9854
      }
9855
 
9856
      public String getFieldName() {
9857
        return _fieldName;
9858
      }
9859
    }
9860
 
9861
    // isset id assignments
9862
 
9863
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9864
    static {
9865
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9866
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9867
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
9868
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
9869
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9870
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9871
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9872
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_result.class, metaDataMap);
9873
    }
9874
 
9875
    public getPendingPurchaseOrders_result() {
9876
    }
9877
 
9878
    public getPendingPurchaseOrders_result(
9879
      List<PurchaseOrder> success,
9880
      PurchaseServiceException e)
9881
    {
9882
      this();
9883
      this.success = success;
9884
      this.e = e;
9885
    }
9886
 
9887
    /**
9888
     * Performs a deep copy on <i>other</i>.
9889
     */
9890
    public getPendingPurchaseOrders_result(getPendingPurchaseOrders_result other) {
9891
      if (other.isSetSuccess()) {
9892
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
9893
        for (PurchaseOrder other_element : other.success) {
9894
          __this__success.add(new PurchaseOrder(other_element));
9895
        }
9896
        this.success = __this__success;
9897
      }
9898
      if (other.isSetE()) {
9899
        this.e = new PurchaseServiceException(other.e);
9900
      }
9901
    }
9902
 
9903
    public getPendingPurchaseOrders_result deepCopy() {
9904
      return new getPendingPurchaseOrders_result(this);
9905
    }
9906
 
9907
    @Override
9908
    public void clear() {
9909
      this.success = null;
9910
      this.e = null;
9911
    }
9912
 
9913
    public int getSuccessSize() {
9914
      return (this.success == null) ? 0 : this.success.size();
9915
    }
9916
 
9917
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
9918
      return (this.success == null) ? null : this.success.iterator();
9919
    }
9920
 
9921
    public void addToSuccess(PurchaseOrder elem) {
9922
      if (this.success == null) {
9923
        this.success = new ArrayList<PurchaseOrder>();
9924
      }
9925
      this.success.add(elem);
9926
    }
9927
 
9928
    public List<PurchaseOrder> getSuccess() {
9929
      return this.success;
9930
    }
9931
 
9932
    public void setSuccess(List<PurchaseOrder> success) {
9933
      this.success = success;
9934
    }
9935
 
9936
    public void unsetSuccess() {
9937
      this.success = null;
9938
    }
9939
 
9940
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9941
    public boolean isSetSuccess() {
9942
      return this.success != null;
9943
    }
9944
 
9945
    public void setSuccessIsSet(boolean value) {
9946
      if (!value) {
9947
        this.success = null;
9948
      }
9949
    }
9950
 
9951
    public PurchaseServiceException getE() {
9952
      return this.e;
9953
    }
9954
 
9955
    public void setE(PurchaseServiceException e) {
9956
      this.e = e;
9957
    }
9958
 
9959
    public void unsetE() {
9960
      this.e = null;
9961
    }
9962
 
9963
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
9964
    public boolean isSetE() {
9965
      return this.e != null;
9966
    }
9967
 
9968
    public void setEIsSet(boolean value) {
9969
      if (!value) {
9970
        this.e = null;
9971
      }
9972
    }
9973
 
9974
    public void setFieldValue(_Fields field, Object value) {
9975
      switch (field) {
9976
      case SUCCESS:
9977
        if (value == null) {
9978
          unsetSuccess();
9979
        } else {
9980
          setSuccess((List<PurchaseOrder>)value);
9981
        }
9982
        break;
9983
 
9984
      case E:
9985
        if (value == null) {
9986
          unsetE();
9987
        } else {
9988
          setE((PurchaseServiceException)value);
9989
        }
9990
        break;
9991
 
9992
      }
9993
    }
9994
 
9995
    public Object getFieldValue(_Fields field) {
9996
      switch (field) {
9997
      case SUCCESS:
9998
        return getSuccess();
9999
 
10000
      case E:
10001
        return getE();
10002
 
10003
      }
10004
      throw new IllegalStateException();
10005
    }
10006
 
10007
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10008
    public boolean isSet(_Fields field) {
10009
      if (field == null) {
10010
        throw new IllegalArgumentException();
10011
      }
10012
 
10013
      switch (field) {
10014
      case SUCCESS:
10015
        return isSetSuccess();
10016
      case E:
10017
        return isSetE();
10018
      }
10019
      throw new IllegalStateException();
10020
    }
10021
 
10022
    @Override
10023
    public boolean equals(Object that) {
10024
      if (that == null)
10025
        return false;
10026
      if (that instanceof getPendingPurchaseOrders_result)
10027
        return this.equals((getPendingPurchaseOrders_result)that);
10028
      return false;
10029
    }
10030
 
10031
    public boolean equals(getPendingPurchaseOrders_result that) {
10032
      if (that == null)
10033
        return false;
10034
 
10035
      boolean this_present_success = true && this.isSetSuccess();
10036
      boolean that_present_success = true && that.isSetSuccess();
10037
      if (this_present_success || that_present_success) {
10038
        if (!(this_present_success && that_present_success))
10039
          return false;
10040
        if (!this.success.equals(that.success))
10041
          return false;
10042
      }
10043
 
10044
      boolean this_present_e = true && this.isSetE();
10045
      boolean that_present_e = true && that.isSetE();
10046
      if (this_present_e || that_present_e) {
10047
        if (!(this_present_e && that_present_e))
10048
          return false;
10049
        if (!this.e.equals(that.e))
10050
          return false;
10051
      }
10052
 
10053
      return true;
10054
    }
10055
 
10056
    @Override
10057
    public int hashCode() {
10058
      return 0;
10059
    }
10060
 
10061
    public int compareTo(getPendingPurchaseOrders_result other) {
10062
      if (!getClass().equals(other.getClass())) {
10063
        return getClass().getName().compareTo(other.getClass().getName());
10064
      }
10065
 
10066
      int lastComparison = 0;
10067
      getPendingPurchaseOrders_result typedOther = (getPendingPurchaseOrders_result)other;
10068
 
10069
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
10070
      if (lastComparison != 0) {
10071
        return lastComparison;
10072
      }
10073
      if (isSetSuccess()) {
10074
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
10075
        if (lastComparison != 0) {
10076
          return lastComparison;
10077
        }
10078
      }
10079
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
10080
      if (lastComparison != 0) {
10081
        return lastComparison;
10082
      }
10083
      if (isSetE()) {
10084
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
10085
        if (lastComparison != 0) {
10086
          return lastComparison;
10087
        }
10088
      }
10089
      return 0;
10090
    }
10091
 
10092
    public _Fields fieldForId(int fieldId) {
10093
      return _Fields.findByThriftId(fieldId);
10094
    }
10095
 
10096
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10097
      org.apache.thrift.protocol.TField field;
10098
      iprot.readStructBegin();
10099
      while (true)
10100
      {
10101
        field = iprot.readFieldBegin();
10102
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10103
          break;
10104
        }
10105
        switch (field.id) {
10106
          case 0: // SUCCESS
10107
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
10108
              {
6385 amar.kumar 10109
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
10110
                this.success = new ArrayList<PurchaseOrder>(_list16.size);
10111
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
4754 mandeep.dh 10112
                {
6385 amar.kumar 10113
                  PurchaseOrder _elem18; // required
10114
                  _elem18 = new PurchaseOrder();
10115
                  _elem18.read(iprot);
10116
                  this.success.add(_elem18);
4754 mandeep.dh 10117
                }
10118
                iprot.readListEnd();
10119
              }
10120
            } else { 
10121
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10122
            }
10123
            break;
10124
          case 1: // E
10125
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10126
              this.e = new PurchaseServiceException();
10127
              this.e.read(iprot);
10128
            } else { 
10129
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10130
            }
10131
            break;
10132
          default:
10133
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10134
        }
10135
        iprot.readFieldEnd();
10136
      }
10137
      iprot.readStructEnd();
10138
      validate();
10139
    }
10140
 
10141
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10142
      oprot.writeStructBegin(STRUCT_DESC);
10143
 
10144
      if (this.isSetSuccess()) {
10145
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10146
        {
10147
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 10148
          for (PurchaseOrder _iter19 : this.success)
4754 mandeep.dh 10149
          {
6385 amar.kumar 10150
            _iter19.write(oprot);
4754 mandeep.dh 10151
          }
10152
          oprot.writeListEnd();
10153
        }
10154
        oprot.writeFieldEnd();
10155
      } else if (this.isSetE()) {
10156
        oprot.writeFieldBegin(E_FIELD_DESC);
10157
        this.e.write(oprot);
10158
        oprot.writeFieldEnd();
10159
      }
10160
      oprot.writeFieldStop();
10161
      oprot.writeStructEnd();
10162
    }
10163
 
10164
    @Override
10165
    public String toString() {
10166
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_result(");
10167
      boolean first = true;
10168
 
10169
      sb.append("success:");
10170
      if (this.success == null) {
10171
        sb.append("null");
10172
      } else {
10173
        sb.append(this.success);
10174
      }
10175
      first = false;
10176
      if (!first) sb.append(", ");
10177
      sb.append("e:");
10178
      if (this.e == null) {
10179
        sb.append("null");
10180
      } else {
10181
        sb.append(this.e);
10182
      }
10183
      first = false;
10184
      sb.append(")");
10185
      return sb.toString();
10186
    }
10187
 
10188
    public void validate() throws org.apache.thrift.TException {
10189
      // check for required fields
10190
    }
10191
 
10192
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10193
      try {
10194
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10195
      } catch (org.apache.thrift.TException te) {
10196
        throw new java.io.IOException(te);
10197
      }
10198
    }
10199
 
10200
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10201
      try {
10202
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10203
      } catch (org.apache.thrift.TException te) {
10204
        throw new java.io.IOException(te);
10205
      }
10206
    }
10207
 
10208
  }
10209
 
10210
  public static class getSuppliers_args implements org.apache.thrift.TBase<getSuppliers_args, getSuppliers_args._Fields>, java.io.Serializable, Cloneable   {
10211
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_args");
10212
 
10213
 
10214
 
10215
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10216
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10217
;
10218
 
10219
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10220
 
10221
      static {
10222
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10223
          byName.put(field.getFieldName(), field);
10224
        }
10225
      }
10226
 
10227
      /**
10228
       * Find the _Fields constant that matches fieldId, or null if its not found.
10229
       */
10230
      public static _Fields findByThriftId(int fieldId) {
10231
        switch(fieldId) {
10232
          default:
10233
            return null;
10234
        }
10235
      }
10236
 
10237
      /**
10238
       * Find the _Fields constant that matches fieldId, throwing an exception
10239
       * if it is not found.
10240
       */
10241
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10242
        _Fields fields = findByThriftId(fieldId);
10243
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10244
        return fields;
10245
      }
10246
 
10247
      /**
10248
       * Find the _Fields constant that matches name, or null if its not found.
10249
       */
10250
      public static _Fields findByName(String name) {
10251
        return byName.get(name);
10252
      }
10253
 
10254
      private final short _thriftId;
10255
      private final String _fieldName;
10256
 
10257
      _Fields(short thriftId, String fieldName) {
10258
        _thriftId = thriftId;
10259
        _fieldName = fieldName;
10260
      }
10261
 
10262
      public short getThriftFieldId() {
10263
        return _thriftId;
10264
      }
10265
 
10266
      public String getFieldName() {
10267
        return _fieldName;
10268
      }
10269
    }
10270
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10271
    static {
10272
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10273
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10274
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_args.class, metaDataMap);
10275
    }
10276
 
10277
    public getSuppliers_args() {
10278
    }
10279
 
10280
    /**
10281
     * Performs a deep copy on <i>other</i>.
10282
     */
10283
    public getSuppliers_args(getSuppliers_args other) {
10284
    }
10285
 
10286
    public getSuppliers_args deepCopy() {
10287
      return new getSuppliers_args(this);
10288
    }
10289
 
10290
    @Override
10291
    public void clear() {
10292
    }
10293
 
10294
    public void setFieldValue(_Fields field, Object value) {
10295
      switch (field) {
10296
      }
10297
    }
10298
 
10299
    public Object getFieldValue(_Fields field) {
10300
      switch (field) {
10301
      }
10302
      throw new IllegalStateException();
10303
    }
10304
 
10305
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10306
    public boolean isSet(_Fields field) {
10307
      if (field == null) {
10308
        throw new IllegalArgumentException();
10309
      }
10310
 
10311
      switch (field) {
10312
      }
10313
      throw new IllegalStateException();
10314
    }
10315
 
10316
    @Override
10317
    public boolean equals(Object that) {
10318
      if (that == null)
10319
        return false;
10320
      if (that instanceof getSuppliers_args)
10321
        return this.equals((getSuppliers_args)that);
10322
      return false;
10323
    }
10324
 
10325
    public boolean equals(getSuppliers_args that) {
10326
      if (that == null)
10327
        return false;
10328
 
10329
      return true;
10330
    }
10331
 
10332
    @Override
10333
    public int hashCode() {
10334
      return 0;
10335
    }
10336
 
10337
    public int compareTo(getSuppliers_args other) {
10338
      if (!getClass().equals(other.getClass())) {
10339
        return getClass().getName().compareTo(other.getClass().getName());
10340
      }
10341
 
10342
      int lastComparison = 0;
10343
      getSuppliers_args typedOther = (getSuppliers_args)other;
10344
 
10345
      return 0;
10346
    }
10347
 
10348
    public _Fields fieldForId(int fieldId) {
10349
      return _Fields.findByThriftId(fieldId);
10350
    }
10351
 
10352
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10353
      org.apache.thrift.protocol.TField field;
10354
      iprot.readStructBegin();
10355
      while (true)
10356
      {
10357
        field = iprot.readFieldBegin();
10358
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10359
          break;
10360
        }
10361
        switch (field.id) {
10362
          default:
10363
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10364
        }
10365
        iprot.readFieldEnd();
10366
      }
10367
      iprot.readStructEnd();
10368
      validate();
10369
    }
10370
 
10371
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10372
      validate();
10373
 
10374
      oprot.writeStructBegin(STRUCT_DESC);
10375
      oprot.writeFieldStop();
10376
      oprot.writeStructEnd();
10377
    }
10378
 
10379
    @Override
10380
    public String toString() {
10381
      StringBuilder sb = new StringBuilder("getSuppliers_args(");
10382
      boolean first = true;
10383
 
10384
      sb.append(")");
10385
      return sb.toString();
10386
    }
10387
 
10388
    public void validate() throws org.apache.thrift.TException {
10389
      // check for required fields
10390
    }
10391
 
10392
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10393
      try {
10394
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10395
      } catch (org.apache.thrift.TException te) {
10396
        throw new java.io.IOException(te);
10397
      }
10398
    }
10399
 
10400
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10401
      try {
10402
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10403
      } catch (org.apache.thrift.TException te) {
10404
        throw new java.io.IOException(te);
10405
      }
10406
    }
10407
 
10408
  }
10409
 
10410
  public static class getSuppliers_result implements org.apache.thrift.TBase<getSuppliers_result, getSuppliers_result._Fields>, java.io.Serializable, Cloneable   {
10411
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_result");
10412
 
10413
    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);
10414
    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);
10415
 
10416
    private List<Supplier> success; // required
10417
    private PurchaseServiceException e; // required
10418
 
10419
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10420
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10421
      SUCCESS((short)0, "success"),
10422
      E((short)1, "e");
10423
 
10424
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10425
 
10426
      static {
10427
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10428
          byName.put(field.getFieldName(), field);
10429
        }
10430
      }
10431
 
10432
      /**
10433
       * Find the _Fields constant that matches fieldId, or null if its not found.
10434
       */
10435
      public static _Fields findByThriftId(int fieldId) {
10436
        switch(fieldId) {
10437
          case 0: // SUCCESS
10438
            return SUCCESS;
10439
          case 1: // E
10440
            return E;
10441
          default:
10442
            return null;
10443
        }
10444
      }
10445
 
10446
      /**
10447
       * Find the _Fields constant that matches fieldId, throwing an exception
10448
       * if it is not found.
10449
       */
10450
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10451
        _Fields fields = findByThriftId(fieldId);
10452
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10453
        return fields;
10454
      }
10455
 
10456
      /**
10457
       * Find the _Fields constant that matches name, or null if its not found.
10458
       */
10459
      public static _Fields findByName(String name) {
10460
        return byName.get(name);
10461
      }
10462
 
10463
      private final short _thriftId;
10464
      private final String _fieldName;
10465
 
10466
      _Fields(short thriftId, String fieldName) {
10467
        _thriftId = thriftId;
10468
        _fieldName = fieldName;
10469
      }
10470
 
10471
      public short getThriftFieldId() {
10472
        return _thriftId;
10473
      }
10474
 
10475
      public String getFieldName() {
10476
        return _fieldName;
10477
      }
10478
    }
10479
 
10480
    // isset id assignments
10481
 
10482
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10483
    static {
10484
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10485
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10486
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
10487
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class))));
10488
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10489
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
10490
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10491
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_result.class, metaDataMap);
10492
    }
10493
 
10494
    public getSuppliers_result() {
10495
    }
10496
 
10497
    public getSuppliers_result(
10498
      List<Supplier> success,
10499
      PurchaseServiceException e)
10500
    {
10501
      this();
10502
      this.success = success;
10503
      this.e = e;
10504
    }
10505
 
10506
    /**
10507
     * Performs a deep copy on <i>other</i>.
10508
     */
10509
    public getSuppliers_result(getSuppliers_result other) {
10510
      if (other.isSetSuccess()) {
10511
        List<Supplier> __this__success = new ArrayList<Supplier>();
10512
        for (Supplier other_element : other.success) {
10513
          __this__success.add(new Supplier(other_element));
10514
        }
10515
        this.success = __this__success;
10516
      }
10517
      if (other.isSetE()) {
10518
        this.e = new PurchaseServiceException(other.e);
10519
      }
10520
    }
10521
 
10522
    public getSuppliers_result deepCopy() {
10523
      return new getSuppliers_result(this);
10524
    }
10525
 
10526
    @Override
10527
    public void clear() {
10528
      this.success = null;
10529
      this.e = null;
10530
    }
10531
 
10532
    public int getSuccessSize() {
10533
      return (this.success == null) ? 0 : this.success.size();
10534
    }
10535
 
10536
    public java.util.Iterator<Supplier> getSuccessIterator() {
10537
      return (this.success == null) ? null : this.success.iterator();
10538
    }
10539
 
10540
    public void addToSuccess(Supplier elem) {
10541
      if (this.success == null) {
10542
        this.success = new ArrayList<Supplier>();
10543
      }
10544
      this.success.add(elem);
10545
    }
10546
 
10547
    public List<Supplier> getSuccess() {
10548
      return this.success;
10549
    }
10550
 
10551
    public void setSuccess(List<Supplier> success) {
10552
      this.success = success;
10553
    }
10554
 
10555
    public void unsetSuccess() {
10556
      this.success = null;
10557
    }
10558
 
10559
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
10560
    public boolean isSetSuccess() {
10561
      return this.success != null;
10562
    }
10563
 
10564
    public void setSuccessIsSet(boolean value) {
10565
      if (!value) {
10566
        this.success = null;
10567
      }
10568
    }
10569
 
10570
    public PurchaseServiceException getE() {
10571
      return this.e;
10572
    }
10573
 
10574
    public void setE(PurchaseServiceException e) {
10575
      this.e = e;
10576
    }
10577
 
10578
    public void unsetE() {
10579
      this.e = null;
10580
    }
10581
 
10582
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
10583
    public boolean isSetE() {
10584
      return this.e != null;
10585
    }
10586
 
10587
    public void setEIsSet(boolean value) {
10588
      if (!value) {
10589
        this.e = null;
10590
      }
10591
    }
10592
 
10593
    public void setFieldValue(_Fields field, Object value) {
10594
      switch (field) {
10595
      case SUCCESS:
10596
        if (value == null) {
10597
          unsetSuccess();
10598
        } else {
10599
          setSuccess((List<Supplier>)value);
10600
        }
10601
        break;
10602
 
10603
      case E:
10604
        if (value == null) {
10605
          unsetE();
10606
        } else {
10607
          setE((PurchaseServiceException)value);
10608
        }
10609
        break;
10610
 
10611
      }
10612
    }
10613
 
10614
    public Object getFieldValue(_Fields field) {
10615
      switch (field) {
10616
      case SUCCESS:
10617
        return getSuccess();
10618
 
10619
      case E:
10620
        return getE();
10621
 
10622
      }
10623
      throw new IllegalStateException();
10624
    }
10625
 
10626
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10627
    public boolean isSet(_Fields field) {
10628
      if (field == null) {
10629
        throw new IllegalArgumentException();
10630
      }
10631
 
10632
      switch (field) {
10633
      case SUCCESS:
10634
        return isSetSuccess();
10635
      case E:
10636
        return isSetE();
10637
      }
10638
      throw new IllegalStateException();
10639
    }
10640
 
10641
    @Override
10642
    public boolean equals(Object that) {
10643
      if (that == null)
10644
        return false;
10645
      if (that instanceof getSuppliers_result)
10646
        return this.equals((getSuppliers_result)that);
10647
      return false;
10648
    }
10649
 
10650
    public boolean equals(getSuppliers_result that) {
10651
      if (that == null)
10652
        return false;
10653
 
10654
      boolean this_present_success = true && this.isSetSuccess();
10655
      boolean that_present_success = true && that.isSetSuccess();
10656
      if (this_present_success || that_present_success) {
10657
        if (!(this_present_success && that_present_success))
10658
          return false;
10659
        if (!this.success.equals(that.success))
10660
          return false;
10661
      }
10662
 
10663
      boolean this_present_e = true && this.isSetE();
10664
      boolean that_present_e = true && that.isSetE();
10665
      if (this_present_e || that_present_e) {
10666
        if (!(this_present_e && that_present_e))
10667
          return false;
10668
        if (!this.e.equals(that.e))
10669
          return false;
10670
      }
10671
 
10672
      return true;
10673
    }
10674
 
10675
    @Override
10676
    public int hashCode() {
10677
      return 0;
10678
    }
10679
 
10680
    public int compareTo(getSuppliers_result other) {
10681
      if (!getClass().equals(other.getClass())) {
10682
        return getClass().getName().compareTo(other.getClass().getName());
10683
      }
10684
 
10685
      int lastComparison = 0;
10686
      getSuppliers_result typedOther = (getSuppliers_result)other;
10687
 
10688
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
10689
      if (lastComparison != 0) {
10690
        return lastComparison;
10691
      }
10692
      if (isSetSuccess()) {
10693
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
10694
        if (lastComparison != 0) {
10695
          return lastComparison;
10696
        }
10697
      }
10698
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
10699
      if (lastComparison != 0) {
10700
        return lastComparison;
10701
      }
10702
      if (isSetE()) {
10703
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
10704
        if (lastComparison != 0) {
10705
          return lastComparison;
10706
        }
10707
      }
10708
      return 0;
10709
    }
10710
 
10711
    public _Fields fieldForId(int fieldId) {
10712
      return _Fields.findByThriftId(fieldId);
10713
    }
10714
 
10715
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10716
      org.apache.thrift.protocol.TField field;
10717
      iprot.readStructBegin();
10718
      while (true)
10719
      {
10720
        field = iprot.readFieldBegin();
10721
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10722
          break;
10723
        }
10724
        switch (field.id) {
10725
          case 0: // SUCCESS
10726
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
10727
              {
6385 amar.kumar 10728
                org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
10729
                this.success = new ArrayList<Supplier>(_list20.size);
10730
                for (int _i21 = 0; _i21 < _list20.size; ++_i21)
4754 mandeep.dh 10731
                {
6385 amar.kumar 10732
                  Supplier _elem22; // required
10733
                  _elem22 = new Supplier();
10734
                  _elem22.read(iprot);
10735
                  this.success.add(_elem22);
4754 mandeep.dh 10736
                }
10737
                iprot.readListEnd();
10738
              }
10739
            } else { 
10740
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10741
            }
10742
            break;
10743
          case 1: // E
10744
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10745
              this.e = new PurchaseServiceException();
10746
              this.e.read(iprot);
10747
            } else { 
10748
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10749
            }
10750
            break;
10751
          default:
10752
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10753
        }
10754
        iprot.readFieldEnd();
10755
      }
10756
      iprot.readStructEnd();
10757
      validate();
10758
    }
10759
 
10760
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10761
      oprot.writeStructBegin(STRUCT_DESC);
10762
 
10763
      if (this.isSetSuccess()) {
10764
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10765
        {
10766
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 10767
          for (Supplier _iter23 : this.success)
4754 mandeep.dh 10768
          {
6385 amar.kumar 10769
            _iter23.write(oprot);
4754 mandeep.dh 10770
          }
10771
          oprot.writeListEnd();
10772
        }
10773
        oprot.writeFieldEnd();
10774
      } else if (this.isSetE()) {
10775
        oprot.writeFieldBegin(E_FIELD_DESC);
10776
        this.e.write(oprot);
10777
        oprot.writeFieldEnd();
10778
      }
10779
      oprot.writeFieldStop();
10780
      oprot.writeStructEnd();
10781
    }
10782
 
10783
    @Override
10784
    public String toString() {
10785
      StringBuilder sb = new StringBuilder("getSuppliers_result(");
10786
      boolean first = true;
10787
 
10788
      sb.append("success:");
10789
      if (this.success == null) {
10790
        sb.append("null");
10791
      } else {
10792
        sb.append(this.success);
10793
      }
10794
      first = false;
10795
      if (!first) sb.append(", ");
10796
      sb.append("e:");
10797
      if (this.e == null) {
10798
        sb.append("null");
10799
      } else {
10800
        sb.append(this.e);
10801
      }
10802
      first = false;
10803
      sb.append(")");
10804
      return sb.toString();
10805
    }
10806
 
10807
    public void validate() throws org.apache.thrift.TException {
10808
      // check for required fields
10809
    }
10810
 
10811
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10812
      try {
10813
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10814
      } catch (org.apache.thrift.TException te) {
10815
        throw new java.io.IOException(te);
10816
      }
10817
    }
10818
 
10819
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10820
      try {
10821
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10822
      } catch (org.apache.thrift.TException te) {
10823
        throw new java.io.IOException(te);
10824
      }
10825
    }
10826
 
10827
  }
10828
 
21847 amit.gupta 10829
  public static class getAllSuppliers_args implements org.apache.thrift.TBase<getAllSuppliers_args, getAllSuppliers_args._Fields>, java.io.Serializable, Cloneable   {
10830
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllSuppliers_args");
10831
 
10832
 
10833
 
10834
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10835
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10836
;
10837
 
10838
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10839
 
10840
      static {
10841
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10842
          byName.put(field.getFieldName(), field);
10843
        }
10844
      }
10845
 
10846
      /**
10847
       * Find the _Fields constant that matches fieldId, or null if its not found.
10848
       */
10849
      public static _Fields findByThriftId(int fieldId) {
10850
        switch(fieldId) {
10851
          default:
10852
            return null;
10853
        }
10854
      }
10855
 
10856
      /**
10857
       * Find the _Fields constant that matches fieldId, throwing an exception
10858
       * if it is not found.
10859
       */
10860
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10861
        _Fields fields = findByThriftId(fieldId);
10862
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10863
        return fields;
10864
      }
10865
 
10866
      /**
10867
       * Find the _Fields constant that matches name, or null if its not found.
10868
       */
10869
      public static _Fields findByName(String name) {
10870
        return byName.get(name);
10871
      }
10872
 
10873
      private final short _thriftId;
10874
      private final String _fieldName;
10875
 
10876
      _Fields(short thriftId, String fieldName) {
10877
        _thriftId = thriftId;
10878
        _fieldName = fieldName;
10879
      }
10880
 
10881
      public short getThriftFieldId() {
10882
        return _thriftId;
10883
      }
10884
 
10885
      public String getFieldName() {
10886
        return _fieldName;
10887
      }
10888
    }
10889
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10890
    static {
10891
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10892
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10893
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllSuppliers_args.class, metaDataMap);
10894
    }
10895
 
10896
    public getAllSuppliers_args() {
10897
    }
10898
 
10899
    /**
10900
     * Performs a deep copy on <i>other</i>.
10901
     */
10902
    public getAllSuppliers_args(getAllSuppliers_args other) {
10903
    }
10904
 
10905
    public getAllSuppliers_args deepCopy() {
10906
      return new getAllSuppliers_args(this);
10907
    }
10908
 
10909
    @Override
10910
    public void clear() {
10911
    }
10912
 
10913
    public void setFieldValue(_Fields field, Object value) {
10914
      switch (field) {
10915
      }
10916
    }
10917
 
10918
    public Object getFieldValue(_Fields field) {
10919
      switch (field) {
10920
      }
10921
      throw new IllegalStateException();
10922
    }
10923
 
10924
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10925
    public boolean isSet(_Fields field) {
10926
      if (field == null) {
10927
        throw new IllegalArgumentException();
10928
      }
10929
 
10930
      switch (field) {
10931
      }
10932
      throw new IllegalStateException();
10933
    }
10934
 
10935
    @Override
10936
    public boolean equals(Object that) {
10937
      if (that == null)
10938
        return false;
10939
      if (that instanceof getAllSuppliers_args)
10940
        return this.equals((getAllSuppliers_args)that);
10941
      return false;
10942
    }
10943
 
10944
    public boolean equals(getAllSuppliers_args that) {
10945
      if (that == null)
10946
        return false;
10947
 
10948
      return true;
10949
    }
10950
 
10951
    @Override
10952
    public int hashCode() {
10953
      return 0;
10954
    }
10955
 
10956
    public int compareTo(getAllSuppliers_args other) {
10957
      if (!getClass().equals(other.getClass())) {
10958
        return getClass().getName().compareTo(other.getClass().getName());
10959
      }
10960
 
10961
      int lastComparison = 0;
10962
      getAllSuppliers_args typedOther = (getAllSuppliers_args)other;
10963
 
10964
      return 0;
10965
    }
10966
 
10967
    public _Fields fieldForId(int fieldId) {
10968
      return _Fields.findByThriftId(fieldId);
10969
    }
10970
 
10971
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10972
      org.apache.thrift.protocol.TField field;
10973
      iprot.readStructBegin();
10974
      while (true)
10975
      {
10976
        field = iprot.readFieldBegin();
10977
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10978
          break;
10979
        }
10980
        switch (field.id) {
10981
          default:
10982
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10983
        }
10984
        iprot.readFieldEnd();
10985
      }
10986
      iprot.readStructEnd();
10987
      validate();
10988
    }
10989
 
10990
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10991
      validate();
10992
 
10993
      oprot.writeStructBegin(STRUCT_DESC);
10994
      oprot.writeFieldStop();
10995
      oprot.writeStructEnd();
10996
    }
10997
 
10998
    @Override
10999
    public String toString() {
11000
      StringBuilder sb = new StringBuilder("getAllSuppliers_args(");
11001
      boolean first = true;
11002
 
11003
      sb.append(")");
11004
      return sb.toString();
11005
    }
11006
 
11007
    public void validate() throws org.apache.thrift.TException {
11008
      // check for required fields
11009
    }
11010
 
11011
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11012
      try {
11013
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11014
      } catch (org.apache.thrift.TException te) {
11015
        throw new java.io.IOException(te);
11016
      }
11017
    }
11018
 
11019
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11020
      try {
11021
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11022
      } catch (org.apache.thrift.TException te) {
11023
        throw new java.io.IOException(te);
11024
      }
11025
    }
11026
 
11027
  }
11028
 
11029
  public static class getAllSuppliers_result implements org.apache.thrift.TBase<getAllSuppliers_result, getAllSuppliers_result._Fields>, java.io.Serializable, Cloneable   {
11030
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllSuppliers_result");
11031
 
11032
    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);
11033
    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);
11034
 
11035
    private List<Supplier> success; // required
11036
    private PurchaseServiceException e; // required
11037
 
11038
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11039
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11040
      SUCCESS((short)0, "success"),
11041
      E((short)1, "e");
11042
 
11043
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11044
 
11045
      static {
11046
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11047
          byName.put(field.getFieldName(), field);
11048
        }
11049
      }
11050
 
11051
      /**
11052
       * Find the _Fields constant that matches fieldId, or null if its not found.
11053
       */
11054
      public static _Fields findByThriftId(int fieldId) {
11055
        switch(fieldId) {
11056
          case 0: // SUCCESS
11057
            return SUCCESS;
11058
          case 1: // E
11059
            return E;
11060
          default:
11061
            return null;
11062
        }
11063
      }
11064
 
11065
      /**
11066
       * Find the _Fields constant that matches fieldId, throwing an exception
11067
       * if it is not found.
11068
       */
11069
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11070
        _Fields fields = findByThriftId(fieldId);
11071
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11072
        return fields;
11073
      }
11074
 
11075
      /**
11076
       * Find the _Fields constant that matches name, or null if its not found.
11077
       */
11078
      public static _Fields findByName(String name) {
11079
        return byName.get(name);
11080
      }
11081
 
11082
      private final short _thriftId;
11083
      private final String _fieldName;
11084
 
11085
      _Fields(short thriftId, String fieldName) {
11086
        _thriftId = thriftId;
11087
        _fieldName = fieldName;
11088
      }
11089
 
11090
      public short getThriftFieldId() {
11091
        return _thriftId;
11092
      }
11093
 
11094
      public String getFieldName() {
11095
        return _fieldName;
11096
      }
11097
    }
11098
 
11099
    // isset id assignments
11100
 
11101
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11102
    static {
11103
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11104
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11105
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
11106
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class))));
11107
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11108
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11109
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11110
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllSuppliers_result.class, metaDataMap);
11111
    }
11112
 
11113
    public getAllSuppliers_result() {
11114
    }
11115
 
11116
    public getAllSuppliers_result(
11117
      List<Supplier> success,
11118
      PurchaseServiceException e)
11119
    {
11120
      this();
11121
      this.success = success;
11122
      this.e = e;
11123
    }
11124
 
11125
    /**
11126
     * Performs a deep copy on <i>other</i>.
11127
     */
11128
    public getAllSuppliers_result(getAllSuppliers_result other) {
11129
      if (other.isSetSuccess()) {
11130
        List<Supplier> __this__success = new ArrayList<Supplier>();
11131
        for (Supplier other_element : other.success) {
11132
          __this__success.add(new Supplier(other_element));
11133
        }
11134
        this.success = __this__success;
11135
      }
11136
      if (other.isSetE()) {
11137
        this.e = new PurchaseServiceException(other.e);
11138
      }
11139
    }
11140
 
11141
    public getAllSuppliers_result deepCopy() {
11142
      return new getAllSuppliers_result(this);
11143
    }
11144
 
11145
    @Override
11146
    public void clear() {
11147
      this.success = null;
11148
      this.e = null;
11149
    }
11150
 
11151
    public int getSuccessSize() {
11152
      return (this.success == null) ? 0 : this.success.size();
11153
    }
11154
 
11155
    public java.util.Iterator<Supplier> getSuccessIterator() {
11156
      return (this.success == null) ? null : this.success.iterator();
11157
    }
11158
 
11159
    public void addToSuccess(Supplier elem) {
11160
      if (this.success == null) {
11161
        this.success = new ArrayList<Supplier>();
11162
      }
11163
      this.success.add(elem);
11164
    }
11165
 
11166
    public List<Supplier> getSuccess() {
11167
      return this.success;
11168
    }
11169
 
11170
    public void setSuccess(List<Supplier> success) {
11171
      this.success = success;
11172
    }
11173
 
11174
    public void unsetSuccess() {
11175
      this.success = null;
11176
    }
11177
 
11178
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
11179
    public boolean isSetSuccess() {
11180
      return this.success != null;
11181
    }
11182
 
11183
    public void setSuccessIsSet(boolean value) {
11184
      if (!value) {
11185
        this.success = null;
11186
      }
11187
    }
11188
 
11189
    public PurchaseServiceException getE() {
11190
      return this.e;
11191
    }
11192
 
11193
    public void setE(PurchaseServiceException e) {
11194
      this.e = e;
11195
    }
11196
 
11197
    public void unsetE() {
11198
      this.e = null;
11199
    }
11200
 
11201
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
11202
    public boolean isSetE() {
11203
      return this.e != null;
11204
    }
11205
 
11206
    public void setEIsSet(boolean value) {
11207
      if (!value) {
11208
        this.e = null;
11209
      }
11210
    }
11211
 
11212
    public void setFieldValue(_Fields field, Object value) {
11213
      switch (field) {
11214
      case SUCCESS:
11215
        if (value == null) {
11216
          unsetSuccess();
11217
        } else {
11218
          setSuccess((List<Supplier>)value);
11219
        }
11220
        break;
11221
 
11222
      case E:
11223
        if (value == null) {
11224
          unsetE();
11225
        } else {
11226
          setE((PurchaseServiceException)value);
11227
        }
11228
        break;
11229
 
11230
      }
11231
    }
11232
 
11233
    public Object getFieldValue(_Fields field) {
11234
      switch (field) {
11235
      case SUCCESS:
11236
        return getSuccess();
11237
 
11238
      case E:
11239
        return getE();
11240
 
11241
      }
11242
      throw new IllegalStateException();
11243
    }
11244
 
11245
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11246
    public boolean isSet(_Fields field) {
11247
      if (field == null) {
11248
        throw new IllegalArgumentException();
11249
      }
11250
 
11251
      switch (field) {
11252
      case SUCCESS:
11253
        return isSetSuccess();
11254
      case E:
11255
        return isSetE();
11256
      }
11257
      throw new IllegalStateException();
11258
    }
11259
 
11260
    @Override
11261
    public boolean equals(Object that) {
11262
      if (that == null)
11263
        return false;
11264
      if (that instanceof getAllSuppliers_result)
11265
        return this.equals((getAllSuppliers_result)that);
11266
      return false;
11267
    }
11268
 
11269
    public boolean equals(getAllSuppliers_result that) {
11270
      if (that == null)
11271
        return false;
11272
 
11273
      boolean this_present_success = true && this.isSetSuccess();
11274
      boolean that_present_success = true && that.isSetSuccess();
11275
      if (this_present_success || that_present_success) {
11276
        if (!(this_present_success && that_present_success))
11277
          return false;
11278
        if (!this.success.equals(that.success))
11279
          return false;
11280
      }
11281
 
11282
      boolean this_present_e = true && this.isSetE();
11283
      boolean that_present_e = true && that.isSetE();
11284
      if (this_present_e || that_present_e) {
11285
        if (!(this_present_e && that_present_e))
11286
          return false;
11287
        if (!this.e.equals(that.e))
11288
          return false;
11289
      }
11290
 
11291
      return true;
11292
    }
11293
 
11294
    @Override
11295
    public int hashCode() {
11296
      return 0;
11297
    }
11298
 
11299
    public int compareTo(getAllSuppliers_result other) {
11300
      if (!getClass().equals(other.getClass())) {
11301
        return getClass().getName().compareTo(other.getClass().getName());
11302
      }
11303
 
11304
      int lastComparison = 0;
11305
      getAllSuppliers_result typedOther = (getAllSuppliers_result)other;
11306
 
11307
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
11308
      if (lastComparison != 0) {
11309
        return lastComparison;
11310
      }
11311
      if (isSetSuccess()) {
11312
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
11313
        if (lastComparison != 0) {
11314
          return lastComparison;
11315
        }
11316
      }
11317
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
11318
      if (lastComparison != 0) {
11319
        return lastComparison;
11320
      }
11321
      if (isSetE()) {
11322
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
11323
        if (lastComparison != 0) {
11324
          return lastComparison;
11325
        }
11326
      }
11327
      return 0;
11328
    }
11329
 
11330
    public _Fields fieldForId(int fieldId) {
11331
      return _Fields.findByThriftId(fieldId);
11332
    }
11333
 
11334
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11335
      org.apache.thrift.protocol.TField field;
11336
      iprot.readStructBegin();
11337
      while (true)
11338
      {
11339
        field = iprot.readFieldBegin();
11340
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11341
          break;
11342
        }
11343
        switch (field.id) {
11344
          case 0: // SUCCESS
11345
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
11346
              {
11347
                org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
11348
                this.success = new ArrayList<Supplier>(_list24.size);
11349
                for (int _i25 = 0; _i25 < _list24.size; ++_i25)
11350
                {
11351
                  Supplier _elem26; // required
11352
                  _elem26 = new Supplier();
11353
                  _elem26.read(iprot);
11354
                  this.success.add(_elem26);
11355
                }
11356
                iprot.readListEnd();
11357
              }
11358
            } else { 
11359
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11360
            }
11361
            break;
11362
          case 1: // E
11363
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11364
              this.e = new PurchaseServiceException();
11365
              this.e.read(iprot);
11366
            } else { 
11367
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11368
            }
11369
            break;
11370
          default:
11371
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11372
        }
11373
        iprot.readFieldEnd();
11374
      }
11375
      iprot.readStructEnd();
11376
      validate();
11377
    }
11378
 
11379
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11380
      oprot.writeStructBegin(STRUCT_DESC);
11381
 
11382
      if (this.isSetSuccess()) {
11383
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11384
        {
11385
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
11386
          for (Supplier _iter27 : this.success)
11387
          {
11388
            _iter27.write(oprot);
11389
          }
11390
          oprot.writeListEnd();
11391
        }
11392
        oprot.writeFieldEnd();
11393
      } else if (this.isSetE()) {
11394
        oprot.writeFieldBegin(E_FIELD_DESC);
11395
        this.e.write(oprot);
11396
        oprot.writeFieldEnd();
11397
      }
11398
      oprot.writeFieldStop();
11399
      oprot.writeStructEnd();
11400
    }
11401
 
11402
    @Override
11403
    public String toString() {
11404
      StringBuilder sb = new StringBuilder("getAllSuppliers_result(");
11405
      boolean first = true;
11406
 
11407
      sb.append("success:");
11408
      if (this.success == null) {
11409
        sb.append("null");
11410
      } else {
11411
        sb.append(this.success);
11412
      }
11413
      first = false;
11414
      if (!first) sb.append(", ");
11415
      sb.append("e:");
11416
      if (this.e == null) {
11417
        sb.append("null");
11418
      } else {
11419
        sb.append(this.e);
11420
      }
11421
      first = false;
11422
      sb.append(")");
11423
      return sb.toString();
11424
    }
11425
 
11426
    public void validate() throws org.apache.thrift.TException {
11427
      // check for required fields
11428
    }
11429
 
11430
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11431
      try {
11432
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11433
      } catch (org.apache.thrift.TException te) {
11434
        throw new java.io.IOException(te);
11435
      }
11436
    }
11437
 
11438
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11439
      try {
11440
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11441
      } catch (org.apache.thrift.TException te) {
11442
        throw new java.io.IOException(te);
11443
      }
11444
    }
11445
 
11446
  }
11447
 
4754 mandeep.dh 11448
  public static class fulfillPO_args implements org.apache.thrift.TBase<fulfillPO_args, fulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
11449
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_args");
11450
 
11451
    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);
11452
    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);
11453
    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);
11454
 
11455
    private long purchaseOrderId; // required
11456
    private long itemId; // required
11457
    private long quantity; // required
11458
 
11459
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11460
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11461
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
11462
      ITEM_ID((short)2, "itemId"),
11463
      QUANTITY((short)3, "quantity");
11464
 
11465
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11466
 
11467
      static {
11468
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11469
          byName.put(field.getFieldName(), field);
11470
        }
11471
      }
11472
 
11473
      /**
11474
       * Find the _Fields constant that matches fieldId, or null if its not found.
11475
       */
11476
      public static _Fields findByThriftId(int fieldId) {
11477
        switch(fieldId) {
11478
          case 1: // PURCHASE_ORDER_ID
11479
            return PURCHASE_ORDER_ID;
11480
          case 2: // ITEM_ID
11481
            return ITEM_ID;
11482
          case 3: // QUANTITY
11483
            return QUANTITY;
11484
          default:
11485
            return null;
11486
        }
11487
      }
11488
 
11489
      /**
11490
       * Find the _Fields constant that matches fieldId, throwing an exception
11491
       * if it is not found.
11492
       */
11493
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11494
        _Fields fields = findByThriftId(fieldId);
11495
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11496
        return fields;
11497
      }
11498
 
11499
      /**
11500
       * Find the _Fields constant that matches name, or null if its not found.
11501
       */
11502
      public static _Fields findByName(String name) {
11503
        return byName.get(name);
11504
      }
11505
 
11506
      private final short _thriftId;
11507
      private final String _fieldName;
11508
 
11509
      _Fields(short thriftId, String fieldName) {
11510
        _thriftId = thriftId;
11511
        _fieldName = fieldName;
11512
      }
11513
 
11514
      public short getThriftFieldId() {
11515
        return _thriftId;
11516
      }
11517
 
11518
      public String getFieldName() {
11519
        return _fieldName;
11520
      }
11521
    }
11522
 
11523
    // isset id assignments
11524
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
11525
    private static final int __ITEMID_ISSET_ID = 1;
11526
    private static final int __QUANTITY_ISSET_ID = 2;
11527
    private BitSet __isset_bit_vector = new BitSet(3);
11528
 
11529
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11530
    static {
11531
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11532
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11533
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11534
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11535
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11536
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11537
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11538
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11539
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_args.class, metaDataMap);
11540
    }
11541
 
11542
    public fulfillPO_args() {
11543
    }
11544
 
11545
    public fulfillPO_args(
11546
      long purchaseOrderId,
11547
      long itemId,
11548
      long quantity)
11549
    {
11550
      this();
11551
      this.purchaseOrderId = purchaseOrderId;
11552
      setPurchaseOrderIdIsSet(true);
11553
      this.itemId = itemId;
11554
      setItemIdIsSet(true);
11555
      this.quantity = quantity;
11556
      setQuantityIsSet(true);
11557
    }
11558
 
11559
    /**
11560
     * Performs a deep copy on <i>other</i>.
11561
     */
11562
    public fulfillPO_args(fulfillPO_args other) {
11563
      __isset_bit_vector.clear();
11564
      __isset_bit_vector.or(other.__isset_bit_vector);
11565
      this.purchaseOrderId = other.purchaseOrderId;
11566
      this.itemId = other.itemId;
11567
      this.quantity = other.quantity;
11568
    }
11569
 
11570
    public fulfillPO_args deepCopy() {
11571
      return new fulfillPO_args(this);
11572
    }
11573
 
11574
    @Override
11575
    public void clear() {
11576
      setPurchaseOrderIdIsSet(false);
11577
      this.purchaseOrderId = 0;
11578
      setItemIdIsSet(false);
11579
      this.itemId = 0;
11580
      setQuantityIsSet(false);
11581
      this.quantity = 0;
11582
    }
11583
 
11584
    public long getPurchaseOrderId() {
11585
      return this.purchaseOrderId;
11586
    }
11587
 
11588
    public void setPurchaseOrderId(long purchaseOrderId) {
11589
      this.purchaseOrderId = purchaseOrderId;
11590
      setPurchaseOrderIdIsSet(true);
11591
    }
11592
 
11593
    public void unsetPurchaseOrderId() {
11594
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
11595
    }
11596
 
11597
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
11598
    public boolean isSetPurchaseOrderId() {
11599
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
11600
    }
11601
 
11602
    public void setPurchaseOrderIdIsSet(boolean value) {
11603
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
11604
    }
11605
 
11606
    public long getItemId() {
11607
      return this.itemId;
11608
    }
11609
 
11610
    public void setItemId(long itemId) {
11611
      this.itemId = itemId;
11612
      setItemIdIsSet(true);
11613
    }
11614
 
11615
    public void unsetItemId() {
11616
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
11617
    }
11618
 
11619
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
11620
    public boolean isSetItemId() {
11621
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
11622
    }
11623
 
11624
    public void setItemIdIsSet(boolean value) {
11625
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
11626
    }
11627
 
11628
    public long getQuantity() {
11629
      return this.quantity;
11630
    }
11631
 
11632
    public void setQuantity(long quantity) {
11633
      this.quantity = quantity;
11634
      setQuantityIsSet(true);
11635
    }
11636
 
11637
    public void unsetQuantity() {
11638
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
11639
    }
11640
 
11641
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
11642
    public boolean isSetQuantity() {
11643
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
11644
    }
11645
 
11646
    public void setQuantityIsSet(boolean value) {
11647
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
11648
    }
11649
 
11650
    public void setFieldValue(_Fields field, Object value) {
11651
      switch (field) {
11652
      case PURCHASE_ORDER_ID:
11653
        if (value == null) {
11654
          unsetPurchaseOrderId();
11655
        } else {
11656
          setPurchaseOrderId((Long)value);
11657
        }
11658
        break;
11659
 
11660
      case ITEM_ID:
11661
        if (value == null) {
11662
          unsetItemId();
11663
        } else {
11664
          setItemId((Long)value);
11665
        }
11666
        break;
11667
 
11668
      case QUANTITY:
11669
        if (value == null) {
11670
          unsetQuantity();
11671
        } else {
11672
          setQuantity((Long)value);
11673
        }
11674
        break;
11675
 
11676
      }
11677
    }
11678
 
11679
    public Object getFieldValue(_Fields field) {
11680
      switch (field) {
11681
      case PURCHASE_ORDER_ID:
11682
        return Long.valueOf(getPurchaseOrderId());
11683
 
11684
      case ITEM_ID:
11685
        return Long.valueOf(getItemId());
11686
 
11687
      case QUANTITY:
11688
        return Long.valueOf(getQuantity());
11689
 
11690
      }
11691
      throw new IllegalStateException();
11692
    }
11693
 
11694
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11695
    public boolean isSet(_Fields field) {
11696
      if (field == null) {
11697
        throw new IllegalArgumentException();
11698
      }
11699
 
11700
      switch (field) {
11701
      case PURCHASE_ORDER_ID:
11702
        return isSetPurchaseOrderId();
11703
      case ITEM_ID:
11704
        return isSetItemId();
11705
      case QUANTITY:
11706
        return isSetQuantity();
11707
      }
11708
      throw new IllegalStateException();
11709
    }
11710
 
11711
    @Override
11712
    public boolean equals(Object that) {
11713
      if (that == null)
11714
        return false;
11715
      if (that instanceof fulfillPO_args)
11716
        return this.equals((fulfillPO_args)that);
11717
      return false;
11718
    }
11719
 
11720
    public boolean equals(fulfillPO_args that) {
11721
      if (that == null)
11722
        return false;
11723
 
11724
      boolean this_present_purchaseOrderId = true;
11725
      boolean that_present_purchaseOrderId = true;
11726
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
11727
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
11728
          return false;
11729
        if (this.purchaseOrderId != that.purchaseOrderId)
11730
          return false;
11731
      }
11732
 
11733
      boolean this_present_itemId = true;
11734
      boolean that_present_itemId = true;
11735
      if (this_present_itemId || that_present_itemId) {
11736
        if (!(this_present_itemId && that_present_itemId))
11737
          return false;
11738
        if (this.itemId != that.itemId)
11739
          return false;
11740
      }
11741
 
11742
      boolean this_present_quantity = true;
11743
      boolean that_present_quantity = true;
11744
      if (this_present_quantity || that_present_quantity) {
11745
        if (!(this_present_quantity && that_present_quantity))
11746
          return false;
11747
        if (this.quantity != that.quantity)
11748
          return false;
11749
      }
11750
 
11751
      return true;
11752
    }
11753
 
11754
    @Override
11755
    public int hashCode() {
11756
      return 0;
11757
    }
11758
 
11759
    public int compareTo(fulfillPO_args other) {
11760
      if (!getClass().equals(other.getClass())) {
11761
        return getClass().getName().compareTo(other.getClass().getName());
11762
      }
11763
 
11764
      int lastComparison = 0;
11765
      fulfillPO_args typedOther = (fulfillPO_args)other;
11766
 
11767
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
11768
      if (lastComparison != 0) {
11769
        return lastComparison;
11770
      }
11771
      if (isSetPurchaseOrderId()) {
11772
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
11773
        if (lastComparison != 0) {
11774
          return lastComparison;
11775
        }
11776
      }
11777
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
11778
      if (lastComparison != 0) {
11779
        return lastComparison;
11780
      }
11781
      if (isSetItemId()) {
11782
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
11783
        if (lastComparison != 0) {
11784
          return lastComparison;
11785
        }
11786
      }
11787
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
11788
      if (lastComparison != 0) {
11789
        return lastComparison;
11790
      }
11791
      if (isSetQuantity()) {
11792
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
11793
        if (lastComparison != 0) {
11794
          return lastComparison;
11795
        }
11796
      }
11797
      return 0;
11798
    }
11799
 
11800
    public _Fields fieldForId(int fieldId) {
11801
      return _Fields.findByThriftId(fieldId);
11802
    }
11803
 
11804
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11805
      org.apache.thrift.protocol.TField field;
11806
      iprot.readStructBegin();
11807
      while (true)
11808
      {
11809
        field = iprot.readFieldBegin();
11810
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11811
          break;
11812
        }
11813
        switch (field.id) {
11814
          case 1: // PURCHASE_ORDER_ID
11815
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11816
              this.purchaseOrderId = iprot.readI64();
11817
              setPurchaseOrderIdIsSet(true);
11818
            } else { 
11819
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11820
            }
11821
            break;
11822
          case 2: // ITEM_ID
11823
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11824
              this.itemId = iprot.readI64();
11825
              setItemIdIsSet(true);
11826
            } else { 
11827
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11828
            }
11829
            break;
11830
          case 3: // QUANTITY
11831
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11832
              this.quantity = iprot.readI64();
11833
              setQuantityIsSet(true);
11834
            } else { 
11835
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11836
            }
11837
            break;
11838
          default:
11839
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11840
        }
11841
        iprot.readFieldEnd();
11842
      }
11843
      iprot.readStructEnd();
11844
      validate();
11845
    }
11846
 
11847
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11848
      validate();
11849
 
11850
      oprot.writeStructBegin(STRUCT_DESC);
11851
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
11852
      oprot.writeI64(this.purchaseOrderId);
11853
      oprot.writeFieldEnd();
11854
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
11855
      oprot.writeI64(this.itemId);
11856
      oprot.writeFieldEnd();
11857
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
11858
      oprot.writeI64(this.quantity);
11859
      oprot.writeFieldEnd();
11860
      oprot.writeFieldStop();
11861
      oprot.writeStructEnd();
11862
    }
11863
 
11864
    @Override
11865
    public String toString() {
11866
      StringBuilder sb = new StringBuilder("fulfillPO_args(");
11867
      boolean first = true;
11868
 
11869
      sb.append("purchaseOrderId:");
11870
      sb.append(this.purchaseOrderId);
11871
      first = false;
11872
      if (!first) sb.append(", ");
11873
      sb.append("itemId:");
11874
      sb.append(this.itemId);
11875
      first = false;
11876
      if (!first) sb.append(", ");
11877
      sb.append("quantity:");
11878
      sb.append(this.quantity);
11879
      first = false;
11880
      sb.append(")");
11881
      return sb.toString();
11882
    }
11883
 
11884
    public void validate() throws org.apache.thrift.TException {
11885
      // check for required fields
11886
    }
11887
 
11888
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11889
      try {
11890
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11891
      } catch (org.apache.thrift.TException te) {
11892
        throw new java.io.IOException(te);
11893
      }
11894
    }
11895
 
11896
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11897
      try {
11898
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
11899
        __isset_bit_vector = new BitSet(1);
11900
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11901
      } catch (org.apache.thrift.TException te) {
11902
        throw new java.io.IOException(te);
11903
      }
11904
    }
11905
 
11906
  }
11907
 
11908
  public static class fulfillPO_result implements org.apache.thrift.TBase<fulfillPO_result, fulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
11909
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_result");
11910
 
11911
    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);
11912
 
11913
    private PurchaseServiceException e; // required
11914
 
11915
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11916
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11917
      E((short)1, "e");
11918
 
11919
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11920
 
11921
      static {
11922
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11923
          byName.put(field.getFieldName(), field);
11924
        }
11925
      }
11926
 
11927
      /**
11928
       * Find the _Fields constant that matches fieldId, or null if its not found.
11929
       */
11930
      public static _Fields findByThriftId(int fieldId) {
11931
        switch(fieldId) {
11932
          case 1: // E
11933
            return E;
11934
          default:
11935
            return null;
11936
        }
11937
      }
11938
 
11939
      /**
11940
       * Find the _Fields constant that matches fieldId, throwing an exception
11941
       * if it is not found.
11942
       */
11943
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11944
        _Fields fields = findByThriftId(fieldId);
11945
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11946
        return fields;
11947
      }
11948
 
11949
      /**
11950
       * Find the _Fields constant that matches name, or null if its not found.
11951
       */
11952
      public static _Fields findByName(String name) {
11953
        return byName.get(name);
11954
      }
11955
 
11956
      private final short _thriftId;
11957
      private final String _fieldName;
11958
 
11959
      _Fields(short thriftId, String fieldName) {
11960
        _thriftId = thriftId;
11961
        _fieldName = fieldName;
11962
      }
11963
 
11964
      public short getThriftFieldId() {
11965
        return _thriftId;
11966
      }
11967
 
11968
      public String getFieldName() {
11969
        return _fieldName;
11970
      }
11971
    }
11972
 
11973
    // isset id assignments
11974
 
11975
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11976
    static {
11977
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11978
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11979
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11980
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11981
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_result.class, metaDataMap);
11982
    }
11983
 
11984
    public fulfillPO_result() {
11985
    }
11986
 
11987
    public fulfillPO_result(
11988
      PurchaseServiceException e)
11989
    {
11990
      this();
11991
      this.e = e;
11992
    }
11993
 
11994
    /**
11995
     * Performs a deep copy on <i>other</i>.
11996
     */
11997
    public fulfillPO_result(fulfillPO_result other) {
11998
      if (other.isSetE()) {
11999
        this.e = new PurchaseServiceException(other.e);
12000
      }
12001
    }
12002
 
12003
    public fulfillPO_result deepCopy() {
12004
      return new fulfillPO_result(this);
12005
    }
12006
 
12007
    @Override
12008
    public void clear() {
12009
      this.e = null;
12010
    }
12011
 
12012
    public PurchaseServiceException getE() {
12013
      return this.e;
12014
    }
12015
 
12016
    public void setE(PurchaseServiceException e) {
12017
      this.e = e;
12018
    }
12019
 
12020
    public void unsetE() {
12021
      this.e = null;
12022
    }
12023
 
12024
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
12025
    public boolean isSetE() {
12026
      return this.e != null;
12027
    }
12028
 
12029
    public void setEIsSet(boolean value) {
12030
      if (!value) {
12031
        this.e = null;
12032
      }
12033
    }
12034
 
12035
    public void setFieldValue(_Fields field, Object value) {
12036
      switch (field) {
12037
      case E:
12038
        if (value == null) {
12039
          unsetE();
12040
        } else {
12041
          setE((PurchaseServiceException)value);
12042
        }
12043
        break;
12044
 
12045
      }
12046
    }
12047
 
12048
    public Object getFieldValue(_Fields field) {
12049
      switch (field) {
12050
      case E:
12051
        return getE();
12052
 
12053
      }
12054
      throw new IllegalStateException();
12055
    }
12056
 
12057
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12058
    public boolean isSet(_Fields field) {
12059
      if (field == null) {
12060
        throw new IllegalArgumentException();
12061
      }
12062
 
12063
      switch (field) {
12064
      case E:
12065
        return isSetE();
12066
      }
12067
      throw new IllegalStateException();
12068
    }
12069
 
12070
    @Override
12071
    public boolean equals(Object that) {
12072
      if (that == null)
12073
        return false;
12074
      if (that instanceof fulfillPO_result)
12075
        return this.equals((fulfillPO_result)that);
12076
      return false;
12077
    }
12078
 
12079
    public boolean equals(fulfillPO_result that) {
12080
      if (that == null)
12081
        return false;
12082
 
12083
      boolean this_present_e = true && this.isSetE();
12084
      boolean that_present_e = true && that.isSetE();
12085
      if (this_present_e || that_present_e) {
12086
        if (!(this_present_e && that_present_e))
12087
          return false;
12088
        if (!this.e.equals(that.e))
12089
          return false;
12090
      }
12091
 
12092
      return true;
12093
    }
12094
 
12095
    @Override
12096
    public int hashCode() {
12097
      return 0;
12098
    }
12099
 
12100
    public int compareTo(fulfillPO_result other) {
12101
      if (!getClass().equals(other.getClass())) {
12102
        return getClass().getName().compareTo(other.getClass().getName());
12103
      }
12104
 
12105
      int lastComparison = 0;
12106
      fulfillPO_result typedOther = (fulfillPO_result)other;
12107
 
12108
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
12109
      if (lastComparison != 0) {
12110
        return lastComparison;
12111
      }
12112
      if (isSetE()) {
12113
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
12114
        if (lastComparison != 0) {
12115
          return lastComparison;
12116
        }
12117
      }
12118
      return 0;
12119
    }
12120
 
12121
    public _Fields fieldForId(int fieldId) {
12122
      return _Fields.findByThriftId(fieldId);
12123
    }
12124
 
12125
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12126
      org.apache.thrift.protocol.TField field;
12127
      iprot.readStructBegin();
12128
      while (true)
12129
      {
12130
        field = iprot.readFieldBegin();
12131
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12132
          break;
12133
        }
12134
        switch (field.id) {
12135
          case 1: // E
12136
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12137
              this.e = new PurchaseServiceException();
12138
              this.e.read(iprot);
12139
            } else { 
12140
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12141
            }
12142
            break;
12143
          default:
12144
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12145
        }
12146
        iprot.readFieldEnd();
12147
      }
12148
      iprot.readStructEnd();
12149
      validate();
12150
    }
12151
 
12152
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12153
      oprot.writeStructBegin(STRUCT_DESC);
12154
 
12155
      if (this.isSetE()) {
12156
        oprot.writeFieldBegin(E_FIELD_DESC);
12157
        this.e.write(oprot);
12158
        oprot.writeFieldEnd();
12159
      }
12160
      oprot.writeFieldStop();
12161
      oprot.writeStructEnd();
12162
    }
12163
 
12164
    @Override
12165
    public String toString() {
12166
      StringBuilder sb = new StringBuilder("fulfillPO_result(");
12167
      boolean first = true;
12168
 
12169
      sb.append("e:");
12170
      if (this.e == null) {
12171
        sb.append("null");
12172
      } else {
12173
        sb.append(this.e);
12174
      }
12175
      first = false;
12176
      sb.append(")");
12177
      return sb.toString();
12178
    }
12179
 
12180
    public void validate() throws org.apache.thrift.TException {
12181
      // check for required fields
12182
    }
12183
 
12184
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12185
      try {
12186
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12187
      } catch (org.apache.thrift.TException te) {
12188
        throw new java.io.IOException(te);
12189
      }
12190
    }
12191
 
12192
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12193
      try {
12194
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12195
      } catch (org.apache.thrift.TException te) {
12196
        throw new java.io.IOException(te);
12197
      }
12198
    }
12199
 
12200
  }
12201
 
12202
  public static class updatePurchaseOrder_args implements org.apache.thrift.TBase<updatePurchaseOrder_args, updatePurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
12203
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_args");
12204
 
12205
    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);
12206
 
12207
    private PurchaseOrder purchaseOrder; // required
12208
 
12209
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12210
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12211
      PURCHASE_ORDER((short)1, "purchaseOrder");
12212
 
12213
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12214
 
12215
      static {
12216
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12217
          byName.put(field.getFieldName(), field);
12218
        }
12219
      }
12220
 
12221
      /**
12222
       * Find the _Fields constant that matches fieldId, or null if its not found.
12223
       */
12224
      public static _Fields findByThriftId(int fieldId) {
12225
        switch(fieldId) {
12226
          case 1: // PURCHASE_ORDER
12227
            return PURCHASE_ORDER;
12228
          default:
12229
            return null;
12230
        }
12231
      }
12232
 
12233
      /**
12234
       * Find the _Fields constant that matches fieldId, throwing an exception
12235
       * if it is not found.
12236
       */
12237
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12238
        _Fields fields = findByThriftId(fieldId);
12239
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12240
        return fields;
12241
      }
12242
 
12243
      /**
12244
       * Find the _Fields constant that matches name, or null if its not found.
12245
       */
12246
      public static _Fields findByName(String name) {
12247
        return byName.get(name);
12248
      }
12249
 
12250
      private final short _thriftId;
12251
      private final String _fieldName;
12252
 
12253
      _Fields(short thriftId, String fieldName) {
12254
        _thriftId = thriftId;
12255
        _fieldName = fieldName;
12256
      }
12257
 
12258
      public short getThriftFieldId() {
12259
        return _thriftId;
12260
      }
12261
 
12262
      public String getFieldName() {
12263
        return _fieldName;
12264
      }
12265
    }
12266
 
12267
    // isset id assignments
12268
 
12269
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12270
    static {
12271
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12272
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12273
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
12274
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12275
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_args.class, metaDataMap);
12276
    }
12277
 
12278
    public updatePurchaseOrder_args() {
12279
    }
12280
 
12281
    public updatePurchaseOrder_args(
12282
      PurchaseOrder purchaseOrder)
12283
    {
12284
      this();
12285
      this.purchaseOrder = purchaseOrder;
12286
    }
12287
 
12288
    /**
12289
     * Performs a deep copy on <i>other</i>.
12290
     */
12291
    public updatePurchaseOrder_args(updatePurchaseOrder_args other) {
12292
      if (other.isSetPurchaseOrder()) {
12293
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
12294
      }
12295
    }
12296
 
12297
    public updatePurchaseOrder_args deepCopy() {
12298
      return new updatePurchaseOrder_args(this);
12299
    }
12300
 
12301
    @Override
12302
    public void clear() {
12303
      this.purchaseOrder = null;
12304
    }
12305
 
12306
    public PurchaseOrder getPurchaseOrder() {
12307
      return this.purchaseOrder;
12308
    }
12309
 
12310
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
12311
      this.purchaseOrder = purchaseOrder;
12312
    }
12313
 
12314
    public void unsetPurchaseOrder() {
12315
      this.purchaseOrder = null;
12316
    }
12317
 
12318
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
12319
    public boolean isSetPurchaseOrder() {
12320
      return this.purchaseOrder != null;
12321
    }
12322
 
12323
    public void setPurchaseOrderIsSet(boolean value) {
12324
      if (!value) {
12325
        this.purchaseOrder = null;
12326
      }
12327
    }
12328
 
12329
    public void setFieldValue(_Fields field, Object value) {
12330
      switch (field) {
12331
      case PURCHASE_ORDER:
12332
        if (value == null) {
12333
          unsetPurchaseOrder();
12334
        } else {
12335
          setPurchaseOrder((PurchaseOrder)value);
12336
        }
12337
        break;
12338
 
12339
      }
12340
    }
12341
 
12342
    public Object getFieldValue(_Fields field) {
12343
      switch (field) {
12344
      case PURCHASE_ORDER:
12345
        return getPurchaseOrder();
12346
 
12347
      }
12348
      throw new IllegalStateException();
12349
    }
12350
 
12351
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12352
    public boolean isSet(_Fields field) {
12353
      if (field == null) {
12354
        throw new IllegalArgumentException();
12355
      }
12356
 
12357
      switch (field) {
12358
      case PURCHASE_ORDER:
12359
        return isSetPurchaseOrder();
12360
      }
12361
      throw new IllegalStateException();
12362
    }
12363
 
12364
    @Override
12365
    public boolean equals(Object that) {
12366
      if (that == null)
12367
        return false;
12368
      if (that instanceof updatePurchaseOrder_args)
12369
        return this.equals((updatePurchaseOrder_args)that);
12370
      return false;
12371
    }
12372
 
12373
    public boolean equals(updatePurchaseOrder_args that) {
12374
      if (that == null)
12375
        return false;
12376
 
12377
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
12378
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
12379
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
12380
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
12381
          return false;
12382
        if (!this.purchaseOrder.equals(that.purchaseOrder))
12383
          return false;
12384
      }
12385
 
12386
      return true;
12387
    }
12388
 
12389
    @Override
12390
    public int hashCode() {
12391
      return 0;
12392
    }
12393
 
12394
    public int compareTo(updatePurchaseOrder_args other) {
12395
      if (!getClass().equals(other.getClass())) {
12396
        return getClass().getName().compareTo(other.getClass().getName());
12397
      }
12398
 
12399
      int lastComparison = 0;
12400
      updatePurchaseOrder_args typedOther = (updatePurchaseOrder_args)other;
12401
 
12402
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
12403
      if (lastComparison != 0) {
12404
        return lastComparison;
12405
      }
12406
      if (isSetPurchaseOrder()) {
12407
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
12408
        if (lastComparison != 0) {
12409
          return lastComparison;
12410
        }
12411
      }
12412
      return 0;
12413
    }
12414
 
12415
    public _Fields fieldForId(int fieldId) {
12416
      return _Fields.findByThriftId(fieldId);
12417
    }
12418
 
12419
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12420
      org.apache.thrift.protocol.TField field;
12421
      iprot.readStructBegin();
12422
      while (true)
12423
      {
12424
        field = iprot.readFieldBegin();
12425
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12426
          break;
12427
        }
12428
        switch (field.id) {
12429
          case 1: // PURCHASE_ORDER
12430
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12431
              this.purchaseOrder = new PurchaseOrder();
12432
              this.purchaseOrder.read(iprot);
12433
            } else { 
12434
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12435
            }
12436
            break;
12437
          default:
12438
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12439
        }
12440
        iprot.readFieldEnd();
12441
      }
12442
      iprot.readStructEnd();
12443
      validate();
12444
    }
12445
 
12446
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12447
      validate();
12448
 
12449
      oprot.writeStructBegin(STRUCT_DESC);
12450
      if (this.purchaseOrder != null) {
12451
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
12452
        this.purchaseOrder.write(oprot);
12453
        oprot.writeFieldEnd();
12454
      }
12455
      oprot.writeFieldStop();
12456
      oprot.writeStructEnd();
12457
    }
12458
 
12459
    @Override
12460
    public String toString() {
12461
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_args(");
12462
      boolean first = true;
12463
 
12464
      sb.append("purchaseOrder:");
12465
      if (this.purchaseOrder == null) {
12466
        sb.append("null");
12467
      } else {
12468
        sb.append(this.purchaseOrder);
12469
      }
12470
      first = false;
12471
      sb.append(")");
12472
      return sb.toString();
12473
    }
12474
 
12475
    public void validate() throws org.apache.thrift.TException {
12476
      // check for required fields
12477
    }
12478
 
12479
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12480
      try {
12481
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12482
      } catch (org.apache.thrift.TException te) {
12483
        throw new java.io.IOException(te);
12484
      }
12485
    }
12486
 
12487
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12488
      try {
12489
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12490
      } catch (org.apache.thrift.TException te) {
12491
        throw new java.io.IOException(te);
12492
      }
12493
    }
12494
 
12495
  }
12496
 
12497
  public static class updatePurchaseOrder_result implements org.apache.thrift.TBase<updatePurchaseOrder_result, updatePurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
12498
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_result");
12499
 
12500
    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);
12501
 
12502
    private PurchaseServiceException e; // required
12503
 
12504
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12505
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12506
      E((short)1, "e");
12507
 
12508
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12509
 
12510
      static {
12511
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12512
          byName.put(field.getFieldName(), field);
12513
        }
12514
      }
12515
 
12516
      /**
12517
       * Find the _Fields constant that matches fieldId, or null if its not found.
12518
       */
12519
      public static _Fields findByThriftId(int fieldId) {
12520
        switch(fieldId) {
12521
          case 1: // E
12522
            return E;
12523
          default:
12524
            return null;
12525
        }
12526
      }
12527
 
12528
      /**
12529
       * Find the _Fields constant that matches fieldId, throwing an exception
12530
       * if it is not found.
12531
       */
12532
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12533
        _Fields fields = findByThriftId(fieldId);
12534
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12535
        return fields;
12536
      }
12537
 
12538
      /**
12539
       * Find the _Fields constant that matches name, or null if its not found.
12540
       */
12541
      public static _Fields findByName(String name) {
12542
        return byName.get(name);
12543
      }
12544
 
12545
      private final short _thriftId;
12546
      private final String _fieldName;
12547
 
12548
      _Fields(short thriftId, String fieldName) {
12549
        _thriftId = thriftId;
12550
        _fieldName = fieldName;
12551
      }
12552
 
12553
      public short getThriftFieldId() {
12554
        return _thriftId;
12555
      }
12556
 
12557
      public String getFieldName() {
12558
        return _fieldName;
12559
      }
12560
    }
12561
 
12562
    // isset id assignments
12563
 
12564
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12565
    static {
12566
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12567
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12568
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
12569
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12570
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_result.class, metaDataMap);
12571
    }
12572
 
12573
    public updatePurchaseOrder_result() {
12574
    }
12575
 
12576
    public updatePurchaseOrder_result(
12577
      PurchaseServiceException e)
12578
    {
12579
      this();
12580
      this.e = e;
12581
    }
12582
 
12583
    /**
12584
     * Performs a deep copy on <i>other</i>.
12585
     */
12586
    public updatePurchaseOrder_result(updatePurchaseOrder_result other) {
12587
      if (other.isSetE()) {
12588
        this.e = new PurchaseServiceException(other.e);
12589
      }
12590
    }
12591
 
12592
    public updatePurchaseOrder_result deepCopy() {
12593
      return new updatePurchaseOrder_result(this);
12594
    }
12595
 
12596
    @Override
12597
    public void clear() {
12598
      this.e = null;
12599
    }
12600
 
12601
    public PurchaseServiceException getE() {
12602
      return this.e;
12603
    }
12604
 
12605
    public void setE(PurchaseServiceException e) {
12606
      this.e = e;
12607
    }
12608
 
12609
    public void unsetE() {
12610
      this.e = null;
12611
    }
12612
 
12613
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
12614
    public boolean isSetE() {
12615
      return this.e != null;
12616
    }
12617
 
12618
    public void setEIsSet(boolean value) {
12619
      if (!value) {
12620
        this.e = null;
12621
      }
12622
    }
12623
 
12624
    public void setFieldValue(_Fields field, Object value) {
12625
      switch (field) {
12626
      case E:
12627
        if (value == null) {
12628
          unsetE();
12629
        } else {
12630
          setE((PurchaseServiceException)value);
12631
        }
12632
        break;
12633
 
12634
      }
12635
    }
12636
 
12637
    public Object getFieldValue(_Fields field) {
12638
      switch (field) {
12639
      case E:
12640
        return getE();
12641
 
12642
      }
12643
      throw new IllegalStateException();
12644
    }
12645
 
12646
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12647
    public boolean isSet(_Fields field) {
12648
      if (field == null) {
12649
        throw new IllegalArgumentException();
12650
      }
12651
 
12652
      switch (field) {
12653
      case E:
12654
        return isSetE();
12655
      }
12656
      throw new IllegalStateException();
12657
    }
12658
 
12659
    @Override
12660
    public boolean equals(Object that) {
12661
      if (that == null)
12662
        return false;
12663
      if (that instanceof updatePurchaseOrder_result)
12664
        return this.equals((updatePurchaseOrder_result)that);
12665
      return false;
12666
    }
12667
 
12668
    public boolean equals(updatePurchaseOrder_result that) {
12669
      if (that == null)
12670
        return false;
12671
 
12672
      boolean this_present_e = true && this.isSetE();
12673
      boolean that_present_e = true && that.isSetE();
12674
      if (this_present_e || that_present_e) {
12675
        if (!(this_present_e && that_present_e))
12676
          return false;
12677
        if (!this.e.equals(that.e))
12678
          return false;
12679
      }
12680
 
12681
      return true;
12682
    }
12683
 
12684
    @Override
12685
    public int hashCode() {
12686
      return 0;
12687
    }
12688
 
12689
    public int compareTo(updatePurchaseOrder_result other) {
12690
      if (!getClass().equals(other.getClass())) {
12691
        return getClass().getName().compareTo(other.getClass().getName());
12692
      }
12693
 
12694
      int lastComparison = 0;
12695
      updatePurchaseOrder_result typedOther = (updatePurchaseOrder_result)other;
12696
 
12697
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
12698
      if (lastComparison != 0) {
12699
        return lastComparison;
12700
      }
12701
      if (isSetE()) {
12702
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
12703
        if (lastComparison != 0) {
12704
          return lastComparison;
12705
        }
12706
      }
12707
      return 0;
12708
    }
12709
 
12710
    public _Fields fieldForId(int fieldId) {
12711
      return _Fields.findByThriftId(fieldId);
12712
    }
12713
 
12714
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12715
      org.apache.thrift.protocol.TField field;
12716
      iprot.readStructBegin();
12717
      while (true)
12718
      {
12719
        field = iprot.readFieldBegin();
12720
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12721
          break;
12722
        }
12723
        switch (field.id) {
12724
          case 1: // E
12725
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12726
              this.e = new PurchaseServiceException();
12727
              this.e.read(iprot);
12728
            } else { 
12729
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12730
            }
12731
            break;
12732
          default:
12733
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12734
        }
12735
        iprot.readFieldEnd();
12736
      }
12737
      iprot.readStructEnd();
12738
      validate();
12739
    }
12740
 
12741
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12742
      oprot.writeStructBegin(STRUCT_DESC);
12743
 
12744
      if (this.isSetE()) {
12745
        oprot.writeFieldBegin(E_FIELD_DESC);
12746
        this.e.write(oprot);
12747
        oprot.writeFieldEnd();
12748
      }
12749
      oprot.writeFieldStop();
12750
      oprot.writeStructEnd();
12751
    }
12752
 
12753
    @Override
12754
    public String toString() {
12755
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_result(");
12756
      boolean first = true;
12757
 
12758
      sb.append("e:");
12759
      if (this.e == null) {
12760
        sb.append("null");
12761
      } else {
12762
        sb.append(this.e);
12763
      }
12764
      first = false;
12765
      sb.append(")");
12766
      return sb.toString();
12767
    }
12768
 
12769
    public void validate() throws org.apache.thrift.TException {
12770
      // check for required fields
12771
    }
12772
 
12773
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12774
      try {
12775
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12776
      } catch (org.apache.thrift.TException te) {
12777
        throw new java.io.IOException(te);
12778
      }
12779
    }
12780
 
12781
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12782
      try {
12783
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12784
      } catch (org.apache.thrift.TException te) {
12785
        throw new java.io.IOException(te);
12786
      }
12787
    }
12788
 
12789
  }
12790
 
5185 mandeep.dh 12791
  public static class unFulfillPO_args implements org.apache.thrift.TBase<unFulfillPO_args, unFulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
12792
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_args");
12793
 
12794
    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);
12795
    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);
12796
    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);
12797
 
12798
    private long purchaseId; // required
12799
    private long itemId; // required
12800
    private long quantity; // required
12801
 
12802
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12803
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12804
      PURCHASE_ID((short)1, "purchaseId"),
12805
      ITEM_ID((short)2, "itemId"),
12806
      QUANTITY((short)3, "quantity");
12807
 
12808
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12809
 
12810
      static {
12811
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12812
          byName.put(field.getFieldName(), field);
12813
        }
12814
      }
12815
 
12816
      /**
12817
       * Find the _Fields constant that matches fieldId, or null if its not found.
12818
       */
12819
      public static _Fields findByThriftId(int fieldId) {
12820
        switch(fieldId) {
12821
          case 1: // PURCHASE_ID
12822
            return PURCHASE_ID;
12823
          case 2: // ITEM_ID
12824
            return ITEM_ID;
12825
          case 3: // QUANTITY
12826
            return QUANTITY;
12827
          default:
12828
            return null;
12829
        }
12830
      }
12831
 
12832
      /**
12833
       * Find the _Fields constant that matches fieldId, throwing an exception
12834
       * if it is not found.
12835
       */
12836
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12837
        _Fields fields = findByThriftId(fieldId);
12838
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12839
        return fields;
12840
      }
12841
 
12842
      /**
12843
       * Find the _Fields constant that matches name, or null if its not found.
12844
       */
12845
      public static _Fields findByName(String name) {
12846
        return byName.get(name);
12847
      }
12848
 
12849
      private final short _thriftId;
12850
      private final String _fieldName;
12851
 
12852
      _Fields(short thriftId, String fieldName) {
12853
        _thriftId = thriftId;
12854
        _fieldName = fieldName;
12855
      }
12856
 
12857
      public short getThriftFieldId() {
12858
        return _thriftId;
12859
      }
12860
 
12861
      public String getFieldName() {
12862
        return _fieldName;
12863
      }
12864
    }
12865
 
12866
    // isset id assignments
12867
    private static final int __PURCHASEID_ISSET_ID = 0;
12868
    private static final int __ITEMID_ISSET_ID = 1;
12869
    private static final int __QUANTITY_ISSET_ID = 2;
12870
    private BitSet __isset_bit_vector = new BitSet(3);
12871
 
12872
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12873
    static {
12874
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12875
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12876
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12877
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12878
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12879
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12880
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12881
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12882
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_args.class, metaDataMap);
12883
    }
12884
 
12885
    public unFulfillPO_args() {
12886
    }
12887
 
12888
    public unFulfillPO_args(
12889
      long purchaseId,
12890
      long itemId,
12891
      long quantity)
12892
    {
12893
      this();
12894
      this.purchaseId = purchaseId;
12895
      setPurchaseIdIsSet(true);
12896
      this.itemId = itemId;
12897
      setItemIdIsSet(true);
12898
      this.quantity = quantity;
12899
      setQuantityIsSet(true);
12900
    }
12901
 
12902
    /**
12903
     * Performs a deep copy on <i>other</i>.
12904
     */
12905
    public unFulfillPO_args(unFulfillPO_args other) {
12906
      __isset_bit_vector.clear();
12907
      __isset_bit_vector.or(other.__isset_bit_vector);
12908
      this.purchaseId = other.purchaseId;
12909
      this.itemId = other.itemId;
12910
      this.quantity = other.quantity;
12911
    }
12912
 
12913
    public unFulfillPO_args deepCopy() {
12914
      return new unFulfillPO_args(this);
12915
    }
12916
 
12917
    @Override
12918
    public void clear() {
12919
      setPurchaseIdIsSet(false);
12920
      this.purchaseId = 0;
12921
      setItemIdIsSet(false);
12922
      this.itemId = 0;
12923
      setQuantityIsSet(false);
12924
      this.quantity = 0;
12925
    }
12926
 
12927
    public long getPurchaseId() {
12928
      return this.purchaseId;
12929
    }
12930
 
12931
    public void setPurchaseId(long purchaseId) {
12932
      this.purchaseId = purchaseId;
12933
      setPurchaseIdIsSet(true);
12934
    }
12935
 
12936
    public void unsetPurchaseId() {
12937
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
12938
    }
12939
 
12940
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
12941
    public boolean isSetPurchaseId() {
12942
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
12943
    }
12944
 
12945
    public void setPurchaseIdIsSet(boolean value) {
12946
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
12947
    }
12948
 
12949
    public long getItemId() {
12950
      return this.itemId;
12951
    }
12952
 
12953
    public void setItemId(long itemId) {
12954
      this.itemId = itemId;
12955
      setItemIdIsSet(true);
12956
    }
12957
 
12958
    public void unsetItemId() {
12959
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
12960
    }
12961
 
12962
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
12963
    public boolean isSetItemId() {
12964
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
12965
    }
12966
 
12967
    public void setItemIdIsSet(boolean value) {
12968
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
12969
    }
12970
 
12971
    public long getQuantity() {
12972
      return this.quantity;
12973
    }
12974
 
12975
    public void setQuantity(long quantity) {
12976
      this.quantity = quantity;
12977
      setQuantityIsSet(true);
12978
    }
12979
 
12980
    public void unsetQuantity() {
12981
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
12982
    }
12983
 
12984
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
12985
    public boolean isSetQuantity() {
12986
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
12987
    }
12988
 
12989
    public void setQuantityIsSet(boolean value) {
12990
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
12991
    }
12992
 
12993
    public void setFieldValue(_Fields field, Object value) {
12994
      switch (field) {
12995
      case PURCHASE_ID:
12996
        if (value == null) {
12997
          unsetPurchaseId();
12998
        } else {
12999
          setPurchaseId((Long)value);
13000
        }
13001
        break;
13002
 
13003
      case ITEM_ID:
13004
        if (value == null) {
13005
          unsetItemId();
13006
        } else {
13007
          setItemId((Long)value);
13008
        }
13009
        break;
13010
 
13011
      case QUANTITY:
13012
        if (value == null) {
13013
          unsetQuantity();
13014
        } else {
13015
          setQuantity((Long)value);
13016
        }
13017
        break;
13018
 
13019
      }
13020
    }
13021
 
13022
    public Object getFieldValue(_Fields field) {
13023
      switch (field) {
13024
      case PURCHASE_ID:
13025
        return Long.valueOf(getPurchaseId());
13026
 
13027
      case ITEM_ID:
13028
        return Long.valueOf(getItemId());
13029
 
13030
      case QUANTITY:
13031
        return Long.valueOf(getQuantity());
13032
 
13033
      }
13034
      throw new IllegalStateException();
13035
    }
13036
 
13037
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13038
    public boolean isSet(_Fields field) {
13039
      if (field == null) {
13040
        throw new IllegalArgumentException();
13041
      }
13042
 
13043
      switch (field) {
13044
      case PURCHASE_ID:
13045
        return isSetPurchaseId();
13046
      case ITEM_ID:
13047
        return isSetItemId();
13048
      case QUANTITY:
13049
        return isSetQuantity();
13050
      }
13051
      throw new IllegalStateException();
13052
    }
13053
 
13054
    @Override
13055
    public boolean equals(Object that) {
13056
      if (that == null)
13057
        return false;
13058
      if (that instanceof unFulfillPO_args)
13059
        return this.equals((unFulfillPO_args)that);
13060
      return false;
13061
    }
13062
 
13063
    public boolean equals(unFulfillPO_args that) {
13064
      if (that == null)
13065
        return false;
13066
 
13067
      boolean this_present_purchaseId = true;
13068
      boolean that_present_purchaseId = true;
13069
      if (this_present_purchaseId || that_present_purchaseId) {
13070
        if (!(this_present_purchaseId && that_present_purchaseId))
13071
          return false;
13072
        if (this.purchaseId != that.purchaseId)
13073
          return false;
13074
      }
13075
 
13076
      boolean this_present_itemId = true;
13077
      boolean that_present_itemId = true;
13078
      if (this_present_itemId || that_present_itemId) {
13079
        if (!(this_present_itemId && that_present_itemId))
13080
          return false;
13081
        if (this.itemId != that.itemId)
13082
          return false;
13083
      }
13084
 
13085
      boolean this_present_quantity = true;
13086
      boolean that_present_quantity = true;
13087
      if (this_present_quantity || that_present_quantity) {
13088
        if (!(this_present_quantity && that_present_quantity))
13089
          return false;
13090
        if (this.quantity != that.quantity)
13091
          return false;
13092
      }
13093
 
13094
      return true;
13095
    }
13096
 
13097
    @Override
13098
    public int hashCode() {
13099
      return 0;
13100
    }
13101
 
13102
    public int compareTo(unFulfillPO_args other) {
13103
      if (!getClass().equals(other.getClass())) {
13104
        return getClass().getName().compareTo(other.getClass().getName());
13105
      }
13106
 
13107
      int lastComparison = 0;
13108
      unFulfillPO_args typedOther = (unFulfillPO_args)other;
13109
 
13110
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
13111
      if (lastComparison != 0) {
13112
        return lastComparison;
13113
      }
13114
      if (isSetPurchaseId()) {
13115
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
13116
        if (lastComparison != 0) {
13117
          return lastComparison;
13118
        }
13119
      }
13120
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
13121
      if (lastComparison != 0) {
13122
        return lastComparison;
13123
      }
13124
      if (isSetItemId()) {
13125
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
13126
        if (lastComparison != 0) {
13127
          return lastComparison;
13128
        }
13129
      }
13130
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
13131
      if (lastComparison != 0) {
13132
        return lastComparison;
13133
      }
13134
      if (isSetQuantity()) {
13135
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
13136
        if (lastComparison != 0) {
13137
          return lastComparison;
13138
        }
13139
      }
13140
      return 0;
13141
    }
13142
 
13143
    public _Fields fieldForId(int fieldId) {
13144
      return _Fields.findByThriftId(fieldId);
13145
    }
13146
 
13147
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13148
      org.apache.thrift.protocol.TField field;
13149
      iprot.readStructBegin();
13150
      while (true)
13151
      {
13152
        field = iprot.readFieldBegin();
13153
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13154
          break;
13155
        }
13156
        switch (field.id) {
13157
          case 1: // PURCHASE_ID
13158
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13159
              this.purchaseId = iprot.readI64();
13160
              setPurchaseIdIsSet(true);
13161
            } else { 
13162
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13163
            }
13164
            break;
13165
          case 2: // ITEM_ID
13166
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13167
              this.itemId = iprot.readI64();
13168
              setItemIdIsSet(true);
13169
            } else { 
13170
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13171
            }
13172
            break;
13173
          case 3: // QUANTITY
13174
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13175
              this.quantity = iprot.readI64();
13176
              setQuantityIsSet(true);
13177
            } else { 
13178
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13179
            }
13180
            break;
13181
          default:
13182
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13183
        }
13184
        iprot.readFieldEnd();
13185
      }
13186
      iprot.readStructEnd();
13187
      validate();
13188
    }
13189
 
13190
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13191
      validate();
13192
 
13193
      oprot.writeStructBegin(STRUCT_DESC);
13194
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
13195
      oprot.writeI64(this.purchaseId);
13196
      oprot.writeFieldEnd();
13197
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
13198
      oprot.writeI64(this.itemId);
13199
      oprot.writeFieldEnd();
13200
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
13201
      oprot.writeI64(this.quantity);
13202
      oprot.writeFieldEnd();
13203
      oprot.writeFieldStop();
13204
      oprot.writeStructEnd();
13205
    }
13206
 
13207
    @Override
13208
    public String toString() {
13209
      StringBuilder sb = new StringBuilder("unFulfillPO_args(");
13210
      boolean first = true;
13211
 
13212
      sb.append("purchaseId:");
13213
      sb.append(this.purchaseId);
13214
      first = false;
13215
      if (!first) sb.append(", ");
13216
      sb.append("itemId:");
13217
      sb.append(this.itemId);
13218
      first = false;
13219
      if (!first) sb.append(", ");
13220
      sb.append("quantity:");
13221
      sb.append(this.quantity);
13222
      first = false;
13223
      sb.append(")");
13224
      return sb.toString();
13225
    }
13226
 
13227
    public void validate() throws org.apache.thrift.TException {
13228
      // check for required fields
13229
    }
13230
 
13231
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13232
      try {
13233
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13234
      } catch (org.apache.thrift.TException te) {
13235
        throw new java.io.IOException(te);
13236
      }
13237
    }
13238
 
13239
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13240
      try {
13241
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
13242
        __isset_bit_vector = new BitSet(1);
13243
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13244
      } catch (org.apache.thrift.TException te) {
13245
        throw new java.io.IOException(te);
13246
      }
13247
    }
13248
 
13249
  }
13250
 
13251
  public static class unFulfillPO_result implements org.apache.thrift.TBase<unFulfillPO_result, unFulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
13252
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_result");
13253
 
13254
    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);
13255
 
13256
    private PurchaseServiceException e; // required
13257
 
13258
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13259
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13260
      E((short)1, "e");
13261
 
13262
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13263
 
13264
      static {
13265
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13266
          byName.put(field.getFieldName(), field);
13267
        }
13268
      }
13269
 
13270
      /**
13271
       * Find the _Fields constant that matches fieldId, or null if its not found.
13272
       */
13273
      public static _Fields findByThriftId(int fieldId) {
13274
        switch(fieldId) {
13275
          case 1: // E
13276
            return E;
13277
          default:
13278
            return null;
13279
        }
13280
      }
13281
 
13282
      /**
13283
       * Find the _Fields constant that matches fieldId, throwing an exception
13284
       * if it is not found.
13285
       */
13286
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13287
        _Fields fields = findByThriftId(fieldId);
13288
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13289
        return fields;
13290
      }
13291
 
13292
      /**
13293
       * Find the _Fields constant that matches name, or null if its not found.
13294
       */
13295
      public static _Fields findByName(String name) {
13296
        return byName.get(name);
13297
      }
13298
 
13299
      private final short _thriftId;
13300
      private final String _fieldName;
13301
 
13302
      _Fields(short thriftId, String fieldName) {
13303
        _thriftId = thriftId;
13304
        _fieldName = fieldName;
13305
      }
13306
 
13307
      public short getThriftFieldId() {
13308
        return _thriftId;
13309
      }
13310
 
13311
      public String getFieldName() {
13312
        return _fieldName;
13313
      }
13314
    }
13315
 
13316
    // isset id assignments
13317
 
13318
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13319
    static {
13320
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13321
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13322
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
13323
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13324
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_result.class, metaDataMap);
13325
    }
13326
 
13327
    public unFulfillPO_result() {
13328
    }
13329
 
13330
    public unFulfillPO_result(
13331
      PurchaseServiceException e)
13332
    {
13333
      this();
13334
      this.e = e;
13335
    }
13336
 
13337
    /**
13338
     * Performs a deep copy on <i>other</i>.
13339
     */
13340
    public unFulfillPO_result(unFulfillPO_result other) {
13341
      if (other.isSetE()) {
13342
        this.e = new PurchaseServiceException(other.e);
13343
      }
13344
    }
13345
 
13346
    public unFulfillPO_result deepCopy() {
13347
      return new unFulfillPO_result(this);
13348
    }
13349
 
13350
    @Override
13351
    public void clear() {
13352
      this.e = null;
13353
    }
13354
 
13355
    public PurchaseServiceException getE() {
13356
      return this.e;
13357
    }
13358
 
13359
    public void setE(PurchaseServiceException e) {
13360
      this.e = e;
13361
    }
13362
 
13363
    public void unsetE() {
13364
      this.e = null;
13365
    }
13366
 
13367
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
13368
    public boolean isSetE() {
13369
      return this.e != null;
13370
    }
13371
 
13372
    public void setEIsSet(boolean value) {
13373
      if (!value) {
13374
        this.e = null;
13375
      }
13376
    }
13377
 
13378
    public void setFieldValue(_Fields field, Object value) {
13379
      switch (field) {
13380
      case E:
13381
        if (value == null) {
13382
          unsetE();
13383
        } else {
13384
          setE((PurchaseServiceException)value);
13385
        }
13386
        break;
13387
 
13388
      }
13389
    }
13390
 
13391
    public Object getFieldValue(_Fields field) {
13392
      switch (field) {
13393
      case E:
13394
        return getE();
13395
 
13396
      }
13397
      throw new IllegalStateException();
13398
    }
13399
 
13400
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13401
    public boolean isSet(_Fields field) {
13402
      if (field == null) {
13403
        throw new IllegalArgumentException();
13404
      }
13405
 
13406
      switch (field) {
13407
      case E:
13408
        return isSetE();
13409
      }
13410
      throw new IllegalStateException();
13411
    }
13412
 
13413
    @Override
13414
    public boolean equals(Object that) {
13415
      if (that == null)
13416
        return false;
13417
      if (that instanceof unFulfillPO_result)
13418
        return this.equals((unFulfillPO_result)that);
13419
      return false;
13420
    }
13421
 
13422
    public boolean equals(unFulfillPO_result that) {
13423
      if (that == null)
13424
        return false;
13425
 
13426
      boolean this_present_e = true && this.isSetE();
13427
      boolean that_present_e = true && that.isSetE();
13428
      if (this_present_e || that_present_e) {
13429
        if (!(this_present_e && that_present_e))
13430
          return false;
13431
        if (!this.e.equals(that.e))
13432
          return false;
13433
      }
13434
 
13435
      return true;
13436
    }
13437
 
13438
    @Override
13439
    public int hashCode() {
13440
      return 0;
13441
    }
13442
 
13443
    public int compareTo(unFulfillPO_result other) {
13444
      if (!getClass().equals(other.getClass())) {
13445
        return getClass().getName().compareTo(other.getClass().getName());
13446
      }
13447
 
13448
      int lastComparison = 0;
13449
      unFulfillPO_result typedOther = (unFulfillPO_result)other;
13450
 
13451
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
13452
      if (lastComparison != 0) {
13453
        return lastComparison;
13454
      }
13455
      if (isSetE()) {
13456
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
13457
        if (lastComparison != 0) {
13458
          return lastComparison;
13459
        }
13460
      }
13461
      return 0;
13462
    }
13463
 
13464
    public _Fields fieldForId(int fieldId) {
13465
      return _Fields.findByThriftId(fieldId);
13466
    }
13467
 
13468
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13469
      org.apache.thrift.protocol.TField field;
13470
      iprot.readStructBegin();
13471
      while (true)
13472
      {
13473
        field = iprot.readFieldBegin();
13474
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13475
          break;
13476
        }
13477
        switch (field.id) {
13478
          case 1: // E
13479
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
13480
              this.e = new PurchaseServiceException();
13481
              this.e.read(iprot);
13482
            } else { 
13483
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13484
            }
13485
            break;
13486
          default:
13487
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13488
        }
13489
        iprot.readFieldEnd();
13490
      }
13491
      iprot.readStructEnd();
13492
      validate();
13493
    }
13494
 
13495
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13496
      oprot.writeStructBegin(STRUCT_DESC);
13497
 
13498
      if (this.isSetE()) {
13499
        oprot.writeFieldBegin(E_FIELD_DESC);
13500
        this.e.write(oprot);
13501
        oprot.writeFieldEnd();
13502
      }
13503
      oprot.writeFieldStop();
13504
      oprot.writeStructEnd();
13505
    }
13506
 
13507
    @Override
13508
    public String toString() {
13509
      StringBuilder sb = new StringBuilder("unFulfillPO_result(");
13510
      boolean first = true;
13511
 
13512
      sb.append("e:");
13513
      if (this.e == null) {
13514
        sb.append("null");
13515
      } else {
13516
        sb.append(this.e);
13517
      }
13518
      first = false;
13519
      sb.append(")");
13520
      return sb.toString();
13521
    }
13522
 
13523
    public void validate() throws org.apache.thrift.TException {
13524
      // check for required fields
13525
    }
13526
 
13527
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13528
      try {
13529
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13530
      } catch (org.apache.thrift.TException te) {
13531
        throw new java.io.IOException(te);
13532
      }
13533
    }
13534
 
13535
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13536
      try {
13537
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13538
      } catch (org.apache.thrift.TException te) {
13539
        throw new java.io.IOException(te);
13540
      }
13541
    }
13542
 
13543
  }
13544
 
5443 mandeep.dh 13545
  public static class getInvoices_args implements org.apache.thrift.TBase<getInvoices_args, getInvoices_args._Fields>, java.io.Serializable, Cloneable   {
13546
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_args");
13547
 
13548
    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);
13549
 
13550
    private long date; // required
13551
 
13552
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13553
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13554
      DATE((short)1, "date");
13555
 
13556
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13557
 
13558
      static {
13559
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13560
          byName.put(field.getFieldName(), field);
13561
        }
13562
      }
13563
 
13564
      /**
13565
       * Find the _Fields constant that matches fieldId, or null if its not found.
13566
       */
13567
      public static _Fields findByThriftId(int fieldId) {
13568
        switch(fieldId) {
13569
          case 1: // DATE
13570
            return DATE;
13571
          default:
13572
            return null;
13573
        }
13574
      }
13575
 
13576
      /**
13577
       * Find the _Fields constant that matches fieldId, throwing an exception
13578
       * if it is not found.
13579
       */
13580
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13581
        _Fields fields = findByThriftId(fieldId);
13582
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13583
        return fields;
13584
      }
13585
 
13586
      /**
13587
       * Find the _Fields constant that matches name, or null if its not found.
13588
       */
13589
      public static _Fields findByName(String name) {
13590
        return byName.get(name);
13591
      }
13592
 
13593
      private final short _thriftId;
13594
      private final String _fieldName;
13595
 
13596
      _Fields(short thriftId, String fieldName) {
13597
        _thriftId = thriftId;
13598
        _fieldName = fieldName;
13599
      }
13600
 
13601
      public short getThriftFieldId() {
13602
        return _thriftId;
13603
      }
13604
 
13605
      public String getFieldName() {
13606
        return _fieldName;
13607
      }
13608
    }
13609
 
13610
    // isset id assignments
13611
    private static final int __DATE_ISSET_ID = 0;
13612
    private BitSet __isset_bit_vector = new BitSet(1);
13613
 
13614
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13615
    static {
13616
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13617
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13618
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13619
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13620
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_args.class, metaDataMap);
13621
    }
13622
 
13623
    public getInvoices_args() {
13624
    }
13625
 
13626
    public getInvoices_args(
13627
      long date)
13628
    {
13629
      this();
13630
      this.date = date;
13631
      setDateIsSet(true);
13632
    }
13633
 
13634
    /**
13635
     * Performs a deep copy on <i>other</i>.
13636
     */
13637
    public getInvoices_args(getInvoices_args other) {
13638
      __isset_bit_vector.clear();
13639
      __isset_bit_vector.or(other.__isset_bit_vector);
13640
      this.date = other.date;
13641
    }
13642
 
13643
    public getInvoices_args deepCopy() {
13644
      return new getInvoices_args(this);
13645
    }
13646
 
13647
    @Override
13648
    public void clear() {
13649
      setDateIsSet(false);
13650
      this.date = 0;
13651
    }
13652
 
13653
    public long getDate() {
13654
      return this.date;
13655
    }
13656
 
13657
    public void setDate(long date) {
13658
      this.date = date;
13659
      setDateIsSet(true);
13660
    }
13661
 
13662
    public void unsetDate() {
13663
      __isset_bit_vector.clear(__DATE_ISSET_ID);
13664
    }
13665
 
13666
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
13667
    public boolean isSetDate() {
13668
      return __isset_bit_vector.get(__DATE_ISSET_ID);
13669
    }
13670
 
13671
    public void setDateIsSet(boolean value) {
13672
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
13673
    }
13674
 
13675
    public void setFieldValue(_Fields field, Object value) {
13676
      switch (field) {
13677
      case DATE:
13678
        if (value == null) {
13679
          unsetDate();
13680
        } else {
13681
          setDate((Long)value);
13682
        }
13683
        break;
13684
 
13685
      }
13686
    }
13687
 
13688
    public Object getFieldValue(_Fields field) {
13689
      switch (field) {
13690
      case DATE:
13691
        return Long.valueOf(getDate());
13692
 
13693
      }
13694
      throw new IllegalStateException();
13695
    }
13696
 
13697
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13698
    public boolean isSet(_Fields field) {
13699
      if (field == null) {
13700
        throw new IllegalArgumentException();
13701
      }
13702
 
13703
      switch (field) {
13704
      case DATE:
13705
        return isSetDate();
13706
      }
13707
      throw new IllegalStateException();
13708
    }
13709
 
13710
    @Override
13711
    public boolean equals(Object that) {
13712
      if (that == null)
13713
        return false;
13714
      if (that instanceof getInvoices_args)
13715
        return this.equals((getInvoices_args)that);
13716
      return false;
13717
    }
13718
 
13719
    public boolean equals(getInvoices_args that) {
13720
      if (that == null)
13721
        return false;
13722
 
13723
      boolean this_present_date = true;
13724
      boolean that_present_date = true;
13725
      if (this_present_date || that_present_date) {
13726
        if (!(this_present_date && that_present_date))
13727
          return false;
13728
        if (this.date != that.date)
13729
          return false;
13730
      }
13731
 
13732
      return true;
13733
    }
13734
 
13735
    @Override
13736
    public int hashCode() {
13737
      return 0;
13738
    }
13739
 
13740
    public int compareTo(getInvoices_args other) {
13741
      if (!getClass().equals(other.getClass())) {
13742
        return getClass().getName().compareTo(other.getClass().getName());
13743
      }
13744
 
13745
      int lastComparison = 0;
13746
      getInvoices_args typedOther = (getInvoices_args)other;
13747
 
13748
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
13749
      if (lastComparison != 0) {
13750
        return lastComparison;
13751
      }
13752
      if (isSetDate()) {
13753
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
13754
        if (lastComparison != 0) {
13755
          return lastComparison;
13756
        }
13757
      }
13758
      return 0;
13759
    }
13760
 
13761
    public _Fields fieldForId(int fieldId) {
13762
      return _Fields.findByThriftId(fieldId);
13763
    }
13764
 
13765
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13766
      org.apache.thrift.protocol.TField field;
13767
      iprot.readStructBegin();
13768
      while (true)
13769
      {
13770
        field = iprot.readFieldBegin();
13771
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13772
          break;
13773
        }
13774
        switch (field.id) {
13775
          case 1: // DATE
13776
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13777
              this.date = iprot.readI64();
13778
              setDateIsSet(true);
13779
            } else { 
13780
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13781
            }
13782
            break;
13783
          default:
13784
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13785
        }
13786
        iprot.readFieldEnd();
13787
      }
13788
      iprot.readStructEnd();
13789
      validate();
13790
    }
13791
 
13792
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13793
      validate();
13794
 
13795
      oprot.writeStructBegin(STRUCT_DESC);
13796
      oprot.writeFieldBegin(DATE_FIELD_DESC);
13797
      oprot.writeI64(this.date);
13798
      oprot.writeFieldEnd();
13799
      oprot.writeFieldStop();
13800
      oprot.writeStructEnd();
13801
    }
13802
 
13803
    @Override
13804
    public String toString() {
13805
      StringBuilder sb = new StringBuilder("getInvoices_args(");
13806
      boolean first = true;
13807
 
13808
      sb.append("date:");
13809
      sb.append(this.date);
13810
      first = false;
13811
      sb.append(")");
13812
      return sb.toString();
13813
    }
13814
 
13815
    public void validate() throws org.apache.thrift.TException {
13816
      // check for required fields
13817
    }
13818
 
13819
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13820
      try {
13821
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13822
      } catch (org.apache.thrift.TException te) {
13823
        throw new java.io.IOException(te);
13824
      }
13825
    }
13826
 
13827
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13828
      try {
13829
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
13830
        __isset_bit_vector = new BitSet(1);
13831
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13832
      } catch (org.apache.thrift.TException te) {
13833
        throw new java.io.IOException(te);
13834
      }
13835
    }
13836
 
13837
  }
13838
 
13839
  public static class getInvoices_result implements org.apache.thrift.TBase<getInvoices_result, getInvoices_result._Fields>, java.io.Serializable, Cloneable   {
13840
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_result");
13841
 
13842
    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);
13843
 
13844
    private List<Invoice> success; // required
13845
 
13846
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13847
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13848
      SUCCESS((short)0, "success");
13849
 
13850
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13851
 
13852
      static {
13853
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13854
          byName.put(field.getFieldName(), field);
13855
        }
13856
      }
13857
 
13858
      /**
13859
       * Find the _Fields constant that matches fieldId, or null if its not found.
13860
       */
13861
      public static _Fields findByThriftId(int fieldId) {
13862
        switch(fieldId) {
13863
          case 0: // SUCCESS
13864
            return SUCCESS;
13865
          default:
13866
            return null;
13867
        }
13868
      }
13869
 
13870
      /**
13871
       * Find the _Fields constant that matches fieldId, throwing an exception
13872
       * if it is not found.
13873
       */
13874
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13875
        _Fields fields = findByThriftId(fieldId);
13876
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13877
        return fields;
13878
      }
13879
 
13880
      /**
13881
       * Find the _Fields constant that matches name, or null if its not found.
13882
       */
13883
      public static _Fields findByName(String name) {
13884
        return byName.get(name);
13885
      }
13886
 
13887
      private final short _thriftId;
13888
      private final String _fieldName;
13889
 
13890
      _Fields(short thriftId, String fieldName) {
13891
        _thriftId = thriftId;
13892
        _fieldName = fieldName;
13893
      }
13894
 
13895
      public short getThriftFieldId() {
13896
        return _thriftId;
13897
      }
13898
 
13899
      public String getFieldName() {
13900
        return _fieldName;
13901
      }
13902
    }
13903
 
13904
    // isset id assignments
13905
 
13906
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13907
    static {
13908
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13909
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13910
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
13911
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class))));
13912
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13913
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_result.class, metaDataMap);
13914
    }
13915
 
13916
    public getInvoices_result() {
13917
    }
13918
 
13919
    public getInvoices_result(
13920
      List<Invoice> success)
13921
    {
13922
      this();
13923
      this.success = success;
13924
    }
13925
 
13926
    /**
13927
     * Performs a deep copy on <i>other</i>.
13928
     */
13929
    public getInvoices_result(getInvoices_result other) {
13930
      if (other.isSetSuccess()) {
13931
        List<Invoice> __this__success = new ArrayList<Invoice>();
13932
        for (Invoice other_element : other.success) {
13933
          __this__success.add(new Invoice(other_element));
13934
        }
13935
        this.success = __this__success;
13936
      }
13937
    }
13938
 
13939
    public getInvoices_result deepCopy() {
13940
      return new getInvoices_result(this);
13941
    }
13942
 
13943
    @Override
13944
    public void clear() {
13945
      this.success = null;
13946
    }
13947
 
13948
    public int getSuccessSize() {
13949
      return (this.success == null) ? 0 : this.success.size();
13950
    }
13951
 
13952
    public java.util.Iterator<Invoice> getSuccessIterator() {
13953
      return (this.success == null) ? null : this.success.iterator();
13954
    }
13955
 
13956
    public void addToSuccess(Invoice elem) {
13957
      if (this.success == null) {
13958
        this.success = new ArrayList<Invoice>();
13959
      }
13960
      this.success.add(elem);
13961
    }
13962
 
13963
    public List<Invoice> getSuccess() {
13964
      return this.success;
13965
    }
13966
 
13967
    public void setSuccess(List<Invoice> success) {
13968
      this.success = success;
13969
    }
13970
 
13971
    public void unsetSuccess() {
13972
      this.success = null;
13973
    }
13974
 
13975
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
13976
    public boolean isSetSuccess() {
13977
      return this.success != null;
13978
    }
13979
 
13980
    public void setSuccessIsSet(boolean value) {
13981
      if (!value) {
13982
        this.success = null;
13983
      }
13984
    }
13985
 
13986
    public void setFieldValue(_Fields field, Object value) {
13987
      switch (field) {
13988
      case SUCCESS:
13989
        if (value == null) {
13990
          unsetSuccess();
13991
        } else {
13992
          setSuccess((List<Invoice>)value);
13993
        }
13994
        break;
13995
 
13996
      }
13997
    }
13998
 
13999
    public Object getFieldValue(_Fields field) {
14000
      switch (field) {
14001
      case SUCCESS:
14002
        return getSuccess();
14003
 
14004
      }
14005
      throw new IllegalStateException();
14006
    }
14007
 
14008
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14009
    public boolean isSet(_Fields field) {
14010
      if (field == null) {
14011
        throw new IllegalArgumentException();
14012
      }
14013
 
14014
      switch (field) {
14015
      case SUCCESS:
14016
        return isSetSuccess();
14017
      }
14018
      throw new IllegalStateException();
14019
    }
14020
 
14021
    @Override
14022
    public boolean equals(Object that) {
14023
      if (that == null)
14024
        return false;
14025
      if (that instanceof getInvoices_result)
14026
        return this.equals((getInvoices_result)that);
14027
      return false;
14028
    }
14029
 
14030
    public boolean equals(getInvoices_result that) {
14031
      if (that == null)
14032
        return false;
14033
 
14034
      boolean this_present_success = true && this.isSetSuccess();
14035
      boolean that_present_success = true && that.isSetSuccess();
14036
      if (this_present_success || that_present_success) {
14037
        if (!(this_present_success && that_present_success))
14038
          return false;
14039
        if (!this.success.equals(that.success))
14040
          return false;
14041
      }
14042
 
14043
      return true;
14044
    }
14045
 
14046
    @Override
14047
    public int hashCode() {
14048
      return 0;
14049
    }
14050
 
14051
    public int compareTo(getInvoices_result other) {
14052
      if (!getClass().equals(other.getClass())) {
14053
        return getClass().getName().compareTo(other.getClass().getName());
14054
      }
14055
 
14056
      int lastComparison = 0;
14057
      getInvoices_result typedOther = (getInvoices_result)other;
14058
 
14059
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
14060
      if (lastComparison != 0) {
14061
        return lastComparison;
14062
      }
14063
      if (isSetSuccess()) {
14064
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
14065
        if (lastComparison != 0) {
14066
          return lastComparison;
14067
        }
14068
      }
14069
      return 0;
14070
    }
14071
 
14072
    public _Fields fieldForId(int fieldId) {
14073
      return _Fields.findByThriftId(fieldId);
14074
    }
14075
 
14076
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14077
      org.apache.thrift.protocol.TField field;
14078
      iprot.readStructBegin();
14079
      while (true)
14080
      {
14081
        field = iprot.readFieldBegin();
14082
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14083
          break;
14084
        }
14085
        switch (field.id) {
14086
          case 0: // SUCCESS
14087
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
14088
              {
21847 amit.gupta 14089
                org.apache.thrift.protocol.TList _list28 = iprot.readListBegin();
14090
                this.success = new ArrayList<Invoice>(_list28.size);
14091
                for (int _i29 = 0; _i29 < _list28.size; ++_i29)
5443 mandeep.dh 14092
                {
21847 amit.gupta 14093
                  Invoice _elem30; // required
14094
                  _elem30 = new Invoice();
14095
                  _elem30.read(iprot);
14096
                  this.success.add(_elem30);
5443 mandeep.dh 14097
                }
14098
                iprot.readListEnd();
14099
              }
14100
            } else { 
14101
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14102
            }
14103
            break;
14104
          default:
14105
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14106
        }
14107
        iprot.readFieldEnd();
14108
      }
14109
      iprot.readStructEnd();
14110
      validate();
14111
    }
14112
 
14113
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14114
      oprot.writeStructBegin(STRUCT_DESC);
14115
 
14116
      if (this.isSetSuccess()) {
14117
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14118
        {
14119
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
21847 amit.gupta 14120
          for (Invoice _iter31 : this.success)
5443 mandeep.dh 14121
          {
21847 amit.gupta 14122
            _iter31.write(oprot);
5443 mandeep.dh 14123
          }
14124
          oprot.writeListEnd();
14125
        }
14126
        oprot.writeFieldEnd();
14127
      }
14128
      oprot.writeFieldStop();
14129
      oprot.writeStructEnd();
14130
    }
14131
 
14132
    @Override
14133
    public String toString() {
14134
      StringBuilder sb = new StringBuilder("getInvoices_result(");
14135
      boolean first = true;
14136
 
14137
      sb.append("success:");
14138
      if (this.success == null) {
14139
        sb.append("null");
14140
      } else {
14141
        sb.append(this.success);
14142
      }
14143
      first = false;
14144
      sb.append(")");
14145
      return sb.toString();
14146
    }
14147
 
14148
    public void validate() throws org.apache.thrift.TException {
14149
      // check for required fields
14150
    }
14151
 
14152
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14153
      try {
14154
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14155
      } catch (org.apache.thrift.TException te) {
14156
        throw new java.io.IOException(te);
14157
      }
14158
    }
14159
 
14160
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14161
      try {
14162
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14163
      } catch (org.apache.thrift.TException te) {
14164
        throw new java.io.IOException(te);
14165
      }
14166
    }
14167
 
14168
  }
14169
 
7410 amar.kumar 14170
  public static class getInvoicesForWarehouse_args implements org.apache.thrift.TBase<getInvoicesForWarehouse_args, getInvoicesForWarehouse_args._Fields>, java.io.Serializable, Cloneable   {
14171
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoicesForWarehouse_args");
14172
 
14173
    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);
14174
    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);
14175
    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);
14176
 
14177
    private long warehouseId; // required
14178
    private long supplierId; // required
14179
    private long date; // required
14180
 
14181
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14182
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14183
      WAREHOUSE_ID((short)1, "warehouseId"),
14184
      SUPPLIER_ID((short)2, "supplierId"),
14185
      DATE((short)3, "date");
14186
 
14187
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14188
 
14189
      static {
14190
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14191
          byName.put(field.getFieldName(), field);
14192
        }
14193
      }
14194
 
14195
      /**
14196
       * Find the _Fields constant that matches fieldId, or null if its not found.
14197
       */
14198
      public static _Fields findByThriftId(int fieldId) {
14199
        switch(fieldId) {
14200
          case 1: // WAREHOUSE_ID
14201
            return WAREHOUSE_ID;
14202
          case 2: // SUPPLIER_ID
14203
            return SUPPLIER_ID;
14204
          case 3: // DATE
14205
            return DATE;
14206
          default:
14207
            return null;
14208
        }
14209
      }
14210
 
14211
      /**
14212
       * Find the _Fields constant that matches fieldId, throwing an exception
14213
       * if it is not found.
14214
       */
14215
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14216
        _Fields fields = findByThriftId(fieldId);
14217
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14218
        return fields;
14219
      }
14220
 
14221
      /**
14222
       * Find the _Fields constant that matches name, or null if its not found.
14223
       */
14224
      public static _Fields findByName(String name) {
14225
        return byName.get(name);
14226
      }
14227
 
14228
      private final short _thriftId;
14229
      private final String _fieldName;
14230
 
14231
      _Fields(short thriftId, String fieldName) {
14232
        _thriftId = thriftId;
14233
        _fieldName = fieldName;
14234
      }
14235
 
14236
      public short getThriftFieldId() {
14237
        return _thriftId;
14238
      }
14239
 
14240
      public String getFieldName() {
14241
        return _fieldName;
14242
      }
14243
    }
14244
 
14245
    // isset id assignments
14246
    private static final int __WAREHOUSEID_ISSET_ID = 0;
14247
    private static final int __SUPPLIERID_ISSET_ID = 1;
14248
    private static final int __DATE_ISSET_ID = 2;
14249
    private BitSet __isset_bit_vector = new BitSet(3);
14250
 
14251
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14252
    static {
14253
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14254
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14255
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
14256
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14257
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
14258
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14259
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
14260
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14261
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoicesForWarehouse_args.class, metaDataMap);
14262
    }
14263
 
14264
    public getInvoicesForWarehouse_args() {
14265
    }
14266
 
14267
    public getInvoicesForWarehouse_args(
14268
      long warehouseId,
14269
      long supplierId,
14270
      long date)
14271
    {
14272
      this();
14273
      this.warehouseId = warehouseId;
14274
      setWarehouseIdIsSet(true);
14275
      this.supplierId = supplierId;
14276
      setSupplierIdIsSet(true);
14277
      this.date = date;
14278
      setDateIsSet(true);
14279
    }
14280
 
14281
    /**
14282
     * Performs a deep copy on <i>other</i>.
14283
     */
14284
    public getInvoicesForWarehouse_args(getInvoicesForWarehouse_args other) {
14285
      __isset_bit_vector.clear();
14286
      __isset_bit_vector.or(other.__isset_bit_vector);
14287
      this.warehouseId = other.warehouseId;
14288
      this.supplierId = other.supplierId;
14289
      this.date = other.date;
14290
    }
14291
 
14292
    public getInvoicesForWarehouse_args deepCopy() {
14293
      return new getInvoicesForWarehouse_args(this);
14294
    }
14295
 
14296
    @Override
14297
    public void clear() {
14298
      setWarehouseIdIsSet(false);
14299
      this.warehouseId = 0;
14300
      setSupplierIdIsSet(false);
14301
      this.supplierId = 0;
14302
      setDateIsSet(false);
14303
      this.date = 0;
14304
    }
14305
 
14306
    public long getWarehouseId() {
14307
      return this.warehouseId;
14308
    }
14309
 
14310
    public void setWarehouseId(long warehouseId) {
14311
      this.warehouseId = warehouseId;
14312
      setWarehouseIdIsSet(true);
14313
    }
14314
 
14315
    public void unsetWarehouseId() {
14316
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
14317
    }
14318
 
14319
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
14320
    public boolean isSetWarehouseId() {
14321
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
14322
    }
14323
 
14324
    public void setWarehouseIdIsSet(boolean value) {
14325
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
14326
    }
14327
 
14328
    public long getSupplierId() {
14329
      return this.supplierId;
14330
    }
14331
 
14332
    public void setSupplierId(long supplierId) {
14333
      this.supplierId = supplierId;
14334
      setSupplierIdIsSet(true);
14335
    }
14336
 
14337
    public void unsetSupplierId() {
14338
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
14339
    }
14340
 
14341
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
14342
    public boolean isSetSupplierId() {
14343
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
14344
    }
14345
 
14346
    public void setSupplierIdIsSet(boolean value) {
14347
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
14348
    }
14349
 
14350
    public long getDate() {
14351
      return this.date;
14352
    }
14353
 
14354
    public void setDate(long date) {
14355
      this.date = date;
14356
      setDateIsSet(true);
14357
    }
14358
 
14359
    public void unsetDate() {
14360
      __isset_bit_vector.clear(__DATE_ISSET_ID);
14361
    }
14362
 
14363
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
14364
    public boolean isSetDate() {
14365
      return __isset_bit_vector.get(__DATE_ISSET_ID);
14366
    }
14367
 
14368
    public void setDateIsSet(boolean value) {
14369
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
14370
    }
14371
 
14372
    public void setFieldValue(_Fields field, Object value) {
14373
      switch (field) {
14374
      case WAREHOUSE_ID:
14375
        if (value == null) {
14376
          unsetWarehouseId();
14377
        } else {
14378
          setWarehouseId((Long)value);
14379
        }
14380
        break;
14381
 
14382
      case SUPPLIER_ID:
14383
        if (value == null) {
14384
          unsetSupplierId();
14385
        } else {
14386
          setSupplierId((Long)value);
14387
        }
14388
        break;
14389
 
14390
      case DATE:
14391
        if (value == null) {
14392
          unsetDate();
14393
        } else {
14394
          setDate((Long)value);
14395
        }
14396
        break;
14397
 
14398
      }
14399
    }
14400
 
14401
    public Object getFieldValue(_Fields field) {
14402
      switch (field) {
14403
      case WAREHOUSE_ID:
14404
        return Long.valueOf(getWarehouseId());
14405
 
14406
      case SUPPLIER_ID:
14407
        return Long.valueOf(getSupplierId());
14408
 
14409
      case DATE:
14410
        return Long.valueOf(getDate());
14411
 
14412
      }
14413
      throw new IllegalStateException();
14414
    }
14415
 
14416
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14417
    public boolean isSet(_Fields field) {
14418
      if (field == null) {
14419
        throw new IllegalArgumentException();
14420
      }
14421
 
14422
      switch (field) {
14423
      case WAREHOUSE_ID:
14424
        return isSetWarehouseId();
14425
      case SUPPLIER_ID:
14426
        return isSetSupplierId();
14427
      case DATE:
14428
        return isSetDate();
14429
      }
14430
      throw new IllegalStateException();
14431
    }
14432
 
14433
    @Override
14434
    public boolean equals(Object that) {
14435
      if (that == null)
14436
        return false;
14437
      if (that instanceof getInvoicesForWarehouse_args)
14438
        return this.equals((getInvoicesForWarehouse_args)that);
14439
      return false;
14440
    }
14441
 
14442
    public boolean equals(getInvoicesForWarehouse_args that) {
14443
      if (that == null)
14444
        return false;
14445
 
14446
      boolean this_present_warehouseId = true;
14447
      boolean that_present_warehouseId = true;
14448
      if (this_present_warehouseId || that_present_warehouseId) {
14449
        if (!(this_present_warehouseId && that_present_warehouseId))
14450
          return false;
14451
        if (this.warehouseId != that.warehouseId)
14452
          return false;
14453
      }
14454
 
14455
      boolean this_present_supplierId = true;
14456
      boolean that_present_supplierId = true;
14457
      if (this_present_supplierId || that_present_supplierId) {
14458
        if (!(this_present_supplierId && that_present_supplierId))
14459
          return false;
14460
        if (this.supplierId != that.supplierId)
14461
          return false;
14462
      }
14463
 
14464
      boolean this_present_date = true;
14465
      boolean that_present_date = true;
14466
      if (this_present_date || that_present_date) {
14467
        if (!(this_present_date && that_present_date))
14468
          return false;
14469
        if (this.date != that.date)
14470
          return false;
14471
      }
14472
 
14473
      return true;
14474
    }
14475
 
14476
    @Override
14477
    public int hashCode() {
14478
      return 0;
14479
    }
14480
 
14481
    public int compareTo(getInvoicesForWarehouse_args other) {
14482
      if (!getClass().equals(other.getClass())) {
14483
        return getClass().getName().compareTo(other.getClass().getName());
14484
      }
14485
 
14486
      int lastComparison = 0;
14487
      getInvoicesForWarehouse_args typedOther = (getInvoicesForWarehouse_args)other;
14488
 
14489
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
14490
      if (lastComparison != 0) {
14491
        return lastComparison;
14492
      }
14493
      if (isSetWarehouseId()) {
14494
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
14495
        if (lastComparison != 0) {
14496
          return lastComparison;
14497
        }
14498
      }
14499
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
14500
      if (lastComparison != 0) {
14501
        return lastComparison;
14502
      }
14503
      if (isSetSupplierId()) {
14504
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
14505
        if (lastComparison != 0) {
14506
          return lastComparison;
14507
        }
14508
      }
14509
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
14510
      if (lastComparison != 0) {
14511
        return lastComparison;
14512
      }
14513
      if (isSetDate()) {
14514
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
14515
        if (lastComparison != 0) {
14516
          return lastComparison;
14517
        }
14518
      }
14519
      return 0;
14520
    }
14521
 
14522
    public _Fields fieldForId(int fieldId) {
14523
      return _Fields.findByThriftId(fieldId);
14524
    }
14525
 
14526
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14527
      org.apache.thrift.protocol.TField field;
14528
      iprot.readStructBegin();
14529
      while (true)
14530
      {
14531
        field = iprot.readFieldBegin();
14532
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14533
          break;
14534
        }
14535
        switch (field.id) {
14536
          case 1: // WAREHOUSE_ID
14537
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14538
              this.warehouseId = iprot.readI64();
14539
              setWarehouseIdIsSet(true);
14540
            } else { 
14541
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14542
            }
14543
            break;
14544
          case 2: // SUPPLIER_ID
14545
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14546
              this.supplierId = iprot.readI64();
14547
              setSupplierIdIsSet(true);
14548
            } else { 
14549
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14550
            }
14551
            break;
14552
          case 3: // DATE
14553
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14554
              this.date = iprot.readI64();
14555
              setDateIsSet(true);
14556
            } else { 
14557
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14558
            }
14559
            break;
14560
          default:
14561
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14562
        }
14563
        iprot.readFieldEnd();
14564
      }
14565
      iprot.readStructEnd();
14566
      validate();
14567
    }
14568
 
14569
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14570
      validate();
14571
 
14572
      oprot.writeStructBegin(STRUCT_DESC);
14573
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
14574
      oprot.writeI64(this.warehouseId);
14575
      oprot.writeFieldEnd();
14576
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
14577
      oprot.writeI64(this.supplierId);
14578
      oprot.writeFieldEnd();
14579
      oprot.writeFieldBegin(DATE_FIELD_DESC);
14580
      oprot.writeI64(this.date);
14581
      oprot.writeFieldEnd();
14582
      oprot.writeFieldStop();
14583
      oprot.writeStructEnd();
14584
    }
14585
 
14586
    @Override
14587
    public String toString() {
14588
      StringBuilder sb = new StringBuilder("getInvoicesForWarehouse_args(");
14589
      boolean first = true;
14590
 
14591
      sb.append("warehouseId:");
14592
      sb.append(this.warehouseId);
14593
      first = false;
14594
      if (!first) sb.append(", ");
14595
      sb.append("supplierId:");
14596
      sb.append(this.supplierId);
14597
      first = false;
14598
      if (!first) sb.append(", ");
14599
      sb.append("date:");
14600
      sb.append(this.date);
14601
      first = false;
14602
      sb.append(")");
14603
      return sb.toString();
14604
    }
14605
 
14606
    public void validate() throws org.apache.thrift.TException {
14607
      // check for required fields
14608
    }
14609
 
14610
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14611
      try {
14612
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14613
      } catch (org.apache.thrift.TException te) {
14614
        throw new java.io.IOException(te);
14615
      }
14616
    }
14617
 
14618
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14619
      try {
14620
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
14621
        __isset_bit_vector = new BitSet(1);
14622
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14623
      } catch (org.apache.thrift.TException te) {
14624
        throw new java.io.IOException(te);
14625
      }
14626
    }
14627
 
14628
  }
14629
 
14630
  public static class getInvoicesForWarehouse_result implements org.apache.thrift.TBase<getInvoicesForWarehouse_result, getInvoicesForWarehouse_result._Fields>, java.io.Serializable, Cloneable   {
14631
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoicesForWarehouse_result");
14632
 
14633
    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);
14634
 
14635
    private List<Invoice> success; // required
14636
 
14637
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14638
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14639
      SUCCESS((short)0, "success");
14640
 
14641
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14642
 
14643
      static {
14644
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14645
          byName.put(field.getFieldName(), field);
14646
        }
14647
      }
14648
 
14649
      /**
14650
       * Find the _Fields constant that matches fieldId, or null if its not found.
14651
       */
14652
      public static _Fields findByThriftId(int fieldId) {
14653
        switch(fieldId) {
14654
          case 0: // SUCCESS
14655
            return SUCCESS;
14656
          default:
14657
            return null;
14658
        }
14659
      }
14660
 
14661
      /**
14662
       * Find the _Fields constant that matches fieldId, throwing an exception
14663
       * if it is not found.
14664
       */
14665
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14666
        _Fields fields = findByThriftId(fieldId);
14667
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14668
        return fields;
14669
      }
14670
 
14671
      /**
14672
       * Find the _Fields constant that matches name, or null if its not found.
14673
       */
14674
      public static _Fields findByName(String name) {
14675
        return byName.get(name);
14676
      }
14677
 
14678
      private final short _thriftId;
14679
      private final String _fieldName;
14680
 
14681
      _Fields(short thriftId, String fieldName) {
14682
        _thriftId = thriftId;
14683
        _fieldName = fieldName;
14684
      }
14685
 
14686
      public short getThriftFieldId() {
14687
        return _thriftId;
14688
      }
14689
 
14690
      public String getFieldName() {
14691
        return _fieldName;
14692
      }
14693
    }
14694
 
14695
    // isset id assignments
14696
 
14697
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14698
    static {
14699
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14700
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14701
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
14702
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class))));
14703
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14704
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoicesForWarehouse_result.class, metaDataMap);
14705
    }
14706
 
14707
    public getInvoicesForWarehouse_result() {
14708
    }
14709
 
14710
    public getInvoicesForWarehouse_result(
14711
      List<Invoice> success)
14712
    {
14713
      this();
14714
      this.success = success;
14715
    }
14716
 
14717
    /**
14718
     * Performs a deep copy on <i>other</i>.
14719
     */
14720
    public getInvoicesForWarehouse_result(getInvoicesForWarehouse_result other) {
14721
      if (other.isSetSuccess()) {
14722
        List<Invoice> __this__success = new ArrayList<Invoice>();
14723
        for (Invoice other_element : other.success) {
14724
          __this__success.add(new Invoice(other_element));
14725
        }
14726
        this.success = __this__success;
14727
      }
14728
    }
14729
 
14730
    public getInvoicesForWarehouse_result deepCopy() {
14731
      return new getInvoicesForWarehouse_result(this);
14732
    }
14733
 
14734
    @Override
14735
    public void clear() {
14736
      this.success = null;
14737
    }
14738
 
14739
    public int getSuccessSize() {
14740
      return (this.success == null) ? 0 : this.success.size();
14741
    }
14742
 
14743
    public java.util.Iterator<Invoice> getSuccessIterator() {
14744
      return (this.success == null) ? null : this.success.iterator();
14745
    }
14746
 
14747
    public void addToSuccess(Invoice elem) {
14748
      if (this.success == null) {
14749
        this.success = new ArrayList<Invoice>();
14750
      }
14751
      this.success.add(elem);
14752
    }
14753
 
14754
    public List<Invoice> getSuccess() {
14755
      return this.success;
14756
    }
14757
 
14758
    public void setSuccess(List<Invoice> success) {
14759
      this.success = success;
14760
    }
14761
 
14762
    public void unsetSuccess() {
14763
      this.success = null;
14764
    }
14765
 
14766
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
14767
    public boolean isSetSuccess() {
14768
      return this.success != null;
14769
    }
14770
 
14771
    public void setSuccessIsSet(boolean value) {
14772
      if (!value) {
14773
        this.success = null;
14774
      }
14775
    }
14776
 
14777
    public void setFieldValue(_Fields field, Object value) {
14778
      switch (field) {
14779
      case SUCCESS:
14780
        if (value == null) {
14781
          unsetSuccess();
14782
        } else {
14783
          setSuccess((List<Invoice>)value);
14784
        }
14785
        break;
14786
 
14787
      }
14788
    }
14789
 
14790
    public Object getFieldValue(_Fields field) {
14791
      switch (field) {
14792
      case SUCCESS:
14793
        return getSuccess();
14794
 
14795
      }
14796
      throw new IllegalStateException();
14797
    }
14798
 
14799
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14800
    public boolean isSet(_Fields field) {
14801
      if (field == null) {
14802
        throw new IllegalArgumentException();
14803
      }
14804
 
14805
      switch (field) {
14806
      case SUCCESS:
14807
        return isSetSuccess();
14808
      }
14809
      throw new IllegalStateException();
14810
    }
14811
 
14812
    @Override
14813
    public boolean equals(Object that) {
14814
      if (that == null)
14815
        return false;
14816
      if (that instanceof getInvoicesForWarehouse_result)
14817
        return this.equals((getInvoicesForWarehouse_result)that);
14818
      return false;
14819
    }
14820
 
14821
    public boolean equals(getInvoicesForWarehouse_result that) {
14822
      if (that == null)
14823
        return false;
14824
 
14825
      boolean this_present_success = true && this.isSetSuccess();
14826
      boolean that_present_success = true && that.isSetSuccess();
14827
      if (this_present_success || that_present_success) {
14828
        if (!(this_present_success && that_present_success))
14829
          return false;
14830
        if (!this.success.equals(that.success))
14831
          return false;
14832
      }
14833
 
14834
      return true;
14835
    }
14836
 
14837
    @Override
14838
    public int hashCode() {
14839
      return 0;
14840
    }
14841
 
14842
    public int compareTo(getInvoicesForWarehouse_result other) {
14843
      if (!getClass().equals(other.getClass())) {
14844
        return getClass().getName().compareTo(other.getClass().getName());
14845
      }
14846
 
14847
      int lastComparison = 0;
14848
      getInvoicesForWarehouse_result typedOther = (getInvoicesForWarehouse_result)other;
14849
 
14850
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
14851
      if (lastComparison != 0) {
14852
        return lastComparison;
14853
      }
14854
      if (isSetSuccess()) {
14855
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
14856
        if (lastComparison != 0) {
14857
          return lastComparison;
14858
        }
14859
      }
14860
      return 0;
14861
    }
14862
 
14863
    public _Fields fieldForId(int fieldId) {
14864
      return _Fields.findByThriftId(fieldId);
14865
    }
14866
 
14867
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14868
      org.apache.thrift.protocol.TField field;
14869
      iprot.readStructBegin();
14870
      while (true)
14871
      {
14872
        field = iprot.readFieldBegin();
14873
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14874
          break;
14875
        }
14876
        switch (field.id) {
14877
          case 0: // SUCCESS
14878
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
14879
              {
21847 amit.gupta 14880
                org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
14881
                this.success = new ArrayList<Invoice>(_list32.size);
14882
                for (int _i33 = 0; _i33 < _list32.size; ++_i33)
7410 amar.kumar 14883
                {
21847 amit.gupta 14884
                  Invoice _elem34; // required
14885
                  _elem34 = new Invoice();
14886
                  _elem34.read(iprot);
14887
                  this.success.add(_elem34);
7410 amar.kumar 14888
                }
14889
                iprot.readListEnd();
14890
              }
14891
            } else { 
14892
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14893
            }
14894
            break;
14895
          default:
14896
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14897
        }
14898
        iprot.readFieldEnd();
14899
      }
14900
      iprot.readStructEnd();
14901
      validate();
14902
    }
14903
 
14904
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14905
      oprot.writeStructBegin(STRUCT_DESC);
14906
 
14907
      if (this.isSetSuccess()) {
14908
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14909
        {
14910
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
21847 amit.gupta 14911
          for (Invoice _iter35 : this.success)
7410 amar.kumar 14912
          {
21847 amit.gupta 14913
            _iter35.write(oprot);
7410 amar.kumar 14914
          }
14915
          oprot.writeListEnd();
14916
        }
14917
        oprot.writeFieldEnd();
14918
      }
14919
      oprot.writeFieldStop();
14920
      oprot.writeStructEnd();
14921
    }
14922
 
14923
    @Override
14924
    public String toString() {
14925
      StringBuilder sb = new StringBuilder("getInvoicesForWarehouse_result(");
14926
      boolean first = true;
14927
 
14928
      sb.append("success:");
14929
      if (this.success == null) {
14930
        sb.append("null");
14931
      } else {
14932
        sb.append(this.success);
14933
      }
14934
      first = false;
14935
      sb.append(")");
14936
      return sb.toString();
14937
    }
14938
 
14939
    public void validate() throws org.apache.thrift.TException {
14940
      // check for required fields
14941
    }
14942
 
14943
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14944
      try {
14945
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14946
      } catch (org.apache.thrift.TException te) {
14947
        throw new java.io.IOException(te);
14948
      }
14949
    }
14950
 
14951
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14952
      try {
14953
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14954
      } catch (org.apache.thrift.TException te) {
14955
        throw new java.io.IOException(te);
14956
      }
14957
    }
14958
 
14959
  }
14960
 
5443 mandeep.dh 14961
  public static class createInvoice_args implements org.apache.thrift.TBase<createInvoice_args, createInvoice_args._Fields>, java.io.Serializable, Cloneable   {
14962
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_args");
14963
 
14964
    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);
14965
 
14966
    private Invoice invoice; // required
14967
 
14968
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14969
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14970
      INVOICE((short)1, "invoice");
14971
 
14972
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14973
 
14974
      static {
14975
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14976
          byName.put(field.getFieldName(), field);
14977
        }
14978
      }
14979
 
14980
      /**
14981
       * Find the _Fields constant that matches fieldId, or null if its not found.
14982
       */
14983
      public static _Fields findByThriftId(int fieldId) {
14984
        switch(fieldId) {
14985
          case 1: // INVOICE
14986
            return INVOICE;
14987
          default:
14988
            return null;
14989
        }
14990
      }
14991
 
14992
      /**
14993
       * Find the _Fields constant that matches fieldId, throwing an exception
14994
       * if it is not found.
14995
       */
14996
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14997
        _Fields fields = findByThriftId(fieldId);
14998
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14999
        return fields;
15000
      }
15001
 
15002
      /**
15003
       * Find the _Fields constant that matches name, or null if its not found.
15004
       */
15005
      public static _Fields findByName(String name) {
15006
        return byName.get(name);
15007
      }
15008
 
15009
      private final short _thriftId;
15010
      private final String _fieldName;
15011
 
15012
      _Fields(short thriftId, String fieldName) {
15013
        _thriftId = thriftId;
15014
        _fieldName = fieldName;
15015
      }
15016
 
15017
      public short getThriftFieldId() {
15018
        return _thriftId;
15019
      }
15020
 
15021
      public String getFieldName() {
15022
        return _fieldName;
15023
      }
15024
    }
15025
 
15026
    // isset id assignments
15027
 
15028
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15029
    static {
15030
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15031
      tmpMap.put(_Fields.INVOICE, new org.apache.thrift.meta_data.FieldMetaData("invoice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15032
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class)));
15033
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15034
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_args.class, metaDataMap);
15035
    }
15036
 
15037
    public createInvoice_args() {
15038
    }
15039
 
15040
    public createInvoice_args(
15041
      Invoice invoice)
15042
    {
15043
      this();
15044
      this.invoice = invoice;
15045
    }
15046
 
15047
    /**
15048
     * Performs a deep copy on <i>other</i>.
15049
     */
15050
    public createInvoice_args(createInvoice_args other) {
15051
      if (other.isSetInvoice()) {
15052
        this.invoice = new Invoice(other.invoice);
15053
      }
15054
    }
15055
 
15056
    public createInvoice_args deepCopy() {
15057
      return new createInvoice_args(this);
15058
    }
15059
 
15060
    @Override
15061
    public void clear() {
15062
      this.invoice = null;
15063
    }
15064
 
15065
    public Invoice getInvoice() {
15066
      return this.invoice;
15067
    }
15068
 
15069
    public void setInvoice(Invoice invoice) {
15070
      this.invoice = invoice;
15071
    }
15072
 
15073
    public void unsetInvoice() {
15074
      this.invoice = null;
15075
    }
15076
 
15077
    /** Returns true if field invoice is set (has been assigned a value) and false otherwise */
15078
    public boolean isSetInvoice() {
15079
      return this.invoice != null;
15080
    }
15081
 
15082
    public void setInvoiceIsSet(boolean value) {
15083
      if (!value) {
15084
        this.invoice = null;
15085
      }
15086
    }
15087
 
15088
    public void setFieldValue(_Fields field, Object value) {
15089
      switch (field) {
15090
      case INVOICE:
15091
        if (value == null) {
15092
          unsetInvoice();
15093
        } else {
15094
          setInvoice((Invoice)value);
15095
        }
15096
        break;
15097
 
15098
      }
15099
    }
15100
 
15101
    public Object getFieldValue(_Fields field) {
15102
      switch (field) {
15103
      case INVOICE:
15104
        return getInvoice();
15105
 
15106
      }
15107
      throw new IllegalStateException();
15108
    }
15109
 
15110
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15111
    public boolean isSet(_Fields field) {
15112
      if (field == null) {
15113
        throw new IllegalArgumentException();
15114
      }
15115
 
15116
      switch (field) {
15117
      case INVOICE:
15118
        return isSetInvoice();
15119
      }
15120
      throw new IllegalStateException();
15121
    }
15122
 
15123
    @Override
15124
    public boolean equals(Object that) {
15125
      if (that == null)
15126
        return false;
15127
      if (that instanceof createInvoice_args)
15128
        return this.equals((createInvoice_args)that);
15129
      return false;
15130
    }
15131
 
15132
    public boolean equals(createInvoice_args that) {
15133
      if (that == null)
15134
        return false;
15135
 
15136
      boolean this_present_invoice = true && this.isSetInvoice();
15137
      boolean that_present_invoice = true && that.isSetInvoice();
15138
      if (this_present_invoice || that_present_invoice) {
15139
        if (!(this_present_invoice && that_present_invoice))
15140
          return false;
15141
        if (!this.invoice.equals(that.invoice))
15142
          return false;
15143
      }
15144
 
15145
      return true;
15146
    }
15147
 
15148
    @Override
15149
    public int hashCode() {
15150
      return 0;
15151
    }
15152
 
15153
    public int compareTo(createInvoice_args other) {
15154
      if (!getClass().equals(other.getClass())) {
15155
        return getClass().getName().compareTo(other.getClass().getName());
15156
      }
15157
 
15158
      int lastComparison = 0;
15159
      createInvoice_args typedOther = (createInvoice_args)other;
15160
 
15161
      lastComparison = Boolean.valueOf(isSetInvoice()).compareTo(typedOther.isSetInvoice());
15162
      if (lastComparison != 0) {
15163
        return lastComparison;
15164
      }
15165
      if (isSetInvoice()) {
15166
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoice, typedOther.invoice);
15167
        if (lastComparison != 0) {
15168
          return lastComparison;
15169
        }
15170
      }
15171
      return 0;
15172
    }
15173
 
15174
    public _Fields fieldForId(int fieldId) {
15175
      return _Fields.findByThriftId(fieldId);
15176
    }
15177
 
15178
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15179
      org.apache.thrift.protocol.TField field;
15180
      iprot.readStructBegin();
15181
      while (true)
15182
      {
15183
        field = iprot.readFieldBegin();
15184
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15185
          break;
15186
        }
15187
        switch (field.id) {
15188
          case 1: // INVOICE
15189
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15190
              this.invoice = new Invoice();
15191
              this.invoice.read(iprot);
15192
            } else { 
15193
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15194
            }
15195
            break;
15196
          default:
15197
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15198
        }
15199
        iprot.readFieldEnd();
15200
      }
15201
      iprot.readStructEnd();
15202
      validate();
15203
    }
15204
 
15205
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15206
      validate();
15207
 
15208
      oprot.writeStructBegin(STRUCT_DESC);
15209
      if (this.invoice != null) {
15210
        oprot.writeFieldBegin(INVOICE_FIELD_DESC);
15211
        this.invoice.write(oprot);
15212
        oprot.writeFieldEnd();
15213
      }
15214
      oprot.writeFieldStop();
15215
      oprot.writeStructEnd();
15216
    }
15217
 
15218
    @Override
15219
    public String toString() {
15220
      StringBuilder sb = new StringBuilder("createInvoice_args(");
15221
      boolean first = true;
15222
 
15223
      sb.append("invoice:");
15224
      if (this.invoice == null) {
15225
        sb.append("null");
15226
      } else {
15227
        sb.append(this.invoice);
15228
      }
15229
      first = false;
15230
      sb.append(")");
15231
      return sb.toString();
15232
    }
15233
 
15234
    public void validate() throws org.apache.thrift.TException {
15235
      // check for required fields
15236
    }
15237
 
15238
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15239
      try {
15240
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15241
      } catch (org.apache.thrift.TException te) {
15242
        throw new java.io.IOException(te);
15243
      }
15244
    }
15245
 
15246
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15247
      try {
15248
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15249
      } catch (org.apache.thrift.TException te) {
15250
        throw new java.io.IOException(te);
15251
      }
15252
    }
15253
 
15254
  }
15255
 
15256
  public static class createInvoice_result implements org.apache.thrift.TBase<createInvoice_result, createInvoice_result._Fields>, java.io.Serializable, Cloneable   {
15257
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_result");
15258
 
15259
    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);
15260
 
15261
    private PurchaseServiceException e; // required
15262
 
15263
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15264
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15265
      E((short)1, "e");
15266
 
15267
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15268
 
15269
      static {
15270
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15271
          byName.put(field.getFieldName(), field);
15272
        }
15273
      }
15274
 
15275
      /**
15276
       * Find the _Fields constant that matches fieldId, or null if its not found.
15277
       */
15278
      public static _Fields findByThriftId(int fieldId) {
15279
        switch(fieldId) {
15280
          case 1: // E
15281
            return E;
15282
          default:
15283
            return null;
15284
        }
15285
      }
15286
 
15287
      /**
15288
       * Find the _Fields constant that matches fieldId, throwing an exception
15289
       * if it is not found.
15290
       */
15291
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15292
        _Fields fields = findByThriftId(fieldId);
15293
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15294
        return fields;
15295
      }
15296
 
15297
      /**
15298
       * Find the _Fields constant that matches name, or null if its not found.
15299
       */
15300
      public static _Fields findByName(String name) {
15301
        return byName.get(name);
15302
      }
15303
 
15304
      private final short _thriftId;
15305
      private final String _fieldName;
15306
 
15307
      _Fields(short thriftId, String fieldName) {
15308
        _thriftId = thriftId;
15309
        _fieldName = fieldName;
15310
      }
15311
 
15312
      public short getThriftFieldId() {
15313
        return _thriftId;
15314
      }
15315
 
15316
      public String getFieldName() {
15317
        return _fieldName;
15318
      }
15319
    }
15320
 
15321
    // isset id assignments
15322
 
15323
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15324
    static {
15325
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15326
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15327
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
15328
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15329
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_result.class, metaDataMap);
15330
    }
15331
 
15332
    public createInvoice_result() {
15333
    }
15334
 
15335
    public createInvoice_result(
15336
      PurchaseServiceException e)
15337
    {
15338
      this();
15339
      this.e = e;
15340
    }
15341
 
15342
    /**
15343
     * Performs a deep copy on <i>other</i>.
15344
     */
15345
    public createInvoice_result(createInvoice_result other) {
15346
      if (other.isSetE()) {
15347
        this.e = new PurchaseServiceException(other.e);
15348
      }
15349
    }
15350
 
15351
    public createInvoice_result deepCopy() {
15352
      return new createInvoice_result(this);
15353
    }
15354
 
15355
    @Override
15356
    public void clear() {
15357
      this.e = null;
15358
    }
15359
 
15360
    public PurchaseServiceException getE() {
15361
      return this.e;
15362
    }
15363
 
15364
    public void setE(PurchaseServiceException e) {
15365
      this.e = e;
15366
    }
15367
 
15368
    public void unsetE() {
15369
      this.e = null;
15370
    }
15371
 
15372
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
15373
    public boolean isSetE() {
15374
      return this.e != null;
15375
    }
15376
 
15377
    public void setEIsSet(boolean value) {
15378
      if (!value) {
15379
        this.e = null;
15380
      }
15381
    }
15382
 
15383
    public void setFieldValue(_Fields field, Object value) {
15384
      switch (field) {
15385
      case E:
15386
        if (value == null) {
15387
          unsetE();
15388
        } else {
15389
          setE((PurchaseServiceException)value);
15390
        }
15391
        break;
15392
 
15393
      }
15394
    }
15395
 
15396
    public Object getFieldValue(_Fields field) {
15397
      switch (field) {
15398
      case E:
15399
        return getE();
15400
 
15401
      }
15402
      throw new IllegalStateException();
15403
    }
15404
 
15405
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15406
    public boolean isSet(_Fields field) {
15407
      if (field == null) {
15408
        throw new IllegalArgumentException();
15409
      }
15410
 
15411
      switch (field) {
15412
      case E:
15413
        return isSetE();
15414
      }
15415
      throw new IllegalStateException();
15416
    }
15417
 
15418
    @Override
15419
    public boolean equals(Object that) {
15420
      if (that == null)
15421
        return false;
15422
      if (that instanceof createInvoice_result)
15423
        return this.equals((createInvoice_result)that);
15424
      return false;
15425
    }
15426
 
15427
    public boolean equals(createInvoice_result that) {
15428
      if (that == null)
15429
        return false;
15430
 
15431
      boolean this_present_e = true && this.isSetE();
15432
      boolean that_present_e = true && that.isSetE();
15433
      if (this_present_e || that_present_e) {
15434
        if (!(this_present_e && that_present_e))
15435
          return false;
15436
        if (!this.e.equals(that.e))
15437
          return false;
15438
      }
15439
 
15440
      return true;
15441
    }
15442
 
15443
    @Override
15444
    public int hashCode() {
15445
      return 0;
15446
    }
15447
 
15448
    public int compareTo(createInvoice_result other) {
15449
      if (!getClass().equals(other.getClass())) {
15450
        return getClass().getName().compareTo(other.getClass().getName());
15451
      }
15452
 
15453
      int lastComparison = 0;
15454
      createInvoice_result typedOther = (createInvoice_result)other;
15455
 
15456
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
15457
      if (lastComparison != 0) {
15458
        return lastComparison;
15459
      }
15460
      if (isSetE()) {
15461
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
15462
        if (lastComparison != 0) {
15463
          return lastComparison;
15464
        }
15465
      }
15466
      return 0;
15467
    }
15468
 
15469
    public _Fields fieldForId(int fieldId) {
15470
      return _Fields.findByThriftId(fieldId);
15471
    }
15472
 
15473
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15474
      org.apache.thrift.protocol.TField field;
15475
      iprot.readStructBegin();
15476
      while (true)
15477
      {
15478
        field = iprot.readFieldBegin();
15479
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15480
          break;
15481
        }
15482
        switch (field.id) {
15483
          case 1: // E
15484
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15485
              this.e = new PurchaseServiceException();
15486
              this.e.read(iprot);
15487
            } else { 
15488
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15489
            }
15490
            break;
15491
          default:
15492
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15493
        }
15494
        iprot.readFieldEnd();
15495
      }
15496
      iprot.readStructEnd();
15497
      validate();
15498
    }
15499
 
15500
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15501
      oprot.writeStructBegin(STRUCT_DESC);
15502
 
15503
      if (this.isSetE()) {
15504
        oprot.writeFieldBegin(E_FIELD_DESC);
15505
        this.e.write(oprot);
15506
        oprot.writeFieldEnd();
15507
      }
15508
      oprot.writeFieldStop();
15509
      oprot.writeStructEnd();
15510
    }
15511
 
15512
    @Override
15513
    public String toString() {
15514
      StringBuilder sb = new StringBuilder("createInvoice_result(");
15515
      boolean first = true;
15516
 
15517
      sb.append("e:");
15518
      if (this.e == null) {
15519
        sb.append("null");
15520
      } else {
15521
        sb.append(this.e);
15522
      }
15523
      first = false;
15524
      sb.append(")");
15525
      return sb.toString();
15526
    }
15527
 
15528
    public void validate() throws org.apache.thrift.TException {
15529
      // check for required fields
15530
    }
15531
 
15532
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15533
      try {
15534
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15535
      } catch (org.apache.thrift.TException te) {
15536
        throw new java.io.IOException(te);
15537
      }
15538
    }
15539
 
15540
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15541
      try {
15542
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15543
      } catch (org.apache.thrift.TException te) {
15544
        throw new java.io.IOException(te);
15545
      }
15546
    }
15547
 
15548
  }
15549
 
5591 mandeep.dh 15550
  public static class addSupplier_args implements org.apache.thrift.TBase<addSupplier_args, addSupplier_args._Fields>, java.io.Serializable, Cloneable   {
15551
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSupplier_args");
15552
 
15553
    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);
15554
 
15555
    private Supplier supplier; // required
15556
 
15557
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15558
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15559
      SUPPLIER((short)1, "supplier");
15560
 
15561
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15562
 
15563
      static {
15564
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15565
          byName.put(field.getFieldName(), field);
15566
        }
15567
      }
15568
 
15569
      /**
15570
       * Find the _Fields constant that matches fieldId, or null if its not found.
15571
       */
15572
      public static _Fields findByThriftId(int fieldId) {
15573
        switch(fieldId) {
15574
          case 1: // SUPPLIER
15575
            return SUPPLIER;
15576
          default:
15577
            return null;
15578
        }
15579
      }
15580
 
15581
      /**
15582
       * Find the _Fields constant that matches fieldId, throwing an exception
15583
       * if it is not found.
15584
       */
15585
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15586
        _Fields fields = findByThriftId(fieldId);
15587
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15588
        return fields;
15589
      }
15590
 
15591
      /**
15592
       * Find the _Fields constant that matches name, or null if its not found.
15593
       */
15594
      public static _Fields findByName(String name) {
15595
        return byName.get(name);
15596
      }
15597
 
15598
      private final short _thriftId;
15599
      private final String _fieldName;
15600
 
15601
      _Fields(short thriftId, String fieldName) {
15602
        _thriftId = thriftId;
15603
        _fieldName = fieldName;
15604
      }
15605
 
15606
      public short getThriftFieldId() {
15607
        return _thriftId;
15608
      }
15609
 
15610
      public String getFieldName() {
15611
        return _fieldName;
15612
      }
15613
    }
15614
 
15615
    // isset id assignments
15616
 
15617
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15618
    static {
15619
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15620
      tmpMap.put(_Fields.SUPPLIER, new org.apache.thrift.meta_data.FieldMetaData("supplier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15621
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
15622
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15623
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSupplier_args.class, metaDataMap);
15624
    }
15625
 
15626
    public addSupplier_args() {
15627
    }
15628
 
15629
    public addSupplier_args(
15630
      Supplier supplier)
15631
    {
15632
      this();
15633
      this.supplier = supplier;
15634
    }
15635
 
15636
    /**
15637
     * Performs a deep copy on <i>other</i>.
15638
     */
15639
    public addSupplier_args(addSupplier_args other) {
15640
      if (other.isSetSupplier()) {
15641
        this.supplier = new Supplier(other.supplier);
15642
      }
15643
    }
15644
 
15645
    public addSupplier_args deepCopy() {
15646
      return new addSupplier_args(this);
15647
    }
15648
 
15649
    @Override
15650
    public void clear() {
15651
      this.supplier = null;
15652
    }
15653
 
15654
    public Supplier getSupplier() {
15655
      return this.supplier;
15656
    }
15657
 
15658
    public void setSupplier(Supplier supplier) {
15659
      this.supplier = supplier;
15660
    }
15661
 
15662
    public void unsetSupplier() {
15663
      this.supplier = null;
15664
    }
15665
 
15666
    /** Returns true if field supplier is set (has been assigned a value) and false otherwise */
15667
    public boolean isSetSupplier() {
15668
      return this.supplier != null;
15669
    }
15670
 
15671
    public void setSupplierIsSet(boolean value) {
15672
      if (!value) {
15673
        this.supplier = null;
15674
      }
15675
    }
15676
 
15677
    public void setFieldValue(_Fields field, Object value) {
15678
      switch (field) {
15679
      case SUPPLIER:
15680
        if (value == null) {
15681
          unsetSupplier();
15682
        } else {
15683
          setSupplier((Supplier)value);
15684
        }
15685
        break;
15686
 
15687
      }
15688
    }
15689
 
15690
    public Object getFieldValue(_Fields field) {
15691
      switch (field) {
15692
      case SUPPLIER:
15693
        return getSupplier();
15694
 
15695
      }
15696
      throw new IllegalStateException();
15697
    }
15698
 
15699
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15700
    public boolean isSet(_Fields field) {
15701
      if (field == null) {
15702
        throw new IllegalArgumentException();
15703
      }
15704
 
15705
      switch (field) {
15706
      case SUPPLIER:
15707
        return isSetSupplier();
15708
      }
15709
      throw new IllegalStateException();
15710
    }
15711
 
15712
    @Override
15713
    public boolean equals(Object that) {
15714
      if (that == null)
15715
        return false;
15716
      if (that instanceof addSupplier_args)
15717
        return this.equals((addSupplier_args)that);
15718
      return false;
15719
    }
15720
 
15721
    public boolean equals(addSupplier_args that) {
15722
      if (that == null)
15723
        return false;
15724
 
15725
      boolean this_present_supplier = true && this.isSetSupplier();
15726
      boolean that_present_supplier = true && that.isSetSupplier();
15727
      if (this_present_supplier || that_present_supplier) {
15728
        if (!(this_present_supplier && that_present_supplier))
15729
          return false;
15730
        if (!this.supplier.equals(that.supplier))
15731
          return false;
15732
      }
15733
 
15734
      return true;
15735
    }
15736
 
15737
    @Override
15738
    public int hashCode() {
15739
      return 0;
15740
    }
15741
 
15742
    public int compareTo(addSupplier_args other) {
15743
      if (!getClass().equals(other.getClass())) {
15744
        return getClass().getName().compareTo(other.getClass().getName());
15745
      }
15746
 
15747
      int lastComparison = 0;
15748
      addSupplier_args typedOther = (addSupplier_args)other;
15749
 
15750
      lastComparison = Boolean.valueOf(isSetSupplier()).compareTo(typedOther.isSetSupplier());
15751
      if (lastComparison != 0) {
15752
        return lastComparison;
15753
      }
15754
      if (isSetSupplier()) {
15755
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplier, typedOther.supplier);
15756
        if (lastComparison != 0) {
15757
          return lastComparison;
15758
        }
15759
      }
15760
      return 0;
15761
    }
15762
 
15763
    public _Fields fieldForId(int fieldId) {
15764
      return _Fields.findByThriftId(fieldId);
15765
    }
15766
 
15767
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15768
      org.apache.thrift.protocol.TField field;
15769
      iprot.readStructBegin();
15770
      while (true)
15771
      {
15772
        field = iprot.readFieldBegin();
15773
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15774
          break;
15775
        }
15776
        switch (field.id) {
15777
          case 1: // SUPPLIER
15778
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15779
              this.supplier = new Supplier();
15780
              this.supplier.read(iprot);
15781
            } else { 
15782
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15783
            }
15784
            break;
15785
          default:
15786
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15787
        }
15788
        iprot.readFieldEnd();
15789
      }
15790
      iprot.readStructEnd();
15791
      validate();
15792
    }
15793
 
15794
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15795
      validate();
15796
 
15797
      oprot.writeStructBegin(STRUCT_DESC);
15798
      if (this.supplier != null) {
15799
        oprot.writeFieldBegin(SUPPLIER_FIELD_DESC);
15800
        this.supplier.write(oprot);
15801
        oprot.writeFieldEnd();
15802
      }
15803
      oprot.writeFieldStop();
15804
      oprot.writeStructEnd();
15805
    }
15806
 
15807
    @Override
15808
    public String toString() {
15809
      StringBuilder sb = new StringBuilder("addSupplier_args(");
15810
      boolean first = true;
15811
 
15812
      sb.append("supplier:");
15813
      if (this.supplier == null) {
15814
        sb.append("null");
15815
      } else {
15816
        sb.append(this.supplier);
15817
      }
15818
      first = false;
15819
      sb.append(")");
15820
      return sb.toString();
15821
    }
15822
 
15823
    public void validate() throws org.apache.thrift.TException {
15824
      // check for required fields
15825
    }
15826
 
15827
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15828
      try {
15829
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15830
      } catch (org.apache.thrift.TException te) {
15831
        throw new java.io.IOException(te);
15832
      }
15833
    }
15834
 
15835
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15836
      try {
15837
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15838
      } catch (org.apache.thrift.TException te) {
15839
        throw new java.io.IOException(te);
15840
      }
15841
    }
15842
 
15843
  }
15844
 
15845
  public static class addSupplier_result implements org.apache.thrift.TBase<addSupplier_result, addSupplier_result._Fields>, java.io.Serializable, Cloneable   {
15846
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSupplier_result");
15847
 
15848
    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);
15849
 
15850
    private Supplier success; // required
15851
 
15852
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15853
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15854
      SUCCESS((short)0, "success");
15855
 
15856
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15857
 
15858
      static {
15859
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15860
          byName.put(field.getFieldName(), field);
15861
        }
15862
      }
15863
 
15864
      /**
15865
       * Find the _Fields constant that matches fieldId, or null if its not found.
15866
       */
15867
      public static _Fields findByThriftId(int fieldId) {
15868
        switch(fieldId) {
15869
          case 0: // SUCCESS
15870
            return SUCCESS;
15871
          default:
15872
            return null;
15873
        }
15874
      }
15875
 
15876
      /**
15877
       * Find the _Fields constant that matches fieldId, throwing an exception
15878
       * if it is not found.
15879
       */
15880
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15881
        _Fields fields = findByThriftId(fieldId);
15882
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15883
        return fields;
15884
      }
15885
 
15886
      /**
15887
       * Find the _Fields constant that matches name, or null if its not found.
15888
       */
15889
      public static _Fields findByName(String name) {
15890
        return byName.get(name);
15891
      }
15892
 
15893
      private final short _thriftId;
15894
      private final String _fieldName;
15895
 
15896
      _Fields(short thriftId, String fieldName) {
15897
        _thriftId = thriftId;
15898
        _fieldName = fieldName;
15899
      }
15900
 
15901
      public short getThriftFieldId() {
15902
        return _thriftId;
15903
      }
15904
 
15905
      public String getFieldName() {
15906
        return _fieldName;
15907
      }
15908
    }
15909
 
15910
    // isset id assignments
15911
 
15912
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15913
    static {
15914
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15915
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15916
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
15917
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15918
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSupplier_result.class, metaDataMap);
15919
    }
15920
 
15921
    public addSupplier_result() {
15922
    }
15923
 
15924
    public addSupplier_result(
15925
      Supplier success)
15926
    {
15927
      this();
15928
      this.success = success;
15929
    }
15930
 
15931
    /**
15932
     * Performs a deep copy on <i>other</i>.
15933
     */
15934
    public addSupplier_result(addSupplier_result other) {
15935
      if (other.isSetSuccess()) {
15936
        this.success = new Supplier(other.success);
15937
      }
15938
    }
15939
 
15940
    public addSupplier_result deepCopy() {
15941
      return new addSupplier_result(this);
15942
    }
15943
 
15944
    @Override
15945
    public void clear() {
15946
      this.success = null;
15947
    }
15948
 
15949
    public Supplier getSuccess() {
15950
      return this.success;
15951
    }
15952
 
15953
    public void setSuccess(Supplier success) {
15954
      this.success = success;
15955
    }
15956
 
15957
    public void unsetSuccess() {
15958
      this.success = null;
15959
    }
15960
 
15961
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
15962
    public boolean isSetSuccess() {
15963
      return this.success != null;
15964
    }
15965
 
15966
    public void setSuccessIsSet(boolean value) {
15967
      if (!value) {
15968
        this.success = null;
15969
      }
15970
    }
15971
 
15972
    public void setFieldValue(_Fields field, Object value) {
15973
      switch (field) {
15974
      case SUCCESS:
15975
        if (value == null) {
15976
          unsetSuccess();
15977
        } else {
15978
          setSuccess((Supplier)value);
15979
        }
15980
        break;
15981
 
15982
      }
15983
    }
15984
 
15985
    public Object getFieldValue(_Fields field) {
15986
      switch (field) {
15987
      case SUCCESS:
15988
        return getSuccess();
15989
 
15990
      }
15991
      throw new IllegalStateException();
15992
    }
15993
 
15994
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15995
    public boolean isSet(_Fields field) {
15996
      if (field == null) {
15997
        throw new IllegalArgumentException();
15998
      }
15999
 
16000
      switch (field) {
16001
      case SUCCESS:
16002
        return isSetSuccess();
16003
      }
16004
      throw new IllegalStateException();
16005
    }
16006
 
16007
    @Override
16008
    public boolean equals(Object that) {
16009
      if (that == null)
16010
        return false;
16011
      if (that instanceof addSupplier_result)
16012
        return this.equals((addSupplier_result)that);
16013
      return false;
16014
    }
16015
 
16016
    public boolean equals(addSupplier_result that) {
16017
      if (that == null)
16018
        return false;
16019
 
16020
      boolean this_present_success = true && this.isSetSuccess();
16021
      boolean that_present_success = true && that.isSetSuccess();
16022
      if (this_present_success || that_present_success) {
16023
        if (!(this_present_success && that_present_success))
16024
          return false;
16025
        if (!this.success.equals(that.success))
16026
          return false;
16027
      }
16028
 
16029
      return true;
16030
    }
16031
 
16032
    @Override
16033
    public int hashCode() {
16034
      return 0;
16035
    }
16036
 
16037
    public int compareTo(addSupplier_result other) {
16038
      if (!getClass().equals(other.getClass())) {
16039
        return getClass().getName().compareTo(other.getClass().getName());
16040
      }
16041
 
16042
      int lastComparison = 0;
16043
      addSupplier_result typedOther = (addSupplier_result)other;
16044
 
16045
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
16046
      if (lastComparison != 0) {
16047
        return lastComparison;
16048
      }
16049
      if (isSetSuccess()) {
16050
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
16051
        if (lastComparison != 0) {
16052
          return lastComparison;
16053
        }
16054
      }
16055
      return 0;
16056
    }
16057
 
16058
    public _Fields fieldForId(int fieldId) {
16059
      return _Fields.findByThriftId(fieldId);
16060
    }
16061
 
16062
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16063
      org.apache.thrift.protocol.TField field;
16064
      iprot.readStructBegin();
16065
      while (true)
16066
      {
16067
        field = iprot.readFieldBegin();
16068
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16069
          break;
16070
        }
16071
        switch (field.id) {
16072
          case 0: // SUCCESS
16073
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
16074
              this.success = new Supplier();
16075
              this.success.read(iprot);
16076
            } else { 
16077
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16078
            }
16079
            break;
16080
          default:
16081
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16082
        }
16083
        iprot.readFieldEnd();
16084
      }
16085
      iprot.readStructEnd();
16086
      validate();
16087
    }
16088
 
16089
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16090
      oprot.writeStructBegin(STRUCT_DESC);
16091
 
16092
      if (this.isSetSuccess()) {
16093
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16094
        this.success.write(oprot);
16095
        oprot.writeFieldEnd();
16096
      }
16097
      oprot.writeFieldStop();
16098
      oprot.writeStructEnd();
16099
    }
16100
 
16101
    @Override
16102
    public String toString() {
16103
      StringBuilder sb = new StringBuilder("addSupplier_result(");
16104
      boolean first = true;
16105
 
16106
      sb.append("success:");
16107
      if (this.success == null) {
16108
        sb.append("null");
16109
      } else {
16110
        sb.append(this.success);
16111
      }
16112
      first = false;
16113
      sb.append(")");
16114
      return sb.toString();
16115
    }
16116
 
16117
    public void validate() throws org.apache.thrift.TException {
16118
      // check for required fields
16119
    }
16120
 
16121
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16122
      try {
16123
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16124
      } catch (org.apache.thrift.TException te) {
16125
        throw new java.io.IOException(te);
16126
      }
16127
    }
16128
 
16129
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16130
      try {
16131
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16132
      } catch (org.apache.thrift.TException te) {
16133
        throw new java.io.IOException(te);
16134
      }
16135
    }
16136
 
16137
  }
16138
 
16139
  public static class updateSupplier_args implements org.apache.thrift.TBase<updateSupplier_args, updateSupplier_args._Fields>, java.io.Serializable, Cloneable   {
16140
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSupplier_args");
16141
 
16142
    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);
16143
 
16144
    private Supplier supplier; // required
16145
 
16146
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16147
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16148
      SUPPLIER((short)1, "supplier");
16149
 
16150
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16151
 
16152
      static {
16153
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16154
          byName.put(field.getFieldName(), field);
16155
        }
16156
      }
16157
 
16158
      /**
16159
       * Find the _Fields constant that matches fieldId, or null if its not found.
16160
       */
16161
      public static _Fields findByThriftId(int fieldId) {
16162
        switch(fieldId) {
16163
          case 1: // SUPPLIER
16164
            return SUPPLIER;
16165
          default:
16166
            return null;
16167
        }
16168
      }
16169
 
16170
      /**
16171
       * Find the _Fields constant that matches fieldId, throwing an exception
16172
       * if it is not found.
16173
       */
16174
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16175
        _Fields fields = findByThriftId(fieldId);
16176
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16177
        return fields;
16178
      }
16179
 
16180
      /**
16181
       * Find the _Fields constant that matches name, or null if its not found.
16182
       */
16183
      public static _Fields findByName(String name) {
16184
        return byName.get(name);
16185
      }
16186
 
16187
      private final short _thriftId;
16188
      private final String _fieldName;
16189
 
16190
      _Fields(short thriftId, String fieldName) {
16191
        _thriftId = thriftId;
16192
        _fieldName = fieldName;
16193
      }
16194
 
16195
      public short getThriftFieldId() {
16196
        return _thriftId;
16197
      }
16198
 
16199
      public String getFieldName() {
16200
        return _fieldName;
16201
      }
16202
    }
16203
 
16204
    // isset id assignments
16205
 
16206
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16207
    static {
16208
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16209
      tmpMap.put(_Fields.SUPPLIER, new org.apache.thrift.meta_data.FieldMetaData("supplier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16210
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
16211
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16212
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSupplier_args.class, metaDataMap);
16213
    }
16214
 
16215
    public updateSupplier_args() {
16216
    }
16217
 
16218
    public updateSupplier_args(
16219
      Supplier supplier)
16220
    {
16221
      this();
16222
      this.supplier = supplier;
16223
    }
16224
 
16225
    /**
16226
     * Performs a deep copy on <i>other</i>.
16227
     */
16228
    public updateSupplier_args(updateSupplier_args other) {
16229
      if (other.isSetSupplier()) {
16230
        this.supplier = new Supplier(other.supplier);
16231
      }
16232
    }
16233
 
16234
    public updateSupplier_args deepCopy() {
16235
      return new updateSupplier_args(this);
16236
    }
16237
 
16238
    @Override
16239
    public void clear() {
16240
      this.supplier = null;
16241
    }
16242
 
16243
    public Supplier getSupplier() {
16244
      return this.supplier;
16245
    }
16246
 
16247
    public void setSupplier(Supplier supplier) {
16248
      this.supplier = supplier;
16249
    }
16250
 
16251
    public void unsetSupplier() {
16252
      this.supplier = null;
16253
    }
16254
 
16255
    /** Returns true if field supplier is set (has been assigned a value) and false otherwise */
16256
    public boolean isSetSupplier() {
16257
      return this.supplier != null;
16258
    }
16259
 
16260
    public void setSupplierIsSet(boolean value) {
16261
      if (!value) {
16262
        this.supplier = null;
16263
      }
16264
    }
16265
 
16266
    public void setFieldValue(_Fields field, Object value) {
16267
      switch (field) {
16268
      case SUPPLIER:
16269
        if (value == null) {
16270
          unsetSupplier();
16271
        } else {
16272
          setSupplier((Supplier)value);
16273
        }
16274
        break;
16275
 
16276
      }
16277
    }
16278
 
16279
    public Object getFieldValue(_Fields field) {
16280
      switch (field) {
16281
      case SUPPLIER:
16282
        return getSupplier();
16283
 
16284
      }
16285
      throw new IllegalStateException();
16286
    }
16287
 
16288
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16289
    public boolean isSet(_Fields field) {
16290
      if (field == null) {
16291
        throw new IllegalArgumentException();
16292
      }
16293
 
16294
      switch (field) {
16295
      case SUPPLIER:
16296
        return isSetSupplier();
16297
      }
16298
      throw new IllegalStateException();
16299
    }
16300
 
16301
    @Override
16302
    public boolean equals(Object that) {
16303
      if (that == null)
16304
        return false;
16305
      if (that instanceof updateSupplier_args)
16306
        return this.equals((updateSupplier_args)that);
16307
      return false;
16308
    }
16309
 
16310
    public boolean equals(updateSupplier_args that) {
16311
      if (that == null)
16312
        return false;
16313
 
16314
      boolean this_present_supplier = true && this.isSetSupplier();
16315
      boolean that_present_supplier = true && that.isSetSupplier();
16316
      if (this_present_supplier || that_present_supplier) {
16317
        if (!(this_present_supplier && that_present_supplier))
16318
          return false;
16319
        if (!this.supplier.equals(that.supplier))
16320
          return false;
16321
      }
16322
 
16323
      return true;
16324
    }
16325
 
16326
    @Override
16327
    public int hashCode() {
16328
      return 0;
16329
    }
16330
 
16331
    public int compareTo(updateSupplier_args other) {
16332
      if (!getClass().equals(other.getClass())) {
16333
        return getClass().getName().compareTo(other.getClass().getName());
16334
      }
16335
 
16336
      int lastComparison = 0;
16337
      updateSupplier_args typedOther = (updateSupplier_args)other;
16338
 
16339
      lastComparison = Boolean.valueOf(isSetSupplier()).compareTo(typedOther.isSetSupplier());
16340
      if (lastComparison != 0) {
16341
        return lastComparison;
16342
      }
16343
      if (isSetSupplier()) {
16344
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplier, typedOther.supplier);
16345
        if (lastComparison != 0) {
16346
          return lastComparison;
16347
        }
16348
      }
16349
      return 0;
16350
    }
16351
 
16352
    public _Fields fieldForId(int fieldId) {
16353
      return _Fields.findByThriftId(fieldId);
16354
    }
16355
 
16356
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16357
      org.apache.thrift.protocol.TField field;
16358
      iprot.readStructBegin();
16359
      while (true)
16360
      {
16361
        field = iprot.readFieldBegin();
16362
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16363
          break;
16364
        }
16365
        switch (field.id) {
16366
          case 1: // SUPPLIER
16367
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
16368
              this.supplier = new Supplier();
16369
              this.supplier.read(iprot);
16370
            } else { 
16371
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16372
            }
16373
            break;
16374
          default:
16375
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16376
        }
16377
        iprot.readFieldEnd();
16378
      }
16379
      iprot.readStructEnd();
16380
      validate();
16381
    }
16382
 
16383
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16384
      validate();
16385
 
16386
      oprot.writeStructBegin(STRUCT_DESC);
16387
      if (this.supplier != null) {
16388
        oprot.writeFieldBegin(SUPPLIER_FIELD_DESC);
16389
        this.supplier.write(oprot);
16390
        oprot.writeFieldEnd();
16391
      }
16392
      oprot.writeFieldStop();
16393
      oprot.writeStructEnd();
16394
    }
16395
 
16396
    @Override
16397
    public String toString() {
16398
      StringBuilder sb = new StringBuilder("updateSupplier_args(");
16399
      boolean first = true;
16400
 
16401
      sb.append("supplier:");
16402
      if (this.supplier == null) {
16403
        sb.append("null");
16404
      } else {
16405
        sb.append(this.supplier);
16406
      }
16407
      first = false;
16408
      sb.append(")");
16409
      return sb.toString();
16410
    }
16411
 
16412
    public void validate() throws org.apache.thrift.TException {
16413
      // check for required fields
16414
    }
16415
 
16416
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16417
      try {
16418
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16419
      } catch (org.apache.thrift.TException te) {
16420
        throw new java.io.IOException(te);
16421
      }
16422
    }
16423
 
16424
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16425
      try {
16426
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16427
      } catch (org.apache.thrift.TException te) {
16428
        throw new java.io.IOException(te);
16429
      }
16430
    }
16431
 
16432
  }
16433
 
16434
  public static class updateSupplier_result implements org.apache.thrift.TBase<updateSupplier_result, updateSupplier_result._Fields>, java.io.Serializable, Cloneable   {
16435
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSupplier_result");
16436
 
16437
 
16438
 
16439
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16440
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16441
;
16442
 
16443
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16444
 
16445
      static {
16446
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16447
          byName.put(field.getFieldName(), field);
16448
        }
16449
      }
16450
 
16451
      /**
16452
       * Find the _Fields constant that matches fieldId, or null if its not found.
16453
       */
16454
      public static _Fields findByThriftId(int fieldId) {
16455
        switch(fieldId) {
16456
          default:
16457
            return null;
16458
        }
16459
      }
16460
 
16461
      /**
16462
       * Find the _Fields constant that matches fieldId, throwing an exception
16463
       * if it is not found.
16464
       */
16465
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16466
        _Fields fields = findByThriftId(fieldId);
16467
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16468
        return fields;
16469
      }
16470
 
16471
      /**
16472
       * Find the _Fields constant that matches name, or null if its not found.
16473
       */
16474
      public static _Fields findByName(String name) {
16475
        return byName.get(name);
16476
      }
16477
 
16478
      private final short _thriftId;
16479
      private final String _fieldName;
16480
 
16481
      _Fields(short thriftId, String fieldName) {
16482
        _thriftId = thriftId;
16483
        _fieldName = fieldName;
16484
      }
16485
 
16486
      public short getThriftFieldId() {
16487
        return _thriftId;
16488
      }
16489
 
16490
      public String getFieldName() {
16491
        return _fieldName;
16492
      }
16493
    }
16494
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16495
    static {
16496
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16497
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16498
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSupplier_result.class, metaDataMap);
16499
    }
16500
 
16501
    public updateSupplier_result() {
16502
    }
16503
 
16504
    /**
16505
     * Performs a deep copy on <i>other</i>.
16506
     */
16507
    public updateSupplier_result(updateSupplier_result other) {
16508
    }
16509
 
16510
    public updateSupplier_result deepCopy() {
16511
      return new updateSupplier_result(this);
16512
    }
16513
 
16514
    @Override
16515
    public void clear() {
16516
    }
16517
 
16518
    public void setFieldValue(_Fields field, Object value) {
16519
      switch (field) {
16520
      }
16521
    }
16522
 
16523
    public Object getFieldValue(_Fields field) {
16524
      switch (field) {
16525
      }
16526
      throw new IllegalStateException();
16527
    }
16528
 
16529
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16530
    public boolean isSet(_Fields field) {
16531
      if (field == null) {
16532
        throw new IllegalArgumentException();
16533
      }
16534
 
16535
      switch (field) {
16536
      }
16537
      throw new IllegalStateException();
16538
    }
16539
 
16540
    @Override
16541
    public boolean equals(Object that) {
16542
      if (that == null)
16543
        return false;
16544
      if (that instanceof updateSupplier_result)
16545
        return this.equals((updateSupplier_result)that);
16546
      return false;
16547
    }
16548
 
16549
    public boolean equals(updateSupplier_result that) {
16550
      if (that == null)
16551
        return false;
16552
 
16553
      return true;
16554
    }
16555
 
16556
    @Override
16557
    public int hashCode() {
16558
      return 0;
16559
    }
16560
 
16561
    public int compareTo(updateSupplier_result other) {
16562
      if (!getClass().equals(other.getClass())) {
16563
        return getClass().getName().compareTo(other.getClass().getName());
16564
      }
16565
 
16566
      int lastComparison = 0;
16567
      updateSupplier_result typedOther = (updateSupplier_result)other;
16568
 
16569
      return 0;
16570
    }
16571
 
16572
    public _Fields fieldForId(int fieldId) {
16573
      return _Fields.findByThriftId(fieldId);
16574
    }
16575
 
16576
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16577
      org.apache.thrift.protocol.TField field;
16578
      iprot.readStructBegin();
16579
      while (true)
16580
      {
16581
        field = iprot.readFieldBegin();
16582
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16583
          break;
16584
        }
16585
        switch (field.id) {
16586
          default:
16587
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16588
        }
16589
        iprot.readFieldEnd();
16590
      }
16591
      iprot.readStructEnd();
16592
      validate();
16593
    }
16594
 
16595
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16596
      oprot.writeStructBegin(STRUCT_DESC);
16597
 
16598
      oprot.writeFieldStop();
16599
      oprot.writeStructEnd();
16600
    }
16601
 
16602
    @Override
16603
    public String toString() {
16604
      StringBuilder sb = new StringBuilder("updateSupplier_result(");
16605
      boolean first = true;
16606
 
16607
      sb.append(")");
16608
      return sb.toString();
16609
    }
16610
 
16611
    public void validate() throws org.apache.thrift.TException {
16612
      // check for required fields
16613
    }
16614
 
16615
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16616
      try {
16617
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16618
      } catch (org.apache.thrift.TException te) {
16619
        throw new java.io.IOException(te);
16620
      }
16621
    }
16622
 
16623
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16624
      try {
16625
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16626
      } catch (org.apache.thrift.TException te) {
16627
        throw new java.io.IOException(te);
16628
      }
16629
    }
16630
 
16631
  }
16632
 
6467 amar.kumar 16633
  public static class createPurchaseReturn_args implements org.apache.thrift.TBase<createPurchaseReturn_args, createPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
16634
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseReturn_args");
16635
 
16636
    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);
16637
 
16638
    private PurchaseReturn purchaseReturn; // required
16639
 
16640
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16641
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16642
      PURCHASE_RETURN((short)1, "purchaseReturn");
16643
 
16644
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16645
 
16646
      static {
16647
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16648
          byName.put(field.getFieldName(), field);
16649
        }
16650
      }
16651
 
16652
      /**
16653
       * Find the _Fields constant that matches fieldId, or null if its not found.
16654
       */
16655
      public static _Fields findByThriftId(int fieldId) {
16656
        switch(fieldId) {
16657
          case 1: // PURCHASE_RETURN
16658
            return PURCHASE_RETURN;
16659
          default:
16660
            return null;
16661
        }
16662
      }
16663
 
16664
      /**
16665
       * Find the _Fields constant that matches fieldId, throwing an exception
16666
       * if it is not found.
16667
       */
16668
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16669
        _Fields fields = findByThriftId(fieldId);
16670
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16671
        return fields;
16672
      }
16673
 
16674
      /**
16675
       * Find the _Fields constant that matches name, or null if its not found.
16676
       */
16677
      public static _Fields findByName(String name) {
16678
        return byName.get(name);
16679
      }
16680
 
16681
      private final short _thriftId;
16682
      private final String _fieldName;
16683
 
16684
      _Fields(short thriftId, String fieldName) {
16685
        _thriftId = thriftId;
16686
        _fieldName = fieldName;
16687
      }
16688
 
16689
      public short getThriftFieldId() {
16690
        return _thriftId;
16691
      }
16692
 
16693
      public String getFieldName() {
16694
        return _fieldName;
16695
      }
16696
    }
16697
 
16698
    // isset id assignments
16699
 
16700
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16701
    static {
16702
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16703
      tmpMap.put(_Fields.PURCHASE_RETURN, new org.apache.thrift.meta_data.FieldMetaData("purchaseReturn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16704
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class)));
16705
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16706
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseReturn_args.class, metaDataMap);
16707
    }
16708
 
16709
    public createPurchaseReturn_args() {
16710
    }
16711
 
16712
    public createPurchaseReturn_args(
16713
      PurchaseReturn purchaseReturn)
16714
    {
16715
      this();
16716
      this.purchaseReturn = purchaseReturn;
16717
    }
16718
 
16719
    /**
16720
     * Performs a deep copy on <i>other</i>.
16721
     */
16722
    public createPurchaseReturn_args(createPurchaseReturn_args other) {
16723
      if (other.isSetPurchaseReturn()) {
16724
        this.purchaseReturn = new PurchaseReturn(other.purchaseReturn);
16725
      }
16726
    }
16727
 
16728
    public createPurchaseReturn_args deepCopy() {
16729
      return new createPurchaseReturn_args(this);
16730
    }
16731
 
16732
    @Override
16733
    public void clear() {
16734
      this.purchaseReturn = null;
16735
    }
16736
 
16737
    public PurchaseReturn getPurchaseReturn() {
16738
      return this.purchaseReturn;
16739
    }
16740
 
16741
    public void setPurchaseReturn(PurchaseReturn purchaseReturn) {
16742
      this.purchaseReturn = purchaseReturn;
16743
    }
16744
 
16745
    public void unsetPurchaseReturn() {
16746
      this.purchaseReturn = null;
16747
    }
16748
 
16749
    /** Returns true if field purchaseReturn is set (has been assigned a value) and false otherwise */
16750
    public boolean isSetPurchaseReturn() {
16751
      return this.purchaseReturn != null;
16752
    }
16753
 
16754
    public void setPurchaseReturnIsSet(boolean value) {
16755
      if (!value) {
16756
        this.purchaseReturn = null;
16757
      }
16758
    }
16759
 
16760
    public void setFieldValue(_Fields field, Object value) {
16761
      switch (field) {
16762
      case PURCHASE_RETURN:
16763
        if (value == null) {
16764
          unsetPurchaseReturn();
16765
        } else {
16766
          setPurchaseReturn((PurchaseReturn)value);
16767
        }
16768
        break;
16769
 
16770
      }
16771
    }
16772
 
16773
    public Object getFieldValue(_Fields field) {
16774
      switch (field) {
16775
      case PURCHASE_RETURN:
16776
        return getPurchaseReturn();
16777
 
16778
      }
16779
      throw new IllegalStateException();
16780
    }
16781
 
16782
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16783
    public boolean isSet(_Fields field) {
16784
      if (field == null) {
16785
        throw new IllegalArgumentException();
16786
      }
16787
 
16788
      switch (field) {
16789
      case PURCHASE_RETURN:
16790
        return isSetPurchaseReturn();
16791
      }
16792
      throw new IllegalStateException();
16793
    }
16794
 
16795
    @Override
16796
    public boolean equals(Object that) {
16797
      if (that == null)
16798
        return false;
16799
      if (that instanceof createPurchaseReturn_args)
16800
        return this.equals((createPurchaseReturn_args)that);
16801
      return false;
16802
    }
16803
 
16804
    public boolean equals(createPurchaseReturn_args that) {
16805
      if (that == null)
16806
        return false;
16807
 
16808
      boolean this_present_purchaseReturn = true && this.isSetPurchaseReturn();
16809
      boolean that_present_purchaseReturn = true && that.isSetPurchaseReturn();
16810
      if (this_present_purchaseReturn || that_present_purchaseReturn) {
16811
        if (!(this_present_purchaseReturn && that_present_purchaseReturn))
16812
          return false;
16813
        if (!this.purchaseReturn.equals(that.purchaseReturn))
16814
          return false;
16815
      }
16816
 
16817
      return true;
16818
    }
16819
 
16820
    @Override
16821
    public int hashCode() {
16822
      return 0;
16823
    }
16824
 
16825
    public int compareTo(createPurchaseReturn_args other) {
16826
      if (!getClass().equals(other.getClass())) {
16827
        return getClass().getName().compareTo(other.getClass().getName());
16828
      }
16829
 
16830
      int lastComparison = 0;
16831
      createPurchaseReturn_args typedOther = (createPurchaseReturn_args)other;
16832
 
16833
      lastComparison = Boolean.valueOf(isSetPurchaseReturn()).compareTo(typedOther.isSetPurchaseReturn());
16834
      if (lastComparison != 0) {
16835
        return lastComparison;
16836
      }
16837
      if (isSetPurchaseReturn()) {
16838
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseReturn, typedOther.purchaseReturn);
16839
        if (lastComparison != 0) {
16840
          return lastComparison;
16841
        }
16842
      }
16843
      return 0;
16844
    }
16845
 
16846
    public _Fields fieldForId(int fieldId) {
16847
      return _Fields.findByThriftId(fieldId);
16848
    }
16849
 
16850
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16851
      org.apache.thrift.protocol.TField field;
16852
      iprot.readStructBegin();
16853
      while (true)
16854
      {
16855
        field = iprot.readFieldBegin();
16856
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16857
          break;
16858
        }
16859
        switch (field.id) {
16860
          case 1: // PURCHASE_RETURN
16861
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
16862
              this.purchaseReturn = new PurchaseReturn();
16863
              this.purchaseReturn.read(iprot);
16864
            } else { 
16865
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16866
            }
16867
            break;
16868
          default:
16869
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16870
        }
16871
        iprot.readFieldEnd();
16872
      }
16873
      iprot.readStructEnd();
16874
      validate();
16875
    }
16876
 
16877
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16878
      validate();
16879
 
16880
      oprot.writeStructBegin(STRUCT_DESC);
16881
      if (this.purchaseReturn != null) {
16882
        oprot.writeFieldBegin(PURCHASE_RETURN_FIELD_DESC);
16883
        this.purchaseReturn.write(oprot);
16884
        oprot.writeFieldEnd();
16885
      }
16886
      oprot.writeFieldStop();
16887
      oprot.writeStructEnd();
16888
    }
16889
 
16890
    @Override
16891
    public String toString() {
16892
      StringBuilder sb = new StringBuilder("createPurchaseReturn_args(");
16893
      boolean first = true;
16894
 
16895
      sb.append("purchaseReturn:");
16896
      if (this.purchaseReturn == null) {
16897
        sb.append("null");
16898
      } else {
16899
        sb.append(this.purchaseReturn);
16900
      }
16901
      first = false;
16902
      sb.append(")");
16903
      return sb.toString();
16904
    }
16905
 
16906
    public void validate() throws org.apache.thrift.TException {
16907
      // check for required fields
16908
    }
16909
 
16910
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16911
      try {
16912
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16913
      } catch (org.apache.thrift.TException te) {
16914
        throw new java.io.IOException(te);
16915
      }
16916
    }
16917
 
16918
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16919
      try {
16920
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16921
      } catch (org.apache.thrift.TException te) {
16922
        throw new java.io.IOException(te);
16923
      }
16924
    }
16925
 
16926
  }
16927
 
16928
  public static class createPurchaseReturn_result implements org.apache.thrift.TBase<createPurchaseReturn_result, createPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
16929
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseReturn_result");
16930
 
16931
    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);
16932
 
16933
    private long success; // required
16934
 
16935
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16936
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16937
      SUCCESS((short)0, "success");
16938
 
16939
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16940
 
16941
      static {
16942
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16943
          byName.put(field.getFieldName(), field);
16944
        }
16945
      }
16946
 
16947
      /**
16948
       * Find the _Fields constant that matches fieldId, or null if its not found.
16949
       */
16950
      public static _Fields findByThriftId(int fieldId) {
16951
        switch(fieldId) {
16952
          case 0: // SUCCESS
16953
            return SUCCESS;
16954
          default:
16955
            return null;
16956
        }
16957
      }
16958
 
16959
      /**
16960
       * Find the _Fields constant that matches fieldId, throwing an exception
16961
       * if it is not found.
16962
       */
16963
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16964
        _Fields fields = findByThriftId(fieldId);
16965
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16966
        return fields;
16967
      }
16968
 
16969
      /**
16970
       * Find the _Fields constant that matches name, or null if its not found.
16971
       */
16972
      public static _Fields findByName(String name) {
16973
        return byName.get(name);
16974
      }
16975
 
16976
      private final short _thriftId;
16977
      private final String _fieldName;
16978
 
16979
      _Fields(short thriftId, String fieldName) {
16980
        _thriftId = thriftId;
16981
        _fieldName = fieldName;
16982
      }
16983
 
16984
      public short getThriftFieldId() {
16985
        return _thriftId;
16986
      }
16987
 
16988
      public String getFieldName() {
16989
        return _fieldName;
16990
      }
16991
    }
16992
 
16993
    // isset id assignments
16994
    private static final int __SUCCESS_ISSET_ID = 0;
16995
    private BitSet __isset_bit_vector = new BitSet(1);
16996
 
16997
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16998
    static {
16999
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17000
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17001
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
17002
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17003
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseReturn_result.class, metaDataMap);
17004
    }
17005
 
17006
    public createPurchaseReturn_result() {
17007
    }
17008
 
17009
    public createPurchaseReturn_result(
17010
      long success)
17011
    {
17012
      this();
17013
      this.success = success;
17014
      setSuccessIsSet(true);
17015
    }
17016
 
17017
    /**
17018
     * Performs a deep copy on <i>other</i>.
17019
     */
17020
    public createPurchaseReturn_result(createPurchaseReturn_result other) {
17021
      __isset_bit_vector.clear();
17022
      __isset_bit_vector.or(other.__isset_bit_vector);
17023
      this.success = other.success;
17024
    }
17025
 
17026
    public createPurchaseReturn_result deepCopy() {
17027
      return new createPurchaseReturn_result(this);
17028
    }
17029
 
17030
    @Override
17031
    public void clear() {
17032
      setSuccessIsSet(false);
17033
      this.success = 0;
17034
    }
17035
 
17036
    public long getSuccess() {
17037
      return this.success;
17038
    }
17039
 
17040
    public void setSuccess(long success) {
17041
      this.success = success;
17042
      setSuccessIsSet(true);
17043
    }
17044
 
17045
    public void unsetSuccess() {
17046
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
17047
    }
17048
 
17049
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
17050
    public boolean isSetSuccess() {
17051
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
17052
    }
17053
 
17054
    public void setSuccessIsSet(boolean value) {
17055
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
17056
    }
17057
 
17058
    public void setFieldValue(_Fields field, Object value) {
17059
      switch (field) {
17060
      case SUCCESS:
17061
        if (value == null) {
17062
          unsetSuccess();
17063
        } else {
17064
          setSuccess((Long)value);
17065
        }
17066
        break;
17067
 
17068
      }
17069
    }
17070
 
17071
    public Object getFieldValue(_Fields field) {
17072
      switch (field) {
17073
      case SUCCESS:
17074
        return Long.valueOf(getSuccess());
17075
 
17076
      }
17077
      throw new IllegalStateException();
17078
    }
17079
 
17080
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17081
    public boolean isSet(_Fields field) {
17082
      if (field == null) {
17083
        throw new IllegalArgumentException();
17084
      }
17085
 
17086
      switch (field) {
17087
      case SUCCESS:
17088
        return isSetSuccess();
17089
      }
17090
      throw new IllegalStateException();
17091
    }
17092
 
17093
    @Override
17094
    public boolean equals(Object that) {
17095
      if (that == null)
17096
        return false;
17097
      if (that instanceof createPurchaseReturn_result)
17098
        return this.equals((createPurchaseReturn_result)that);
17099
      return false;
17100
    }
17101
 
17102
    public boolean equals(createPurchaseReturn_result that) {
17103
      if (that == null)
17104
        return false;
17105
 
17106
      boolean this_present_success = true;
17107
      boolean that_present_success = true;
17108
      if (this_present_success || that_present_success) {
17109
        if (!(this_present_success && that_present_success))
17110
          return false;
17111
        if (this.success != that.success)
17112
          return false;
17113
      }
17114
 
17115
      return true;
17116
    }
17117
 
17118
    @Override
17119
    public int hashCode() {
17120
      return 0;
17121
    }
17122
 
17123
    public int compareTo(createPurchaseReturn_result other) {
17124
      if (!getClass().equals(other.getClass())) {
17125
        return getClass().getName().compareTo(other.getClass().getName());
17126
      }
17127
 
17128
      int lastComparison = 0;
17129
      createPurchaseReturn_result typedOther = (createPurchaseReturn_result)other;
17130
 
17131
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
17132
      if (lastComparison != 0) {
17133
        return lastComparison;
17134
      }
17135
      if (isSetSuccess()) {
17136
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
17137
        if (lastComparison != 0) {
17138
          return lastComparison;
17139
        }
17140
      }
17141
      return 0;
17142
    }
17143
 
17144
    public _Fields fieldForId(int fieldId) {
17145
      return _Fields.findByThriftId(fieldId);
17146
    }
17147
 
17148
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17149
      org.apache.thrift.protocol.TField field;
17150
      iprot.readStructBegin();
17151
      while (true)
17152
      {
17153
        field = iprot.readFieldBegin();
17154
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17155
          break;
17156
        }
17157
        switch (field.id) {
17158
          case 0: // SUCCESS
17159
            if (field.type == org.apache.thrift.protocol.TType.I64) {
17160
              this.success = iprot.readI64();
17161
              setSuccessIsSet(true);
17162
            } else { 
17163
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17164
            }
17165
            break;
17166
          default:
17167
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17168
        }
17169
        iprot.readFieldEnd();
17170
      }
17171
      iprot.readStructEnd();
17172
      validate();
17173
    }
17174
 
17175
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17176
      oprot.writeStructBegin(STRUCT_DESC);
17177
 
17178
      if (this.isSetSuccess()) {
17179
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17180
        oprot.writeI64(this.success);
17181
        oprot.writeFieldEnd();
17182
      }
17183
      oprot.writeFieldStop();
17184
      oprot.writeStructEnd();
17185
    }
17186
 
17187
    @Override
17188
    public String toString() {
17189
      StringBuilder sb = new StringBuilder("createPurchaseReturn_result(");
17190
      boolean first = true;
17191
 
17192
      sb.append("success:");
17193
      sb.append(this.success);
17194
      first = false;
17195
      sb.append(")");
17196
      return sb.toString();
17197
    }
17198
 
17199
    public void validate() throws org.apache.thrift.TException {
17200
      // check for required fields
17201
    }
17202
 
17203
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17204
      try {
17205
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17206
      } catch (org.apache.thrift.TException te) {
17207
        throw new java.io.IOException(te);
17208
      }
17209
    }
17210
 
17211
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17212
      try {
17213
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17214
      } catch (org.apache.thrift.TException te) {
17215
        throw new java.io.IOException(te);
17216
      }
17217
    }
17218
 
17219
  }
17220
 
17221
  public static class settlePurchaseReturn_args implements org.apache.thrift.TBase<settlePurchaseReturn_args, settlePurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
17222
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("settlePurchaseReturn_args");
17223
 
17224
    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);
17225
 
17226
    private long id; // required
17227
 
17228
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17229
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17230
      ID((short)1, "id");
17231
 
17232
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17233
 
17234
      static {
17235
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17236
          byName.put(field.getFieldName(), field);
17237
        }
17238
      }
17239
 
17240
      /**
17241
       * Find the _Fields constant that matches fieldId, or null if its not found.
17242
       */
17243
      public static _Fields findByThriftId(int fieldId) {
17244
        switch(fieldId) {
17245
          case 1: // ID
17246
            return ID;
17247
          default:
17248
            return null;
17249
        }
17250
      }
17251
 
17252
      /**
17253
       * Find the _Fields constant that matches fieldId, throwing an exception
17254
       * if it is not found.
17255
       */
17256
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17257
        _Fields fields = findByThriftId(fieldId);
17258
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17259
        return fields;
17260
      }
17261
 
17262
      /**
17263
       * Find the _Fields constant that matches name, or null if its not found.
17264
       */
17265
      public static _Fields findByName(String name) {
17266
        return byName.get(name);
17267
      }
17268
 
17269
      private final short _thriftId;
17270
      private final String _fieldName;
17271
 
17272
      _Fields(short thriftId, String fieldName) {
17273
        _thriftId = thriftId;
17274
        _fieldName = fieldName;
17275
      }
17276
 
17277
      public short getThriftFieldId() {
17278
        return _thriftId;
17279
      }
17280
 
17281
      public String getFieldName() {
17282
        return _fieldName;
17283
      }
17284
    }
17285
 
17286
    // isset id assignments
17287
    private static final int __ID_ISSET_ID = 0;
17288
    private BitSet __isset_bit_vector = new BitSet(1);
17289
 
17290
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17291
    static {
17292
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17293
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17294
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
17295
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17296
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(settlePurchaseReturn_args.class, metaDataMap);
17297
    }
17298
 
17299
    public settlePurchaseReturn_args() {
17300
    }
17301
 
17302
    public settlePurchaseReturn_args(
17303
      long id)
17304
    {
17305
      this();
17306
      this.id = id;
17307
      setIdIsSet(true);
17308
    }
17309
 
17310
    /**
17311
     * Performs a deep copy on <i>other</i>.
17312
     */
17313
    public settlePurchaseReturn_args(settlePurchaseReturn_args other) {
17314
      __isset_bit_vector.clear();
17315
      __isset_bit_vector.or(other.__isset_bit_vector);
17316
      this.id = other.id;
17317
    }
17318
 
17319
    public settlePurchaseReturn_args deepCopy() {
17320
      return new settlePurchaseReturn_args(this);
17321
    }
17322
 
17323
    @Override
17324
    public void clear() {
17325
      setIdIsSet(false);
17326
      this.id = 0;
17327
    }
17328
 
17329
    public long getId() {
17330
      return this.id;
17331
    }
17332
 
17333
    public void setId(long id) {
17334
      this.id = id;
17335
      setIdIsSet(true);
17336
    }
17337
 
17338
    public void unsetId() {
17339
      __isset_bit_vector.clear(__ID_ISSET_ID);
17340
    }
17341
 
17342
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
17343
    public boolean isSetId() {
17344
      return __isset_bit_vector.get(__ID_ISSET_ID);
17345
    }
17346
 
17347
    public void setIdIsSet(boolean value) {
17348
      __isset_bit_vector.set(__ID_ISSET_ID, value);
17349
    }
17350
 
17351
    public void setFieldValue(_Fields field, Object value) {
17352
      switch (field) {
17353
      case ID:
17354
        if (value == null) {
17355
          unsetId();
17356
        } else {
17357
          setId((Long)value);
17358
        }
17359
        break;
17360
 
17361
      }
17362
    }
17363
 
17364
    public Object getFieldValue(_Fields field) {
17365
      switch (field) {
17366
      case ID:
17367
        return Long.valueOf(getId());
17368
 
17369
      }
17370
      throw new IllegalStateException();
17371
    }
17372
 
17373
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17374
    public boolean isSet(_Fields field) {
17375
      if (field == null) {
17376
        throw new IllegalArgumentException();
17377
      }
17378
 
17379
      switch (field) {
17380
      case ID:
17381
        return isSetId();
17382
      }
17383
      throw new IllegalStateException();
17384
    }
17385
 
17386
    @Override
17387
    public boolean equals(Object that) {
17388
      if (that == null)
17389
        return false;
17390
      if (that instanceof settlePurchaseReturn_args)
17391
        return this.equals((settlePurchaseReturn_args)that);
17392
      return false;
17393
    }
17394
 
17395
    public boolean equals(settlePurchaseReturn_args that) {
17396
      if (that == null)
17397
        return false;
17398
 
17399
      boolean this_present_id = true;
17400
      boolean that_present_id = true;
17401
      if (this_present_id || that_present_id) {
17402
        if (!(this_present_id && that_present_id))
17403
          return false;
17404
        if (this.id != that.id)
17405
          return false;
17406
      }
17407
 
17408
      return true;
17409
    }
17410
 
17411
    @Override
17412
    public int hashCode() {
17413
      return 0;
17414
    }
17415
 
17416
    public int compareTo(settlePurchaseReturn_args other) {
17417
      if (!getClass().equals(other.getClass())) {
17418
        return getClass().getName().compareTo(other.getClass().getName());
17419
      }
17420
 
17421
      int lastComparison = 0;
17422
      settlePurchaseReturn_args typedOther = (settlePurchaseReturn_args)other;
17423
 
17424
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
17425
      if (lastComparison != 0) {
17426
        return lastComparison;
17427
      }
17428
      if (isSetId()) {
17429
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
17430
        if (lastComparison != 0) {
17431
          return lastComparison;
17432
        }
17433
      }
17434
      return 0;
17435
    }
17436
 
17437
    public _Fields fieldForId(int fieldId) {
17438
      return _Fields.findByThriftId(fieldId);
17439
    }
17440
 
17441
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17442
      org.apache.thrift.protocol.TField field;
17443
      iprot.readStructBegin();
17444
      while (true)
17445
      {
17446
        field = iprot.readFieldBegin();
17447
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17448
          break;
17449
        }
17450
        switch (field.id) {
17451
          case 1: // ID
17452
            if (field.type == org.apache.thrift.protocol.TType.I64) {
17453
              this.id = iprot.readI64();
17454
              setIdIsSet(true);
17455
            } else { 
17456
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17457
            }
17458
            break;
17459
          default:
17460
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17461
        }
17462
        iprot.readFieldEnd();
17463
      }
17464
      iprot.readStructEnd();
17465
      validate();
17466
    }
17467
 
17468
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17469
      validate();
17470
 
17471
      oprot.writeStructBegin(STRUCT_DESC);
17472
      oprot.writeFieldBegin(ID_FIELD_DESC);
17473
      oprot.writeI64(this.id);
17474
      oprot.writeFieldEnd();
17475
      oprot.writeFieldStop();
17476
      oprot.writeStructEnd();
17477
    }
17478
 
17479
    @Override
17480
    public String toString() {
17481
      StringBuilder sb = new StringBuilder("settlePurchaseReturn_args(");
17482
      boolean first = true;
17483
 
17484
      sb.append("id:");
17485
      sb.append(this.id);
17486
      first = false;
17487
      sb.append(")");
17488
      return sb.toString();
17489
    }
17490
 
17491
    public void validate() throws org.apache.thrift.TException {
17492
      // check for required fields
17493
    }
17494
 
17495
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17496
      try {
17497
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17498
      } catch (org.apache.thrift.TException te) {
17499
        throw new java.io.IOException(te);
17500
      }
17501
    }
17502
 
17503
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17504
      try {
17505
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
17506
        __isset_bit_vector = new BitSet(1);
17507
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17508
      } catch (org.apache.thrift.TException te) {
17509
        throw new java.io.IOException(te);
17510
      }
17511
    }
17512
 
17513
  }
17514
 
17515
  public static class settlePurchaseReturn_result implements org.apache.thrift.TBase<settlePurchaseReturn_result, settlePurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
17516
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("settlePurchaseReturn_result");
17517
 
17518
 
17519
 
17520
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17521
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17522
;
17523
 
17524
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17525
 
17526
      static {
17527
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17528
          byName.put(field.getFieldName(), field);
17529
        }
17530
      }
17531
 
17532
      /**
17533
       * Find the _Fields constant that matches fieldId, or null if its not found.
17534
       */
17535
      public static _Fields findByThriftId(int fieldId) {
17536
        switch(fieldId) {
17537
          default:
17538
            return null;
17539
        }
17540
      }
17541
 
17542
      /**
17543
       * Find the _Fields constant that matches fieldId, throwing an exception
17544
       * if it is not found.
17545
       */
17546
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17547
        _Fields fields = findByThriftId(fieldId);
17548
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17549
        return fields;
17550
      }
17551
 
17552
      /**
17553
       * Find the _Fields constant that matches name, or null if its not found.
17554
       */
17555
      public static _Fields findByName(String name) {
17556
        return byName.get(name);
17557
      }
17558
 
17559
      private final short _thriftId;
17560
      private final String _fieldName;
17561
 
17562
      _Fields(short thriftId, String fieldName) {
17563
        _thriftId = thriftId;
17564
        _fieldName = fieldName;
17565
      }
17566
 
17567
      public short getThriftFieldId() {
17568
        return _thriftId;
17569
      }
17570
 
17571
      public String getFieldName() {
17572
        return _fieldName;
17573
      }
17574
    }
17575
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17576
    static {
17577
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17578
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17579
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(settlePurchaseReturn_result.class, metaDataMap);
17580
    }
17581
 
17582
    public settlePurchaseReturn_result() {
17583
    }
17584
 
17585
    /**
17586
     * Performs a deep copy on <i>other</i>.
17587
     */
17588
    public settlePurchaseReturn_result(settlePurchaseReturn_result other) {
17589
    }
17590
 
17591
    public settlePurchaseReturn_result deepCopy() {
17592
      return new settlePurchaseReturn_result(this);
17593
    }
17594
 
17595
    @Override
17596
    public void clear() {
17597
    }
17598
 
17599
    public void setFieldValue(_Fields field, Object value) {
17600
      switch (field) {
17601
      }
17602
    }
17603
 
17604
    public Object getFieldValue(_Fields field) {
17605
      switch (field) {
17606
      }
17607
      throw new IllegalStateException();
17608
    }
17609
 
17610
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17611
    public boolean isSet(_Fields field) {
17612
      if (field == null) {
17613
        throw new IllegalArgumentException();
17614
      }
17615
 
17616
      switch (field) {
17617
      }
17618
      throw new IllegalStateException();
17619
    }
17620
 
17621
    @Override
17622
    public boolean equals(Object that) {
17623
      if (that == null)
17624
        return false;
17625
      if (that instanceof settlePurchaseReturn_result)
17626
        return this.equals((settlePurchaseReturn_result)that);
17627
      return false;
17628
    }
17629
 
17630
    public boolean equals(settlePurchaseReturn_result that) {
17631
      if (that == null)
17632
        return false;
17633
 
17634
      return true;
17635
    }
17636
 
17637
    @Override
17638
    public int hashCode() {
17639
      return 0;
17640
    }
17641
 
17642
    public int compareTo(settlePurchaseReturn_result other) {
17643
      if (!getClass().equals(other.getClass())) {
17644
        return getClass().getName().compareTo(other.getClass().getName());
17645
      }
17646
 
17647
      int lastComparison = 0;
17648
      settlePurchaseReturn_result typedOther = (settlePurchaseReturn_result)other;
17649
 
17650
      return 0;
17651
    }
17652
 
17653
    public _Fields fieldForId(int fieldId) {
17654
      return _Fields.findByThriftId(fieldId);
17655
    }
17656
 
17657
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17658
      org.apache.thrift.protocol.TField field;
17659
      iprot.readStructBegin();
17660
      while (true)
17661
      {
17662
        field = iprot.readFieldBegin();
17663
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17664
          break;
17665
        }
17666
        switch (field.id) {
17667
          default:
17668
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17669
        }
17670
        iprot.readFieldEnd();
17671
      }
17672
      iprot.readStructEnd();
17673
      validate();
17674
    }
17675
 
17676
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17677
      oprot.writeStructBegin(STRUCT_DESC);
17678
 
17679
      oprot.writeFieldStop();
17680
      oprot.writeStructEnd();
17681
    }
17682
 
17683
    @Override
17684
    public String toString() {
17685
      StringBuilder sb = new StringBuilder("settlePurchaseReturn_result(");
17686
      boolean first = true;
17687
 
17688
      sb.append(")");
17689
      return sb.toString();
17690
    }
17691
 
17692
    public void validate() throws org.apache.thrift.TException {
17693
      // check for required fields
17694
    }
17695
 
17696
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17697
      try {
17698
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17699
      } catch (org.apache.thrift.TException te) {
17700
        throw new java.io.IOException(te);
17701
      }
17702
    }
17703
 
17704
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17705
      try {
17706
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17707
      } catch (org.apache.thrift.TException te) {
17708
        throw new java.io.IOException(te);
17709
      }
17710
    }
17711
 
17712
  }
17713
 
17714
  public static class getUnsettledPurchaseReturns_args implements org.apache.thrift.TBase<getUnsettledPurchaseReturns_args, getUnsettledPurchaseReturns_args._Fields>, java.io.Serializable, Cloneable   {
17715
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUnsettledPurchaseReturns_args");
17716
 
17717
 
17718
 
17719
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17720
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17721
;
17722
 
17723
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17724
 
17725
      static {
17726
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17727
          byName.put(field.getFieldName(), field);
17728
        }
17729
      }
17730
 
17731
      /**
17732
       * Find the _Fields constant that matches fieldId, or null if its not found.
17733
       */
17734
      public static _Fields findByThriftId(int fieldId) {
17735
        switch(fieldId) {
17736
          default:
17737
            return null;
17738
        }
17739
      }
17740
 
17741
      /**
17742
       * Find the _Fields constant that matches fieldId, throwing an exception
17743
       * if it is not found.
17744
       */
17745
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17746
        _Fields fields = findByThriftId(fieldId);
17747
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17748
        return fields;
17749
      }
17750
 
17751
      /**
17752
       * Find the _Fields constant that matches name, or null if its not found.
17753
       */
17754
      public static _Fields findByName(String name) {
17755
        return byName.get(name);
17756
      }
17757
 
17758
      private final short _thriftId;
17759
      private final String _fieldName;
17760
 
17761
      _Fields(short thriftId, String fieldName) {
17762
        _thriftId = thriftId;
17763
        _fieldName = fieldName;
17764
      }
17765
 
17766
      public short getThriftFieldId() {
17767
        return _thriftId;
17768
      }
17769
 
17770
      public String getFieldName() {
17771
        return _fieldName;
17772
      }
17773
    }
17774
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17775
    static {
17776
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17777
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17778
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUnsettledPurchaseReturns_args.class, metaDataMap);
17779
    }
17780
 
17781
    public getUnsettledPurchaseReturns_args() {
17782
    }
17783
 
17784
    /**
17785
     * Performs a deep copy on <i>other</i>.
17786
     */
17787
    public getUnsettledPurchaseReturns_args(getUnsettledPurchaseReturns_args other) {
17788
    }
17789
 
17790
    public getUnsettledPurchaseReturns_args deepCopy() {
17791
      return new getUnsettledPurchaseReturns_args(this);
17792
    }
17793
 
17794
    @Override
17795
    public void clear() {
17796
    }
17797
 
17798
    public void setFieldValue(_Fields field, Object value) {
17799
      switch (field) {
17800
      }
17801
    }
17802
 
17803
    public Object getFieldValue(_Fields field) {
17804
      switch (field) {
17805
      }
17806
      throw new IllegalStateException();
17807
    }
17808
 
17809
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17810
    public boolean isSet(_Fields field) {
17811
      if (field == null) {
17812
        throw new IllegalArgumentException();
17813
      }
17814
 
17815
      switch (field) {
17816
      }
17817
      throw new IllegalStateException();
17818
    }
17819
 
17820
    @Override
17821
    public boolean equals(Object that) {
17822
      if (that == null)
17823
        return false;
17824
      if (that instanceof getUnsettledPurchaseReturns_args)
17825
        return this.equals((getUnsettledPurchaseReturns_args)that);
17826
      return false;
17827
    }
17828
 
17829
    public boolean equals(getUnsettledPurchaseReturns_args that) {
17830
      if (that == null)
17831
        return false;
17832
 
17833
      return true;
17834
    }
17835
 
17836
    @Override
17837
    public int hashCode() {
17838
      return 0;
17839
    }
17840
 
17841
    public int compareTo(getUnsettledPurchaseReturns_args other) {
17842
      if (!getClass().equals(other.getClass())) {
17843
        return getClass().getName().compareTo(other.getClass().getName());
17844
      }
17845
 
17846
      int lastComparison = 0;
17847
      getUnsettledPurchaseReturns_args typedOther = (getUnsettledPurchaseReturns_args)other;
17848
 
17849
      return 0;
17850
    }
17851
 
17852
    public _Fields fieldForId(int fieldId) {
17853
      return _Fields.findByThriftId(fieldId);
17854
    }
17855
 
17856
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17857
      org.apache.thrift.protocol.TField field;
17858
      iprot.readStructBegin();
17859
      while (true)
17860
      {
17861
        field = iprot.readFieldBegin();
17862
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17863
          break;
17864
        }
17865
        switch (field.id) {
17866
          default:
17867
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17868
        }
17869
        iprot.readFieldEnd();
17870
      }
17871
      iprot.readStructEnd();
17872
      validate();
17873
    }
17874
 
17875
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17876
      validate();
17877
 
17878
      oprot.writeStructBegin(STRUCT_DESC);
17879
      oprot.writeFieldStop();
17880
      oprot.writeStructEnd();
17881
    }
17882
 
17883
    @Override
17884
    public String toString() {
17885
      StringBuilder sb = new StringBuilder("getUnsettledPurchaseReturns_args(");
17886
      boolean first = true;
17887
 
17888
      sb.append(")");
17889
      return sb.toString();
17890
    }
17891
 
17892
    public void validate() throws org.apache.thrift.TException {
17893
      // check for required fields
17894
    }
17895
 
17896
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17897
      try {
17898
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17899
      } catch (org.apache.thrift.TException te) {
17900
        throw new java.io.IOException(te);
17901
      }
17902
    }
17903
 
17904
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17905
      try {
17906
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17907
      } catch (org.apache.thrift.TException te) {
17908
        throw new java.io.IOException(te);
17909
      }
17910
    }
17911
 
17912
  }
17913
 
17914
  public static class getUnsettledPurchaseReturns_result implements org.apache.thrift.TBase<getUnsettledPurchaseReturns_result, getUnsettledPurchaseReturns_result._Fields>, java.io.Serializable, Cloneable   {
17915
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUnsettledPurchaseReturns_result");
17916
 
17917
    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);
17918
 
17919
    private List<PurchaseReturn> success; // required
17920
 
17921
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17922
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17923
      SUCCESS((short)0, "success");
17924
 
17925
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17926
 
17927
      static {
17928
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17929
          byName.put(field.getFieldName(), field);
17930
        }
17931
      }
17932
 
17933
      /**
17934
       * Find the _Fields constant that matches fieldId, or null if its not found.
17935
       */
17936
      public static _Fields findByThriftId(int fieldId) {
17937
        switch(fieldId) {
17938
          case 0: // SUCCESS
17939
            return SUCCESS;
17940
          default:
17941
            return null;
17942
        }
17943
      }
17944
 
17945
      /**
17946
       * Find the _Fields constant that matches fieldId, throwing an exception
17947
       * if it is not found.
17948
       */
17949
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17950
        _Fields fields = findByThriftId(fieldId);
17951
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17952
        return fields;
17953
      }
17954
 
17955
      /**
17956
       * Find the _Fields constant that matches name, or null if its not found.
17957
       */
17958
      public static _Fields findByName(String name) {
17959
        return byName.get(name);
17960
      }
17961
 
17962
      private final short _thriftId;
17963
      private final String _fieldName;
17964
 
17965
      _Fields(short thriftId, String fieldName) {
17966
        _thriftId = thriftId;
17967
        _fieldName = fieldName;
17968
      }
17969
 
17970
      public short getThriftFieldId() {
17971
        return _thriftId;
17972
      }
17973
 
17974
      public String getFieldName() {
17975
        return _fieldName;
17976
      }
17977
    }
17978
 
17979
    // isset id assignments
17980
 
17981
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17982
    static {
17983
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17984
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17985
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
17986
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class))));
17987
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17988
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUnsettledPurchaseReturns_result.class, metaDataMap);
17989
    }
17990
 
17991
    public getUnsettledPurchaseReturns_result() {
17992
    }
17993
 
17994
    public getUnsettledPurchaseReturns_result(
17995
      List<PurchaseReturn> success)
17996
    {
17997
      this();
17998
      this.success = success;
17999
    }
18000
 
18001
    /**
18002
     * Performs a deep copy on <i>other</i>.
18003
     */
18004
    public getUnsettledPurchaseReturns_result(getUnsettledPurchaseReturns_result other) {
18005
      if (other.isSetSuccess()) {
18006
        List<PurchaseReturn> __this__success = new ArrayList<PurchaseReturn>();
18007
        for (PurchaseReturn other_element : other.success) {
18008
          __this__success.add(new PurchaseReturn(other_element));
18009
        }
18010
        this.success = __this__success;
18011
      }
18012
    }
18013
 
18014
    public getUnsettledPurchaseReturns_result deepCopy() {
18015
      return new getUnsettledPurchaseReturns_result(this);
18016
    }
18017
 
18018
    @Override
18019
    public void clear() {
18020
      this.success = null;
18021
    }
18022
 
18023
    public int getSuccessSize() {
18024
      return (this.success == null) ? 0 : this.success.size();
18025
    }
18026
 
18027
    public java.util.Iterator<PurchaseReturn> getSuccessIterator() {
18028
      return (this.success == null) ? null : this.success.iterator();
18029
    }
18030
 
18031
    public void addToSuccess(PurchaseReturn elem) {
18032
      if (this.success == null) {
18033
        this.success = new ArrayList<PurchaseReturn>();
18034
      }
18035
      this.success.add(elem);
18036
    }
18037
 
18038
    public List<PurchaseReturn> getSuccess() {
18039
      return this.success;
18040
    }
18041
 
18042
    public void setSuccess(List<PurchaseReturn> success) {
18043
      this.success = success;
18044
    }
18045
 
18046
    public void unsetSuccess() {
18047
      this.success = null;
18048
    }
18049
 
18050
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
18051
    public boolean isSetSuccess() {
18052
      return this.success != null;
18053
    }
18054
 
18055
    public void setSuccessIsSet(boolean value) {
18056
      if (!value) {
18057
        this.success = null;
18058
      }
18059
    }
18060
 
18061
    public void setFieldValue(_Fields field, Object value) {
18062
      switch (field) {
18063
      case SUCCESS:
18064
        if (value == null) {
18065
          unsetSuccess();
18066
        } else {
18067
          setSuccess((List<PurchaseReturn>)value);
18068
        }
18069
        break;
18070
 
18071
      }
18072
    }
18073
 
18074
    public Object getFieldValue(_Fields field) {
18075
      switch (field) {
18076
      case SUCCESS:
18077
        return getSuccess();
18078
 
18079
      }
18080
      throw new IllegalStateException();
18081
    }
18082
 
18083
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18084
    public boolean isSet(_Fields field) {
18085
      if (field == null) {
18086
        throw new IllegalArgumentException();
18087
      }
18088
 
18089
      switch (field) {
18090
      case SUCCESS:
18091
        return isSetSuccess();
18092
      }
18093
      throw new IllegalStateException();
18094
    }
18095
 
18096
    @Override
18097
    public boolean equals(Object that) {
18098
      if (that == null)
18099
        return false;
18100
      if (that instanceof getUnsettledPurchaseReturns_result)
18101
        return this.equals((getUnsettledPurchaseReturns_result)that);
18102
      return false;
18103
    }
18104
 
18105
    public boolean equals(getUnsettledPurchaseReturns_result that) {
18106
      if (that == null)
18107
        return false;
18108
 
18109
      boolean this_present_success = true && this.isSetSuccess();
18110
      boolean that_present_success = true && that.isSetSuccess();
18111
      if (this_present_success || that_present_success) {
18112
        if (!(this_present_success && that_present_success))
18113
          return false;
18114
        if (!this.success.equals(that.success))
18115
          return false;
18116
      }
18117
 
18118
      return true;
18119
    }
18120
 
18121
    @Override
18122
    public int hashCode() {
18123
      return 0;
18124
    }
18125
 
18126
    public int compareTo(getUnsettledPurchaseReturns_result other) {
18127
      if (!getClass().equals(other.getClass())) {
18128
        return getClass().getName().compareTo(other.getClass().getName());
18129
      }
18130
 
18131
      int lastComparison = 0;
18132
      getUnsettledPurchaseReturns_result typedOther = (getUnsettledPurchaseReturns_result)other;
18133
 
18134
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
18135
      if (lastComparison != 0) {
18136
        return lastComparison;
18137
      }
18138
      if (isSetSuccess()) {
18139
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
18140
        if (lastComparison != 0) {
18141
          return lastComparison;
18142
        }
18143
      }
18144
      return 0;
18145
    }
18146
 
18147
    public _Fields fieldForId(int fieldId) {
18148
      return _Fields.findByThriftId(fieldId);
18149
    }
18150
 
18151
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18152
      org.apache.thrift.protocol.TField field;
18153
      iprot.readStructBegin();
18154
      while (true)
18155
      {
18156
        field = iprot.readFieldBegin();
18157
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18158
          break;
18159
        }
18160
        switch (field.id) {
18161
          case 0: // SUCCESS
18162
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
18163
              {
21847 amit.gupta 18164
                org.apache.thrift.protocol.TList _list36 = iprot.readListBegin();
18165
                this.success = new ArrayList<PurchaseReturn>(_list36.size);
18166
                for (int _i37 = 0; _i37 < _list36.size; ++_i37)
6467 amar.kumar 18167
                {
21847 amit.gupta 18168
                  PurchaseReturn _elem38; // required
18169
                  _elem38 = new PurchaseReturn();
18170
                  _elem38.read(iprot);
18171
                  this.success.add(_elem38);
6467 amar.kumar 18172
                }
18173
                iprot.readListEnd();
18174
              }
18175
            } else { 
18176
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18177
            }
18178
            break;
18179
          default:
18180
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18181
        }
18182
        iprot.readFieldEnd();
18183
      }
18184
      iprot.readStructEnd();
18185
      validate();
18186
    }
18187
 
18188
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18189
      oprot.writeStructBegin(STRUCT_DESC);
18190
 
18191
      if (this.isSetSuccess()) {
18192
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18193
        {
18194
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
21847 amit.gupta 18195
          for (PurchaseReturn _iter39 : this.success)
6467 amar.kumar 18196
          {
21847 amit.gupta 18197
            _iter39.write(oprot);
6467 amar.kumar 18198
          }
18199
          oprot.writeListEnd();
18200
        }
18201
        oprot.writeFieldEnd();
18202
      }
18203
      oprot.writeFieldStop();
18204
      oprot.writeStructEnd();
18205
    }
18206
 
18207
    @Override
18208
    public String toString() {
18209
      StringBuilder sb = new StringBuilder("getUnsettledPurchaseReturns_result(");
18210
      boolean first = true;
18211
 
18212
      sb.append("success:");
18213
      if (this.success == null) {
18214
        sb.append("null");
18215
      } else {
18216
        sb.append(this.success);
18217
      }
18218
      first = false;
18219
      sb.append(")");
18220
      return sb.toString();
18221
    }
18222
 
18223
    public void validate() throws org.apache.thrift.TException {
18224
      // check for required fields
18225
    }
18226
 
18227
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18228
      try {
18229
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18230
      } catch (org.apache.thrift.TException te) {
18231
        throw new java.io.IOException(te);
18232
      }
18233
    }
18234
 
18235
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18236
      try {
18237
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18238
      } catch (org.apache.thrift.TException te) {
18239
        throw new java.io.IOException(te);
18240
      }
18241
    }
18242
 
18243
  }
18244
 
6630 amar.kumar 18245
  public static class getInvoice_args implements org.apache.thrift.TBase<getInvoice_args, getInvoice_args._Fields>, java.io.Serializable, Cloneable   {
18246
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoice_args");
18247
 
18248
    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);
18249
    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);
18250
 
18251
    private String invoiceNumber; // required
18252
    private long supplierId; // required
18253
 
18254
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18255
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18256
      INVOICE_NUMBER((short)1, "invoiceNumber"),
18257
      SUPPLIER_ID((short)2, "supplierId");
18258
 
18259
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18260
 
18261
      static {
18262
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18263
          byName.put(field.getFieldName(), field);
18264
        }
18265
      }
18266
 
18267
      /**
18268
       * Find the _Fields constant that matches fieldId, or null if its not found.
18269
       */
18270
      public static _Fields findByThriftId(int fieldId) {
18271
        switch(fieldId) {
18272
          case 1: // INVOICE_NUMBER
18273
            return INVOICE_NUMBER;
18274
          case 2: // SUPPLIER_ID
18275
            return SUPPLIER_ID;
18276
          default:
18277
            return null;
18278
        }
18279
      }
18280
 
18281
      /**
18282
       * Find the _Fields constant that matches fieldId, throwing an exception
18283
       * if it is not found.
18284
       */
18285
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18286
        _Fields fields = findByThriftId(fieldId);
18287
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18288
        return fields;
18289
      }
18290
 
18291
      /**
18292
       * Find the _Fields constant that matches name, or null if its not found.
18293
       */
18294
      public static _Fields findByName(String name) {
18295
        return byName.get(name);
18296
      }
18297
 
18298
      private final short _thriftId;
18299
      private final String _fieldName;
18300
 
18301
      _Fields(short thriftId, String fieldName) {
18302
        _thriftId = thriftId;
18303
        _fieldName = fieldName;
18304
      }
18305
 
18306
      public short getThriftFieldId() {
18307
        return _thriftId;
18308
      }
18309
 
18310
      public String getFieldName() {
18311
        return _fieldName;
18312
      }
18313
    }
18314
 
18315
    // isset id assignments
18316
    private static final int __SUPPLIERID_ISSET_ID = 0;
18317
    private BitSet __isset_bit_vector = new BitSet(1);
18318
 
18319
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18320
    static {
18321
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18322
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18323
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
18324
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18325
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18326
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18327
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoice_args.class, metaDataMap);
18328
    }
18329
 
18330
    public getInvoice_args() {
18331
    }
18332
 
18333
    public getInvoice_args(
18334
      String invoiceNumber,
18335
      long supplierId)
18336
    {
18337
      this();
18338
      this.invoiceNumber = invoiceNumber;
18339
      this.supplierId = supplierId;
18340
      setSupplierIdIsSet(true);
18341
    }
18342
 
18343
    /**
18344
     * Performs a deep copy on <i>other</i>.
18345
     */
18346
    public getInvoice_args(getInvoice_args other) {
18347
      __isset_bit_vector.clear();
18348
      __isset_bit_vector.or(other.__isset_bit_vector);
18349
      if (other.isSetInvoiceNumber()) {
18350
        this.invoiceNumber = other.invoiceNumber;
18351
      }
18352
      this.supplierId = other.supplierId;
18353
    }
18354
 
18355
    public getInvoice_args deepCopy() {
18356
      return new getInvoice_args(this);
18357
    }
18358
 
18359
    @Override
18360
    public void clear() {
18361
      this.invoiceNumber = null;
18362
      setSupplierIdIsSet(false);
18363
      this.supplierId = 0;
18364
    }
18365
 
18366
    public String getInvoiceNumber() {
18367
      return this.invoiceNumber;
18368
    }
18369
 
18370
    public void setInvoiceNumber(String invoiceNumber) {
18371
      this.invoiceNumber = invoiceNumber;
18372
    }
18373
 
18374
    public void unsetInvoiceNumber() {
18375
      this.invoiceNumber = null;
18376
    }
18377
 
18378
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
18379
    public boolean isSetInvoiceNumber() {
18380
      return this.invoiceNumber != null;
18381
    }
18382
 
18383
    public void setInvoiceNumberIsSet(boolean value) {
18384
      if (!value) {
18385
        this.invoiceNumber = null;
18386
      }
18387
    }
18388
 
18389
    public long getSupplierId() {
18390
      return this.supplierId;
18391
    }
18392
 
18393
    public void setSupplierId(long supplierId) {
18394
      this.supplierId = supplierId;
18395
      setSupplierIdIsSet(true);
18396
    }
18397
 
18398
    public void unsetSupplierId() {
18399
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
18400
    }
18401
 
18402
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
18403
    public boolean isSetSupplierId() {
18404
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
18405
    }
18406
 
18407
    public void setSupplierIdIsSet(boolean value) {
18408
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
18409
    }
18410
 
18411
    public void setFieldValue(_Fields field, Object value) {
18412
      switch (field) {
18413
      case INVOICE_NUMBER:
18414
        if (value == null) {
18415
          unsetInvoiceNumber();
18416
        } else {
18417
          setInvoiceNumber((String)value);
18418
        }
18419
        break;
18420
 
18421
      case SUPPLIER_ID:
18422
        if (value == null) {
18423
          unsetSupplierId();
18424
        } else {
18425
          setSupplierId((Long)value);
18426
        }
18427
        break;
18428
 
18429
      }
18430
    }
18431
 
18432
    public Object getFieldValue(_Fields field) {
18433
      switch (field) {
18434
      case INVOICE_NUMBER:
18435
        return getInvoiceNumber();
18436
 
18437
      case SUPPLIER_ID:
18438
        return Long.valueOf(getSupplierId());
18439
 
18440
      }
18441
      throw new IllegalStateException();
18442
    }
18443
 
18444
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18445
    public boolean isSet(_Fields field) {
18446
      if (field == null) {
18447
        throw new IllegalArgumentException();
18448
      }
18449
 
18450
      switch (field) {
18451
      case INVOICE_NUMBER:
18452
        return isSetInvoiceNumber();
18453
      case SUPPLIER_ID:
18454
        return isSetSupplierId();
18455
      }
18456
      throw new IllegalStateException();
18457
    }
18458
 
18459
    @Override
18460
    public boolean equals(Object that) {
18461
      if (that == null)
18462
        return false;
18463
      if (that instanceof getInvoice_args)
18464
        return this.equals((getInvoice_args)that);
18465
      return false;
18466
    }
18467
 
18468
    public boolean equals(getInvoice_args that) {
18469
      if (that == null)
18470
        return false;
18471
 
18472
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
18473
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
18474
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
18475
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
18476
          return false;
18477
        if (!this.invoiceNumber.equals(that.invoiceNumber))
18478
          return false;
18479
      }
18480
 
18481
      boolean this_present_supplierId = true;
18482
      boolean that_present_supplierId = true;
18483
      if (this_present_supplierId || that_present_supplierId) {
18484
        if (!(this_present_supplierId && that_present_supplierId))
18485
          return false;
18486
        if (this.supplierId != that.supplierId)
18487
          return false;
18488
      }
18489
 
18490
      return true;
18491
    }
18492
 
18493
    @Override
18494
    public int hashCode() {
18495
      return 0;
18496
    }
18497
 
18498
    public int compareTo(getInvoice_args other) {
18499
      if (!getClass().equals(other.getClass())) {
18500
        return getClass().getName().compareTo(other.getClass().getName());
18501
      }
18502
 
18503
      int lastComparison = 0;
18504
      getInvoice_args typedOther = (getInvoice_args)other;
18505
 
18506
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
18507
      if (lastComparison != 0) {
18508
        return lastComparison;
18509
      }
18510
      if (isSetInvoiceNumber()) {
18511
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
18512
        if (lastComparison != 0) {
18513
          return lastComparison;
18514
        }
18515
      }
18516
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
18517
      if (lastComparison != 0) {
18518
        return lastComparison;
18519
      }
18520
      if (isSetSupplierId()) {
18521
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
18522
        if (lastComparison != 0) {
18523
          return lastComparison;
18524
        }
18525
      }
18526
      return 0;
18527
    }
18528
 
18529
    public _Fields fieldForId(int fieldId) {
18530
      return _Fields.findByThriftId(fieldId);
18531
    }
18532
 
18533
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18534
      org.apache.thrift.protocol.TField field;
18535
      iprot.readStructBegin();
18536
      while (true)
18537
      {
18538
        field = iprot.readFieldBegin();
18539
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18540
          break;
18541
        }
18542
        switch (field.id) {
18543
          case 1: // INVOICE_NUMBER
18544
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
18545
              this.invoiceNumber = iprot.readString();
18546
            } else { 
18547
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18548
            }
18549
            break;
18550
          case 2: // SUPPLIER_ID
18551
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18552
              this.supplierId = iprot.readI64();
18553
              setSupplierIdIsSet(true);
18554
            } else { 
18555
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18556
            }
18557
            break;
18558
          default:
18559
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18560
        }
18561
        iprot.readFieldEnd();
18562
      }
18563
      iprot.readStructEnd();
18564
      validate();
18565
    }
18566
 
18567
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18568
      validate();
18569
 
18570
      oprot.writeStructBegin(STRUCT_DESC);
18571
      if (this.invoiceNumber != null) {
18572
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
18573
        oprot.writeString(this.invoiceNumber);
18574
        oprot.writeFieldEnd();
18575
      }
18576
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
18577
      oprot.writeI64(this.supplierId);
18578
      oprot.writeFieldEnd();
18579
      oprot.writeFieldStop();
18580
      oprot.writeStructEnd();
18581
    }
18582
 
18583
    @Override
18584
    public String toString() {
18585
      StringBuilder sb = new StringBuilder("getInvoice_args(");
18586
      boolean first = true;
18587
 
18588
      sb.append("invoiceNumber:");
18589
      if (this.invoiceNumber == null) {
18590
        sb.append("null");
18591
      } else {
18592
        sb.append(this.invoiceNumber);
18593
      }
18594
      first = false;
18595
      if (!first) sb.append(", ");
18596
      sb.append("supplierId:");
18597
      sb.append(this.supplierId);
18598
      first = false;
18599
      sb.append(")");
18600
      return sb.toString();
18601
    }
18602
 
18603
    public void validate() throws org.apache.thrift.TException {
18604
      // check for required fields
18605
    }
18606
 
18607
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18608
      try {
18609
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18610
      } catch (org.apache.thrift.TException te) {
18611
        throw new java.io.IOException(te);
18612
      }
18613
    }
18614
 
18615
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18616
      try {
24832 tejbeer 18617
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
18618
        __isset_bit_vector = new BitSet(1);
6630 amar.kumar 18619
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18620
      } catch (org.apache.thrift.TException te) {
18621
        throw new java.io.IOException(te);
18622
      }
18623
    }
18624
 
18625
  }
18626
 
18627
  public static class getInvoice_result implements org.apache.thrift.TBase<getInvoice_result, getInvoice_result._Fields>, java.io.Serializable, Cloneable   {
18628
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoice_result");
18629
 
18630
    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);
18631
 
18632
    private List<PurchaseReturn> success; // required
18633
 
18634
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18635
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18636
      SUCCESS((short)0, "success");
18637
 
18638
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18639
 
18640
      static {
18641
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18642
          byName.put(field.getFieldName(), field);
18643
        }
18644
      }
18645
 
18646
      /**
18647
       * Find the _Fields constant that matches fieldId, or null if its not found.
18648
       */
18649
      public static _Fields findByThriftId(int fieldId) {
18650
        switch(fieldId) {
18651
          case 0: // SUCCESS
18652
            return SUCCESS;
18653
          default:
18654
            return null;
18655
        }
18656
      }
18657
 
18658
      /**
18659
       * Find the _Fields constant that matches fieldId, throwing an exception
18660
       * if it is not found.
18661
       */
18662
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18663
        _Fields fields = findByThriftId(fieldId);
18664
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18665
        return fields;
18666
      }
18667
 
18668
      /**
18669
       * Find the _Fields constant that matches name, or null if its not found.
18670
       */
18671
      public static _Fields findByName(String name) {
18672
        return byName.get(name);
18673
      }
18674
 
18675
      private final short _thriftId;
18676
      private final String _fieldName;
18677
 
18678
      _Fields(short thriftId, String fieldName) {
18679
        _thriftId = thriftId;
18680
        _fieldName = fieldName;
18681
      }
18682
 
18683
      public short getThriftFieldId() {
18684
        return _thriftId;
18685
      }
18686
 
18687
      public String getFieldName() {
18688
        return _fieldName;
18689
      }
18690
    }
18691
 
18692
    // isset id assignments
18693
 
18694
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18695
    static {
18696
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18697
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18698
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
18699
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class))));
18700
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18701
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoice_result.class, metaDataMap);
18702
    }
18703
 
18704
    public getInvoice_result() {
18705
    }
18706
 
18707
    public getInvoice_result(
18708
      List<PurchaseReturn> success)
18709
    {
18710
      this();
18711
      this.success = success;
18712
    }
18713
 
18714
    /**
18715
     * Performs a deep copy on <i>other</i>.
18716
     */
18717
    public getInvoice_result(getInvoice_result other) {
18718
      if (other.isSetSuccess()) {
18719
        List<PurchaseReturn> __this__success = new ArrayList<PurchaseReturn>();
18720
        for (PurchaseReturn other_element : other.success) {
18721
          __this__success.add(new PurchaseReturn(other_element));
18722
        }
18723
        this.success = __this__success;
18724
      }
18725
    }
18726
 
18727
    public getInvoice_result deepCopy() {
18728
      return new getInvoice_result(this);
18729
    }
18730
 
18731
    @Override
18732
    public void clear() {
18733
      this.success = null;
18734
    }
18735
 
18736
    public int getSuccessSize() {
18737
      return (this.success == null) ? 0 : this.success.size();
18738
    }
18739
 
18740
    public java.util.Iterator<PurchaseReturn> getSuccessIterator() {
18741
      return (this.success == null) ? null : this.success.iterator();
18742
    }
18743
 
18744
    public void addToSuccess(PurchaseReturn elem) {
18745
      if (this.success == null) {
18746
        this.success = new ArrayList<PurchaseReturn>();
18747
      }
18748
      this.success.add(elem);
18749
    }
18750
 
18751
    public List<PurchaseReturn> getSuccess() {
18752
      return this.success;
18753
    }
18754
 
18755
    public void setSuccess(List<PurchaseReturn> success) {
18756
      this.success = success;
18757
    }
18758
 
18759
    public void unsetSuccess() {
18760
      this.success = null;
18761
    }
18762
 
18763
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
18764
    public boolean isSetSuccess() {
18765
      return this.success != null;
18766
    }
18767
 
18768
    public void setSuccessIsSet(boolean value) {
18769
      if (!value) {
18770
        this.success = null;
18771
      }
18772
    }
18773
 
18774
    public void setFieldValue(_Fields field, Object value) {
18775
      switch (field) {
18776
      case SUCCESS:
18777
        if (value == null) {
18778
          unsetSuccess();
18779
        } else {
18780
          setSuccess((List<PurchaseReturn>)value);
18781
        }
18782
        break;
18783
 
18784
      }
18785
    }
18786
 
18787
    public Object getFieldValue(_Fields field) {
18788
      switch (field) {
18789
      case SUCCESS:
18790
        return getSuccess();
18791
 
18792
      }
18793
      throw new IllegalStateException();
18794
    }
18795
 
18796
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18797
    public boolean isSet(_Fields field) {
18798
      if (field == null) {
18799
        throw new IllegalArgumentException();
18800
      }
18801
 
18802
      switch (field) {
18803
      case SUCCESS:
18804
        return isSetSuccess();
18805
      }
18806
      throw new IllegalStateException();
18807
    }
18808
 
18809
    @Override
18810
    public boolean equals(Object that) {
18811
      if (that == null)
18812
        return false;
18813
      if (that instanceof getInvoice_result)
18814
        return this.equals((getInvoice_result)that);
18815
      return false;
18816
    }
18817
 
18818
    public boolean equals(getInvoice_result that) {
18819
      if (that == null)
18820
        return false;
18821
 
18822
      boolean this_present_success = true && this.isSetSuccess();
18823
      boolean that_present_success = true && that.isSetSuccess();
18824
      if (this_present_success || that_present_success) {
18825
        if (!(this_present_success && that_present_success))
18826
          return false;
18827
        if (!this.success.equals(that.success))
18828
          return false;
18829
      }
18830
 
18831
      return true;
18832
    }
18833
 
18834
    @Override
18835
    public int hashCode() {
18836
      return 0;
18837
    }
18838
 
18839
    public int compareTo(getInvoice_result other) {
18840
      if (!getClass().equals(other.getClass())) {
18841
        return getClass().getName().compareTo(other.getClass().getName());
18842
      }
18843
 
18844
      int lastComparison = 0;
18845
      getInvoice_result typedOther = (getInvoice_result)other;
18846
 
18847
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
18848
      if (lastComparison != 0) {
18849
        return lastComparison;
18850
      }
18851
      if (isSetSuccess()) {
18852
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
18853
        if (lastComparison != 0) {
18854
          return lastComparison;
18855
        }
18856
      }
18857
      return 0;
18858
    }
18859
 
18860
    public _Fields fieldForId(int fieldId) {
18861
      return _Fields.findByThriftId(fieldId);
18862
    }
18863
 
18864
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18865
      org.apache.thrift.protocol.TField field;
18866
      iprot.readStructBegin();
18867
      while (true)
18868
      {
18869
        field = iprot.readFieldBegin();
18870
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18871
          break;
18872
        }
18873
        switch (field.id) {
18874
          case 0: // SUCCESS
18875
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
18876
              {
21847 amit.gupta 18877
                org.apache.thrift.protocol.TList _list40 = iprot.readListBegin();
18878
                this.success = new ArrayList<PurchaseReturn>(_list40.size);
18879
                for (int _i41 = 0; _i41 < _list40.size; ++_i41)
6630 amar.kumar 18880
                {
21847 amit.gupta 18881
                  PurchaseReturn _elem42; // required
18882
                  _elem42 = new PurchaseReturn();
18883
                  _elem42.read(iprot);
18884
                  this.success.add(_elem42);
6630 amar.kumar 18885
                }
18886
                iprot.readListEnd();
18887
              }
18888
            } else { 
18889
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18890
            }
18891
            break;
18892
          default:
18893
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18894
        }
18895
        iprot.readFieldEnd();
18896
      }
18897
      iprot.readStructEnd();
18898
      validate();
18899
    }
18900
 
18901
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18902
      oprot.writeStructBegin(STRUCT_DESC);
18903
 
18904
      if (this.isSetSuccess()) {
18905
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18906
        {
18907
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
21847 amit.gupta 18908
          for (PurchaseReturn _iter43 : this.success)
6630 amar.kumar 18909
          {
21847 amit.gupta 18910
            _iter43.write(oprot);
6630 amar.kumar 18911
          }
18912
          oprot.writeListEnd();
18913
        }
18914
        oprot.writeFieldEnd();
18915
      }
18916
      oprot.writeFieldStop();
18917
      oprot.writeStructEnd();
18918
    }
18919
 
18920
    @Override
18921
    public String toString() {
18922
      StringBuilder sb = new StringBuilder("getInvoice_result(");
18923
      boolean first = true;
18924
 
18925
      sb.append("success:");
18926
      if (this.success == null) {
18927
        sb.append("null");
18928
      } else {
18929
        sb.append(this.success);
18930
      }
18931
      first = false;
18932
      sb.append(")");
18933
      return sb.toString();
18934
    }
18935
 
18936
    public void validate() throws org.apache.thrift.TException {
18937
      // check for required fields
18938
    }
18939
 
18940
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18941
      try {
18942
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18943
      } catch (org.apache.thrift.TException te) {
18944
        throw new java.io.IOException(te);
18945
      }
18946
    }
18947
 
18948
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18949
      try {
18950
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18951
      } catch (org.apache.thrift.TException te) {
18952
        throw new java.io.IOException(te);
18953
      }
18954
    }
18955
 
18956
  }
18957
 
6762 amar.kumar 18958
  public static class createPurchaseForOurExtBilling_args implements org.apache.thrift.TBase<createPurchaseForOurExtBilling_args, createPurchaseForOurExtBilling_args._Fields>, java.io.Serializable, Cloneable   {
18959
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseForOurExtBilling_args");
18960
 
18961
    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);
18962
    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 18963
    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);
18964
    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 18965
 
18966
    private String invoiceNumber; // required
18967
    private double unitPrice; // required
7672 rajveer 18968
    private double nlc; // required
6762 amar.kumar 18969
    private long itemId; // required
18970
 
18971
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18972
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18973
      INVOICE_NUMBER((short)1, "invoiceNumber"),
18974
      UNIT_PRICE((short)2, "unitPrice"),
7672 rajveer 18975
      NLC((short)3, "nlc"),
18976
      ITEM_ID((short)4, "itemId");
6762 amar.kumar 18977
 
18978
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18979
 
18980
      static {
18981
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18982
          byName.put(field.getFieldName(), field);
18983
        }
18984
      }
18985
 
18986
      /**
18987
       * Find the _Fields constant that matches fieldId, or null if its not found.
18988
       */
18989
      public static _Fields findByThriftId(int fieldId) {
18990
        switch(fieldId) {
18991
          case 1: // INVOICE_NUMBER
18992
            return INVOICE_NUMBER;
18993
          case 2: // UNIT_PRICE
18994
            return UNIT_PRICE;
7672 rajveer 18995
          case 3: // NLC
18996
            return NLC;
18997
          case 4: // ITEM_ID
6762 amar.kumar 18998
            return ITEM_ID;
18999
          default:
19000
            return null;
19001
        }
19002
      }
19003
 
19004
      /**
19005
       * Find the _Fields constant that matches fieldId, throwing an exception
19006
       * if it is not found.
19007
       */
19008
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19009
        _Fields fields = findByThriftId(fieldId);
19010
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19011
        return fields;
19012
      }
19013
 
19014
      /**
19015
       * Find the _Fields constant that matches name, or null if its not found.
19016
       */
19017
      public static _Fields findByName(String name) {
19018
        return byName.get(name);
19019
      }
19020
 
19021
      private final short _thriftId;
19022
      private final String _fieldName;
19023
 
19024
      _Fields(short thriftId, String fieldName) {
19025
        _thriftId = thriftId;
19026
        _fieldName = fieldName;
19027
      }
19028
 
19029
      public short getThriftFieldId() {
19030
        return _thriftId;
19031
      }
19032
 
19033
      public String getFieldName() {
19034
        return _fieldName;
19035
      }
19036
    }
19037
 
19038
    // isset id assignments
19039
    private static final int __UNITPRICE_ISSET_ID = 0;
7672 rajveer 19040
    private static final int __NLC_ISSET_ID = 1;
19041
    private static final int __ITEMID_ISSET_ID = 2;
19042
    private BitSet __isset_bit_vector = new BitSet(3);
6762 amar.kumar 19043
 
19044
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19045
    static {
19046
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19047
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19048
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
19049
      tmpMap.put(_Fields.UNIT_PRICE, new org.apache.thrift.meta_data.FieldMetaData("unitPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19050
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
7672 rajveer 19051
      tmpMap.put(_Fields.NLC, new org.apache.thrift.meta_data.FieldMetaData("nlc", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19052
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
6762 amar.kumar 19053
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19054
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19055
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19056
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseForOurExtBilling_args.class, metaDataMap);
19057
    }
19058
 
19059
    public createPurchaseForOurExtBilling_args() {
19060
    }
19061
 
19062
    public createPurchaseForOurExtBilling_args(
19063
      String invoiceNumber,
19064
      double unitPrice,
7672 rajveer 19065
      double nlc,
6762 amar.kumar 19066
      long itemId)
19067
    {
19068
      this();
19069
      this.invoiceNumber = invoiceNumber;
19070
      this.unitPrice = unitPrice;
19071
      setUnitPriceIsSet(true);
7672 rajveer 19072
      this.nlc = nlc;
19073
      setNlcIsSet(true);
6762 amar.kumar 19074
      this.itemId = itemId;
19075
      setItemIdIsSet(true);
19076
    }
19077
 
19078
    /**
19079
     * Performs a deep copy on <i>other</i>.
19080
     */
19081
    public createPurchaseForOurExtBilling_args(createPurchaseForOurExtBilling_args other) {
19082
      __isset_bit_vector.clear();
19083
      __isset_bit_vector.or(other.__isset_bit_vector);
19084
      if (other.isSetInvoiceNumber()) {
19085
        this.invoiceNumber = other.invoiceNumber;
19086
      }
19087
      this.unitPrice = other.unitPrice;
7672 rajveer 19088
      this.nlc = other.nlc;
6762 amar.kumar 19089
      this.itemId = other.itemId;
19090
    }
19091
 
19092
    public createPurchaseForOurExtBilling_args deepCopy() {
19093
      return new createPurchaseForOurExtBilling_args(this);
19094
    }
19095
 
19096
    @Override
19097
    public void clear() {
19098
      this.invoiceNumber = null;
19099
      setUnitPriceIsSet(false);
19100
      this.unitPrice = 0.0;
7672 rajveer 19101
      setNlcIsSet(false);
19102
      this.nlc = 0.0;
6762 amar.kumar 19103
      setItemIdIsSet(false);
19104
      this.itemId = 0;
19105
    }
19106
 
19107
    public String getInvoiceNumber() {
19108
      return this.invoiceNumber;
19109
    }
19110
 
19111
    public void setInvoiceNumber(String invoiceNumber) {
19112
      this.invoiceNumber = invoiceNumber;
19113
    }
19114
 
19115
    public void unsetInvoiceNumber() {
19116
      this.invoiceNumber = null;
19117
    }
19118
 
19119
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
19120
    public boolean isSetInvoiceNumber() {
19121
      return this.invoiceNumber != null;
19122
    }
19123
 
19124
    public void setInvoiceNumberIsSet(boolean value) {
19125
      if (!value) {
19126
        this.invoiceNumber = null;
19127
      }
19128
    }
19129
 
19130
    public double getUnitPrice() {
19131
      return this.unitPrice;
19132
    }
19133
 
19134
    public void setUnitPrice(double unitPrice) {
19135
      this.unitPrice = unitPrice;
19136
      setUnitPriceIsSet(true);
19137
    }
19138
 
19139
    public void unsetUnitPrice() {
19140
      __isset_bit_vector.clear(__UNITPRICE_ISSET_ID);
19141
    }
19142
 
19143
    /** Returns true if field unitPrice is set (has been assigned a value) and false otherwise */
19144
    public boolean isSetUnitPrice() {
19145
      return __isset_bit_vector.get(__UNITPRICE_ISSET_ID);
19146
    }
19147
 
19148
    public void setUnitPriceIsSet(boolean value) {
19149
      __isset_bit_vector.set(__UNITPRICE_ISSET_ID, value);
19150
    }
19151
 
7672 rajveer 19152
    public double getNlc() {
19153
      return this.nlc;
19154
    }
19155
 
19156
    public void setNlc(double nlc) {
19157
      this.nlc = nlc;
19158
      setNlcIsSet(true);
19159
    }
19160
 
19161
    public void unsetNlc() {
19162
      __isset_bit_vector.clear(__NLC_ISSET_ID);
19163
    }
19164
 
19165
    /** Returns true if field nlc is set (has been assigned a value) and false otherwise */
19166
    public boolean isSetNlc() {
19167
      return __isset_bit_vector.get(__NLC_ISSET_ID);
19168
    }
19169
 
19170
    public void setNlcIsSet(boolean value) {
19171
      __isset_bit_vector.set(__NLC_ISSET_ID, value);
19172
    }
19173
 
6762 amar.kumar 19174
    public long getItemId() {
19175
      return this.itemId;
19176
    }
19177
 
19178
    public void setItemId(long itemId) {
19179
      this.itemId = itemId;
19180
      setItemIdIsSet(true);
19181
    }
19182
 
19183
    public void unsetItemId() {
19184
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
19185
    }
19186
 
19187
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
19188
    public boolean isSetItemId() {
19189
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
19190
    }
19191
 
19192
    public void setItemIdIsSet(boolean value) {
19193
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
19194
    }
19195
 
19196
    public void setFieldValue(_Fields field, Object value) {
19197
      switch (field) {
19198
      case INVOICE_NUMBER:
19199
        if (value == null) {
19200
          unsetInvoiceNumber();
19201
        } else {
19202
          setInvoiceNumber((String)value);
19203
        }
19204
        break;
19205
 
19206
      case UNIT_PRICE:
19207
        if (value == null) {
19208
          unsetUnitPrice();
19209
        } else {
19210
          setUnitPrice((Double)value);
19211
        }
19212
        break;
19213
 
7672 rajveer 19214
      case NLC:
19215
        if (value == null) {
19216
          unsetNlc();
19217
        } else {
19218
          setNlc((Double)value);
19219
        }
19220
        break;
19221
 
6762 amar.kumar 19222
      case ITEM_ID:
19223
        if (value == null) {
19224
          unsetItemId();
19225
        } else {
19226
          setItemId((Long)value);
19227
        }
19228
        break;
19229
 
19230
      }
19231
    }
19232
 
19233
    public Object getFieldValue(_Fields field) {
19234
      switch (field) {
19235
      case INVOICE_NUMBER:
19236
        return getInvoiceNumber();
19237
 
19238
      case UNIT_PRICE:
19239
        return Double.valueOf(getUnitPrice());
19240
 
7672 rajveer 19241
      case NLC:
19242
        return Double.valueOf(getNlc());
19243
 
6762 amar.kumar 19244
      case ITEM_ID:
19245
        return Long.valueOf(getItemId());
19246
 
19247
      }
19248
      throw new IllegalStateException();
19249
    }
19250
 
19251
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19252
    public boolean isSet(_Fields field) {
19253
      if (field == null) {
19254
        throw new IllegalArgumentException();
19255
      }
19256
 
19257
      switch (field) {
19258
      case INVOICE_NUMBER:
19259
        return isSetInvoiceNumber();
19260
      case UNIT_PRICE:
19261
        return isSetUnitPrice();
7672 rajveer 19262
      case NLC:
19263
        return isSetNlc();
6762 amar.kumar 19264
      case ITEM_ID:
19265
        return isSetItemId();
19266
      }
19267
      throw new IllegalStateException();
19268
    }
19269
 
19270
    @Override
19271
    public boolean equals(Object that) {
19272
      if (that == null)
19273
        return false;
19274
      if (that instanceof createPurchaseForOurExtBilling_args)
19275
        return this.equals((createPurchaseForOurExtBilling_args)that);
19276
      return false;
19277
    }
19278
 
19279
    public boolean equals(createPurchaseForOurExtBilling_args that) {
19280
      if (that == null)
19281
        return false;
19282
 
19283
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
19284
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
19285
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
19286
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
19287
          return false;
19288
        if (!this.invoiceNumber.equals(that.invoiceNumber))
19289
          return false;
19290
      }
19291
 
19292
      boolean this_present_unitPrice = true;
19293
      boolean that_present_unitPrice = true;
19294
      if (this_present_unitPrice || that_present_unitPrice) {
19295
        if (!(this_present_unitPrice && that_present_unitPrice))
19296
          return false;
19297
        if (this.unitPrice != that.unitPrice)
19298
          return false;
19299
      }
19300
 
7672 rajveer 19301
      boolean this_present_nlc = true;
19302
      boolean that_present_nlc = true;
19303
      if (this_present_nlc || that_present_nlc) {
19304
        if (!(this_present_nlc && that_present_nlc))
19305
          return false;
19306
        if (this.nlc != that.nlc)
19307
          return false;
19308
      }
19309
 
6762 amar.kumar 19310
      boolean this_present_itemId = true;
19311
      boolean that_present_itemId = true;
19312
      if (this_present_itemId || that_present_itemId) {
19313
        if (!(this_present_itemId && that_present_itemId))
19314
          return false;
19315
        if (this.itemId != that.itemId)
19316
          return false;
19317
      }
19318
 
19319
      return true;
19320
    }
19321
 
19322
    @Override
19323
    public int hashCode() {
19324
      return 0;
19325
    }
19326
 
19327
    public int compareTo(createPurchaseForOurExtBilling_args other) {
19328
      if (!getClass().equals(other.getClass())) {
19329
        return getClass().getName().compareTo(other.getClass().getName());
19330
      }
19331
 
19332
      int lastComparison = 0;
19333
      createPurchaseForOurExtBilling_args typedOther = (createPurchaseForOurExtBilling_args)other;
19334
 
19335
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
19336
      if (lastComparison != 0) {
19337
        return lastComparison;
19338
      }
19339
      if (isSetInvoiceNumber()) {
19340
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
19341
        if (lastComparison != 0) {
19342
          return lastComparison;
19343
        }
19344
      }
19345
      lastComparison = Boolean.valueOf(isSetUnitPrice()).compareTo(typedOther.isSetUnitPrice());
19346
      if (lastComparison != 0) {
19347
        return lastComparison;
19348
      }
19349
      if (isSetUnitPrice()) {
19350
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unitPrice, typedOther.unitPrice);
19351
        if (lastComparison != 0) {
19352
          return lastComparison;
19353
        }
19354
      }
7672 rajveer 19355
      lastComparison = Boolean.valueOf(isSetNlc()).compareTo(typedOther.isSetNlc());
19356
      if (lastComparison != 0) {
19357
        return lastComparison;
19358
      }
19359
      if (isSetNlc()) {
19360
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nlc, typedOther.nlc);
19361
        if (lastComparison != 0) {
19362
          return lastComparison;
19363
        }
19364
      }
6762 amar.kumar 19365
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
19366
      if (lastComparison != 0) {
19367
        return lastComparison;
19368
      }
19369
      if (isSetItemId()) {
19370
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
19371
        if (lastComparison != 0) {
19372
          return lastComparison;
19373
        }
19374
      }
19375
      return 0;
19376
    }
19377
 
19378
    public _Fields fieldForId(int fieldId) {
19379
      return _Fields.findByThriftId(fieldId);
19380
    }
19381
 
19382
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19383
      org.apache.thrift.protocol.TField field;
19384
      iprot.readStructBegin();
19385
      while (true)
19386
      {
19387
        field = iprot.readFieldBegin();
19388
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19389
          break;
19390
        }
19391
        switch (field.id) {
19392
          case 1: // INVOICE_NUMBER
19393
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
19394
              this.invoiceNumber = iprot.readString();
19395
            } else { 
19396
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19397
            }
19398
            break;
19399
          case 2: // UNIT_PRICE
19400
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
19401
              this.unitPrice = iprot.readDouble();
19402
              setUnitPriceIsSet(true);
19403
            } else { 
19404
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19405
            }
19406
            break;
7672 rajveer 19407
          case 3: // NLC
19408
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
19409
              this.nlc = iprot.readDouble();
19410
              setNlcIsSet(true);
19411
            } else { 
19412
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19413
            }
19414
            break;
19415
          case 4: // ITEM_ID
6762 amar.kumar 19416
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19417
              this.itemId = iprot.readI64();
19418
              setItemIdIsSet(true);
19419
            } else { 
19420
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19421
            }
19422
            break;
19423
          default:
19424
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19425
        }
19426
        iprot.readFieldEnd();
19427
      }
19428
      iprot.readStructEnd();
19429
      validate();
19430
    }
19431
 
19432
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19433
      validate();
19434
 
19435
      oprot.writeStructBegin(STRUCT_DESC);
19436
      if (this.invoiceNumber != null) {
19437
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
19438
        oprot.writeString(this.invoiceNumber);
19439
        oprot.writeFieldEnd();
19440
      }
19441
      oprot.writeFieldBegin(UNIT_PRICE_FIELD_DESC);
19442
      oprot.writeDouble(this.unitPrice);
19443
      oprot.writeFieldEnd();
7672 rajveer 19444
      oprot.writeFieldBegin(NLC_FIELD_DESC);
19445
      oprot.writeDouble(this.nlc);
19446
      oprot.writeFieldEnd();
6762 amar.kumar 19447
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
19448
      oprot.writeI64(this.itemId);
19449
      oprot.writeFieldEnd();
19450
      oprot.writeFieldStop();
19451
      oprot.writeStructEnd();
19452
    }
19453
 
19454
    @Override
19455
    public String toString() {
19456
      StringBuilder sb = new StringBuilder("createPurchaseForOurExtBilling_args(");
19457
      boolean first = true;
19458
 
19459
      sb.append("invoiceNumber:");
19460
      if (this.invoiceNumber == null) {
19461
        sb.append("null");
19462
      } else {
19463
        sb.append(this.invoiceNumber);
19464
      }
19465
      first = false;
19466
      if (!first) sb.append(", ");
19467
      sb.append("unitPrice:");
19468
      sb.append(this.unitPrice);
19469
      first = false;
19470
      if (!first) sb.append(", ");
7672 rajveer 19471
      sb.append("nlc:");
19472
      sb.append(this.nlc);
19473
      first = false;
19474
      if (!first) sb.append(", ");
6762 amar.kumar 19475
      sb.append("itemId:");
19476
      sb.append(this.itemId);
19477
      first = false;
19478
      sb.append(")");
19479
      return sb.toString();
19480
    }
19481
 
19482
    public void validate() throws org.apache.thrift.TException {
19483
      // check for required fields
19484
    }
19485
 
19486
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19487
      try {
19488
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19489
      } catch (org.apache.thrift.TException te) {
19490
        throw new java.io.IOException(te);
19491
      }
19492
    }
19493
 
19494
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19495
      try {
19496
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
19497
        __isset_bit_vector = new BitSet(1);
19498
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19499
      } catch (org.apache.thrift.TException te) {
19500
        throw new java.io.IOException(te);
19501
      }
19502
    }
19503
 
19504
  }
19505
 
19506
  public static class createPurchaseForOurExtBilling_result implements org.apache.thrift.TBase<createPurchaseForOurExtBilling_result, createPurchaseForOurExtBilling_result._Fields>, java.io.Serializable, Cloneable   {
19507
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseForOurExtBilling_result");
19508
 
19509
    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);
19510
 
19511
    private long success; // required
19512
 
19513
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19514
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19515
      SUCCESS((short)0, "success");
19516
 
19517
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19518
 
19519
      static {
19520
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19521
          byName.put(field.getFieldName(), field);
19522
        }
19523
      }
19524
 
19525
      /**
19526
       * Find the _Fields constant that matches fieldId, or null if its not found.
19527
       */
19528
      public static _Fields findByThriftId(int fieldId) {
19529
        switch(fieldId) {
19530
          case 0: // SUCCESS
19531
            return SUCCESS;
19532
          default:
19533
            return null;
19534
        }
19535
      }
19536
 
19537
      /**
19538
       * Find the _Fields constant that matches fieldId, throwing an exception
19539
       * if it is not found.
19540
       */
19541
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19542
        _Fields fields = findByThriftId(fieldId);
19543
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19544
        return fields;
19545
      }
19546
 
19547
      /**
19548
       * Find the _Fields constant that matches name, or null if its not found.
19549
       */
19550
      public static _Fields findByName(String name) {
19551
        return byName.get(name);
19552
      }
19553
 
19554
      private final short _thriftId;
19555
      private final String _fieldName;
19556
 
19557
      _Fields(short thriftId, String fieldName) {
19558
        _thriftId = thriftId;
19559
        _fieldName = fieldName;
19560
      }
19561
 
19562
      public short getThriftFieldId() {
19563
        return _thriftId;
19564
      }
19565
 
19566
      public String getFieldName() {
19567
        return _fieldName;
19568
      }
19569
    }
19570
 
19571
    // isset id assignments
19572
    private static final int __SUCCESS_ISSET_ID = 0;
19573
    private BitSet __isset_bit_vector = new BitSet(1);
19574
 
19575
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19576
    static {
19577
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19578
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19579
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19580
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19581
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseForOurExtBilling_result.class, metaDataMap);
19582
    }
19583
 
19584
    public createPurchaseForOurExtBilling_result() {
19585
    }
19586
 
19587
    public createPurchaseForOurExtBilling_result(
19588
      long success)
19589
    {
19590
      this();
19591
      this.success = success;
19592
      setSuccessIsSet(true);
19593
    }
19594
 
19595
    /**
19596
     * Performs a deep copy on <i>other</i>.
19597
     */
19598
    public createPurchaseForOurExtBilling_result(createPurchaseForOurExtBilling_result other) {
19599
      __isset_bit_vector.clear();
19600
      __isset_bit_vector.or(other.__isset_bit_vector);
19601
      this.success = other.success;
19602
    }
19603
 
19604
    public createPurchaseForOurExtBilling_result deepCopy() {
19605
      return new createPurchaseForOurExtBilling_result(this);
19606
    }
19607
 
19608
    @Override
19609
    public void clear() {
19610
      setSuccessIsSet(false);
19611
      this.success = 0;
19612
    }
19613
 
19614
    public long getSuccess() {
19615
      return this.success;
19616
    }
19617
 
19618
    public void setSuccess(long success) {
19619
      this.success = success;
19620
      setSuccessIsSet(true);
19621
    }
19622
 
19623
    public void unsetSuccess() {
19624
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
19625
    }
19626
 
19627
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
19628
    public boolean isSetSuccess() {
19629
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
19630
    }
19631
 
19632
    public void setSuccessIsSet(boolean value) {
19633
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
19634
    }
19635
 
19636
    public void setFieldValue(_Fields field, Object value) {
19637
      switch (field) {
19638
      case SUCCESS:
19639
        if (value == null) {
19640
          unsetSuccess();
19641
        } else {
19642
          setSuccess((Long)value);
19643
        }
19644
        break;
19645
 
19646
      }
19647
    }
19648
 
19649
    public Object getFieldValue(_Fields field) {
19650
      switch (field) {
19651
      case SUCCESS:
19652
        return Long.valueOf(getSuccess());
19653
 
19654
      }
19655
      throw new IllegalStateException();
19656
    }
19657
 
19658
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19659
    public boolean isSet(_Fields field) {
19660
      if (field == null) {
19661
        throw new IllegalArgumentException();
19662
      }
19663
 
19664
      switch (field) {
19665
      case SUCCESS:
19666
        return isSetSuccess();
19667
      }
19668
      throw new IllegalStateException();
19669
    }
19670
 
19671
    @Override
19672
    public boolean equals(Object that) {
19673
      if (that == null)
19674
        return false;
19675
      if (that instanceof createPurchaseForOurExtBilling_result)
19676
        return this.equals((createPurchaseForOurExtBilling_result)that);
19677
      return false;
19678
    }
19679
 
19680
    public boolean equals(createPurchaseForOurExtBilling_result that) {
19681
      if (that == null)
19682
        return false;
19683
 
19684
      boolean this_present_success = true;
19685
      boolean that_present_success = true;
19686
      if (this_present_success || that_present_success) {
19687
        if (!(this_present_success && that_present_success))
19688
          return false;
19689
        if (this.success != that.success)
19690
          return false;
19691
      }
19692
 
19693
      return true;
19694
    }
19695
 
19696
    @Override
19697
    public int hashCode() {
19698
      return 0;
19699
    }
19700
 
19701
    public int compareTo(createPurchaseForOurExtBilling_result other) {
19702
      if (!getClass().equals(other.getClass())) {
19703
        return getClass().getName().compareTo(other.getClass().getName());
19704
      }
19705
 
19706
      int lastComparison = 0;
19707
      createPurchaseForOurExtBilling_result typedOther = (createPurchaseForOurExtBilling_result)other;
19708
 
19709
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
19710
      if (lastComparison != 0) {
19711
        return lastComparison;
19712
      }
19713
      if (isSetSuccess()) {
19714
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
19715
        if (lastComparison != 0) {
19716
          return lastComparison;
19717
        }
19718
      }
19719
      return 0;
19720
    }
19721
 
19722
    public _Fields fieldForId(int fieldId) {
19723
      return _Fields.findByThriftId(fieldId);
19724
    }
19725
 
19726
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19727
      org.apache.thrift.protocol.TField field;
19728
      iprot.readStructBegin();
19729
      while (true)
19730
      {
19731
        field = iprot.readFieldBegin();
19732
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19733
          break;
19734
        }
19735
        switch (field.id) {
19736
          case 0: // SUCCESS
19737
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19738
              this.success = iprot.readI64();
19739
              setSuccessIsSet(true);
19740
            } else { 
19741
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19742
            }
19743
            break;
19744
          default:
19745
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19746
        }
19747
        iprot.readFieldEnd();
19748
      }
19749
      iprot.readStructEnd();
19750
      validate();
19751
    }
19752
 
19753
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19754
      oprot.writeStructBegin(STRUCT_DESC);
19755
 
19756
      if (this.isSetSuccess()) {
19757
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
19758
        oprot.writeI64(this.success);
19759
        oprot.writeFieldEnd();
19760
      }
19761
      oprot.writeFieldStop();
19762
      oprot.writeStructEnd();
19763
    }
19764
 
19765
    @Override
19766
    public String toString() {
19767
      StringBuilder sb = new StringBuilder("createPurchaseForOurExtBilling_result(");
19768
      boolean first = true;
19769
 
19770
      sb.append("success:");
19771
      sb.append(this.success);
19772
      first = false;
19773
      sb.append(")");
19774
      return sb.toString();
19775
    }
19776
 
19777
    public void validate() throws org.apache.thrift.TException {
19778
      // check for required fields
19779
    }
19780
 
19781
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19782
      try {
19783
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19784
      } catch (org.apache.thrift.TException te) {
19785
        throw new java.io.IOException(te);
19786
      }
19787
    }
19788
 
19789
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19790
      try {
19791
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19792
      } catch (org.apache.thrift.TException te) {
19793
        throw new java.io.IOException(te);
19794
      }
19795
    }
19796
 
19797
  }
19798
 
19799
  public static class fulfillPOForExtBilling_args implements org.apache.thrift.TBase<fulfillPOForExtBilling_args, fulfillPOForExtBilling_args._Fields>, java.io.Serializable, Cloneable   {
19800
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPOForExtBilling_args");
19801
 
19802
    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);
19803
    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);
19804
 
19805
    private long itemId; // required
19806
    private long quantity; // required
19807
 
19808
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19809
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19810
      ITEM_ID((short)1, "itemId"),
19811
      QUANTITY((short)2, "quantity");
19812
 
19813
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19814
 
19815
      static {
19816
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19817
          byName.put(field.getFieldName(), field);
19818
        }
19819
      }
19820
 
19821
      /**
19822
       * Find the _Fields constant that matches fieldId, or null if its not found.
19823
       */
19824
      public static _Fields findByThriftId(int fieldId) {
19825
        switch(fieldId) {
19826
          case 1: // ITEM_ID
19827
            return ITEM_ID;
19828
          case 2: // QUANTITY
19829
            return QUANTITY;
19830
          default:
19831
            return null;
19832
        }
19833
      }
19834
 
19835
      /**
19836
       * Find the _Fields constant that matches fieldId, throwing an exception
19837
       * if it is not found.
19838
       */
19839
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19840
        _Fields fields = findByThriftId(fieldId);
19841
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19842
        return fields;
19843
      }
19844
 
19845
      /**
19846
       * Find the _Fields constant that matches name, or null if its not found.
19847
       */
19848
      public static _Fields findByName(String name) {
19849
        return byName.get(name);
19850
      }
19851
 
19852
      private final short _thriftId;
19853
      private final String _fieldName;
19854
 
19855
      _Fields(short thriftId, String fieldName) {
19856
        _thriftId = thriftId;
19857
        _fieldName = fieldName;
19858
      }
19859
 
19860
      public short getThriftFieldId() {
19861
        return _thriftId;
19862
      }
19863
 
19864
      public String getFieldName() {
19865
        return _fieldName;
19866
      }
19867
    }
19868
 
19869
    // isset id assignments
19870
    private static final int __ITEMID_ISSET_ID = 0;
19871
    private static final int __QUANTITY_ISSET_ID = 1;
19872
    private BitSet __isset_bit_vector = new BitSet(2);
19873
 
19874
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19875
    static {
19876
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19877
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19878
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19879
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19880
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19881
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19882
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPOForExtBilling_args.class, metaDataMap);
19883
    }
19884
 
19885
    public fulfillPOForExtBilling_args() {
19886
    }
19887
 
19888
    public fulfillPOForExtBilling_args(
19889
      long itemId,
19890
      long quantity)
19891
    {
19892
      this();
19893
      this.itemId = itemId;
19894
      setItemIdIsSet(true);
19895
      this.quantity = quantity;
19896
      setQuantityIsSet(true);
19897
    }
19898
 
19899
    /**
19900
     * Performs a deep copy on <i>other</i>.
19901
     */
19902
    public fulfillPOForExtBilling_args(fulfillPOForExtBilling_args other) {
19903
      __isset_bit_vector.clear();
19904
      __isset_bit_vector.or(other.__isset_bit_vector);
19905
      this.itemId = other.itemId;
19906
      this.quantity = other.quantity;
19907
    }
19908
 
19909
    public fulfillPOForExtBilling_args deepCopy() {
19910
      return new fulfillPOForExtBilling_args(this);
19911
    }
19912
 
19913
    @Override
19914
    public void clear() {
19915
      setItemIdIsSet(false);
19916
      this.itemId = 0;
19917
      setQuantityIsSet(false);
19918
      this.quantity = 0;
19919
    }
19920
 
19921
    public long getItemId() {
19922
      return this.itemId;
19923
    }
19924
 
19925
    public void setItemId(long itemId) {
19926
      this.itemId = itemId;
19927
      setItemIdIsSet(true);
19928
    }
19929
 
19930
    public void unsetItemId() {
19931
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
19932
    }
19933
 
19934
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
19935
    public boolean isSetItemId() {
19936
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
19937
    }
19938
 
19939
    public void setItemIdIsSet(boolean value) {
19940
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
19941
    }
19942
 
19943
    public long getQuantity() {
19944
      return this.quantity;
19945
    }
19946
 
19947
    public void setQuantity(long quantity) {
19948
      this.quantity = quantity;
19949
      setQuantityIsSet(true);
19950
    }
19951
 
19952
    public void unsetQuantity() {
19953
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
19954
    }
19955
 
19956
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
19957
    public boolean isSetQuantity() {
19958
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
19959
    }
19960
 
19961
    public void setQuantityIsSet(boolean value) {
19962
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
19963
    }
19964
 
19965
    public void setFieldValue(_Fields field, Object value) {
19966
      switch (field) {
19967
      case ITEM_ID:
19968
        if (value == null) {
19969
          unsetItemId();
19970
        } else {
19971
          setItemId((Long)value);
19972
        }
19973
        break;
19974
 
19975
      case QUANTITY:
19976
        if (value == null) {
19977
          unsetQuantity();
19978
        } else {
19979
          setQuantity((Long)value);
19980
        }
19981
        break;
19982
 
19983
      }
19984
    }
19985
 
19986
    public Object getFieldValue(_Fields field) {
19987
      switch (field) {
19988
      case ITEM_ID:
19989
        return Long.valueOf(getItemId());
19990
 
19991
      case QUANTITY:
19992
        return Long.valueOf(getQuantity());
19993
 
19994
      }
19995
      throw new IllegalStateException();
19996
    }
19997
 
19998
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19999
    public boolean isSet(_Fields field) {
20000
      if (field == null) {
20001
        throw new IllegalArgumentException();
20002
      }
20003
 
20004
      switch (field) {
20005
      case ITEM_ID:
20006
        return isSetItemId();
20007
      case QUANTITY:
20008
        return isSetQuantity();
20009
      }
20010
      throw new IllegalStateException();
20011
    }
20012
 
20013
    @Override
20014
    public boolean equals(Object that) {
20015
      if (that == null)
20016
        return false;
20017
      if (that instanceof fulfillPOForExtBilling_args)
20018
        return this.equals((fulfillPOForExtBilling_args)that);
20019
      return false;
20020
    }
20021
 
20022
    public boolean equals(fulfillPOForExtBilling_args that) {
20023
      if (that == null)
20024
        return false;
20025
 
20026
      boolean this_present_itemId = true;
20027
      boolean that_present_itemId = true;
20028
      if (this_present_itemId || that_present_itemId) {
20029
        if (!(this_present_itemId && that_present_itemId))
20030
          return false;
20031
        if (this.itemId != that.itemId)
20032
          return false;
20033
      }
20034
 
20035
      boolean this_present_quantity = true;
20036
      boolean that_present_quantity = true;
20037
      if (this_present_quantity || that_present_quantity) {
20038
        if (!(this_present_quantity && that_present_quantity))
20039
          return false;
20040
        if (this.quantity != that.quantity)
20041
          return false;
20042
      }
20043
 
20044
      return true;
20045
    }
20046
 
20047
    @Override
20048
    public int hashCode() {
20049
      return 0;
20050
    }
20051
 
20052
    public int compareTo(fulfillPOForExtBilling_args other) {
20053
      if (!getClass().equals(other.getClass())) {
20054
        return getClass().getName().compareTo(other.getClass().getName());
20055
      }
20056
 
20057
      int lastComparison = 0;
20058
      fulfillPOForExtBilling_args typedOther = (fulfillPOForExtBilling_args)other;
20059
 
20060
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
20061
      if (lastComparison != 0) {
20062
        return lastComparison;
20063
      }
20064
      if (isSetItemId()) {
20065
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
20066
        if (lastComparison != 0) {
20067
          return lastComparison;
20068
        }
20069
      }
20070
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
20071
      if (lastComparison != 0) {
20072
        return lastComparison;
20073
      }
20074
      if (isSetQuantity()) {
20075
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
20076
        if (lastComparison != 0) {
20077
          return lastComparison;
20078
        }
20079
      }
20080
      return 0;
20081
    }
20082
 
20083
    public _Fields fieldForId(int fieldId) {
20084
      return _Fields.findByThriftId(fieldId);
20085
    }
20086
 
20087
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20088
      org.apache.thrift.protocol.TField field;
20089
      iprot.readStructBegin();
20090
      while (true)
20091
      {
20092
        field = iprot.readFieldBegin();
20093
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20094
          break;
20095
        }
20096
        switch (field.id) {
20097
          case 1: // ITEM_ID
20098
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20099
              this.itemId = iprot.readI64();
20100
              setItemIdIsSet(true);
20101
            } else { 
20102
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20103
            }
20104
            break;
20105
          case 2: // QUANTITY
20106
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20107
              this.quantity = iprot.readI64();
20108
              setQuantityIsSet(true);
20109
            } else { 
20110
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20111
            }
20112
            break;
20113
          default:
20114
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20115
        }
20116
        iprot.readFieldEnd();
20117
      }
20118
      iprot.readStructEnd();
20119
      validate();
20120
    }
20121
 
20122
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20123
      validate();
20124
 
20125
      oprot.writeStructBegin(STRUCT_DESC);
20126
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
20127
      oprot.writeI64(this.itemId);
20128
      oprot.writeFieldEnd();
20129
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
20130
      oprot.writeI64(this.quantity);
20131
      oprot.writeFieldEnd();
20132
      oprot.writeFieldStop();
20133
      oprot.writeStructEnd();
20134
    }
20135
 
20136
    @Override
20137
    public String toString() {
20138
      StringBuilder sb = new StringBuilder("fulfillPOForExtBilling_args(");
20139
      boolean first = true;
20140
 
20141
      sb.append("itemId:");
20142
      sb.append(this.itemId);
20143
      first = false;
20144
      if (!first) sb.append(", ");
20145
      sb.append("quantity:");
20146
      sb.append(this.quantity);
20147
      first = false;
20148
      sb.append(")");
20149
      return sb.toString();
20150
    }
20151
 
20152
    public void validate() throws org.apache.thrift.TException {
20153
      // check for required fields
20154
    }
20155
 
20156
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20157
      try {
20158
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20159
      } catch (org.apache.thrift.TException te) {
20160
        throw new java.io.IOException(te);
20161
      }
20162
    }
20163
 
20164
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20165
      try {
20166
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
20167
        __isset_bit_vector = new BitSet(1);
20168
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20169
      } catch (org.apache.thrift.TException te) {
20170
        throw new java.io.IOException(te);
20171
      }
20172
    }
20173
 
20174
  }
20175
 
20176
  public static class fulfillPOForExtBilling_result implements org.apache.thrift.TBase<fulfillPOForExtBilling_result, fulfillPOForExtBilling_result._Fields>, java.io.Serializable, Cloneable   {
20177
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPOForExtBilling_result");
20178
 
20179
 
20180
 
20181
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20182
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20183
;
20184
 
20185
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20186
 
20187
      static {
20188
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20189
          byName.put(field.getFieldName(), field);
20190
        }
20191
      }
20192
 
20193
      /**
20194
       * Find the _Fields constant that matches fieldId, or null if its not found.
20195
       */
20196
      public static _Fields findByThriftId(int fieldId) {
20197
        switch(fieldId) {
20198
          default:
20199
            return null;
20200
        }
20201
      }
20202
 
20203
      /**
20204
       * Find the _Fields constant that matches fieldId, throwing an exception
20205
       * if it is not found.
20206
       */
20207
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20208
        _Fields fields = findByThriftId(fieldId);
20209
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20210
        return fields;
20211
      }
20212
 
20213
      /**
20214
       * Find the _Fields constant that matches name, or null if its not found.
20215
       */
20216
      public static _Fields findByName(String name) {
20217
        return byName.get(name);
20218
      }
20219
 
20220
      private final short _thriftId;
20221
      private final String _fieldName;
20222
 
20223
      _Fields(short thriftId, String fieldName) {
20224
        _thriftId = thriftId;
20225
        _fieldName = fieldName;
20226
      }
20227
 
20228
      public short getThriftFieldId() {
20229
        return _thriftId;
20230
      }
20231
 
20232
      public String getFieldName() {
20233
        return _fieldName;
20234
      }
20235
    }
20236
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20237
    static {
20238
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20239
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20240
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPOForExtBilling_result.class, metaDataMap);
20241
    }
20242
 
20243
    public fulfillPOForExtBilling_result() {
20244
    }
20245
 
20246
    /**
20247
     * Performs a deep copy on <i>other</i>.
20248
     */
20249
    public fulfillPOForExtBilling_result(fulfillPOForExtBilling_result other) {
20250
    }
20251
 
20252
    public fulfillPOForExtBilling_result deepCopy() {
20253
      return new fulfillPOForExtBilling_result(this);
20254
    }
20255
 
20256
    @Override
20257
    public void clear() {
20258
    }
20259
 
20260
    public void setFieldValue(_Fields field, Object value) {
20261
      switch (field) {
20262
      }
20263
    }
20264
 
20265
    public Object getFieldValue(_Fields field) {
20266
      switch (field) {
20267
      }
20268
      throw new IllegalStateException();
20269
    }
20270
 
20271
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20272
    public boolean isSet(_Fields field) {
20273
      if (field == null) {
20274
        throw new IllegalArgumentException();
20275
      }
20276
 
20277
      switch (field) {
20278
      }
20279
      throw new IllegalStateException();
20280
    }
20281
 
20282
    @Override
20283
    public boolean equals(Object that) {
20284
      if (that == null)
20285
        return false;
20286
      if (that instanceof fulfillPOForExtBilling_result)
20287
        return this.equals((fulfillPOForExtBilling_result)that);
20288
      return false;
20289
    }
20290
 
20291
    public boolean equals(fulfillPOForExtBilling_result that) {
20292
      if (that == null)
20293
        return false;
20294
 
20295
      return true;
20296
    }
20297
 
20298
    @Override
20299
    public int hashCode() {
20300
      return 0;
20301
    }
20302
 
20303
    public int compareTo(fulfillPOForExtBilling_result other) {
20304
      if (!getClass().equals(other.getClass())) {
20305
        return getClass().getName().compareTo(other.getClass().getName());
20306
      }
20307
 
20308
      int lastComparison = 0;
20309
      fulfillPOForExtBilling_result typedOther = (fulfillPOForExtBilling_result)other;
20310
 
20311
      return 0;
20312
    }
20313
 
20314
    public _Fields fieldForId(int fieldId) {
20315
      return _Fields.findByThriftId(fieldId);
20316
    }
20317
 
20318
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20319
      org.apache.thrift.protocol.TField field;
20320
      iprot.readStructBegin();
20321
      while (true)
20322
      {
20323
        field = iprot.readFieldBegin();
20324
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20325
          break;
20326
        }
20327
        switch (field.id) {
20328
          default:
20329
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20330
        }
20331
        iprot.readFieldEnd();
20332
      }
20333
      iprot.readStructEnd();
20334
      validate();
20335
    }
20336
 
20337
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20338
      oprot.writeStructBegin(STRUCT_DESC);
20339
 
20340
      oprot.writeFieldStop();
20341
      oprot.writeStructEnd();
20342
    }
20343
 
20344
    @Override
20345
    public String toString() {
20346
      StringBuilder sb = new StringBuilder("fulfillPOForExtBilling_result(");
20347
      boolean first = true;
20348
 
20349
      sb.append(")");
20350
      return sb.toString();
20351
    }
20352
 
20353
    public void validate() throws org.apache.thrift.TException {
20354
      // check for required fields
20355
    }
20356
 
20357
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20358
      try {
20359
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20360
      } catch (org.apache.thrift.TException te) {
20361
        throw new java.io.IOException(te);
20362
      }
20363
    }
20364
 
20365
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20366
      try {
20367
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20368
      } catch (org.apache.thrift.TException te) {
20369
        throw new java.io.IOException(te);
20370
      }
20371
    }
20372
 
20373
  }
20374
 
7410 amar.kumar 20375
  public static class closePO_args implements org.apache.thrift.TBase<closePO_args, closePO_args._Fields>, java.io.Serializable, Cloneable   {
20376
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePO_args");
20377
 
20378
    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);
20379
 
20380
    private long poId; // required
20381
 
20382
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20383
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20384
      PO_ID((short)1, "poId");
20385
 
20386
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20387
 
20388
      static {
20389
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20390
          byName.put(field.getFieldName(), field);
20391
        }
20392
      }
20393
 
20394
      /**
20395
       * Find the _Fields constant that matches fieldId, or null if its not found.
20396
       */
20397
      public static _Fields findByThriftId(int fieldId) {
20398
        switch(fieldId) {
20399
          case 1: // PO_ID
20400
            return PO_ID;
20401
          default:
20402
            return null;
20403
        }
20404
      }
20405
 
20406
      /**
20407
       * Find the _Fields constant that matches fieldId, throwing an exception
20408
       * if it is not found.
20409
       */
20410
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20411
        _Fields fields = findByThriftId(fieldId);
20412
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20413
        return fields;
20414
      }
20415
 
20416
      /**
20417
       * Find the _Fields constant that matches name, or null if its not found.
20418
       */
20419
      public static _Fields findByName(String name) {
20420
        return byName.get(name);
20421
      }
20422
 
20423
      private final short _thriftId;
20424
      private final String _fieldName;
20425
 
20426
      _Fields(short thriftId, String fieldName) {
20427
        _thriftId = thriftId;
20428
        _fieldName = fieldName;
20429
      }
20430
 
20431
      public short getThriftFieldId() {
20432
        return _thriftId;
20433
      }
20434
 
20435
      public String getFieldName() {
20436
        return _fieldName;
20437
      }
20438
    }
20439
 
20440
    // isset id assignments
20441
    private static final int __POID_ISSET_ID = 0;
20442
    private BitSet __isset_bit_vector = new BitSet(1);
20443
 
20444
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20445
    static {
20446
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20447
      tmpMap.put(_Fields.PO_ID, new org.apache.thrift.meta_data.FieldMetaData("poId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20448
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
20449
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20450
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePO_args.class, metaDataMap);
20451
    }
20452
 
20453
    public closePO_args() {
20454
    }
20455
 
20456
    public closePO_args(
20457
      long poId)
20458
    {
20459
      this();
20460
      this.poId = poId;
20461
      setPoIdIsSet(true);
20462
    }
20463
 
20464
    /**
20465
     * Performs a deep copy on <i>other</i>.
20466
     */
20467
    public closePO_args(closePO_args other) {
20468
      __isset_bit_vector.clear();
20469
      __isset_bit_vector.or(other.__isset_bit_vector);
20470
      this.poId = other.poId;
20471
    }
20472
 
20473
    public closePO_args deepCopy() {
20474
      return new closePO_args(this);
20475
    }
20476
 
20477
    @Override
20478
    public void clear() {
20479
      setPoIdIsSet(false);
20480
      this.poId = 0;
20481
    }
20482
 
20483
    public long getPoId() {
20484
      return this.poId;
20485
    }
20486
 
20487
    public void setPoId(long poId) {
20488
      this.poId = poId;
20489
      setPoIdIsSet(true);
20490
    }
20491
 
20492
    public void unsetPoId() {
20493
      __isset_bit_vector.clear(__POID_ISSET_ID);
20494
    }
20495
 
20496
    /** Returns true if field poId is set (has been assigned a value) and false otherwise */
20497
    public boolean isSetPoId() {
20498
      return __isset_bit_vector.get(__POID_ISSET_ID);
20499
    }
20500
 
20501
    public void setPoIdIsSet(boolean value) {
20502
      __isset_bit_vector.set(__POID_ISSET_ID, value);
20503
    }
20504
 
20505
    public void setFieldValue(_Fields field, Object value) {
20506
      switch (field) {
20507
      case PO_ID:
20508
        if (value == null) {
20509
          unsetPoId();
20510
        } else {
20511
          setPoId((Long)value);
20512
        }
20513
        break;
20514
 
20515
      }
20516
    }
20517
 
20518
    public Object getFieldValue(_Fields field) {
20519
      switch (field) {
20520
      case PO_ID:
20521
        return Long.valueOf(getPoId());
20522
 
20523
      }
20524
      throw new IllegalStateException();
20525
    }
20526
 
20527
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20528
    public boolean isSet(_Fields field) {
20529
      if (field == null) {
20530
        throw new IllegalArgumentException();
20531
      }
20532
 
20533
      switch (field) {
20534
      case PO_ID:
20535
        return isSetPoId();
20536
      }
20537
      throw new IllegalStateException();
20538
    }
20539
 
20540
    @Override
20541
    public boolean equals(Object that) {
20542
      if (that == null)
20543
        return false;
20544
      if (that instanceof closePO_args)
20545
        return this.equals((closePO_args)that);
20546
      return false;
20547
    }
20548
 
20549
    public boolean equals(closePO_args that) {
20550
      if (that == null)
20551
        return false;
20552
 
20553
      boolean this_present_poId = true;
20554
      boolean that_present_poId = true;
20555
      if (this_present_poId || that_present_poId) {
20556
        if (!(this_present_poId && that_present_poId))
20557
          return false;
20558
        if (this.poId != that.poId)
20559
          return false;
20560
      }
20561
 
20562
      return true;
20563
    }
20564
 
20565
    @Override
20566
    public int hashCode() {
20567
      return 0;
20568
    }
20569
 
20570
    public int compareTo(closePO_args other) {
20571
      if (!getClass().equals(other.getClass())) {
20572
        return getClass().getName().compareTo(other.getClass().getName());
20573
      }
20574
 
20575
      int lastComparison = 0;
20576
      closePO_args typedOther = (closePO_args)other;
20577
 
20578
      lastComparison = Boolean.valueOf(isSetPoId()).compareTo(typedOther.isSetPoId());
20579
      if (lastComparison != 0) {
20580
        return lastComparison;
20581
      }
20582
      if (isSetPoId()) {
20583
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.poId, typedOther.poId);
20584
        if (lastComparison != 0) {
20585
          return lastComparison;
20586
        }
20587
      }
20588
      return 0;
20589
    }
20590
 
20591
    public _Fields fieldForId(int fieldId) {
20592
      return _Fields.findByThriftId(fieldId);
20593
    }
20594
 
20595
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20596
      org.apache.thrift.protocol.TField field;
20597
      iprot.readStructBegin();
20598
      while (true)
20599
      {
20600
        field = iprot.readFieldBegin();
20601
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20602
          break;
20603
        }
20604
        switch (field.id) {
20605
          case 1: // PO_ID
20606
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20607
              this.poId = iprot.readI64();
20608
              setPoIdIsSet(true);
20609
            } else { 
20610
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20611
            }
20612
            break;
20613
          default:
20614
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20615
        }
20616
        iprot.readFieldEnd();
20617
      }
20618
      iprot.readStructEnd();
20619
      validate();
20620
    }
20621
 
20622
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20623
      validate();
20624
 
20625
      oprot.writeStructBegin(STRUCT_DESC);
20626
      oprot.writeFieldBegin(PO_ID_FIELD_DESC);
20627
      oprot.writeI64(this.poId);
20628
      oprot.writeFieldEnd();
20629
      oprot.writeFieldStop();
20630
      oprot.writeStructEnd();
20631
    }
20632
 
20633
    @Override
20634
    public String toString() {
20635
      StringBuilder sb = new StringBuilder("closePO_args(");
20636
      boolean first = true;
20637
 
20638
      sb.append("poId:");
20639
      sb.append(this.poId);
20640
      first = false;
20641
      sb.append(")");
20642
      return sb.toString();
20643
    }
20644
 
20645
    public void validate() throws org.apache.thrift.TException {
20646
      // check for required fields
20647
    }
20648
 
20649
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20650
      try {
20651
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20652
      } catch (org.apache.thrift.TException te) {
20653
        throw new java.io.IOException(te);
20654
      }
20655
    }
20656
 
20657
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20658
      try {
24832 tejbeer 20659
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
20660
        __isset_bit_vector = new BitSet(1);
7410 amar.kumar 20661
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20662
      } catch (org.apache.thrift.TException te) {
20663
        throw new java.io.IOException(te);
20664
      }
20665
    }
20666
 
20667
  }
20668
 
20669
  public static class closePO_result implements org.apache.thrift.TBase<closePO_result, closePO_result._Fields>, java.io.Serializable, Cloneable   {
20670
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePO_result");
20671
 
20672
    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);
20673
 
20674
    private PurchaseServiceException e; // required
20675
 
20676
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20677
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20678
      E((short)1, "e");
20679
 
20680
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20681
 
20682
      static {
20683
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20684
          byName.put(field.getFieldName(), field);
20685
        }
20686
      }
20687
 
20688
      /**
20689
       * Find the _Fields constant that matches fieldId, or null if its not found.
20690
       */
20691
      public static _Fields findByThriftId(int fieldId) {
20692
        switch(fieldId) {
20693
          case 1: // E
20694
            return E;
20695
          default:
20696
            return null;
20697
        }
20698
      }
20699
 
20700
      /**
20701
       * Find the _Fields constant that matches fieldId, throwing an exception
20702
       * if it is not found.
20703
       */
20704
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20705
        _Fields fields = findByThriftId(fieldId);
20706
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20707
        return fields;
20708
      }
20709
 
20710
      /**
20711
       * Find the _Fields constant that matches name, or null if its not found.
20712
       */
20713
      public static _Fields findByName(String name) {
20714
        return byName.get(name);
20715
      }
20716
 
20717
      private final short _thriftId;
20718
      private final String _fieldName;
20719
 
20720
      _Fields(short thriftId, String fieldName) {
20721
        _thriftId = thriftId;
20722
        _fieldName = fieldName;
20723
      }
20724
 
20725
      public short getThriftFieldId() {
20726
        return _thriftId;
20727
      }
20728
 
20729
      public String getFieldName() {
20730
        return _fieldName;
20731
      }
20732
    }
20733
 
20734
    // isset id assignments
20735
 
20736
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20737
    static {
20738
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20739
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20740
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
20741
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20742
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePO_result.class, metaDataMap);
20743
    }
20744
 
20745
    public closePO_result() {
20746
    }
20747
 
20748
    public closePO_result(
20749
      PurchaseServiceException e)
20750
    {
20751
      this();
20752
      this.e = e;
20753
    }
20754
 
20755
    /**
20756
     * Performs a deep copy on <i>other</i>.
20757
     */
20758
    public closePO_result(closePO_result other) {
20759
      if (other.isSetE()) {
20760
        this.e = new PurchaseServiceException(other.e);
20761
      }
20762
    }
20763
 
20764
    public closePO_result deepCopy() {
20765
      return new closePO_result(this);
20766
    }
20767
 
20768
    @Override
20769
    public void clear() {
20770
      this.e = null;
20771
    }
20772
 
20773
    public PurchaseServiceException getE() {
20774
      return this.e;
20775
    }
20776
 
20777
    public void setE(PurchaseServiceException e) {
20778
      this.e = e;
20779
    }
20780
 
20781
    public void unsetE() {
20782
      this.e = null;
20783
    }
20784
 
20785
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
20786
    public boolean isSetE() {
20787
      return this.e != null;
20788
    }
20789
 
20790
    public void setEIsSet(boolean value) {
20791
      if (!value) {
20792
        this.e = null;
20793
      }
20794
    }
20795
 
20796
    public void setFieldValue(_Fields field, Object value) {
20797
      switch (field) {
20798
      case E:
20799
        if (value == null) {
20800
          unsetE();
20801
        } else {
20802
          setE((PurchaseServiceException)value);
20803
        }
20804
        break;
20805
 
20806
      }
20807
    }
20808
 
20809
    public Object getFieldValue(_Fields field) {
20810
      switch (field) {
20811
      case E:
20812
        return getE();
20813
 
20814
      }
20815
      throw new IllegalStateException();
20816
    }
20817
 
20818
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20819
    public boolean isSet(_Fields field) {
20820
      if (field == null) {
20821
        throw new IllegalArgumentException();
20822
      }
20823
 
20824
      switch (field) {
20825
      case E:
20826
        return isSetE();
20827
      }
20828
      throw new IllegalStateException();
20829
    }
20830
 
20831
    @Override
20832
    public boolean equals(Object that) {
20833
      if (that == null)
20834
        return false;
20835
      if (that instanceof closePO_result)
20836
        return this.equals((closePO_result)that);
20837
      return false;
20838
    }
20839
 
20840
    public boolean equals(closePO_result that) {
20841
      if (that == null)
20842
        return false;
20843
 
20844
      boolean this_present_e = true && this.isSetE();
20845
      boolean that_present_e = true && that.isSetE();
20846
      if (this_present_e || that_present_e) {
20847
        if (!(this_present_e && that_present_e))
20848
          return false;
20849
        if (!this.e.equals(that.e))
20850
          return false;
20851
      }
20852
 
20853
      return true;
20854
    }
20855
 
20856
    @Override
20857
    public int hashCode() {
20858
      return 0;
20859
    }
20860
 
20861
    public int compareTo(closePO_result other) {
20862
      if (!getClass().equals(other.getClass())) {
20863
        return getClass().getName().compareTo(other.getClass().getName());
20864
      }
20865
 
20866
      int lastComparison = 0;
20867
      closePO_result typedOther = (closePO_result)other;
20868
 
20869
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
20870
      if (lastComparison != 0) {
20871
        return lastComparison;
20872
      }
20873
      if (isSetE()) {
20874
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
20875
        if (lastComparison != 0) {
20876
          return lastComparison;
20877
        }
20878
      }
20879
      return 0;
20880
    }
20881
 
20882
    public _Fields fieldForId(int fieldId) {
20883
      return _Fields.findByThriftId(fieldId);
20884
    }
20885
 
20886
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20887
      org.apache.thrift.protocol.TField field;
20888
      iprot.readStructBegin();
20889
      while (true)
20890
      {
20891
        field = iprot.readFieldBegin();
20892
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20893
          break;
20894
        }
20895
        switch (field.id) {
20896
          case 1: // E
20897
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
20898
              this.e = new PurchaseServiceException();
20899
              this.e.read(iprot);
20900
            } else { 
20901
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20902
            }
20903
            break;
20904
          default:
20905
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20906
        }
20907
        iprot.readFieldEnd();
20908
      }
20909
      iprot.readStructEnd();
20910
      validate();
20911
    }
20912
 
20913
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20914
      oprot.writeStructBegin(STRUCT_DESC);
20915
 
20916
      if (this.isSetE()) {
20917
        oprot.writeFieldBegin(E_FIELD_DESC);
20918
        this.e.write(oprot);
20919
        oprot.writeFieldEnd();
20920
      }
20921
      oprot.writeFieldStop();
20922
      oprot.writeStructEnd();
20923
    }
20924
 
20925
    @Override
20926
    public String toString() {
20927
      StringBuilder sb = new StringBuilder("closePO_result(");
20928
      boolean first = true;
20929
 
20930
      sb.append("e:");
20931
      if (this.e == null) {
20932
        sb.append("null");
20933
      } else {
20934
        sb.append(this.e);
20935
      }
20936
      first = false;
20937
      sb.append(")");
20938
      return sb.toString();
20939
    }
20940
 
20941
    public void validate() throws org.apache.thrift.TException {
20942
      // check for required fields
20943
    }
20944
 
20945
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20946
      try {
20947
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20948
      } catch (org.apache.thrift.TException te) {
20949
        throw new java.io.IOException(te);
20950
      }
20951
    }
20952
 
20953
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20954
      try {
20955
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20956
      } catch (org.apache.thrift.TException te) {
20957
        throw new java.io.IOException(te);
20958
      }
20959
    }
20960
 
20961
  }
20962
 
20963
  public static class isInvoiceReceived_args implements org.apache.thrift.TBase<isInvoiceReceived_args, isInvoiceReceived_args._Fields>, java.io.Serializable, Cloneable   {
20964
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isInvoiceReceived_args");
20965
 
20966
    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);
20967
    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);
20968
 
20969
    private String invoiceNumber; // required
20970
    private long supplierId; // required
20971
 
20972
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20973
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20974
      INVOICE_NUMBER((short)1, "invoiceNumber"),
20975
      SUPPLIER_ID((short)2, "supplierId");
20976
 
20977
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20978
 
20979
      static {
20980
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20981
          byName.put(field.getFieldName(), field);
20982
        }
20983
      }
20984
 
20985
      /**
20986
       * Find the _Fields constant that matches fieldId, or null if its not found.
20987
       */
20988
      public static _Fields findByThriftId(int fieldId) {
20989
        switch(fieldId) {
20990
          case 1: // INVOICE_NUMBER
20991
            return INVOICE_NUMBER;
20992
          case 2: // SUPPLIER_ID
20993
            return SUPPLIER_ID;
20994
          default:
20995
            return null;
20996
        }
20997
      }
20998
 
20999
      /**
21000
       * Find the _Fields constant that matches fieldId, throwing an exception
21001
       * if it is not found.
21002
       */
21003
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21004
        _Fields fields = findByThriftId(fieldId);
21005
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21006
        return fields;
21007
      }
21008
 
21009
      /**
21010
       * Find the _Fields constant that matches name, or null if its not found.
21011
       */
21012
      public static _Fields findByName(String name) {
21013
        return byName.get(name);
21014
      }
21015
 
21016
      private final short _thriftId;
21017
      private final String _fieldName;
21018
 
21019
      _Fields(short thriftId, String fieldName) {
21020
        _thriftId = thriftId;
21021
        _fieldName = fieldName;
21022
      }
21023
 
21024
      public short getThriftFieldId() {
21025
        return _thriftId;
21026
      }
21027
 
21028
      public String getFieldName() {
21029
        return _fieldName;
21030
      }
21031
    }
21032
 
21033
    // isset id assignments
21034
    private static final int __SUPPLIERID_ISSET_ID = 0;
21035
    private BitSet __isset_bit_vector = new BitSet(1);
21036
 
21037
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21038
    static {
21039
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
21040
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21041
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
21042
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21043
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
21044
      metaDataMap = Collections.unmodifiableMap(tmpMap);
21045
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isInvoiceReceived_args.class, metaDataMap);
21046
    }
21047
 
21048
    public isInvoiceReceived_args() {
21049
    }
21050
 
21051
    public isInvoiceReceived_args(
21052
      String invoiceNumber,
21053
      long supplierId)
21054
    {
21055
      this();
21056
      this.invoiceNumber = invoiceNumber;
21057
      this.supplierId = supplierId;
21058
      setSupplierIdIsSet(true);
21059
    }
21060
 
21061
    /**
21062
     * Performs a deep copy on <i>other</i>.
21063
     */
21064
    public isInvoiceReceived_args(isInvoiceReceived_args other) {
21065
      __isset_bit_vector.clear();
21066
      __isset_bit_vector.or(other.__isset_bit_vector);
21067
      if (other.isSetInvoiceNumber()) {
21068
        this.invoiceNumber = other.invoiceNumber;
21069
      }
21070
      this.supplierId = other.supplierId;
21071
    }
21072
 
21073
    public isInvoiceReceived_args deepCopy() {
21074
      return new isInvoiceReceived_args(this);
21075
    }
21076
 
21077
    @Override
21078
    public void clear() {
21079
      this.invoiceNumber = null;
21080
      setSupplierIdIsSet(false);
21081
      this.supplierId = 0;
21082
    }
21083
 
21084
    public String getInvoiceNumber() {
21085
      return this.invoiceNumber;
21086
    }
21087
 
21088
    public void setInvoiceNumber(String invoiceNumber) {
21089
      this.invoiceNumber = invoiceNumber;
21090
    }
21091
 
21092
    public void unsetInvoiceNumber() {
21093
      this.invoiceNumber = null;
21094
    }
21095
 
21096
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
21097
    public boolean isSetInvoiceNumber() {
21098
      return this.invoiceNumber != null;
21099
    }
21100
 
21101
    public void setInvoiceNumberIsSet(boolean value) {
21102
      if (!value) {
21103
        this.invoiceNumber = null;
21104
      }
21105
    }
21106
 
21107
    public long getSupplierId() {
21108
      return this.supplierId;
21109
    }
21110
 
21111
    public void setSupplierId(long supplierId) {
21112
      this.supplierId = supplierId;
21113
      setSupplierIdIsSet(true);
21114
    }
21115
 
21116
    public void unsetSupplierId() {
21117
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
21118
    }
21119
 
21120
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
21121
    public boolean isSetSupplierId() {
21122
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
21123
    }
21124
 
21125
    public void setSupplierIdIsSet(boolean value) {
21126
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
21127
    }
21128
 
21129
    public void setFieldValue(_Fields field, Object value) {
21130
      switch (field) {
21131
      case INVOICE_NUMBER:
21132
        if (value == null) {
21133
          unsetInvoiceNumber();
21134
        } else {
21135
          setInvoiceNumber((String)value);
21136
        }
21137
        break;
21138
 
21139
      case SUPPLIER_ID:
21140
        if (value == null) {
21141
          unsetSupplierId();
21142
        } else {
21143
          setSupplierId((Long)value);
21144
        }
21145
        break;
21146
 
21147
      }
21148
    }
21149
 
21150
    public Object getFieldValue(_Fields field) {
21151
      switch (field) {
21152
      case INVOICE_NUMBER:
21153
        return getInvoiceNumber();
21154
 
21155
      case SUPPLIER_ID:
21156
        return Long.valueOf(getSupplierId());
21157
 
21158
      }
21159
      throw new IllegalStateException();
21160
    }
21161
 
21162
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21163
    public boolean isSet(_Fields field) {
21164
      if (field == null) {
21165
        throw new IllegalArgumentException();
21166
      }
21167
 
21168
      switch (field) {
21169
      case INVOICE_NUMBER:
21170
        return isSetInvoiceNumber();
21171
      case SUPPLIER_ID:
21172
        return isSetSupplierId();
21173
      }
21174
      throw new IllegalStateException();
21175
    }
21176
 
21177
    @Override
21178
    public boolean equals(Object that) {
21179
      if (that == null)
21180
        return false;
21181
      if (that instanceof isInvoiceReceived_args)
21182
        return this.equals((isInvoiceReceived_args)that);
21183
      return false;
21184
    }
21185
 
21186
    public boolean equals(isInvoiceReceived_args that) {
21187
      if (that == null)
21188
        return false;
21189
 
21190
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
21191
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
21192
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
21193
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
21194
          return false;
21195
        if (!this.invoiceNumber.equals(that.invoiceNumber))
21196
          return false;
21197
      }
21198
 
21199
      boolean this_present_supplierId = true;
21200
      boolean that_present_supplierId = true;
21201
      if (this_present_supplierId || that_present_supplierId) {
21202
        if (!(this_present_supplierId && that_present_supplierId))
21203
          return false;
21204
        if (this.supplierId != that.supplierId)
21205
          return false;
21206
      }
21207
 
21208
      return true;
21209
    }
21210
 
21211
    @Override
21212
    public int hashCode() {
21213
      return 0;
21214
    }
21215
 
21216
    public int compareTo(isInvoiceReceived_args other) {
21217
      if (!getClass().equals(other.getClass())) {
21218
        return getClass().getName().compareTo(other.getClass().getName());
21219
      }
21220
 
21221
      int lastComparison = 0;
21222
      isInvoiceReceived_args typedOther = (isInvoiceReceived_args)other;
21223
 
21224
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
21225
      if (lastComparison != 0) {
21226
        return lastComparison;
21227
      }
21228
      if (isSetInvoiceNumber()) {
21229
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
21230
        if (lastComparison != 0) {
21231
          return lastComparison;
21232
        }
21233
      }
21234
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
21235
      if (lastComparison != 0) {
21236
        return lastComparison;
21237
      }
21238
      if (isSetSupplierId()) {
21239
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
21240
        if (lastComparison != 0) {
21241
          return lastComparison;
21242
        }
21243
      }
21244
      return 0;
21245
    }
21246
 
21247
    public _Fields fieldForId(int fieldId) {
21248
      return _Fields.findByThriftId(fieldId);
21249
    }
21250
 
21251
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
21252
      org.apache.thrift.protocol.TField field;
21253
      iprot.readStructBegin();
21254
      while (true)
21255
      {
21256
        field = iprot.readFieldBegin();
21257
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
21258
          break;
21259
        }
21260
        switch (field.id) {
21261
          case 1: // INVOICE_NUMBER
21262
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
21263
              this.invoiceNumber = iprot.readString();
21264
            } else { 
21265
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21266
            }
21267
            break;
21268
          case 2: // SUPPLIER_ID
21269
            if (field.type == org.apache.thrift.protocol.TType.I64) {
21270
              this.supplierId = iprot.readI64();
21271
              setSupplierIdIsSet(true);
21272
            } else { 
21273
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21274
            }
21275
            break;
21276
          default:
21277
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21278
        }
21279
        iprot.readFieldEnd();
21280
      }
21281
      iprot.readStructEnd();
21282
      validate();
21283
    }
21284
 
21285
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
21286
      validate();
21287
 
21288
      oprot.writeStructBegin(STRUCT_DESC);
21289
      if (this.invoiceNumber != null) {
21290
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
21291
        oprot.writeString(this.invoiceNumber);
21292
        oprot.writeFieldEnd();
21293
      }
21294
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
21295
      oprot.writeI64(this.supplierId);
21296
      oprot.writeFieldEnd();
21297
      oprot.writeFieldStop();
21298
      oprot.writeStructEnd();
21299
    }
21300
 
21301
    @Override
21302
    public String toString() {
21303
      StringBuilder sb = new StringBuilder("isInvoiceReceived_args(");
21304
      boolean first = true;
21305
 
21306
      sb.append("invoiceNumber:");
21307
      if (this.invoiceNumber == null) {
21308
        sb.append("null");
21309
      } else {
21310
        sb.append(this.invoiceNumber);
21311
      }
21312
      first = false;
21313
      if (!first) sb.append(", ");
21314
      sb.append("supplierId:");
21315
      sb.append(this.supplierId);
21316
      first = false;
21317
      sb.append(")");
21318
      return sb.toString();
21319
    }
21320
 
21321
    public void validate() throws org.apache.thrift.TException {
21322
      // check for required fields
21323
    }
21324
 
21325
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21326
      try {
21327
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21328
      } catch (org.apache.thrift.TException te) {
21329
        throw new java.io.IOException(te);
21330
      }
21331
    }
21332
 
21333
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
21334
      try {
24832 tejbeer 21335
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
21336
        __isset_bit_vector = new BitSet(1);
7410 amar.kumar 21337
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
21338
      } catch (org.apache.thrift.TException te) {
21339
        throw new java.io.IOException(te);
21340
      }
21341
    }
21342
 
21343
  }
21344
 
21345
  public static class isInvoiceReceived_result implements org.apache.thrift.TBase<isInvoiceReceived_result, isInvoiceReceived_result._Fields>, java.io.Serializable, Cloneable   {
21346
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isInvoiceReceived_result");
21347
 
21348
    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);
21349
 
21350
    private boolean success; // required
21351
 
21352
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21353
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
21354
      SUCCESS((short)0, "success");
21355
 
21356
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21357
 
21358
      static {
21359
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21360
          byName.put(field.getFieldName(), field);
21361
        }
21362
      }
21363
 
21364
      /**
21365
       * Find the _Fields constant that matches fieldId, or null if its not found.
21366
       */
21367
      public static _Fields findByThriftId(int fieldId) {
21368
        switch(fieldId) {
21369
          case 0: // SUCCESS
21370
            return SUCCESS;
21371
          default:
21372
            return null;
21373
        }
21374
      }
21375
 
21376
      /**
21377
       * Find the _Fields constant that matches fieldId, throwing an exception
21378
       * if it is not found.
21379
       */
21380
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21381
        _Fields fields = findByThriftId(fieldId);
21382
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21383
        return fields;
21384
      }
21385
 
21386
      /**
21387
       * Find the _Fields constant that matches name, or null if its not found.
21388
       */
21389
      public static _Fields findByName(String name) {
21390
        return byName.get(name);
21391
      }
21392
 
21393
      private final short _thriftId;
21394
      private final String _fieldName;
21395
 
21396
      _Fields(short thriftId, String fieldName) {
21397
        _thriftId = thriftId;
21398
        _fieldName = fieldName;
21399
      }
21400
 
21401
      public short getThriftFieldId() {
21402
        return _thriftId;
21403
      }
21404
 
21405
      public String getFieldName() {
21406
        return _fieldName;
21407
      }
21408
    }
21409
 
21410
    // isset id assignments
21411
    private static final int __SUCCESS_ISSET_ID = 0;
21412
    private BitSet __isset_bit_vector = new BitSet(1);
21413
 
21414
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21415
    static {
21416
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
21417
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21418
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
21419
      metaDataMap = Collections.unmodifiableMap(tmpMap);
21420
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isInvoiceReceived_result.class, metaDataMap);
21421
    }
21422
 
21423
    public isInvoiceReceived_result() {
21424
    }
21425
 
21426
    public isInvoiceReceived_result(
21427
      boolean success)
21428
    {
21429
      this();
21430
      this.success = success;
21431
      setSuccessIsSet(true);
21432
    }
21433
 
21434
    /**
21435
     * Performs a deep copy on <i>other</i>.
21436
     */
21437
    public isInvoiceReceived_result(isInvoiceReceived_result other) {
21438
      __isset_bit_vector.clear();
21439
      __isset_bit_vector.or(other.__isset_bit_vector);
21440
      this.success = other.success;
21441
    }
21442
 
21443
    public isInvoiceReceived_result deepCopy() {
21444
      return new isInvoiceReceived_result(this);
21445
    }
21446
 
21447
    @Override
21448
    public void clear() {
21449
      setSuccessIsSet(false);
21450
      this.success = false;
21451
    }
21452
 
21453
    public boolean isSuccess() {
21454
      return this.success;
21455
    }
21456
 
21457
    public void setSuccess(boolean success) {
21458
      this.success = success;
21459
      setSuccessIsSet(true);
21460
    }
21461
 
21462
    public void unsetSuccess() {
21463
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
21464
    }
21465
 
21466
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
21467
    public boolean isSetSuccess() {
21468
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
21469
    }
21470
 
21471
    public void setSuccessIsSet(boolean value) {
21472
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
21473
    }
21474
 
21475
    public void setFieldValue(_Fields field, Object value) {
21476
      switch (field) {
21477
      case SUCCESS:
21478
        if (value == null) {
21479
          unsetSuccess();
21480
        } else {
21481
          setSuccess((Boolean)value);
21482
        }
21483
        break;
21484
 
21485
      }
21486
    }
21487
 
21488
    public Object getFieldValue(_Fields field) {
21489
      switch (field) {
21490
      case SUCCESS:
21491
        return Boolean.valueOf(isSuccess());
21492
 
21493
      }
21494
      throw new IllegalStateException();
21495
    }
21496
 
21497
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21498
    public boolean isSet(_Fields field) {
21499
      if (field == null) {
21500
        throw new IllegalArgumentException();
21501
      }
21502
 
21503
      switch (field) {
21504
      case SUCCESS:
21505
        return isSetSuccess();
21506
      }
21507
      throw new IllegalStateException();
21508
    }
21509
 
21510
    @Override
21511
    public boolean equals(Object that) {
21512
      if (that == null)
21513
        return false;
21514
      if (that instanceof isInvoiceReceived_result)
21515
        return this.equals((isInvoiceReceived_result)that);
21516
      return false;
21517
    }
21518
 
21519
    public boolean equals(isInvoiceReceived_result that) {
21520
      if (that == null)
21521
        return false;
21522
 
21523
      boolean this_present_success = true;
21524
      boolean that_present_success = true;
21525
      if (this_present_success || that_present_success) {
21526
        if (!(this_present_success && that_present_success))
21527
          return false;
21528
        if (this.success != that.success)
21529
          return false;
21530
      }
21531
 
21532
      return true;
21533
    }
21534
 
21535
    @Override
21536
    public int hashCode() {
21537
      return 0;
21538
    }
21539
 
21540
    public int compareTo(isInvoiceReceived_result other) {
21541
      if (!getClass().equals(other.getClass())) {
21542
        return getClass().getName().compareTo(other.getClass().getName());
21543
      }
21544
 
21545
      int lastComparison = 0;
21546
      isInvoiceReceived_result typedOther = (isInvoiceReceived_result)other;
21547
 
21548
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
21549
      if (lastComparison != 0) {
21550
        return lastComparison;
21551
      }
21552
      if (isSetSuccess()) {
21553
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
21554
        if (lastComparison != 0) {
21555
          return lastComparison;
21556
        }
21557
      }
21558
      return 0;
21559
    }
21560
 
21561
    public _Fields fieldForId(int fieldId) {
21562
      return _Fields.findByThriftId(fieldId);
21563
    }
21564
 
21565
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
21566
      org.apache.thrift.protocol.TField field;
21567
      iprot.readStructBegin();
21568
      while (true)
21569
      {
21570
        field = iprot.readFieldBegin();
21571
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
21572
          break;
21573
        }
21574
        switch (field.id) {
21575
          case 0: // SUCCESS
21576
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
21577
              this.success = iprot.readBool();
21578
              setSuccessIsSet(true);
21579
            } else { 
21580
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21581
            }
21582
            break;
21583
          default:
21584
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21585
        }
21586
        iprot.readFieldEnd();
21587
      }
21588
      iprot.readStructEnd();
21589
      validate();
21590
    }
21591
 
21592
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
21593
      oprot.writeStructBegin(STRUCT_DESC);
21594
 
21595
      if (this.isSetSuccess()) {
21596
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21597
        oprot.writeBool(this.success);
21598
        oprot.writeFieldEnd();
21599
      }
21600
      oprot.writeFieldStop();
21601
      oprot.writeStructEnd();
21602
    }
21603
 
21604
    @Override
21605
    public String toString() {
21606
      StringBuilder sb = new StringBuilder("isInvoiceReceived_result(");
21607
      boolean first = true;
21608
 
21609
      sb.append("success:");
21610
      sb.append(this.success);
21611
      first = false;
21612
      sb.append(")");
21613
      return sb.toString();
21614
    }
21615
 
21616
    public void validate() throws org.apache.thrift.TException {
21617
      // check for required fields
21618
    }
21619
 
21620
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21621
      try {
21622
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21623
      } catch (org.apache.thrift.TException te) {
21624
        throw new java.io.IOException(te);
21625
      }
21626
    }
21627
 
21628
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
21629
      try {
21630
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
21631
      } catch (org.apache.thrift.TException te) {
21632
        throw new java.io.IOException(te);
21633
      }
21634
    }
21635
 
21636
  }
21637
 
9829 amar.kumar 21638
  public static class changeWarehouseForPO_args implements org.apache.thrift.TBase<changeWarehouseForPO_args, changeWarehouseForPO_args._Fields>, java.io.Serializable, Cloneable   {
21639
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changeWarehouseForPO_args");
21640
 
21641
    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);
21642
    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);
21643
 
21644
    private long id; // required
21645
    private long warehouseId; // required
21646
 
21647
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21648
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
21649
      ID((short)1, "id"),
21650
      WAREHOUSE_ID((short)2, "warehouseId");
21651
 
21652
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21653
 
21654
      static {
21655
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21656
          byName.put(field.getFieldName(), field);
21657
        }
21658
      }
21659
 
21660
      /**
21661
       * Find the _Fields constant that matches fieldId, or null if its not found.
21662
       */
21663
      public static _Fields findByThriftId(int fieldId) {
21664
        switch(fieldId) {
21665
          case 1: // ID
21666
            return ID;
21667
          case 2: // WAREHOUSE_ID
21668
            return WAREHOUSE_ID;
21669
          default:
21670
            return null;
21671
        }
21672
      }
21673
 
21674
      /**
21675
       * Find the _Fields constant that matches fieldId, throwing an exception
21676
       * if it is not found.
21677
       */
21678
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21679
        _Fields fields = findByThriftId(fieldId);
21680
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21681
        return fields;
21682
      }
21683
 
21684
      /**
21685
       * Find the _Fields constant that matches name, or null if its not found.
21686
       */
21687
      public static _Fields findByName(String name) {
21688
        return byName.get(name);
21689
      }
21690
 
21691
      private final short _thriftId;
21692
      private final String _fieldName;
21693
 
21694
      _Fields(short thriftId, String fieldName) {
21695
        _thriftId = thriftId;
21696
        _fieldName = fieldName;
21697
      }
21698
 
21699
      public short getThriftFieldId() {
21700
        return _thriftId;
21701
      }
21702
 
21703
      public String getFieldName() {
21704
        return _fieldName;
21705
      }
21706
    }
21707
 
21708
    // isset id assignments
21709
    private static final int __ID_ISSET_ID = 0;
21710
    private static final int __WAREHOUSEID_ISSET_ID = 1;
21711
    private BitSet __isset_bit_vector = new BitSet(2);
21712
 
21713
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21714
    static {
21715
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
21716
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21717
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
21718
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21719
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
21720
      metaDataMap = Collections.unmodifiableMap(tmpMap);
21721
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changeWarehouseForPO_args.class, metaDataMap);
21722
    }
21723
 
21724
    public changeWarehouseForPO_args() {
21725
    }
21726
 
21727
    public changeWarehouseForPO_args(
21728
      long id,
21729
      long warehouseId)
21730
    {
21731
      this();
21732
      this.id = id;
21733
      setIdIsSet(true);
21734
      this.warehouseId = warehouseId;
21735
      setWarehouseIdIsSet(true);
21736
    }
21737
 
21738
    /**
21739
     * Performs a deep copy on <i>other</i>.
21740
     */
21741
    public changeWarehouseForPO_args(changeWarehouseForPO_args other) {
21742
      __isset_bit_vector.clear();
21743
      __isset_bit_vector.or(other.__isset_bit_vector);
21744
      this.id = other.id;
21745
      this.warehouseId = other.warehouseId;
21746
    }
21747
 
21748
    public changeWarehouseForPO_args deepCopy() {
21749
      return new changeWarehouseForPO_args(this);
21750
    }
21751
 
21752
    @Override
21753
    public void clear() {
21754
      setIdIsSet(false);
21755
      this.id = 0;
21756
      setWarehouseIdIsSet(false);
21757
      this.warehouseId = 0;
21758
    }
21759
 
21760
    public long getId() {
21761
      return this.id;
21762
    }
21763
 
21764
    public void setId(long id) {
21765
      this.id = id;
21766
      setIdIsSet(true);
21767
    }
21768
 
21769
    public void unsetId() {
21770
      __isset_bit_vector.clear(__ID_ISSET_ID);
21771
    }
21772
 
21773
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
21774
    public boolean isSetId() {
21775
      return __isset_bit_vector.get(__ID_ISSET_ID);
21776
    }
21777
 
21778
    public void setIdIsSet(boolean value) {
21779
      __isset_bit_vector.set(__ID_ISSET_ID, value);
21780
    }
21781
 
21782
    public long getWarehouseId() {
21783
      return this.warehouseId;
21784
    }
21785
 
21786
    public void setWarehouseId(long warehouseId) {
21787
      this.warehouseId = warehouseId;
21788
      setWarehouseIdIsSet(true);
21789
    }
21790
 
21791
    public void unsetWarehouseId() {
21792
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
21793
    }
21794
 
21795
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
21796
    public boolean isSetWarehouseId() {
21797
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
21798
    }
21799
 
21800
    public void setWarehouseIdIsSet(boolean value) {
21801
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
21802
    }
21803
 
21804
    public void setFieldValue(_Fields field, Object value) {
21805
      switch (field) {
21806
      case ID:
21807
        if (value == null) {
21808
          unsetId();
21809
        } else {
21810
          setId((Long)value);
21811
        }
21812
        break;
21813
 
21814
      case WAREHOUSE_ID:
21815
        if (value == null) {
21816
          unsetWarehouseId();
21817
        } else {
21818
          setWarehouseId((Long)value);
21819
        }
21820
        break;
21821
 
21822
      }
21823
    }
21824
 
21825
    public Object getFieldValue(_Fields field) {
21826
      switch (field) {
21827
      case ID:
21828
        return Long.valueOf(getId());
21829
 
21830
      case WAREHOUSE_ID:
21831
        return Long.valueOf(getWarehouseId());
21832
 
21833
      }
21834
      throw new IllegalStateException();
21835
    }
21836
 
21837
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21838
    public boolean isSet(_Fields field) {
21839
      if (field == null) {
21840
        throw new IllegalArgumentException();
21841
      }
21842
 
21843
      switch (field) {
21844
      case ID:
21845
        return isSetId();
21846
      case WAREHOUSE_ID:
21847
        return isSetWarehouseId();
21848
      }
21849
      throw new IllegalStateException();
21850
    }
21851
 
21852
    @Override
21853
    public boolean equals(Object that) {
21854
      if (that == null)
21855
        return false;
21856
      if (that instanceof changeWarehouseForPO_args)
21857
        return this.equals((changeWarehouseForPO_args)that);
21858
      return false;
21859
    }
21860
 
21861
    public boolean equals(changeWarehouseForPO_args that) {
21862
      if (that == null)
21863
        return false;
21864
 
21865
      boolean this_present_id = true;
21866
      boolean that_present_id = true;
21867
      if (this_present_id || that_present_id) {
21868
        if (!(this_present_id && that_present_id))
21869
          return false;
21870
        if (this.id != that.id)
21871
          return false;
21872
      }
21873
 
21874
      boolean this_present_warehouseId = true;
21875
      boolean that_present_warehouseId = true;
21876
      if (this_present_warehouseId || that_present_warehouseId) {
21877
        if (!(this_present_warehouseId && that_present_warehouseId))
21878
          return false;
21879
        if (this.warehouseId != that.warehouseId)
21880
          return false;
21881
      }
21882
 
21883
      return true;
21884
    }
21885
 
21886
    @Override
21887
    public int hashCode() {
21888
      return 0;
21889
    }
21890
 
21891
    public int compareTo(changeWarehouseForPO_args other) {
21892
      if (!getClass().equals(other.getClass())) {
21893
        return getClass().getName().compareTo(other.getClass().getName());
21894
      }
21895
 
21896
      int lastComparison = 0;
21897
      changeWarehouseForPO_args typedOther = (changeWarehouseForPO_args)other;
21898
 
21899
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
21900
      if (lastComparison != 0) {
21901
        return lastComparison;
21902
      }
21903
      if (isSetId()) {
21904
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
21905
        if (lastComparison != 0) {
21906
          return lastComparison;
21907
        }
21908
      }
21909
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
21910
      if (lastComparison != 0) {
21911
        return lastComparison;
21912
      }
21913
      if (isSetWarehouseId()) {
21914
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
21915
        if (lastComparison != 0) {
21916
          return lastComparison;
21917
        }
21918
      }
21919
      return 0;
21920
    }
21921
 
21922
    public _Fields fieldForId(int fieldId) {
21923
      return _Fields.findByThriftId(fieldId);
21924
    }
21925
 
21926
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
21927
      org.apache.thrift.protocol.TField field;
21928
      iprot.readStructBegin();
21929
      while (true)
21930
      {
21931
        field = iprot.readFieldBegin();
21932
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
21933
          break;
21934
        }
21935
        switch (field.id) {
21936
          case 1: // ID
21937
            if (field.type == org.apache.thrift.protocol.TType.I64) {
21938
              this.id = iprot.readI64();
21939
              setIdIsSet(true);
21940
            } else { 
21941
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21942
            }
21943
            break;
21944
          case 2: // WAREHOUSE_ID
21945
            if (field.type == org.apache.thrift.protocol.TType.I64) {
21946
              this.warehouseId = iprot.readI64();
21947
              setWarehouseIdIsSet(true);
21948
            } else { 
21949
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21950
            }
21951
            break;
21952
          default:
21953
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21954
        }
21955
        iprot.readFieldEnd();
21956
      }
21957
      iprot.readStructEnd();
21958
      validate();
21959
    }
21960
 
21961
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
21962
      validate();
21963
 
21964
      oprot.writeStructBegin(STRUCT_DESC);
21965
      oprot.writeFieldBegin(ID_FIELD_DESC);
21966
      oprot.writeI64(this.id);
21967
      oprot.writeFieldEnd();
21968
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
21969
      oprot.writeI64(this.warehouseId);
21970
      oprot.writeFieldEnd();
21971
      oprot.writeFieldStop();
21972
      oprot.writeStructEnd();
21973
    }
21974
 
21975
    @Override
21976
    public String toString() {
21977
      StringBuilder sb = new StringBuilder("changeWarehouseForPO_args(");
21978
      boolean first = true;
21979
 
21980
      sb.append("id:");
21981
      sb.append(this.id);
21982
      first = false;
21983
      if (!first) sb.append(", ");
21984
      sb.append("warehouseId:");
21985
      sb.append(this.warehouseId);
21986
      first = false;
21987
      sb.append(")");
21988
      return sb.toString();
21989
    }
21990
 
21991
    public void validate() throws org.apache.thrift.TException {
21992
      // check for required fields
21993
    }
21994
 
21995
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21996
      try {
21997
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21998
      } catch (org.apache.thrift.TException te) {
21999
        throw new java.io.IOException(te);
22000
      }
22001
    }
22002
 
22003
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
22004
      try {
24832 tejbeer 22005
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
22006
        __isset_bit_vector = new BitSet(1);
9829 amar.kumar 22007
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
22008
      } catch (org.apache.thrift.TException te) {
22009
        throw new java.io.IOException(te);
22010
      }
22011
    }
22012
 
22013
  }
22014
 
22015
  public static class changeWarehouseForPO_result implements org.apache.thrift.TBase<changeWarehouseForPO_result, changeWarehouseForPO_result._Fields>, java.io.Serializable, Cloneable   {
22016
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changeWarehouseForPO_result");
22017
 
22018
    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);
22019
 
22020
    private PurchaseServiceException e; // required
22021
 
22022
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22023
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
22024
      E((short)1, "e");
22025
 
22026
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22027
 
22028
      static {
22029
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22030
          byName.put(field.getFieldName(), field);
22031
        }
22032
      }
22033
 
22034
      /**
22035
       * Find the _Fields constant that matches fieldId, or null if its not found.
22036
       */
22037
      public static _Fields findByThriftId(int fieldId) {
22038
        switch(fieldId) {
22039
          case 1: // E
22040
            return E;
22041
          default:
22042
            return null;
22043
        }
22044
      }
22045
 
22046
      /**
22047
       * Find the _Fields constant that matches fieldId, throwing an exception
22048
       * if it is not found.
22049
       */
22050
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22051
        _Fields fields = findByThriftId(fieldId);
22052
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22053
        return fields;
22054
      }
22055
 
22056
      /**
22057
       * Find the _Fields constant that matches name, or null if its not found.
22058
       */
22059
      public static _Fields findByName(String name) {
22060
        return byName.get(name);
22061
      }
22062
 
22063
      private final short _thriftId;
22064
      private final String _fieldName;
22065
 
22066
      _Fields(short thriftId, String fieldName) {
22067
        _thriftId = thriftId;
22068
        _fieldName = fieldName;
22069
      }
22070
 
22071
      public short getThriftFieldId() {
22072
        return _thriftId;
22073
      }
22074
 
22075
      public String getFieldName() {
22076
        return _fieldName;
22077
      }
22078
    }
22079
 
22080
    // isset id assignments
22081
 
22082
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
22083
    static {
22084
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
22085
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22086
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
22087
      metaDataMap = Collections.unmodifiableMap(tmpMap);
22088
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changeWarehouseForPO_result.class, metaDataMap);
22089
    }
22090
 
22091
    public changeWarehouseForPO_result() {
22092
    }
22093
 
22094
    public changeWarehouseForPO_result(
22095
      PurchaseServiceException e)
22096
    {
22097
      this();
22098
      this.e = e;
22099
    }
22100
 
22101
    /**
22102
     * Performs a deep copy on <i>other</i>.
22103
     */
22104
    public changeWarehouseForPO_result(changeWarehouseForPO_result other) {
22105
      if (other.isSetE()) {
22106
        this.e = new PurchaseServiceException(other.e);
22107
      }
22108
    }
22109
 
22110
    public changeWarehouseForPO_result deepCopy() {
22111
      return new changeWarehouseForPO_result(this);
22112
    }
22113
 
22114
    @Override
22115
    public void clear() {
22116
      this.e = null;
22117
    }
22118
 
22119
    public PurchaseServiceException getE() {
22120
      return this.e;
22121
    }
22122
 
22123
    public void setE(PurchaseServiceException e) {
22124
      this.e = e;
22125
    }
22126
 
22127
    public void unsetE() {
22128
      this.e = null;
22129
    }
22130
 
22131
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
22132
    public boolean isSetE() {
22133
      return this.e != null;
22134
    }
22135
 
22136
    public void setEIsSet(boolean value) {
22137
      if (!value) {
22138
        this.e = null;
22139
      }
22140
    }
22141
 
22142
    public void setFieldValue(_Fields field, Object value) {
22143
      switch (field) {
22144
      case E:
22145
        if (value == null) {
22146
          unsetE();
22147
        } else {
22148
          setE((PurchaseServiceException)value);
22149
        }
22150
        break;
22151
 
22152
      }
22153
    }
22154
 
22155
    public Object getFieldValue(_Fields field) {
22156
      switch (field) {
22157
      case E:
22158
        return getE();
22159
 
22160
      }
22161
      throw new IllegalStateException();
22162
    }
22163
 
22164
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
22165
    public boolean isSet(_Fields field) {
22166
      if (field == null) {
22167
        throw new IllegalArgumentException();
22168
      }
22169
 
22170
      switch (field) {
22171
      case E:
22172
        return isSetE();
22173
      }
22174
      throw new IllegalStateException();
22175
    }
22176
 
22177
    @Override
22178
    public boolean equals(Object that) {
22179
      if (that == null)
22180
        return false;
22181
      if (that instanceof changeWarehouseForPO_result)
22182
        return this.equals((changeWarehouseForPO_result)that);
22183
      return false;
22184
    }
22185
 
22186
    public boolean equals(changeWarehouseForPO_result that) {
22187
      if (that == null)
22188
        return false;
22189
 
22190
      boolean this_present_e = true && this.isSetE();
22191
      boolean that_present_e = true && that.isSetE();
22192
      if (this_present_e || that_present_e) {
22193
        if (!(this_present_e && that_present_e))
22194
          return false;
22195
        if (!this.e.equals(that.e))
22196
          return false;
22197
      }
22198
 
22199
      return true;
22200
    }
22201
 
22202
    @Override
22203
    public int hashCode() {
22204
      return 0;
22205
    }
22206
 
22207
    public int compareTo(changeWarehouseForPO_result other) {
22208
      if (!getClass().equals(other.getClass())) {
22209
        return getClass().getName().compareTo(other.getClass().getName());
22210
      }
22211
 
22212
      int lastComparison = 0;
22213
      changeWarehouseForPO_result typedOther = (changeWarehouseForPO_result)other;
22214
 
22215
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
22216
      if (lastComparison != 0) {
22217
        return lastComparison;
22218
      }
22219
      if (isSetE()) {
22220
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
22221
        if (lastComparison != 0) {
22222
          return lastComparison;
22223
        }
22224
      }
22225
      return 0;
22226
    }
22227
 
22228
    public _Fields fieldForId(int fieldId) {
22229
      return _Fields.findByThriftId(fieldId);
22230
    }
22231
 
22232
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
22233
      org.apache.thrift.protocol.TField field;
22234
      iprot.readStructBegin();
22235
      while (true)
22236
      {
22237
        field = iprot.readFieldBegin();
22238
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
22239
          break;
22240
        }
22241
        switch (field.id) {
22242
          case 1: // E
22243
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
22244
              this.e = new PurchaseServiceException();
22245
              this.e.read(iprot);
22246
            } else { 
22247
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22248
            }
22249
            break;
22250
          default:
22251
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22252
        }
22253
        iprot.readFieldEnd();
22254
      }
22255
      iprot.readStructEnd();
22256
      validate();
22257
    }
22258
 
22259
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
22260
      oprot.writeStructBegin(STRUCT_DESC);
22261
 
22262
      if (this.isSetE()) {
22263
        oprot.writeFieldBegin(E_FIELD_DESC);
22264
        this.e.write(oprot);
22265
        oprot.writeFieldEnd();
22266
      }
22267
      oprot.writeFieldStop();
22268
      oprot.writeStructEnd();
22269
    }
22270
 
22271
    @Override
22272
    public String toString() {
22273
      StringBuilder sb = new StringBuilder("changeWarehouseForPO_result(");
22274
      boolean first = true;
22275
 
22276
      sb.append("e:");
22277
      if (this.e == null) {
22278
        sb.append("null");
22279
      } else {
22280
        sb.append(this.e);
22281
      }
22282
      first = false;
22283
      sb.append(")");
22284
      return sb.toString();
22285
    }
22286
 
22287
    public void validate() throws org.apache.thrift.TException {
22288
      // check for required fields
22289
    }
22290
 
22291
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
22292
      try {
22293
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
22294
      } catch (org.apache.thrift.TException te) {
22295
        throw new java.io.IOException(te);
22296
      }
22297
    }
22298
 
22299
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
22300
      try {
22301
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
22302
      } catch (org.apache.thrift.TException te) {
22303
        throw new java.io.IOException(te);
22304
      }
22305
    }
22306
 
22307
  }
22308
 
9925 amar.kumar 22309
  public static class changePOStatus_args implements org.apache.thrift.TBase<changePOStatus_args, changePOStatus_args._Fields>, java.io.Serializable, Cloneable   {
22310
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changePOStatus_args");
22311
 
22312
    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);
22313
    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);
22314
 
22315
    private long id; // required
22316
    private POStatus poStatus; // required
22317
 
22318
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22319
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
22320
      ID((short)1, "id"),
22321
      /**
22322
       * 
22323
       * @see POStatus
22324
       */
22325
      PO_STATUS((short)2, "poStatus");
22326
 
22327
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22328
 
22329
      static {
22330
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22331
          byName.put(field.getFieldName(), field);
22332
        }
22333
      }
22334
 
22335
      /**
22336
       * Find the _Fields constant that matches fieldId, or null if its not found.
22337
       */
22338
      public static _Fields findByThriftId(int fieldId) {
22339
        switch(fieldId) {
22340
          case 1: // ID
22341
            return ID;
22342
          case 2: // PO_STATUS
22343
            return PO_STATUS;
22344
          default:
22345
            return null;
22346
        }
22347
      }
22348
 
22349
      /**
22350
       * Find the _Fields constant that matches fieldId, throwing an exception
22351
       * if it is not found.
22352
       */
22353
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22354
        _Fields fields = findByThriftId(fieldId);
22355
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22356
        return fields;
22357
      }
22358
 
22359
      /**
22360
       * Find the _Fields constant that matches name, or null if its not found.
22361
       */
22362
      public static _Fields findByName(String name) {
22363
        return byName.get(name);
22364
      }
22365
 
22366
      private final short _thriftId;
22367
      private final String _fieldName;
22368
 
22369
      _Fields(short thriftId, String fieldName) {
22370
        _thriftId = thriftId;
22371
        _fieldName = fieldName;
22372
      }
22373
 
22374
      public short getThriftFieldId() {
22375
        return _thriftId;
22376
      }
22377
 
22378
      public String getFieldName() {
22379
        return _fieldName;
22380
      }
22381
    }
22382
 
22383
    // isset id assignments
22384
    private static final int __ID_ISSET_ID = 0;
22385
    private BitSet __isset_bit_vector = new BitSet(1);
22386
 
22387
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
22388
    static {
22389
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
22390
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22391
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
22392
      tmpMap.put(_Fields.PO_STATUS, new org.apache.thrift.meta_data.FieldMetaData("poStatus", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22393
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, POStatus.class)));
22394
      metaDataMap = Collections.unmodifiableMap(tmpMap);
22395
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changePOStatus_args.class, metaDataMap);
22396
    }
22397
 
22398
    public changePOStatus_args() {
22399
    }
22400
 
22401
    public changePOStatus_args(
22402
      long id,
22403
      POStatus poStatus)
22404
    {
22405
      this();
22406
      this.id = id;
22407
      setIdIsSet(true);
22408
      this.poStatus = poStatus;
22409
    }
22410
 
22411
    /**
22412
     * Performs a deep copy on <i>other</i>.
22413
     */
22414
    public changePOStatus_args(changePOStatus_args other) {
22415
      __isset_bit_vector.clear();
22416
      __isset_bit_vector.or(other.__isset_bit_vector);
22417
      this.id = other.id;
22418
      if (other.isSetPoStatus()) {
22419
        this.poStatus = other.poStatus;
22420
      }
22421
    }
22422
 
22423
    public changePOStatus_args deepCopy() {
22424
      return new changePOStatus_args(this);
22425
    }
22426
 
22427
    @Override
22428
    public void clear() {
22429
      setIdIsSet(false);
22430
      this.id = 0;
22431
      this.poStatus = null;
22432
    }
22433
 
22434
    public long getId() {
22435
      return this.id;
22436
    }
22437
 
22438
    public void setId(long id) {
22439
      this.id = id;
22440
      setIdIsSet(true);
22441
    }
22442
 
22443
    public void unsetId() {
22444
      __isset_bit_vector.clear(__ID_ISSET_ID);
22445
    }
22446
 
22447
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
22448
    public boolean isSetId() {
22449
      return __isset_bit_vector.get(__ID_ISSET_ID);
22450
    }
22451
 
22452
    public void setIdIsSet(boolean value) {
22453
      __isset_bit_vector.set(__ID_ISSET_ID, value);
22454
    }
22455
 
22456
    /**
22457
     * 
22458
     * @see POStatus
22459
     */
22460
    public POStatus getPoStatus() {
22461
      return this.poStatus;
22462
    }
22463
 
22464
    /**
22465
     * 
22466
     * @see POStatus
22467
     */
22468
    public void setPoStatus(POStatus poStatus) {
22469
      this.poStatus = poStatus;
22470
    }
22471
 
22472
    public void unsetPoStatus() {
22473
      this.poStatus = null;
22474
    }
22475
 
22476
    /** Returns true if field poStatus is set (has been assigned a value) and false otherwise */
22477
    public boolean isSetPoStatus() {
22478
      return this.poStatus != null;
22479
    }
22480
 
22481
    public void setPoStatusIsSet(boolean value) {
22482
      if (!value) {
22483
        this.poStatus = null;
22484
      }
22485
    }
22486
 
22487
    public void setFieldValue(_Fields field, Object value) {
22488
      switch (field) {
22489
      case ID:
22490
        if (value == null) {
22491
          unsetId();
22492
        } else {
22493
          setId((Long)value);
22494
        }
22495
        break;
22496
 
22497
      case PO_STATUS:
22498
        if (value == null) {
22499
          unsetPoStatus();
22500
        } else {
22501
          setPoStatus((POStatus)value);
22502
        }
22503
        break;
22504
 
22505
      }
22506
    }
22507
 
22508
    public Object getFieldValue(_Fields field) {
22509
      switch (field) {
22510
      case ID:
22511
        return Long.valueOf(getId());
22512
 
22513
      case PO_STATUS:
22514
        return getPoStatus();
22515
 
22516
      }
22517
      throw new IllegalStateException();
22518
    }
22519
 
22520
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
22521
    public boolean isSet(_Fields field) {
22522
      if (field == null) {
22523
        throw new IllegalArgumentException();
22524
      }
22525
 
22526
      switch (field) {
22527
      case ID:
22528
        return isSetId();
22529
      case PO_STATUS:
22530
        return isSetPoStatus();
22531
      }
22532
      throw new IllegalStateException();
22533
    }
22534
 
22535
    @Override
22536
    public boolean equals(Object that) {
22537
      if (that == null)
22538
        return false;
22539
      if (that instanceof changePOStatus_args)
22540
        return this.equals((changePOStatus_args)that);
22541
      return false;
22542
    }
22543
 
22544
    public boolean equals(changePOStatus_args that) {
22545
      if (that == null)
22546
        return false;
22547
 
22548
      boolean this_present_id = true;
22549
      boolean that_present_id = true;
22550
      if (this_present_id || that_present_id) {
22551
        if (!(this_present_id && that_present_id))
22552
          return false;
22553
        if (this.id != that.id)
22554
          return false;
22555
      }
22556
 
22557
      boolean this_present_poStatus = true && this.isSetPoStatus();
22558
      boolean that_present_poStatus = true && that.isSetPoStatus();
22559
      if (this_present_poStatus || that_present_poStatus) {
22560
        if (!(this_present_poStatus && that_present_poStatus))
22561
          return false;
22562
        if (!this.poStatus.equals(that.poStatus))
22563
          return false;
22564
      }
22565
 
22566
      return true;
22567
    }
22568
 
22569
    @Override
22570
    public int hashCode() {
22571
      return 0;
22572
    }
22573
 
22574
    public int compareTo(changePOStatus_args other) {
22575
      if (!getClass().equals(other.getClass())) {
22576
        return getClass().getName().compareTo(other.getClass().getName());
22577
      }
22578
 
22579
      int lastComparison = 0;
22580
      changePOStatus_args typedOther = (changePOStatus_args)other;
22581
 
22582
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
22583
      if (lastComparison != 0) {
22584
        return lastComparison;
22585
      }
22586
      if (isSetId()) {
22587
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
22588
        if (lastComparison != 0) {
22589
          return lastComparison;
22590
        }
22591
      }
22592
      lastComparison = Boolean.valueOf(isSetPoStatus()).compareTo(typedOther.isSetPoStatus());
22593
      if (lastComparison != 0) {
22594
        return lastComparison;
22595
      }
22596
      if (isSetPoStatus()) {
22597
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.poStatus, typedOther.poStatus);
22598
        if (lastComparison != 0) {
22599
          return lastComparison;
22600
        }
22601
      }
22602
      return 0;
22603
    }
22604
 
22605
    public _Fields fieldForId(int fieldId) {
22606
      return _Fields.findByThriftId(fieldId);
22607
    }
22608
 
22609
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
22610
      org.apache.thrift.protocol.TField field;
22611
      iprot.readStructBegin();
22612
      while (true)
22613
      {
22614
        field = iprot.readFieldBegin();
22615
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
22616
          break;
22617
        }
22618
        switch (field.id) {
22619
          case 1: // ID
22620
            if (field.type == org.apache.thrift.protocol.TType.I64) {
22621
              this.id = iprot.readI64();
22622
              setIdIsSet(true);
22623
            } else { 
22624
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22625
            }
22626
            break;
22627
          case 2: // PO_STATUS
22628
            if (field.type == org.apache.thrift.protocol.TType.I32) {
22629
              this.poStatus = POStatus.findByValue(iprot.readI32());
22630
            } else { 
22631
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22632
            }
22633
            break;
22634
          default:
22635
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22636
        }
22637
        iprot.readFieldEnd();
22638
      }
22639
      iprot.readStructEnd();
22640
      validate();
22641
    }
22642
 
22643
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
22644
      validate();
22645
 
22646
      oprot.writeStructBegin(STRUCT_DESC);
22647
      oprot.writeFieldBegin(ID_FIELD_DESC);
22648
      oprot.writeI64(this.id);
22649
      oprot.writeFieldEnd();
22650
      if (this.poStatus != null) {
22651
        oprot.writeFieldBegin(PO_STATUS_FIELD_DESC);
22652
        oprot.writeI32(this.poStatus.getValue());
22653
        oprot.writeFieldEnd();
22654
      }
22655
      oprot.writeFieldStop();
22656
      oprot.writeStructEnd();
22657
    }
22658
 
22659
    @Override
22660
    public String toString() {
22661
      StringBuilder sb = new StringBuilder("changePOStatus_args(");
22662
      boolean first = true;
22663
 
22664
      sb.append("id:");
22665
      sb.append(this.id);
22666
      first = false;
22667
      if (!first) sb.append(", ");
22668
      sb.append("poStatus:");
22669
      if (this.poStatus == null) {
22670
        sb.append("null");
22671
      } else {
22672
        sb.append(this.poStatus);
22673
      }
22674
      first = false;
22675
      sb.append(")");
22676
      return sb.toString();
22677
    }
22678
 
22679
    public void validate() throws org.apache.thrift.TException {
22680
      // check for required fields
22681
    }
22682
 
22683
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
22684
      try {
22685
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
22686
      } catch (org.apache.thrift.TException te) {
22687
        throw new java.io.IOException(te);
22688
      }
22689
    }
22690
 
22691
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
22692
      try {
22693
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
22694
        __isset_bit_vector = new BitSet(1);
22695
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
22696
      } catch (org.apache.thrift.TException te) {
22697
        throw new java.io.IOException(te);
22698
      }
22699
    }
22700
 
22701
  }
22702
 
22703
  public static class changePOStatus_result implements org.apache.thrift.TBase<changePOStatus_result, changePOStatus_result._Fields>, java.io.Serializable, Cloneable   {
22704
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changePOStatus_result");
22705
 
22706
    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);
22707
 
22708
    private PurchaseServiceException e; // required
22709
 
22710
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22711
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
22712
      E((short)1, "e");
22713
 
22714
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22715
 
22716
      static {
22717
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22718
          byName.put(field.getFieldName(), field);
22719
        }
22720
      }
22721
 
22722
      /**
22723
       * Find the _Fields constant that matches fieldId, or null if its not found.
22724
       */
22725
      public static _Fields findByThriftId(int fieldId) {
22726
        switch(fieldId) {
22727
          case 1: // E
22728
            return E;
22729
          default:
22730
            return null;
22731
        }
22732
      }
22733
 
22734
      /**
22735
       * Find the _Fields constant that matches fieldId, throwing an exception
22736
       * if it is not found.
22737
       */
22738
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22739
        _Fields fields = findByThriftId(fieldId);
22740
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22741
        return fields;
22742
      }
22743
 
22744
      /**
22745
       * Find the _Fields constant that matches name, or null if its not found.
22746
       */
22747
      public static _Fields findByName(String name) {
22748
        return byName.get(name);
22749
      }
22750
 
22751
      private final short _thriftId;
22752
      private final String _fieldName;
22753
 
22754
      _Fields(short thriftId, String fieldName) {
22755
        _thriftId = thriftId;
22756
        _fieldName = fieldName;
22757
      }
22758
 
22759
      public short getThriftFieldId() {
22760
        return _thriftId;
22761
      }
22762
 
22763
      public String getFieldName() {
22764
        return _fieldName;
22765
      }
22766
    }
22767
 
22768
    // isset id assignments
22769
 
22770
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
22771
    static {
22772
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
22773
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22774
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
22775
      metaDataMap = Collections.unmodifiableMap(tmpMap);
22776
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changePOStatus_result.class, metaDataMap);
22777
    }
22778
 
22779
    public changePOStatus_result() {
22780
    }
22781
 
22782
    public changePOStatus_result(
22783
      PurchaseServiceException e)
22784
    {
22785
      this();
22786
      this.e = e;
22787
    }
22788
 
22789
    /**
22790
     * Performs a deep copy on <i>other</i>.
22791
     */
22792
    public changePOStatus_result(changePOStatus_result other) {
22793
      if (other.isSetE()) {
22794
        this.e = new PurchaseServiceException(other.e);
22795
      }
22796
    }
22797
 
22798
    public changePOStatus_result deepCopy() {
22799
      return new changePOStatus_result(this);
22800
    }
22801
 
22802
    @Override
22803
    public void clear() {
22804
      this.e = null;
22805
    }
22806
 
22807
    public PurchaseServiceException getE() {
22808
      return this.e;
22809
    }
22810
 
22811
    public void setE(PurchaseServiceException e) {
22812
      this.e = e;
22813
    }
22814
 
22815
    public void unsetE() {
22816
      this.e = null;
22817
    }
22818
 
22819
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
22820
    public boolean isSetE() {
22821
      return this.e != null;
22822
    }
22823
 
22824
    public void setEIsSet(boolean value) {
22825
      if (!value) {
22826
        this.e = null;
22827
      }
22828
    }
22829
 
22830
    public void setFieldValue(_Fields field, Object value) {
22831
      switch (field) {
22832
      case E:
22833
        if (value == null) {
22834
          unsetE();
22835
        } else {
22836
          setE((PurchaseServiceException)value);
22837
        }
22838
        break;
22839
 
22840
      }
22841
    }
22842
 
22843
    public Object getFieldValue(_Fields field) {
22844
      switch (field) {
22845
      case E:
22846
        return getE();
22847
 
22848
      }
22849
      throw new IllegalStateException();
22850
    }
22851
 
22852
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
22853
    public boolean isSet(_Fields field) {
22854
      if (field == null) {
22855
        throw new IllegalArgumentException();
22856
      }
22857
 
22858
      switch (field) {
22859
      case E:
22860
        return isSetE();
22861
      }
22862
      throw new IllegalStateException();
22863
    }
22864
 
22865
    @Override
22866
    public boolean equals(Object that) {
22867
      if (that == null)
22868
        return false;
22869
      if (that instanceof changePOStatus_result)
22870
        return this.equals((changePOStatus_result)that);
22871
      return false;
22872
    }
22873
 
22874
    public boolean equals(changePOStatus_result that) {
22875
      if (that == null)
22876
        return false;
22877
 
22878
      boolean this_present_e = true && this.isSetE();
22879
      boolean that_present_e = true && that.isSetE();
22880
      if (this_present_e || that_present_e) {
22881
        if (!(this_present_e && that_present_e))
22882
          return false;
22883
        if (!this.e.equals(that.e))
22884
          return false;
22885
      }
22886
 
22887
      return true;
22888
    }
22889
 
22890
    @Override
22891
    public int hashCode() {
22892
      return 0;
22893
    }
22894
 
22895
    public int compareTo(changePOStatus_result other) {
22896
      if (!getClass().equals(other.getClass())) {
22897
        return getClass().getName().compareTo(other.getClass().getName());
22898
      }
22899
 
22900
      int lastComparison = 0;
22901
      changePOStatus_result typedOther = (changePOStatus_result)other;
22902
 
22903
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
22904
      if (lastComparison != 0) {
22905
        return lastComparison;
22906
      }
22907
      if (isSetE()) {
22908
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
22909
        if (lastComparison != 0) {
22910
          return lastComparison;
22911
        }
22912
      }
22913
      return 0;
22914
    }
22915
 
22916
    public _Fields fieldForId(int fieldId) {
22917
      return _Fields.findByThriftId(fieldId);
22918
    }
22919
 
22920
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
22921
      org.apache.thrift.protocol.TField field;
22922
      iprot.readStructBegin();
22923
      while (true)
22924
      {
22925
        field = iprot.readFieldBegin();
22926
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
22927
          break;
22928
        }
22929
        switch (field.id) {
22930
          case 1: // E
22931
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
22932
              this.e = new PurchaseServiceException();
22933
              this.e.read(iprot);
22934
            } else { 
22935
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22936
            }
22937
            break;
22938
          default:
22939
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22940
        }
22941
        iprot.readFieldEnd();
22942
      }
22943
      iprot.readStructEnd();
22944
      validate();
22945
    }
22946
 
22947
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
22948
      oprot.writeStructBegin(STRUCT_DESC);
22949
 
22950
      if (this.isSetE()) {
22951
        oprot.writeFieldBegin(E_FIELD_DESC);
22952
        this.e.write(oprot);
22953
        oprot.writeFieldEnd();
22954
      }
22955
      oprot.writeFieldStop();
22956
      oprot.writeStructEnd();
22957
    }
22958
 
22959
    @Override
22960
    public String toString() {
22961
      StringBuilder sb = new StringBuilder("changePOStatus_result(");
22962
      boolean first = true;
22963
 
22964
      sb.append("e:");
22965
      if (this.e == null) {
22966
        sb.append("null");
22967
      } else {
22968
        sb.append(this.e);
22969
      }
22970
      first = false;
22971
      sb.append(")");
22972
      return sb.toString();
22973
    }
22974
 
22975
    public void validate() throws org.apache.thrift.TException {
22976
      // check for required fields
22977
    }
22978
 
22979
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
22980
      try {
22981
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
22982
      } catch (org.apache.thrift.TException te) {
22983
        throw new java.io.IOException(te);
22984
      }
22985
    }
22986
 
22987
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
22988
      try {
22989
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
22990
      } catch (org.apache.thrift.TException te) {
22991
        throw new java.io.IOException(te);
22992
      }
22993
    }
22994
 
22995
  }
22996
 
11751 manish.sha 22997
  public static class getPurchaseReturn_args implements org.apache.thrift.TBase<getPurchaseReturn_args, getPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
22998
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseReturn_args");
22999
 
23000
    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);
23001
 
23002
    private long id; // required
23003
 
23004
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23005
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
23006
      ID((short)1, "id");
23007
 
23008
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23009
 
23010
      static {
23011
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23012
          byName.put(field.getFieldName(), field);
23013
        }
23014
      }
23015
 
23016
      /**
23017
       * Find the _Fields constant that matches fieldId, or null if its not found.
23018
       */
23019
      public static _Fields findByThriftId(int fieldId) {
23020
        switch(fieldId) {
23021
          case 1: // ID
23022
            return ID;
23023
          default:
23024
            return null;
23025
        }
23026
      }
23027
 
23028
      /**
23029
       * Find the _Fields constant that matches fieldId, throwing an exception
23030
       * if it is not found.
23031
       */
23032
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23033
        _Fields fields = findByThriftId(fieldId);
23034
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23035
        return fields;
23036
      }
23037
 
23038
      /**
23039
       * Find the _Fields constant that matches name, or null if its not found.
23040
       */
23041
      public static _Fields findByName(String name) {
23042
        return byName.get(name);
23043
      }
23044
 
23045
      private final short _thriftId;
23046
      private final String _fieldName;
23047
 
23048
      _Fields(short thriftId, String fieldName) {
23049
        _thriftId = thriftId;
23050
        _fieldName = fieldName;
23051
      }
23052
 
23053
      public short getThriftFieldId() {
23054
        return _thriftId;
23055
      }
23056
 
23057
      public String getFieldName() {
23058
        return _fieldName;
23059
      }
23060
    }
23061
 
23062
    // isset id assignments
23063
    private static final int __ID_ISSET_ID = 0;
23064
    private BitSet __isset_bit_vector = new BitSet(1);
23065
 
23066
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
23067
    static {
23068
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
23069
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23070
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
23071
      metaDataMap = Collections.unmodifiableMap(tmpMap);
23072
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseReturn_args.class, metaDataMap);
23073
    }
23074
 
23075
    public getPurchaseReturn_args() {
23076
    }
23077
 
23078
    public getPurchaseReturn_args(
23079
      long id)
23080
    {
23081
      this();
23082
      this.id = id;
23083
      setIdIsSet(true);
23084
    }
23085
 
23086
    /**
23087
     * Performs a deep copy on <i>other</i>.
23088
     */
23089
    public getPurchaseReturn_args(getPurchaseReturn_args other) {
23090
      __isset_bit_vector.clear();
23091
      __isset_bit_vector.or(other.__isset_bit_vector);
23092
      this.id = other.id;
23093
    }
23094
 
23095
    public getPurchaseReturn_args deepCopy() {
23096
      return new getPurchaseReturn_args(this);
23097
    }
23098
 
23099
    @Override
23100
    public void clear() {
23101
      setIdIsSet(false);
23102
      this.id = 0;
23103
    }
23104
 
23105
    public long getId() {
23106
      return this.id;
23107
    }
23108
 
23109
    public void setId(long id) {
23110
      this.id = id;
23111
      setIdIsSet(true);
23112
    }
23113
 
23114
    public void unsetId() {
23115
      __isset_bit_vector.clear(__ID_ISSET_ID);
23116
    }
23117
 
23118
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
23119
    public boolean isSetId() {
23120
      return __isset_bit_vector.get(__ID_ISSET_ID);
23121
    }
23122
 
23123
    public void setIdIsSet(boolean value) {
23124
      __isset_bit_vector.set(__ID_ISSET_ID, value);
23125
    }
23126
 
23127
    public void setFieldValue(_Fields field, Object value) {
23128
      switch (field) {
23129
      case ID:
23130
        if (value == null) {
23131
          unsetId();
23132
        } else {
23133
          setId((Long)value);
23134
        }
23135
        break;
23136
 
23137
      }
23138
    }
23139
 
23140
    public Object getFieldValue(_Fields field) {
23141
      switch (field) {
23142
      case ID:
23143
        return Long.valueOf(getId());
23144
 
23145
      }
23146
      throw new IllegalStateException();
23147
    }
23148
 
23149
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
23150
    public boolean isSet(_Fields field) {
23151
      if (field == null) {
23152
        throw new IllegalArgumentException();
23153
      }
23154
 
23155
      switch (field) {
23156
      case ID:
23157
        return isSetId();
23158
      }
23159
      throw new IllegalStateException();
23160
    }
23161
 
23162
    @Override
23163
    public boolean equals(Object that) {
23164
      if (that == null)
23165
        return false;
23166
      if (that instanceof getPurchaseReturn_args)
23167
        return this.equals((getPurchaseReturn_args)that);
23168
      return false;
23169
    }
23170
 
23171
    public boolean equals(getPurchaseReturn_args that) {
23172
      if (that == null)
23173
        return false;
23174
 
23175
      boolean this_present_id = true;
23176
      boolean that_present_id = true;
23177
      if (this_present_id || that_present_id) {
23178
        if (!(this_present_id && that_present_id))
23179
          return false;
23180
        if (this.id != that.id)
23181
          return false;
23182
      }
23183
 
23184
      return true;
23185
    }
23186
 
23187
    @Override
23188
    public int hashCode() {
23189
      return 0;
23190
    }
23191
 
23192
    public int compareTo(getPurchaseReturn_args other) {
23193
      if (!getClass().equals(other.getClass())) {
23194
        return getClass().getName().compareTo(other.getClass().getName());
23195
      }
23196
 
23197
      int lastComparison = 0;
23198
      getPurchaseReturn_args typedOther = (getPurchaseReturn_args)other;
23199
 
23200
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
23201
      if (lastComparison != 0) {
23202
        return lastComparison;
23203
      }
23204
      if (isSetId()) {
23205
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
23206
        if (lastComparison != 0) {
23207
          return lastComparison;
23208
        }
23209
      }
23210
      return 0;
23211
    }
23212
 
23213
    public _Fields fieldForId(int fieldId) {
23214
      return _Fields.findByThriftId(fieldId);
23215
    }
23216
 
23217
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
23218
      org.apache.thrift.protocol.TField field;
23219
      iprot.readStructBegin();
23220
      while (true)
23221
      {
23222
        field = iprot.readFieldBegin();
23223
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
23224
          break;
23225
        }
23226
        switch (field.id) {
23227
          case 1: // ID
23228
            if (field.type == org.apache.thrift.protocol.TType.I64) {
23229
              this.id = iprot.readI64();
23230
              setIdIsSet(true);
23231
            } else { 
23232
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23233
            }
23234
            break;
23235
          default:
23236
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23237
        }
23238
        iprot.readFieldEnd();
23239
      }
23240
      iprot.readStructEnd();
23241
      validate();
23242
    }
23243
 
23244
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
23245
      validate();
23246
 
23247
      oprot.writeStructBegin(STRUCT_DESC);
23248
      oprot.writeFieldBegin(ID_FIELD_DESC);
23249
      oprot.writeI64(this.id);
23250
      oprot.writeFieldEnd();
23251
      oprot.writeFieldStop();
23252
      oprot.writeStructEnd();
23253
    }
23254
 
23255
    @Override
23256
    public String toString() {
23257
      StringBuilder sb = new StringBuilder("getPurchaseReturn_args(");
23258
      boolean first = true;
23259
 
23260
      sb.append("id:");
23261
      sb.append(this.id);
23262
      first = false;
23263
      sb.append(")");
23264
      return sb.toString();
23265
    }
23266
 
23267
    public void validate() throws org.apache.thrift.TException {
23268
      // check for required fields
23269
    }
23270
 
23271
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
23272
      try {
23273
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
23274
      } catch (org.apache.thrift.TException te) {
23275
        throw new java.io.IOException(te);
23276
      }
23277
    }
23278
 
23279
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
23280
      try {
23281
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
23282
        __isset_bit_vector = new BitSet(1);
23283
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
23284
      } catch (org.apache.thrift.TException te) {
23285
        throw new java.io.IOException(te);
23286
      }
23287
    }
23288
 
23289
  }
23290
 
23291
  public static class getPurchaseReturn_result implements org.apache.thrift.TBase<getPurchaseReturn_result, getPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
23292
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseReturn_result");
23293
 
23294
    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);
23295
    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);
23296
 
23297
    private PurchaseReturn success; // required
23298
    private PurchaseServiceException e; // required
23299
 
23300
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23301
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
23302
      SUCCESS((short)0, "success"),
23303
      E((short)1, "e");
23304
 
23305
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23306
 
23307
      static {
23308
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23309
          byName.put(field.getFieldName(), field);
23310
        }
23311
      }
23312
 
23313
      /**
23314
       * Find the _Fields constant that matches fieldId, or null if its not found.
23315
       */
23316
      public static _Fields findByThriftId(int fieldId) {
23317
        switch(fieldId) {
23318
          case 0: // SUCCESS
23319
            return SUCCESS;
23320
          case 1: // E
23321
            return E;
23322
          default:
23323
            return null;
23324
        }
23325
      }
23326
 
23327
      /**
23328
       * Find the _Fields constant that matches fieldId, throwing an exception
23329
       * if it is not found.
23330
       */
23331
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23332
        _Fields fields = findByThriftId(fieldId);
23333
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23334
        return fields;
23335
      }
23336
 
23337
      /**
23338
       * Find the _Fields constant that matches name, or null if its not found.
23339
       */
23340
      public static _Fields findByName(String name) {
23341
        return byName.get(name);
23342
      }
23343
 
23344
      private final short _thriftId;
23345
      private final String _fieldName;
23346
 
23347
      _Fields(short thriftId, String fieldName) {
23348
        _thriftId = thriftId;
23349
        _fieldName = fieldName;
23350
      }
23351
 
23352
      public short getThriftFieldId() {
23353
        return _thriftId;
23354
      }
23355
 
23356
      public String getFieldName() {
23357
        return _fieldName;
23358
      }
23359
    }
23360
 
23361
    // isset id assignments
23362
 
23363
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
23364
    static {
23365
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
23366
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23367
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class)));
23368
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23369
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
23370
      metaDataMap = Collections.unmodifiableMap(tmpMap);
23371
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseReturn_result.class, metaDataMap);
23372
    }
23373
 
23374
    public getPurchaseReturn_result() {
23375
    }
23376
 
23377
    public getPurchaseReturn_result(
23378
      PurchaseReturn success,
23379
      PurchaseServiceException e)
23380
    {
23381
      this();
23382
      this.success = success;
23383
      this.e = e;
23384
    }
23385
 
23386
    /**
23387
     * Performs a deep copy on <i>other</i>.
23388
     */
23389
    public getPurchaseReturn_result(getPurchaseReturn_result other) {
23390
      if (other.isSetSuccess()) {
23391
        this.success = new PurchaseReturn(other.success);
23392
      }
23393
      if (other.isSetE()) {
23394
        this.e = new PurchaseServiceException(other.e);
23395
      }
23396
    }
23397
 
23398
    public getPurchaseReturn_result deepCopy() {
23399
      return new getPurchaseReturn_result(this);
23400
    }
23401
 
23402
    @Override
23403
    public void clear() {
23404
      this.success = null;
23405
      this.e = null;
23406
    }
23407
 
23408
    public PurchaseReturn getSuccess() {
23409
      return this.success;
23410
    }
23411
 
23412
    public void setSuccess(PurchaseReturn success) {
23413
      this.success = success;
23414
    }
23415
 
23416
    public void unsetSuccess() {
23417
      this.success = null;
23418
    }
23419
 
23420
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
23421
    public boolean isSetSuccess() {
23422
      return this.success != null;
23423
    }
23424
 
23425
    public void setSuccessIsSet(boolean value) {
23426
      if (!value) {
23427
        this.success = null;
23428
      }
23429
    }
23430
 
23431
    public PurchaseServiceException getE() {
23432
      return this.e;
23433
    }
23434
 
23435
    public void setE(PurchaseServiceException e) {
23436
      this.e = e;
23437
    }
23438
 
23439
    public void unsetE() {
23440
      this.e = null;
23441
    }
23442
 
23443
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
23444
    public boolean isSetE() {
23445
      return this.e != null;
23446
    }
23447
 
23448
    public void setEIsSet(boolean value) {
23449
      if (!value) {
23450
        this.e = null;
23451
      }
23452
    }
23453
 
23454
    public void setFieldValue(_Fields field, Object value) {
23455
      switch (field) {
23456
      case SUCCESS:
23457
        if (value == null) {
23458
          unsetSuccess();
23459
        } else {
23460
          setSuccess((PurchaseReturn)value);
23461
        }
23462
        break;
23463
 
23464
      case E:
23465
        if (value == null) {
23466
          unsetE();
23467
        } else {
23468
          setE((PurchaseServiceException)value);
23469
        }
23470
        break;
23471
 
23472
      }
23473
    }
23474
 
23475
    public Object getFieldValue(_Fields field) {
23476
      switch (field) {
23477
      case SUCCESS:
23478
        return getSuccess();
23479
 
23480
      case E:
23481
        return getE();
23482
 
23483
      }
23484
      throw new IllegalStateException();
23485
    }
23486
 
23487
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
23488
    public boolean isSet(_Fields field) {
23489
      if (field == null) {
23490
        throw new IllegalArgumentException();
23491
      }
23492
 
23493
      switch (field) {
23494
      case SUCCESS:
23495
        return isSetSuccess();
23496
      case E:
23497
        return isSetE();
23498
      }
23499
      throw new IllegalStateException();
23500
    }
23501
 
23502
    @Override
23503
    public boolean equals(Object that) {
23504
      if (that == null)
23505
        return false;
23506
      if (that instanceof getPurchaseReturn_result)
23507
        return this.equals((getPurchaseReturn_result)that);
23508
      return false;
23509
    }
23510
 
23511
    public boolean equals(getPurchaseReturn_result that) {
23512
      if (that == null)
23513
        return false;
23514
 
23515
      boolean this_present_success = true && this.isSetSuccess();
23516
      boolean that_present_success = true && that.isSetSuccess();
23517
      if (this_present_success || that_present_success) {
23518
        if (!(this_present_success && that_present_success))
23519
          return false;
23520
        if (!this.success.equals(that.success))
23521
          return false;
23522
      }
23523
 
23524
      boolean this_present_e = true && this.isSetE();
23525
      boolean that_present_e = true && that.isSetE();
23526
      if (this_present_e || that_present_e) {
23527
        if (!(this_present_e && that_present_e))
23528
          return false;
23529
        if (!this.e.equals(that.e))
23530
          return false;
23531
      }
23532
 
23533
      return true;
23534
    }
23535
 
23536
    @Override
23537
    public int hashCode() {
23538
      return 0;
23539
    }
23540
 
23541
    public int compareTo(getPurchaseReturn_result other) {
23542
      if (!getClass().equals(other.getClass())) {
23543
        return getClass().getName().compareTo(other.getClass().getName());
23544
      }
23545
 
23546
      int lastComparison = 0;
23547
      getPurchaseReturn_result typedOther = (getPurchaseReturn_result)other;
23548
 
23549
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
23550
      if (lastComparison != 0) {
23551
        return lastComparison;
23552
      }
23553
      if (isSetSuccess()) {
23554
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
23555
        if (lastComparison != 0) {
23556
          return lastComparison;
23557
        }
23558
      }
23559
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
23560
      if (lastComparison != 0) {
23561
        return lastComparison;
23562
      }
23563
      if (isSetE()) {
23564
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
23565
        if (lastComparison != 0) {
23566
          return lastComparison;
23567
        }
23568
      }
23569
      return 0;
23570
    }
23571
 
23572
    public _Fields fieldForId(int fieldId) {
23573
      return _Fields.findByThriftId(fieldId);
23574
    }
23575
 
23576
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
23577
      org.apache.thrift.protocol.TField field;
23578
      iprot.readStructBegin();
23579
      while (true)
23580
      {
23581
        field = iprot.readFieldBegin();
23582
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
23583
          break;
23584
        }
23585
        switch (field.id) {
23586
          case 0: // SUCCESS
23587
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
23588
              this.success = new PurchaseReturn();
23589
              this.success.read(iprot);
23590
            } else { 
23591
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23592
            }
23593
            break;
23594
          case 1: // E
23595
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
23596
              this.e = new PurchaseServiceException();
23597
              this.e.read(iprot);
23598
            } else { 
23599
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23600
            }
23601
            break;
23602
          default:
23603
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23604
        }
23605
        iprot.readFieldEnd();
23606
      }
23607
      iprot.readStructEnd();
23608
      validate();
23609
    }
23610
 
23611
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
23612
      oprot.writeStructBegin(STRUCT_DESC);
23613
 
23614
      if (this.isSetSuccess()) {
23615
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
23616
        this.success.write(oprot);
23617
        oprot.writeFieldEnd();
23618
      } else if (this.isSetE()) {
23619
        oprot.writeFieldBegin(E_FIELD_DESC);
23620
        this.e.write(oprot);
23621
        oprot.writeFieldEnd();
23622
      }
23623
      oprot.writeFieldStop();
23624
      oprot.writeStructEnd();
23625
    }
23626
 
23627
    @Override
23628
    public String toString() {
23629
      StringBuilder sb = new StringBuilder("getPurchaseReturn_result(");
23630
      boolean first = true;
23631
 
23632
      sb.append("success:");
23633
      if (this.success == null) {
23634
        sb.append("null");
23635
      } else {
23636
        sb.append(this.success);
23637
      }
23638
      first = false;
23639
      if (!first) sb.append(", ");
23640
      sb.append("e:");
23641
      if (this.e == null) {
23642
        sb.append("null");
23643
      } else {
23644
        sb.append(this.e);
23645
      }
23646
      first = false;
23647
      sb.append(")");
23648
      return sb.toString();
23649
    }
23650
 
23651
    public void validate() throws org.apache.thrift.TException {
23652
      // check for required fields
23653
    }
23654
 
23655
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
23656
      try {
23657
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
23658
      } catch (org.apache.thrift.TException te) {
23659
        throw new java.io.IOException(te);
23660
      }
23661
    }
23662
 
23663
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
23664
      try {
23665
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
23666
      } catch (org.apache.thrift.TException te) {
23667
        throw new java.io.IOException(te);
23668
      }
23669
    }
23670
 
23671
  }
23672
 
13600 manish.sha 23673
  public static class markPurchasereturnSettled_args implements org.apache.thrift.TBase<markPurchasereturnSettled_args, markPurchasereturnSettled_args._Fields>, java.io.Serializable, Cloneable   {
23674
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markPurchasereturnSettled_args");
23675
 
23676
    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);
23677
    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);
23678
    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);
23679
    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);
23680
    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);
23681
 
23682
    private long id; // required
23683
    private SettlementType settlementType; // required
23684
    private String documentNumber; // required
23685
    private String settlementBy; // required
23686
    private long settledAmount; // required
23687
 
23688
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23689
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
23690
      ID((short)1, "id"),
23691
      /**
23692
       * 
23693
       * @see SettlementType
23694
       */
23695
      SETTLEMENT_TYPE((short)2, "settlementType"),
23696
      DOCUMENT_NUMBER((short)3, "documentNumber"),
23697
      SETTLEMENT_BY((short)4, "settlementBy"),
23698
      SETTLED_AMOUNT((short)5, "settledAmount");
23699
 
23700
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23701
 
23702
      static {
23703
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23704
          byName.put(field.getFieldName(), field);
23705
        }
23706
      }
23707
 
23708
      /**
23709
       * Find the _Fields constant that matches fieldId, or null if its not found.
23710
       */
23711
      public static _Fields findByThriftId(int fieldId) {
23712
        switch(fieldId) {
23713
          case 1: // ID
23714
            return ID;
23715
          case 2: // SETTLEMENT_TYPE
23716
            return SETTLEMENT_TYPE;
23717
          case 3: // DOCUMENT_NUMBER
23718
            return DOCUMENT_NUMBER;
23719
          case 4: // SETTLEMENT_BY
23720
            return SETTLEMENT_BY;
23721
          case 5: // SETTLED_AMOUNT
23722
            return SETTLED_AMOUNT;
23723
          default:
23724
            return null;
23725
        }
23726
      }
23727
 
23728
      /**
23729
       * Find the _Fields constant that matches fieldId, throwing an exception
23730
       * if it is not found.
23731
       */
23732
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23733
        _Fields fields = findByThriftId(fieldId);
23734
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23735
        return fields;
23736
      }
23737
 
23738
      /**
23739
       * Find the _Fields constant that matches name, or null if its not found.
23740
       */
23741
      public static _Fields findByName(String name) {
23742
        return byName.get(name);
23743
      }
23744
 
23745
      private final short _thriftId;
23746
      private final String _fieldName;
23747
 
23748
      _Fields(short thriftId, String fieldName) {
23749
        _thriftId = thriftId;
23750
        _fieldName = fieldName;
23751
      }
23752
 
23753
      public short getThriftFieldId() {
23754
        return _thriftId;
23755
      }
23756
 
23757
      public String getFieldName() {
23758
        return _fieldName;
23759
      }
23760
    }
23761
 
23762
    // isset id assignments
23763
    private static final int __ID_ISSET_ID = 0;
23764
    private static final int __SETTLEDAMOUNT_ISSET_ID = 1;
23765
    private BitSet __isset_bit_vector = new BitSet(2);
23766
 
23767
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
23768
    static {
23769
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
23770
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23771
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
23772
      tmpMap.put(_Fields.SETTLEMENT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("settlementType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23773
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SettlementType.class)));
23774
      tmpMap.put(_Fields.DOCUMENT_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("documentNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23775
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
23776
      tmpMap.put(_Fields.SETTLEMENT_BY, new org.apache.thrift.meta_data.FieldMetaData("settlementBy", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23777
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
23778
      tmpMap.put(_Fields.SETTLED_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("settledAmount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23779
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
23780
      metaDataMap = Collections.unmodifiableMap(tmpMap);
23781
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markPurchasereturnSettled_args.class, metaDataMap);
23782
    }
23783
 
23784
    public markPurchasereturnSettled_args() {
23785
    }
23786
 
23787
    public markPurchasereturnSettled_args(
23788
      long id,
23789
      SettlementType settlementType,
23790
      String documentNumber,
23791
      String settlementBy,
23792
      long settledAmount)
23793
    {
23794
      this();
23795
      this.id = id;
23796
      setIdIsSet(true);
23797
      this.settlementType = settlementType;
23798
      this.documentNumber = documentNumber;
23799
      this.settlementBy = settlementBy;
23800
      this.settledAmount = settledAmount;
23801
      setSettledAmountIsSet(true);
23802
    }
23803
 
23804
    /**
23805
     * Performs a deep copy on <i>other</i>.
23806
     */
23807
    public markPurchasereturnSettled_args(markPurchasereturnSettled_args other) {
23808
      __isset_bit_vector.clear();
23809
      __isset_bit_vector.or(other.__isset_bit_vector);
23810
      this.id = other.id;
23811
      if (other.isSetSettlementType()) {
23812
        this.settlementType = other.settlementType;
23813
      }
23814
      if (other.isSetDocumentNumber()) {
23815
        this.documentNumber = other.documentNumber;
23816
      }
23817
      if (other.isSetSettlementBy()) {
23818
        this.settlementBy = other.settlementBy;
23819
      }
23820
      this.settledAmount = other.settledAmount;
23821
    }
23822
 
23823
    public markPurchasereturnSettled_args deepCopy() {
23824
      return new markPurchasereturnSettled_args(this);
23825
    }
23826
 
23827
    @Override
23828
    public void clear() {
23829
      setIdIsSet(false);
23830
      this.id = 0;
23831
      this.settlementType = null;
23832
      this.documentNumber = null;
23833
      this.settlementBy = null;
23834
      setSettledAmountIsSet(false);
23835
      this.settledAmount = 0;
23836
    }
23837
 
23838
    public long getId() {
23839
      return this.id;
23840
    }
23841
 
23842
    public void setId(long id) {
23843
      this.id = id;
23844
      setIdIsSet(true);
23845
    }
23846
 
23847
    public void unsetId() {
23848
      __isset_bit_vector.clear(__ID_ISSET_ID);
23849
    }
23850
 
23851
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
23852
    public boolean isSetId() {
23853
      return __isset_bit_vector.get(__ID_ISSET_ID);
23854
    }
23855
 
23856
    public void setIdIsSet(boolean value) {
23857
      __isset_bit_vector.set(__ID_ISSET_ID, value);
23858
    }
23859
 
23860
    /**
23861
     * 
23862
     * @see SettlementType
23863
     */
23864
    public SettlementType getSettlementType() {
23865
      return this.settlementType;
23866
    }
23867
 
23868
    /**
23869
     * 
23870
     * @see SettlementType
23871
     */
23872
    public void setSettlementType(SettlementType settlementType) {
23873
      this.settlementType = settlementType;
23874
    }
23875
 
23876
    public void unsetSettlementType() {
23877
      this.settlementType = null;
23878
    }
23879
 
23880
    /** Returns true if field settlementType is set (has been assigned a value) and false otherwise */
23881
    public boolean isSetSettlementType() {
23882
      return this.settlementType != null;
23883
    }
23884
 
23885
    public void setSettlementTypeIsSet(boolean value) {
23886
      if (!value) {
23887
        this.settlementType = null;
23888
      }
23889
    }
23890
 
23891
    public String getDocumentNumber() {
23892
      return this.documentNumber;
23893
    }
23894
 
23895
    public void setDocumentNumber(String documentNumber) {
23896
      this.documentNumber = documentNumber;
23897
    }
23898
 
23899
    public void unsetDocumentNumber() {
23900
      this.documentNumber = null;
23901
    }
23902
 
23903
    /** Returns true if field documentNumber is set (has been assigned a value) and false otherwise */
23904
    public boolean isSetDocumentNumber() {
23905
      return this.documentNumber != null;
23906
    }
23907
 
23908
    public void setDocumentNumberIsSet(boolean value) {
23909
      if (!value) {
23910
        this.documentNumber = null;
23911
      }
23912
    }
23913
 
23914
    public String getSettlementBy() {
23915
      return this.settlementBy;
23916
    }
23917
 
23918
    public void setSettlementBy(String settlementBy) {
23919
      this.settlementBy = settlementBy;
23920
    }
23921
 
23922
    public void unsetSettlementBy() {
23923
      this.settlementBy = null;
23924
    }
23925
 
23926
    /** Returns true if field settlementBy is set (has been assigned a value) and false otherwise */
23927
    public boolean isSetSettlementBy() {
23928
      return this.settlementBy != null;
23929
    }
23930
 
23931
    public void setSettlementByIsSet(boolean value) {
23932
      if (!value) {
23933
        this.settlementBy = null;
23934
      }
23935
    }
23936
 
23937
    public long getSettledAmount() {
23938
      return this.settledAmount;
23939
    }
23940
 
23941
    public void setSettledAmount(long settledAmount) {
23942
      this.settledAmount = settledAmount;
23943
      setSettledAmountIsSet(true);
23944
    }
23945
 
23946
    public void unsetSettledAmount() {
23947
      __isset_bit_vector.clear(__SETTLEDAMOUNT_ISSET_ID);
23948
    }
23949
 
23950
    /** Returns true if field settledAmount is set (has been assigned a value) and false otherwise */
23951
    public boolean isSetSettledAmount() {
23952
      return __isset_bit_vector.get(__SETTLEDAMOUNT_ISSET_ID);
23953
    }
23954
 
23955
    public void setSettledAmountIsSet(boolean value) {
23956
      __isset_bit_vector.set(__SETTLEDAMOUNT_ISSET_ID, value);
23957
    }
23958
 
23959
    public void setFieldValue(_Fields field, Object value) {
23960
      switch (field) {
23961
      case ID:
23962
        if (value == null) {
23963
          unsetId();
23964
        } else {
23965
          setId((Long)value);
23966
        }
23967
        break;
23968
 
23969
      case SETTLEMENT_TYPE:
23970
        if (value == null) {
23971
          unsetSettlementType();
23972
        } else {
23973
          setSettlementType((SettlementType)value);
23974
        }
23975
        break;
23976
 
23977
      case DOCUMENT_NUMBER:
23978
        if (value == null) {
23979
          unsetDocumentNumber();
23980
        } else {
23981
          setDocumentNumber((String)value);
23982
        }
23983
        break;
23984
 
23985
      case SETTLEMENT_BY:
23986
        if (value == null) {
23987
          unsetSettlementBy();
23988
        } else {
23989
          setSettlementBy((String)value);
23990
        }
23991
        break;
23992
 
23993
      case SETTLED_AMOUNT:
23994
        if (value == null) {
23995
          unsetSettledAmount();
23996
        } else {
23997
          setSettledAmount((Long)value);
23998
        }
23999
        break;
24000
 
24001
      }
24002
    }
24003
 
24004
    public Object getFieldValue(_Fields field) {
24005
      switch (field) {
24006
      case ID:
24007
        return Long.valueOf(getId());
24008
 
24009
      case SETTLEMENT_TYPE:
24010
        return getSettlementType();
24011
 
24012
      case DOCUMENT_NUMBER:
24013
        return getDocumentNumber();
24014
 
24015
      case SETTLEMENT_BY:
24016
        return getSettlementBy();
24017
 
24018
      case SETTLED_AMOUNT:
24019
        return Long.valueOf(getSettledAmount());
24020
 
24021
      }
24022
      throw new IllegalStateException();
24023
    }
24024
 
24025
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
24026
    public boolean isSet(_Fields field) {
24027
      if (field == null) {
24028
        throw new IllegalArgumentException();
24029
      }
24030
 
24031
      switch (field) {
24032
      case ID:
24033
        return isSetId();
24034
      case SETTLEMENT_TYPE:
24035
        return isSetSettlementType();
24036
      case DOCUMENT_NUMBER:
24037
        return isSetDocumentNumber();
24038
      case SETTLEMENT_BY:
24039
        return isSetSettlementBy();
24040
      case SETTLED_AMOUNT:
24041
        return isSetSettledAmount();
24042
      }
24043
      throw new IllegalStateException();
24044
    }
24045
 
24046
    @Override
24047
    public boolean equals(Object that) {
24048
      if (that == null)
24049
        return false;
24050
      if (that instanceof markPurchasereturnSettled_args)
24051
        return this.equals((markPurchasereturnSettled_args)that);
24052
      return false;
24053
    }
24054
 
24055
    public boolean equals(markPurchasereturnSettled_args that) {
24056
      if (that == null)
24057
        return false;
24058
 
24059
      boolean this_present_id = true;
24060
      boolean that_present_id = true;
24061
      if (this_present_id || that_present_id) {
24062
        if (!(this_present_id && that_present_id))
24063
          return false;
24064
        if (this.id != that.id)
24065
          return false;
24066
      }
24067
 
24068
      boolean this_present_settlementType = true && this.isSetSettlementType();
24069
      boolean that_present_settlementType = true && that.isSetSettlementType();
24070
      if (this_present_settlementType || that_present_settlementType) {
24071
        if (!(this_present_settlementType && that_present_settlementType))
24072
          return false;
24073
        if (!this.settlementType.equals(that.settlementType))
24074
          return false;
24075
      }
24076
 
24077
      boolean this_present_documentNumber = true && this.isSetDocumentNumber();
24078
      boolean that_present_documentNumber = true && that.isSetDocumentNumber();
24079
      if (this_present_documentNumber || that_present_documentNumber) {
24080
        if (!(this_present_documentNumber && that_present_documentNumber))
24081
          return false;
24082
        if (!this.documentNumber.equals(that.documentNumber))
24083
          return false;
24084
      }
24085
 
24086
      boolean this_present_settlementBy = true && this.isSetSettlementBy();
24087
      boolean that_present_settlementBy = true && that.isSetSettlementBy();
24088
      if (this_present_settlementBy || that_present_settlementBy) {
24089
        if (!(this_present_settlementBy && that_present_settlementBy))
24090
          return false;
24091
        if (!this.settlementBy.equals(that.settlementBy))
24092
          return false;
24093
      }
24094
 
24095
      boolean this_present_settledAmount = true;
24096
      boolean that_present_settledAmount = true;
24097
      if (this_present_settledAmount || that_present_settledAmount) {
24098
        if (!(this_present_settledAmount && that_present_settledAmount))
24099
          return false;
24100
        if (this.settledAmount != that.settledAmount)
24101
          return false;
24102
      }
24103
 
24104
      return true;
24105
    }
24106
 
24107
    @Override
24108
    public int hashCode() {
24109
      return 0;
24110
    }
24111
 
24112
    public int compareTo(markPurchasereturnSettled_args other) {
24113
      if (!getClass().equals(other.getClass())) {
24114
        return getClass().getName().compareTo(other.getClass().getName());
24115
      }
24116
 
24117
      int lastComparison = 0;
24118
      markPurchasereturnSettled_args typedOther = (markPurchasereturnSettled_args)other;
24119
 
24120
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
24121
      if (lastComparison != 0) {
24122
        return lastComparison;
24123
      }
24124
      if (isSetId()) {
24125
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
24126
        if (lastComparison != 0) {
24127
          return lastComparison;
24128
        }
24129
      }
24130
      lastComparison = Boolean.valueOf(isSetSettlementType()).compareTo(typedOther.isSetSettlementType());
24131
      if (lastComparison != 0) {
24132
        return lastComparison;
24133
      }
24134
      if (isSetSettlementType()) {
24135
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.settlementType, typedOther.settlementType);
24136
        if (lastComparison != 0) {
24137
          return lastComparison;
24138
        }
24139
      }
24140
      lastComparison = Boolean.valueOf(isSetDocumentNumber()).compareTo(typedOther.isSetDocumentNumber());
24141
      if (lastComparison != 0) {
24142
        return lastComparison;
24143
      }
24144
      if (isSetDocumentNumber()) {
24145
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.documentNumber, typedOther.documentNumber);
24146
        if (lastComparison != 0) {
24147
          return lastComparison;
24148
        }
24149
      }
24150
      lastComparison = Boolean.valueOf(isSetSettlementBy()).compareTo(typedOther.isSetSettlementBy());
24151
      if (lastComparison != 0) {
24152
        return lastComparison;
24153
      }
24154
      if (isSetSettlementBy()) {
24155
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.settlementBy, typedOther.settlementBy);
24156
        if (lastComparison != 0) {
24157
          return lastComparison;
24158
        }
24159
      }
24160
      lastComparison = Boolean.valueOf(isSetSettledAmount()).compareTo(typedOther.isSetSettledAmount());
24161
      if (lastComparison != 0) {
24162
        return lastComparison;
24163
      }
24164
      if (isSetSettledAmount()) {
24165
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.settledAmount, typedOther.settledAmount);
24166
        if (lastComparison != 0) {
24167
          return lastComparison;
24168
        }
24169
      }
24170
      return 0;
24171
    }
24172
 
24173
    public _Fields fieldForId(int fieldId) {
24174
      return _Fields.findByThriftId(fieldId);
24175
    }
24176
 
24177
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
24178
      org.apache.thrift.protocol.TField field;
24179
      iprot.readStructBegin();
24180
      while (true)
24181
      {
24182
        field = iprot.readFieldBegin();
24183
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
24184
          break;
24185
        }
24186
        switch (field.id) {
24187
          case 1: // ID
24188
            if (field.type == org.apache.thrift.protocol.TType.I64) {
24189
              this.id = iprot.readI64();
24190
              setIdIsSet(true);
24191
            } else { 
24192
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24193
            }
24194
            break;
24195
          case 2: // SETTLEMENT_TYPE
24196
            if (field.type == org.apache.thrift.protocol.TType.I32) {
24197
              this.settlementType = SettlementType.findByValue(iprot.readI32());
24198
            } else { 
24199
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24200
            }
24201
            break;
24202
          case 3: // DOCUMENT_NUMBER
24203
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
24204
              this.documentNumber = iprot.readString();
24205
            } else { 
24206
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24207
            }
24208
            break;
24209
          case 4: // SETTLEMENT_BY
24210
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
24211
              this.settlementBy = iprot.readString();
24212
            } else { 
24213
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24214
            }
24215
            break;
24216
          case 5: // SETTLED_AMOUNT
24217
            if (field.type == org.apache.thrift.protocol.TType.I64) {
24218
              this.settledAmount = iprot.readI64();
24219
              setSettledAmountIsSet(true);
24220
            } else { 
24221
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24222
            }
24223
            break;
24224
          default:
24225
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24226
        }
24227
        iprot.readFieldEnd();
24228
      }
24229
      iprot.readStructEnd();
24230
      validate();
24231
    }
24232
 
24233
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
24234
      validate();
24235
 
24236
      oprot.writeStructBegin(STRUCT_DESC);
24237
      oprot.writeFieldBegin(ID_FIELD_DESC);
24238
      oprot.writeI64(this.id);
24239
      oprot.writeFieldEnd();
24240
      if (this.settlementType != null) {
24241
        oprot.writeFieldBegin(SETTLEMENT_TYPE_FIELD_DESC);
24242
        oprot.writeI32(this.settlementType.getValue());
24243
        oprot.writeFieldEnd();
24244
      }
24245
      if (this.documentNumber != null) {
24246
        oprot.writeFieldBegin(DOCUMENT_NUMBER_FIELD_DESC);
24247
        oprot.writeString(this.documentNumber);
24248
        oprot.writeFieldEnd();
24249
      }
24250
      if (this.settlementBy != null) {
24251
        oprot.writeFieldBegin(SETTLEMENT_BY_FIELD_DESC);
24252
        oprot.writeString(this.settlementBy);
24253
        oprot.writeFieldEnd();
24254
      }
24255
      oprot.writeFieldBegin(SETTLED_AMOUNT_FIELD_DESC);
24256
      oprot.writeI64(this.settledAmount);
24257
      oprot.writeFieldEnd();
24258
      oprot.writeFieldStop();
24259
      oprot.writeStructEnd();
24260
    }
24261
 
24262
    @Override
24263
    public String toString() {
24264
      StringBuilder sb = new StringBuilder("markPurchasereturnSettled_args(");
24265
      boolean first = true;
24266
 
24267
      sb.append("id:");
24268
      sb.append(this.id);
24269
      first = false;
24270
      if (!first) sb.append(", ");
24271
      sb.append("settlementType:");
24272
      if (this.settlementType == null) {
24273
        sb.append("null");
24274
      } else {
24275
        sb.append(this.settlementType);
24276
      }
24277
      first = false;
24278
      if (!first) sb.append(", ");
24279
      sb.append("documentNumber:");
24280
      if (this.documentNumber == null) {
24281
        sb.append("null");
24282
      } else {
24283
        sb.append(this.documentNumber);
24284
      }
24285
      first = false;
24286
      if (!first) sb.append(", ");
24287
      sb.append("settlementBy:");
24288
      if (this.settlementBy == null) {
24289
        sb.append("null");
24290
      } else {
24291
        sb.append(this.settlementBy);
24292
      }
24293
      first = false;
24294
      if (!first) sb.append(", ");
24295
      sb.append("settledAmount:");
24296
      sb.append(this.settledAmount);
24297
      first = false;
24298
      sb.append(")");
24299
      return sb.toString();
24300
    }
24301
 
24302
    public void validate() throws org.apache.thrift.TException {
24303
      // check for required fields
24304
    }
24305
 
24306
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
24307
      try {
24308
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
24309
      } catch (org.apache.thrift.TException te) {
24310
        throw new java.io.IOException(te);
24311
      }
24312
    }
24313
 
24314
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
24315
      try {
24316
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
24317
        __isset_bit_vector = new BitSet(1);
24318
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
24319
      } catch (org.apache.thrift.TException te) {
24320
        throw new java.io.IOException(te);
24321
      }
24322
    }
24323
 
24324
  }
24325
 
24326
  public static class markPurchasereturnSettled_result implements org.apache.thrift.TBase<markPurchasereturnSettled_result, markPurchasereturnSettled_result._Fields>, java.io.Serializable, Cloneable   {
24327
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markPurchasereturnSettled_result");
24328
 
24329
    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);
24330
    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);
24331
 
24332
    private boolean success; // required
24333
    private PurchaseServiceException e; // required
24334
 
24335
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24336
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
24337
      SUCCESS((short)0, "success"),
24338
      E((short)1, "e");
24339
 
24340
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24341
 
24342
      static {
24343
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24344
          byName.put(field.getFieldName(), field);
24345
        }
24346
      }
24347
 
24348
      /**
24349
       * Find the _Fields constant that matches fieldId, or null if its not found.
24350
       */
24351
      public static _Fields findByThriftId(int fieldId) {
24352
        switch(fieldId) {
24353
          case 0: // SUCCESS
24354
            return SUCCESS;
24355
          case 1: // E
24356
            return E;
24357
          default:
24358
            return null;
24359
        }
24360
      }
24361
 
24362
      /**
24363
       * Find the _Fields constant that matches fieldId, throwing an exception
24364
       * if it is not found.
24365
       */
24366
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24367
        _Fields fields = findByThriftId(fieldId);
24368
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24369
        return fields;
24370
      }
24371
 
24372
      /**
24373
       * Find the _Fields constant that matches name, or null if its not found.
24374
       */
24375
      public static _Fields findByName(String name) {
24376
        return byName.get(name);
24377
      }
24378
 
24379
      private final short _thriftId;
24380
      private final String _fieldName;
24381
 
24382
      _Fields(short thriftId, String fieldName) {
24383
        _thriftId = thriftId;
24384
        _fieldName = fieldName;
24385
      }
24386
 
24387
      public short getThriftFieldId() {
24388
        return _thriftId;
24389
      }
24390
 
24391
      public String getFieldName() {
24392
        return _fieldName;
24393
      }
24394
    }
24395
 
24396
    // isset id assignments
24397
    private static final int __SUCCESS_ISSET_ID = 0;
24398
    private BitSet __isset_bit_vector = new BitSet(1);
24399
 
24400
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
24401
    static {
24402
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
24403
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
24404
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
24405
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
24406
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
24407
      metaDataMap = Collections.unmodifiableMap(tmpMap);
24408
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markPurchasereturnSettled_result.class, metaDataMap);
24409
    }
24410
 
24411
    public markPurchasereturnSettled_result() {
24412
    }
24413
 
24414
    public markPurchasereturnSettled_result(
24415
      boolean success,
24416
      PurchaseServiceException e)
24417
    {
24418
      this();
24419
      this.success = success;
24420
      setSuccessIsSet(true);
24421
      this.e = e;
24422
    }
24423
 
24424
    /**
24425
     * Performs a deep copy on <i>other</i>.
24426
     */
24427
    public markPurchasereturnSettled_result(markPurchasereturnSettled_result other) {
24428
      __isset_bit_vector.clear();
24429
      __isset_bit_vector.or(other.__isset_bit_vector);
24430
      this.success = other.success;
24431
      if (other.isSetE()) {
24432
        this.e = new PurchaseServiceException(other.e);
24433
      }
24434
    }
24435
 
24436
    public markPurchasereturnSettled_result deepCopy() {
24437
      return new markPurchasereturnSettled_result(this);
24438
    }
24439
 
24440
    @Override
24441
    public void clear() {
24442
      setSuccessIsSet(false);
24443
      this.success = false;
24444
      this.e = null;
24445
    }
24446
 
24447
    public boolean isSuccess() {
24448
      return this.success;
24449
    }
24450
 
24451
    public void setSuccess(boolean success) {
24452
      this.success = success;
24453
      setSuccessIsSet(true);
24454
    }
24455
 
24456
    public void unsetSuccess() {
24457
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
24458
    }
24459
 
24460
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
24461
    public boolean isSetSuccess() {
24462
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
24463
    }
24464
 
24465
    public void setSuccessIsSet(boolean value) {
24466
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
24467
    }
24468
 
24469
    public PurchaseServiceException getE() {
24470
      return this.e;
24471
    }
24472
 
24473
    public void setE(PurchaseServiceException e) {
24474
      this.e = e;
24475
    }
24476
 
24477
    public void unsetE() {
24478
      this.e = null;
24479
    }
24480
 
24481
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
24482
    public boolean isSetE() {
24483
      return this.e != null;
24484
    }
24485
 
24486
    public void setEIsSet(boolean value) {
24487
      if (!value) {
24488
        this.e = null;
24489
      }
24490
    }
24491
 
24492
    public void setFieldValue(_Fields field, Object value) {
24493
      switch (field) {
24494
      case SUCCESS:
24495
        if (value == null) {
24496
          unsetSuccess();
24497
        } else {
24498
          setSuccess((Boolean)value);
24499
        }
24500
        break;
24501
 
24502
      case E:
24503
        if (value == null) {
24504
          unsetE();
24505
        } else {
24506
          setE((PurchaseServiceException)value);
24507
        }
24508
        break;
24509
 
24510
      }
24511
    }
24512
 
24513
    public Object getFieldValue(_Fields field) {
24514
      switch (field) {
24515
      case SUCCESS:
24516
        return Boolean.valueOf(isSuccess());
24517
 
24518
      case E:
24519
        return getE();
24520
 
24521
      }
24522
      throw new IllegalStateException();
24523
    }
24524
 
24525
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
24526
    public boolean isSet(_Fields field) {
24527
      if (field == null) {
24528
        throw new IllegalArgumentException();
24529
      }
24530
 
24531
      switch (field) {
24532
      case SUCCESS:
24533
        return isSetSuccess();
24534
      case E:
24535
        return isSetE();
24536
      }
24537
      throw new IllegalStateException();
24538
    }
24539
 
24540
    @Override
24541
    public boolean equals(Object that) {
24542
      if (that == null)
24543
        return false;
24544
      if (that instanceof markPurchasereturnSettled_result)
24545
        return this.equals((markPurchasereturnSettled_result)that);
24546
      return false;
24547
    }
24548
 
24549
    public boolean equals(markPurchasereturnSettled_result that) {
24550
      if (that == null)
24551
        return false;
24552
 
24553
      boolean this_present_success = true;
24554
      boolean that_present_success = true;
24555
      if (this_present_success || that_present_success) {
24556
        if (!(this_present_success && that_present_success))
24557
          return false;
24558
        if (this.success != that.success)
24559
          return false;
24560
      }
24561
 
24562
      boolean this_present_e = true && this.isSetE();
24563
      boolean that_present_e = true && that.isSetE();
24564
      if (this_present_e || that_present_e) {
24565
        if (!(this_present_e && that_present_e))
24566
          return false;
24567
        if (!this.e.equals(that.e))
24568
          return false;
24569
      }
24570
 
24571
      return true;
24572
    }
24573
 
24574
    @Override
24575
    public int hashCode() {
24576
      return 0;
24577
    }
24578
 
24579
    public int compareTo(markPurchasereturnSettled_result other) {
24580
      if (!getClass().equals(other.getClass())) {
24581
        return getClass().getName().compareTo(other.getClass().getName());
24582
      }
24583
 
24584
      int lastComparison = 0;
24585
      markPurchasereturnSettled_result typedOther = (markPurchasereturnSettled_result)other;
24586
 
24587
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
24588
      if (lastComparison != 0) {
24589
        return lastComparison;
24590
      }
24591
      if (isSetSuccess()) {
24592
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
24593
        if (lastComparison != 0) {
24594
          return lastComparison;
24595
        }
24596
      }
24597
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
24598
      if (lastComparison != 0) {
24599
        return lastComparison;
24600
      }
24601
      if (isSetE()) {
24602
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
24603
        if (lastComparison != 0) {
24604
          return lastComparison;
24605
        }
24606
      }
24607
      return 0;
24608
    }
24609
 
24610
    public _Fields fieldForId(int fieldId) {
24611
      return _Fields.findByThriftId(fieldId);
24612
    }
24613
 
24614
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
24615
      org.apache.thrift.protocol.TField field;
24616
      iprot.readStructBegin();
24617
      while (true)
24618
      {
24619
        field = iprot.readFieldBegin();
24620
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
24621
          break;
24622
        }
24623
        switch (field.id) {
24624
          case 0: // SUCCESS
24625
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
24626
              this.success = iprot.readBool();
24627
              setSuccessIsSet(true);
24628
            } else { 
24629
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24630
            }
24631
            break;
24632
          case 1: // E
24633
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
24634
              this.e = new PurchaseServiceException();
24635
              this.e.read(iprot);
24636
            } else { 
24637
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24638
            }
24639
            break;
24640
          default:
24641
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24642
        }
24643
        iprot.readFieldEnd();
24644
      }
24645
      iprot.readStructEnd();
24646
      validate();
24647
    }
24648
 
24649
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
24650
      oprot.writeStructBegin(STRUCT_DESC);
24651
 
24652
      if (this.isSetSuccess()) {
24653
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
24654
        oprot.writeBool(this.success);
24655
        oprot.writeFieldEnd();
24656
      } else if (this.isSetE()) {
24657
        oprot.writeFieldBegin(E_FIELD_DESC);
24658
        this.e.write(oprot);
24659
        oprot.writeFieldEnd();
24660
      }
24661
      oprot.writeFieldStop();
24662
      oprot.writeStructEnd();
24663
    }
24664
 
24665
    @Override
24666
    public String toString() {
24667
      StringBuilder sb = new StringBuilder("markPurchasereturnSettled_result(");
24668
      boolean first = true;
24669
 
24670
      sb.append("success:");
24671
      sb.append(this.success);
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 getPrSettlementsForPurchaseReturn_args implements org.apache.thrift.TBase<getPrSettlementsForPurchaseReturn_args, getPrSettlementsForPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
24708
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPrSettlementsForPurchaseReturn_args");
24709
 
24710
    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);
24711
 
24712
    private long purchaseReturnId; // 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_ID((short)1, "purchaseReturnId");
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_ID
24732
            return PURCHASE_RETURN_ID;
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
    private static final int __PURCHASERETURNID_ISSET_ID = 0;
24774
    private BitSet __isset_bit_vector = new BitSet(1);
24775
 
24776
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
24777
    static {
24778
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
24779
      tmpMap.put(_Fields.PURCHASE_RETURN_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseReturnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
24780
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
24781
      metaDataMap = Collections.unmodifiableMap(tmpMap);
24782
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPrSettlementsForPurchaseReturn_args.class, metaDataMap);
24783
    }
24784
 
24785
    public getPrSettlementsForPurchaseReturn_args() {
24786
    }
24787
 
24788
    public getPrSettlementsForPurchaseReturn_args(
24789
      long purchaseReturnId)
24790
    {
24791
      this();
24792
      this.purchaseReturnId = purchaseReturnId;
24793
      setPurchaseReturnIdIsSet(true);
24794
    }
24795
 
24796
    /**
24797
     * Performs a deep copy on <i>other</i>.
24798
     */
24799
    public getPrSettlementsForPurchaseReturn_args(getPrSettlementsForPurchaseReturn_args other) {
24800
      __isset_bit_vector.clear();
24801
      __isset_bit_vector.or(other.__isset_bit_vector);
24802
      this.purchaseReturnId = other.purchaseReturnId;
24803
    }
24804
 
24805
    public getPrSettlementsForPurchaseReturn_args deepCopy() {
24806
      return new getPrSettlementsForPurchaseReturn_args(this);
24807
    }
24808
 
24809
    @Override
24810
    public void clear() {
24811
      setPurchaseReturnIdIsSet(false);
24812
      this.purchaseReturnId = 0;
24813
    }
24814
 
24815
    public long getPurchaseReturnId() {
24816
      return this.purchaseReturnId;
24817
    }
24818
 
24819
    public void setPurchaseReturnId(long purchaseReturnId) {
24820
      this.purchaseReturnId = purchaseReturnId;
24821
      setPurchaseReturnIdIsSet(true);
24822
    }
24823
 
24824
    public void unsetPurchaseReturnId() {
24825
      __isset_bit_vector.clear(__PURCHASERETURNID_ISSET_ID);
24826
    }
24827
 
24828
    /** Returns true if field purchaseReturnId is set (has been assigned a value) and false otherwise */
24829
    public boolean isSetPurchaseReturnId() {
24830
      return __isset_bit_vector.get(__PURCHASERETURNID_ISSET_ID);
24831
    }
24832
 
24833
    public void setPurchaseReturnIdIsSet(boolean value) {
24834
      __isset_bit_vector.set(__PURCHASERETURNID_ISSET_ID, value);
24835
    }
24836
 
24837
    public void setFieldValue(_Fields field, Object value) {
24838
      switch (field) {
24839
      case PURCHASE_RETURN_ID:
24840
        if (value == null) {
24841
          unsetPurchaseReturnId();
24842
        } else {
24843
          setPurchaseReturnId((Long)value);
24844
        }
24845
        break;
24846
 
24847
      }
24848
    }
24849
 
24850
    public Object getFieldValue(_Fields field) {
24851
      switch (field) {
24852
      case PURCHASE_RETURN_ID:
24853
        return Long.valueOf(getPurchaseReturnId());
24854
 
24855
      }
24856
      throw new IllegalStateException();
24857
    }
24858
 
24859
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
24860
    public boolean isSet(_Fields field) {
24861
      if (field == null) {
24862
        throw new IllegalArgumentException();
24863
      }
24864
 
24865
      switch (field) {
24866
      case PURCHASE_RETURN_ID:
24867
        return isSetPurchaseReturnId();
24868
      }
24869
      throw new IllegalStateException();
24870
    }
24871
 
24872
    @Override
24873
    public boolean equals(Object that) {
24874
      if (that == null)
24875
        return false;
24876
      if (that instanceof getPrSettlementsForPurchaseReturn_args)
24877
        return this.equals((getPrSettlementsForPurchaseReturn_args)that);
24878
      return false;
24879
    }
24880
 
24881
    public boolean equals(getPrSettlementsForPurchaseReturn_args that) {
24882
      if (that == null)
24883
        return false;
24884
 
24885
      boolean this_present_purchaseReturnId = true;
24886
      boolean that_present_purchaseReturnId = true;
24887
      if (this_present_purchaseReturnId || that_present_purchaseReturnId) {
24888
        if (!(this_present_purchaseReturnId && that_present_purchaseReturnId))
24889
          return false;
24890
        if (this.purchaseReturnId != that.purchaseReturnId)
24891
          return false;
24892
      }
24893
 
24894
      return true;
24895
    }
24896
 
24897
    @Override
24898
    public int hashCode() {
24899
      return 0;
24900
    }
24901
 
24902
    public int compareTo(getPrSettlementsForPurchaseReturn_args other) {
24903
      if (!getClass().equals(other.getClass())) {
24904
        return getClass().getName().compareTo(other.getClass().getName());
24905
      }
24906
 
24907
      int lastComparison = 0;
24908
      getPrSettlementsForPurchaseReturn_args typedOther = (getPrSettlementsForPurchaseReturn_args)other;
24909
 
24910
      lastComparison = Boolean.valueOf(isSetPurchaseReturnId()).compareTo(typedOther.isSetPurchaseReturnId());
24911
      if (lastComparison != 0) {
24912
        return lastComparison;
24913
      }
24914
      if (isSetPurchaseReturnId()) {
24915
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseReturnId, typedOther.purchaseReturnId);
24916
        if (lastComparison != 0) {
24917
          return lastComparison;
24918
        }
24919
      }
24920
      return 0;
24921
    }
24922
 
24923
    public _Fields fieldForId(int fieldId) {
24924
      return _Fields.findByThriftId(fieldId);
24925
    }
24926
 
24927
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
24928
      org.apache.thrift.protocol.TField field;
24929
      iprot.readStructBegin();
24930
      while (true)
24931
      {
24932
        field = iprot.readFieldBegin();
24933
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
24934
          break;
24935
        }
24936
        switch (field.id) {
24937
          case 1: // PURCHASE_RETURN_ID
24938
            if (field.type == org.apache.thrift.protocol.TType.I64) {
24939
              this.purchaseReturnId = iprot.readI64();
24940
              setPurchaseReturnIdIsSet(true);
24941
            } else { 
24942
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24943
            }
24944
            break;
24945
          default:
24946
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24947
        }
24948
        iprot.readFieldEnd();
24949
      }
24950
      iprot.readStructEnd();
24951
      validate();
24952
    }
24953
 
24954
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
24955
      validate();
24956
 
24957
      oprot.writeStructBegin(STRUCT_DESC);
24958
      oprot.writeFieldBegin(PURCHASE_RETURN_ID_FIELD_DESC);
24959
      oprot.writeI64(this.purchaseReturnId);
24960
      oprot.writeFieldEnd();
24961
      oprot.writeFieldStop();
24962
      oprot.writeStructEnd();
24963
    }
24964
 
24965
    @Override
24966
    public String toString() {
24967
      StringBuilder sb = new StringBuilder("getPrSettlementsForPurchaseReturn_args(");
24968
      boolean first = true;
24969
 
24970
      sb.append("purchaseReturnId:");
24971
      sb.append(this.purchaseReturnId);
24972
      first = false;
24973
      sb.append(")");
24974
      return sb.toString();
24975
    }
24976
 
24977
    public void validate() throws org.apache.thrift.TException {
24978
      // check for required fields
24979
    }
24980
 
24981
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
24982
      try {
24983
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
24984
      } catch (org.apache.thrift.TException te) {
24985
        throw new java.io.IOException(te);
24986
      }
24987
    }
24988
 
24989
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
24990
      try {
24991
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
24992
        __isset_bit_vector = new BitSet(1);
24993
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
24994
      } catch (org.apache.thrift.TException te) {
24995
        throw new java.io.IOException(te);
24996
      }
24997
    }
24998
 
24999
  }
25000
 
25001
  public static class getPrSettlementsForPurchaseReturn_result implements org.apache.thrift.TBase<getPrSettlementsForPurchaseReturn_result, getPrSettlementsForPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
25002
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPrSettlementsForPurchaseReturn_result");
25003
 
25004
    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);
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 List<PurchaseReturnSettlement> success; // required
25008
    private PurchaseServiceException e; // required
25009
 
25010
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25011
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
25012
      SUCCESS((short)0, "success"),
25013
      E((short)1, "e");
25014
 
25015
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25016
 
25017
      static {
25018
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25019
          byName.put(field.getFieldName(), field);
25020
        }
25021
      }
25022
 
25023
      /**
25024
       * Find the _Fields constant that matches fieldId, or null if its not found.
25025
       */
25026
      public static _Fields findByThriftId(int fieldId) {
25027
        switch(fieldId) {
25028
          case 0: // SUCCESS
25029
            return SUCCESS;
25030
          case 1: // E
25031
            return E;
25032
          default:
25033
            return null;
25034
        }
25035
      }
25036
 
25037
      /**
25038
       * Find the _Fields constant that matches fieldId, throwing an exception
25039
       * if it is not found.
25040
       */
25041
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25042
        _Fields fields = findByThriftId(fieldId);
25043
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25044
        return fields;
25045
      }
25046
 
25047
      /**
25048
       * Find the _Fields constant that matches name, or null if its not found.
25049
       */
25050
      public static _Fields findByName(String name) {
25051
        return byName.get(name);
25052
      }
25053
 
25054
      private final short _thriftId;
25055
      private final String _fieldName;
25056
 
25057
      _Fields(short thriftId, String fieldName) {
25058
        _thriftId = thriftId;
25059
        _fieldName = fieldName;
25060
      }
25061
 
25062
      public short getThriftFieldId() {
25063
        return _thriftId;
25064
      }
25065
 
25066
      public String getFieldName() {
25067
        return _fieldName;
25068
      }
25069
    }
25070
 
25071
    // isset id assignments
25072
 
25073
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
25074
    static {
25075
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
25076
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
25077
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
25078
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturnSettlement.class))));
25079
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
25080
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
25081
      metaDataMap = Collections.unmodifiableMap(tmpMap);
25082
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPrSettlementsForPurchaseReturn_result.class, metaDataMap);
25083
    }
25084
 
25085
    public getPrSettlementsForPurchaseReturn_result() {
25086
    }
25087
 
25088
    public getPrSettlementsForPurchaseReturn_result(
25089
      List<PurchaseReturnSettlement> success,
25090
      PurchaseServiceException e)
25091
    {
25092
      this();
25093
      this.success = success;
25094
      this.e = e;
25095
    }
25096
 
25097
    /**
25098
     * Performs a deep copy on <i>other</i>.
25099
     */
25100
    public getPrSettlementsForPurchaseReturn_result(getPrSettlementsForPurchaseReturn_result other) {
25101
      if (other.isSetSuccess()) {
25102
        List<PurchaseReturnSettlement> __this__success = new ArrayList<PurchaseReturnSettlement>();
25103
        for (PurchaseReturnSettlement other_element : other.success) {
25104
          __this__success.add(new PurchaseReturnSettlement(other_element));
25105
        }
25106
        this.success = __this__success;
25107
      }
25108
      if (other.isSetE()) {
25109
        this.e = new PurchaseServiceException(other.e);
25110
      }
25111
    }
25112
 
25113
    public getPrSettlementsForPurchaseReturn_result deepCopy() {
25114
      return new getPrSettlementsForPurchaseReturn_result(this);
25115
    }
25116
 
25117
    @Override
25118
    public void clear() {
25119
      this.success = null;
25120
      this.e = null;
25121
    }
25122
 
25123
    public int getSuccessSize() {
25124
      return (this.success == null) ? 0 : this.success.size();
25125
    }
25126
 
25127
    public java.util.Iterator<PurchaseReturnSettlement> getSuccessIterator() {
25128
      return (this.success == null) ? null : this.success.iterator();
25129
    }
25130
 
25131
    public void addToSuccess(PurchaseReturnSettlement elem) {
25132
      if (this.success == null) {
25133
        this.success = new ArrayList<PurchaseReturnSettlement>();
25134
      }
25135
      this.success.add(elem);
25136
    }
25137
 
25138
    public List<PurchaseReturnSettlement> getSuccess() {
25139
      return this.success;
25140
    }
25141
 
25142
    public void setSuccess(List<PurchaseReturnSettlement> success) {
25143
      this.success = success;
25144
    }
25145
 
25146
    public void unsetSuccess() {
25147
      this.success = null;
25148
    }
25149
 
25150
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
25151
    public boolean isSetSuccess() {
25152
      return this.success != null;
25153
    }
25154
 
25155
    public void setSuccessIsSet(boolean value) {
25156
      if (!value) {
25157
        this.success = null;
25158
      }
25159
    }
25160
 
25161
    public PurchaseServiceException getE() {
25162
      return this.e;
25163
    }
25164
 
25165
    public void setE(PurchaseServiceException e) {
25166
      this.e = e;
25167
    }
25168
 
25169
    public void unsetE() {
25170
      this.e = null;
25171
    }
25172
 
25173
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
25174
    public boolean isSetE() {
25175
      return this.e != null;
25176
    }
25177
 
25178
    public void setEIsSet(boolean value) {
25179
      if (!value) {
25180
        this.e = null;
25181
      }
25182
    }
25183
 
25184
    public void setFieldValue(_Fields field, Object value) {
25185
      switch (field) {
25186
      case SUCCESS:
25187
        if (value == null) {
25188
          unsetSuccess();
25189
        } else {
25190
          setSuccess((List<PurchaseReturnSettlement>)value);
25191
        }
25192
        break;
25193
 
25194
      case E:
25195
        if (value == null) {
25196
          unsetE();
25197
        } else {
25198
          setE((PurchaseServiceException)value);
25199
        }
25200
        break;
25201
 
25202
      }
25203
    }
25204
 
25205
    public Object getFieldValue(_Fields field) {
25206
      switch (field) {
25207
      case SUCCESS:
25208
        return getSuccess();
25209
 
25210
      case E:
25211
        return getE();
25212
 
25213
      }
25214
      throw new IllegalStateException();
25215
    }
25216
 
25217
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
25218
    public boolean isSet(_Fields field) {
25219
      if (field == null) {
25220
        throw new IllegalArgumentException();
25221
      }
25222
 
25223
      switch (field) {
25224
      case SUCCESS:
25225
        return isSetSuccess();
25226
      case E:
25227
        return isSetE();
25228
      }
25229
      throw new IllegalStateException();
25230
    }
25231
 
25232
    @Override
25233
    public boolean equals(Object that) {
25234
      if (that == null)
25235
        return false;
25236
      if (that instanceof getPrSettlementsForPurchaseReturn_result)
25237
        return this.equals((getPrSettlementsForPurchaseReturn_result)that);
25238
      return false;
25239
    }
25240
 
25241
    public boolean equals(getPrSettlementsForPurchaseReturn_result that) {
25242
      if (that == null)
25243
        return false;
25244
 
25245
      boolean this_present_success = true && this.isSetSuccess();
25246
      boolean that_present_success = true && that.isSetSuccess();
25247
      if (this_present_success || that_present_success) {
25248
        if (!(this_present_success && that_present_success))
25249
          return false;
25250
        if (!this.success.equals(that.success))
25251
          return false;
25252
      }
25253
 
25254
      boolean this_present_e = true && this.isSetE();
25255
      boolean that_present_e = true && that.isSetE();
25256
      if (this_present_e || that_present_e) {
25257
        if (!(this_present_e && that_present_e))
25258
          return false;
25259
        if (!this.e.equals(that.e))
25260
          return false;
25261
      }
25262
 
25263
      return true;
25264
    }
25265
 
25266
    @Override
25267
    public int hashCode() {
25268
      return 0;
25269
    }
25270
 
25271
    public int compareTo(getPrSettlementsForPurchaseReturn_result other) {
25272
      if (!getClass().equals(other.getClass())) {
25273
        return getClass().getName().compareTo(other.getClass().getName());
25274
      }
25275
 
25276
      int lastComparison = 0;
25277
      getPrSettlementsForPurchaseReturn_result typedOther = (getPrSettlementsForPurchaseReturn_result)other;
25278
 
25279
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
25280
      if (lastComparison != 0) {
25281
        return lastComparison;
25282
      }
25283
      if (isSetSuccess()) {
25284
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
25285
        if (lastComparison != 0) {
25286
          return lastComparison;
25287
        }
25288
      }
25289
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
25290
      if (lastComparison != 0) {
25291
        return lastComparison;
25292
      }
25293
      if (isSetE()) {
25294
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
25295
        if (lastComparison != 0) {
25296
          return lastComparison;
25297
        }
25298
      }
25299
      return 0;
25300
    }
25301
 
25302
    public _Fields fieldForId(int fieldId) {
25303
      return _Fields.findByThriftId(fieldId);
25304
    }
25305
 
25306
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
25307
      org.apache.thrift.protocol.TField field;
25308
      iprot.readStructBegin();
25309
      while (true)
25310
      {
25311
        field = iprot.readFieldBegin();
25312
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
25313
          break;
25314
        }
25315
        switch (field.id) {
25316
          case 0: // SUCCESS
25317
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
25318
              {
21847 amit.gupta 25319
                org.apache.thrift.protocol.TList _list44 = iprot.readListBegin();
25320
                this.success = new ArrayList<PurchaseReturnSettlement>(_list44.size);
25321
                for (int _i45 = 0; _i45 < _list44.size; ++_i45)
13600 manish.sha 25322
                {
21847 amit.gupta 25323
                  PurchaseReturnSettlement _elem46; // required
25324
                  _elem46 = new PurchaseReturnSettlement();
25325
                  _elem46.read(iprot);
25326
                  this.success.add(_elem46);
13600 manish.sha 25327
                }
25328
                iprot.readListEnd();
25329
              }
25330
            } else { 
25331
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
25332
            }
25333
            break;
25334
          case 1: // E
25335
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
25336
              this.e = new PurchaseServiceException();
25337
              this.e.read(iprot);
25338
            } else { 
25339
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
25340
            }
25341
            break;
25342
          default:
25343
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
25344
        }
25345
        iprot.readFieldEnd();
25346
      }
25347
      iprot.readStructEnd();
25348
      validate();
25349
    }
25350
 
25351
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
25352
      oprot.writeStructBegin(STRUCT_DESC);
25353
 
25354
      if (this.isSetSuccess()) {
25355
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
25356
        {
25357
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
21847 amit.gupta 25358
          for (PurchaseReturnSettlement _iter47 : this.success)
13600 manish.sha 25359
          {
21847 amit.gupta 25360
            _iter47.write(oprot);
13600 manish.sha 25361
          }
25362
          oprot.writeListEnd();
25363
        }
25364
        oprot.writeFieldEnd();
25365
      } else if (this.isSetE()) {
25366
        oprot.writeFieldBegin(E_FIELD_DESC);
25367
        this.e.write(oprot);
25368
        oprot.writeFieldEnd();
25369
      }
25370
      oprot.writeFieldStop();
25371
      oprot.writeStructEnd();
25372
    }
25373
 
25374
    @Override
25375
    public String toString() {
25376
      StringBuilder sb = new StringBuilder("getPrSettlementsForPurchaseReturn_result(");
25377
      boolean first = true;
25378
 
25379
      sb.append("success:");
25380
      if (this.success == null) {
25381
        sb.append("null");
25382
      } else {
25383
        sb.append(this.success);
25384
      }
25385
      first = false;
25386
      if (!first) sb.append(", ");
25387
      sb.append("e:");
25388
      if (this.e == null) {
25389
        sb.append("null");
25390
      } else {
25391
        sb.append(this.e);
25392
      }
25393
      first = false;
25394
      sb.append(")");
25395
      return sb.toString();
25396
    }
25397
 
25398
    public void validate() throws org.apache.thrift.TException {
25399
      // check for required fields
25400
    }
25401
 
25402
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
25403
      try {
25404
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
25405
      } catch (org.apache.thrift.TException te) {
25406
        throw new java.io.IOException(te);
25407
      }
25408
    }
25409
 
25410
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
25411
      try {
25412
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
25413
      } catch (org.apache.thrift.TException te) {
25414
        throw new java.io.IOException(te);
25415
      }
25416
    }
25417
 
25418
  }
25419
 
25420
  public static class updatePurchaseReturn_args implements org.apache.thrift.TBase<updatePurchaseReturn_args, updatePurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
25421
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseReturn_args");
25422
 
25423
    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);
25424
 
25425
    private PurchaseReturn purchaseReturn; // required
25426
 
25427
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25428
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
25429
      PURCHASE_RETURN((short)1, "purchaseReturn");
25430
 
25431
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25432
 
25433
      static {
25434
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25435
          byName.put(field.getFieldName(), field);
25436
        }
25437
      }
25438
 
25439
      /**
25440
       * Find the _Fields constant that matches fieldId, or null if its not found.
25441
       */
25442
      public static _Fields findByThriftId(int fieldId) {
25443
        switch(fieldId) {
25444
          case 1: // PURCHASE_RETURN
25445
            return PURCHASE_RETURN;
25446
          default:
25447
            return null;
25448
        }
25449
      }
25450
 
25451
      /**
25452
       * Find the _Fields constant that matches fieldId, throwing an exception
25453
       * if it is not found.
25454
       */
25455
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25456
        _Fields fields = findByThriftId(fieldId);
25457
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25458
        return fields;
25459
      }
25460
 
25461
      /**
25462
       * Find the _Fields constant that matches name, or null if its not found.
25463
       */
25464
      public static _Fields findByName(String name) {
25465
        return byName.get(name);
25466
      }
25467
 
25468
      private final short _thriftId;
25469
      private final String _fieldName;
25470
 
25471
      _Fields(short thriftId, String fieldName) {
25472
        _thriftId = thriftId;
25473
        _fieldName = fieldName;
25474
      }
25475
 
25476
      public short getThriftFieldId() {
25477
        return _thriftId;
25478
      }
25479
 
25480
      public String getFieldName() {
25481
        return _fieldName;
25482
      }
25483
    }
25484
 
25485
    // isset id assignments
25486
 
25487
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
25488
    static {
25489
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
25490
      tmpMap.put(_Fields.PURCHASE_RETURN, new org.apache.thrift.meta_data.FieldMetaData("purchaseReturn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
25491
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class)));
25492
      metaDataMap = Collections.unmodifiableMap(tmpMap);
25493
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseReturn_args.class, metaDataMap);
25494
    }
25495
 
25496
    public updatePurchaseReturn_args() {
25497
    }
25498
 
25499
    public updatePurchaseReturn_args(
25500
      PurchaseReturn purchaseReturn)
25501
    {
25502
      this();
25503
      this.purchaseReturn = purchaseReturn;
25504
    }
25505
 
25506
    /**
25507
     * Performs a deep copy on <i>other</i>.
25508
     */
25509
    public updatePurchaseReturn_args(updatePurchaseReturn_args other) {
25510
      if (other.isSetPurchaseReturn()) {
25511
        this.purchaseReturn = new PurchaseReturn(other.purchaseReturn);
25512
      }
25513
    }
25514
 
25515
    public updatePurchaseReturn_args deepCopy() {
25516
      return new updatePurchaseReturn_args(this);
25517
    }
25518
 
25519
    @Override
25520
    public void clear() {
25521
      this.purchaseReturn = null;
25522
    }
25523
 
25524
    public PurchaseReturn getPurchaseReturn() {
25525
      return this.purchaseReturn;
25526
    }
25527
 
25528
    public void setPurchaseReturn(PurchaseReturn purchaseReturn) {
25529
      this.purchaseReturn = purchaseReturn;
25530
    }
25531
 
25532
    public void unsetPurchaseReturn() {
25533
      this.purchaseReturn = null;
25534
    }
25535
 
25536
    /** Returns true if field purchaseReturn is set (has been assigned a value) and false otherwise */
25537
    public boolean isSetPurchaseReturn() {
25538
      return this.purchaseReturn != null;
25539
    }
25540
 
25541
    public void setPurchaseReturnIsSet(boolean value) {
25542
      if (!value) {
25543
        this.purchaseReturn = null;
25544
      }
25545
    }
25546
 
25547
    public void setFieldValue(_Fields field, Object value) {
25548
      switch (field) {
25549
      case PURCHASE_RETURN:
25550
        if (value == null) {
25551
          unsetPurchaseReturn();
25552
        } else {
25553
          setPurchaseReturn((PurchaseReturn)value);
25554
        }
25555
        break;
25556
 
25557
      }
25558
    }
25559
 
25560
    public Object getFieldValue(_Fields field) {
25561
      switch (field) {
25562
      case PURCHASE_RETURN:
25563
        return getPurchaseReturn();
25564
 
25565
      }
25566
      throw new IllegalStateException();
25567
    }
25568
 
25569
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
25570
    public boolean isSet(_Fields field) {
25571
      if (field == null) {
25572
        throw new IllegalArgumentException();
25573
      }
25574
 
25575
      switch (field) {
25576
      case PURCHASE_RETURN:
25577
        return isSetPurchaseReturn();
25578
      }
25579
      throw new IllegalStateException();
25580
    }
25581
 
25582
    @Override
25583
    public boolean equals(Object that) {
25584
      if (that == null)
25585
        return false;
25586
      if (that instanceof updatePurchaseReturn_args)
25587
        return this.equals((updatePurchaseReturn_args)that);
25588
      return false;
25589
    }
25590
 
25591
    public boolean equals(updatePurchaseReturn_args that) {
25592
      if (that == null)
25593
        return false;
25594
 
25595
      boolean this_present_purchaseReturn = true && this.isSetPurchaseReturn();
25596
      boolean that_present_purchaseReturn = true && that.isSetPurchaseReturn();
25597
      if (this_present_purchaseReturn || that_present_purchaseReturn) {
25598
        if (!(this_present_purchaseReturn && that_present_purchaseReturn))
25599
          return false;
25600
        if (!this.purchaseReturn.equals(that.purchaseReturn))
25601
          return false;
25602
      }
25603
 
25604
      return true;
25605
    }
25606
 
25607
    @Override
25608
    public int hashCode() {
25609
      return 0;
25610
    }
25611
 
25612
    public int compareTo(updatePurchaseReturn_args other) {
25613
      if (!getClass().equals(other.getClass())) {
25614
        return getClass().getName().compareTo(other.getClass().getName());
25615
      }
25616
 
25617
      int lastComparison = 0;
25618
      updatePurchaseReturn_args typedOther = (updatePurchaseReturn_args)other;
25619
 
25620
      lastComparison = Boolean.valueOf(isSetPurchaseReturn()).compareTo(typedOther.isSetPurchaseReturn());
25621
      if (lastComparison != 0) {
25622
        return lastComparison;
25623
      }
25624
      if (isSetPurchaseReturn()) {
25625
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseReturn, typedOther.purchaseReturn);
25626
        if (lastComparison != 0) {
25627
          return lastComparison;
25628
        }
25629
      }
25630
      return 0;
25631
    }
25632
 
25633
    public _Fields fieldForId(int fieldId) {
25634
      return _Fields.findByThriftId(fieldId);
25635
    }
25636
 
25637
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
25638
      org.apache.thrift.protocol.TField field;
25639
      iprot.readStructBegin();
25640
      while (true)
25641
      {
25642
        field = iprot.readFieldBegin();
25643
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
25644
          break;
25645
        }
25646
        switch (field.id) {
25647
          case 1: // PURCHASE_RETURN
25648
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
25649
              this.purchaseReturn = new PurchaseReturn();
25650
              this.purchaseReturn.read(iprot);
25651
            } else { 
25652
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
25653
            }
25654
            break;
25655
          default:
25656
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
25657
        }
25658
        iprot.readFieldEnd();
25659
      }
25660
      iprot.readStructEnd();
25661
      validate();
25662
    }
25663
 
25664
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
25665
      validate();
25666
 
25667
      oprot.writeStructBegin(STRUCT_DESC);
25668
      if (this.purchaseReturn != null) {
25669
        oprot.writeFieldBegin(PURCHASE_RETURN_FIELD_DESC);
25670
        this.purchaseReturn.write(oprot);
25671
        oprot.writeFieldEnd();
25672
      }
25673
      oprot.writeFieldStop();
25674
      oprot.writeStructEnd();
25675
    }
25676
 
25677
    @Override
25678
    public String toString() {
25679
      StringBuilder sb = new StringBuilder("updatePurchaseReturn_args(");
25680
      boolean first = true;
25681
 
25682
      sb.append("purchaseReturn:");
25683
      if (this.purchaseReturn == null) {
25684
        sb.append("null");
25685
      } else {
25686
        sb.append(this.purchaseReturn);
25687
      }
25688
      first = false;
25689
      sb.append(")");
25690
      return sb.toString();
25691
    }
25692
 
25693
    public void validate() throws org.apache.thrift.TException {
25694
      // check for required fields
25695
    }
25696
 
25697
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
25698
      try {
25699
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
25700
      } catch (org.apache.thrift.TException te) {
25701
        throw new java.io.IOException(te);
25702
      }
25703
    }
25704
 
25705
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
25706
      try {
25707
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
25708
      } catch (org.apache.thrift.TException te) {
25709
        throw new java.io.IOException(te);
25710
      }
25711
    }
25712
 
25713
  }
25714
 
25715
  public static class updatePurchaseReturn_result implements org.apache.thrift.TBase<updatePurchaseReturn_result, updatePurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
25716
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseReturn_result");
25717
 
25718
    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);
25719
 
25720
    private PurchaseServiceException e; // required
25721
 
25722
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25723
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
25724
      E((short)1, "e");
25725
 
25726
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25727
 
25728
      static {
25729
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25730
          byName.put(field.getFieldName(), field);
25731
        }
25732
      }
25733
 
25734
      /**
25735
       * Find the _Fields constant that matches fieldId, or null if its not found.
25736
       */
25737
      public static _Fields findByThriftId(int fieldId) {
25738
        switch(fieldId) {
25739
          case 1: // E
25740
            return E;
25741
          default:
25742
            return null;
25743
        }
25744
      }
25745
 
25746
      /**
25747
       * Find the _Fields constant that matches fieldId, throwing an exception
25748
       * if it is not found.
25749
       */
25750
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25751
        _Fields fields = findByThriftId(fieldId);
25752
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25753
        return fields;
25754
      }
25755
 
25756
      /**
25757
       * Find the _Fields constant that matches name, or null if its not found.
25758
       */
25759
      public static _Fields findByName(String name) {
25760
        return byName.get(name);
25761
      }
25762
 
25763
      private final short _thriftId;
25764
      private final String _fieldName;
25765
 
25766
      _Fields(short thriftId, String fieldName) {
25767
        _thriftId = thriftId;
25768
        _fieldName = fieldName;
25769
      }
25770
 
25771
      public short getThriftFieldId() {
25772
        return _thriftId;
25773
      }
25774
 
25775
      public String getFieldName() {
25776
        return _fieldName;
25777
      }
25778
    }
25779
 
25780
    // isset id assignments
25781
 
25782
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
25783
    static {
25784
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
25785
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
25786
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
25787
      metaDataMap = Collections.unmodifiableMap(tmpMap);
25788
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseReturn_result.class, metaDataMap);
25789
    }
25790
 
25791
    public updatePurchaseReturn_result() {
25792
    }
25793
 
25794
    public updatePurchaseReturn_result(
25795
      PurchaseServiceException e)
25796
    {
25797
      this();
25798
      this.e = e;
25799
    }
25800
 
25801
    /**
25802
     * Performs a deep copy on <i>other</i>.
25803
     */
25804
    public updatePurchaseReturn_result(updatePurchaseReturn_result other) {
25805
      if (other.isSetE()) {
25806
        this.e = new PurchaseServiceException(other.e);
25807
      }
25808
    }
25809
 
25810
    public updatePurchaseReturn_result deepCopy() {
25811
      return new updatePurchaseReturn_result(this);
25812
    }
25813
 
25814
    @Override
25815
    public void clear() {
25816
      this.e = null;
25817
    }
25818
 
25819
    public PurchaseServiceException getE() {
25820
      return this.e;
25821
    }
25822
 
25823
    public void setE(PurchaseServiceException e) {
25824
      this.e = e;
25825
    }
25826
 
25827
    public void unsetE() {
25828
      this.e = null;
25829
    }
25830
 
25831
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
25832
    public boolean isSetE() {
25833
      return this.e != null;
25834
    }
25835
 
25836
    public void setEIsSet(boolean value) {
25837
      if (!value) {
25838
        this.e = null;
25839
      }
25840
    }
25841
 
25842
    public void setFieldValue(_Fields field, Object value) {
25843
      switch (field) {
25844
      case E:
25845
        if (value == null) {
25846
          unsetE();
25847
        } else {
25848
          setE((PurchaseServiceException)value);
25849
        }
25850
        break;
25851
 
25852
      }
25853
    }
25854
 
25855
    public Object getFieldValue(_Fields field) {
25856
      switch (field) {
25857
      case E:
25858
        return getE();
25859
 
25860
      }
25861
      throw new IllegalStateException();
25862
    }
25863
 
25864
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
25865
    public boolean isSet(_Fields field) {
25866
      if (field == null) {
25867
        throw new IllegalArgumentException();
25868
      }
25869
 
25870
      switch (field) {
25871
      case E:
25872
        return isSetE();
25873
      }
25874
      throw new IllegalStateException();
25875
    }
25876
 
25877
    @Override
25878
    public boolean equals(Object that) {
25879
      if (that == null)
25880
        return false;
25881
      if (that instanceof updatePurchaseReturn_result)
25882
        return this.equals((updatePurchaseReturn_result)that);
25883
      return false;
25884
    }
25885
 
25886
    public boolean equals(updatePurchaseReturn_result that) {
25887
      if (that == null)
25888
        return false;
25889
 
25890
      boolean this_present_e = true && this.isSetE();
25891
      boolean that_present_e = true && that.isSetE();
25892
      if (this_present_e || that_present_e) {
25893
        if (!(this_present_e && that_present_e))
25894
          return false;
25895
        if (!this.e.equals(that.e))
25896
          return false;
25897
      }
25898
 
25899
      return true;
25900
    }
25901
 
25902
    @Override
25903
    public int hashCode() {
25904
      return 0;
25905
    }
25906
 
25907
    public int compareTo(updatePurchaseReturn_result other) {
25908
      if (!getClass().equals(other.getClass())) {
25909
        return getClass().getName().compareTo(other.getClass().getName());
25910
      }
25911
 
25912
      int lastComparison = 0;
25913
      updatePurchaseReturn_result typedOther = (updatePurchaseReturn_result)other;
25914
 
25915
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
25916
      if (lastComparison != 0) {
25917
        return lastComparison;
25918
      }
25919
      if (isSetE()) {
25920
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
25921
        if (lastComparison != 0) {
25922
          return lastComparison;
25923
        }
25924
      }
25925
      return 0;
25926
    }
25927
 
25928
    public _Fields fieldForId(int fieldId) {
25929
      return _Fields.findByThriftId(fieldId);
25930
    }
25931
 
25932
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
25933
      org.apache.thrift.protocol.TField field;
25934
      iprot.readStructBegin();
25935
      while (true)
25936
      {
25937
        field = iprot.readFieldBegin();
25938
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
25939
          break;
25940
        }
25941
        switch (field.id) {
25942
          case 1: // E
25943
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
25944
              this.e = new PurchaseServiceException();
25945
              this.e.read(iprot);
25946
            } else { 
25947
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
25948
            }
25949
            break;
25950
          default:
25951
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
25952
        }
25953
        iprot.readFieldEnd();
25954
      }
25955
      iprot.readStructEnd();
25956
      validate();
25957
    }
25958
 
25959
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
25960
      oprot.writeStructBegin(STRUCT_DESC);
25961
 
25962
      if (this.isSetE()) {
25963
        oprot.writeFieldBegin(E_FIELD_DESC);
25964
        this.e.write(oprot);
25965
        oprot.writeFieldEnd();
25966
      }
25967
      oprot.writeFieldStop();
25968
      oprot.writeStructEnd();
25969
    }
25970
 
25971
    @Override
25972
    public String toString() {
25973
      StringBuilder sb = new StringBuilder("updatePurchaseReturn_result(");
25974
      boolean first = true;
25975
 
25976
      sb.append("e:");
25977
      if (this.e == null) {
25978
        sb.append("null");
25979
      } else {
25980
        sb.append(this.e);
25981
      }
25982
      first = false;
25983
      sb.append(")");
25984
      return sb.toString();
25985
    }
25986
 
25987
    public void validate() throws org.apache.thrift.TException {
25988
      // check for required fields
25989
    }
25990
 
25991
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
25992
      try {
25993
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
25994
      } catch (org.apache.thrift.TException te) {
25995
        throw new java.io.IOException(te);
25996
      }
25997
    }
25998
 
25999
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
26000
      try {
26001
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
26002
      } catch (org.apache.thrift.TException te) {
26003
        throw new java.io.IOException(te);
26004
      }
26005
    }
26006
 
26007
  }
26008
 
4496 mandeep.dh 26009
}