Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
4496 mandeep.dh 1
/**
2
 * Autogenerated by Thrift Compiler (0.7.0)
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.purchase;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
18
import java.nio.ByteBuffer;
19
import java.util.Arrays;
20
import org.slf4j.Logger;
21
import org.slf4j.LoggerFactory;
22
 
23
public class PurchaseService {
24
 
25
  public interface Iface extends in.shop2020.generic.GenericService.Iface {
26
 
27
    /**
28
     * Creates a purchase order based on the data in the given purchase order object.
29
     * This method populates a nummber of missing fields
30
     * 
31
     * @param purchaseOrder
32
     */
33
    public long createPurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException;
34
 
35
    /**
36
     * Returns the purchase order with the given id. Throws an exception if there is no such purchase order.
37
     * 
38
     * @param id
39
     */
40
    public PurchaseOrder getPurchaseOrder(long id) throws PurchaseServiceException, org.apache.thrift.TException;
41
 
42
    /**
43
     * Returns a list of all the purchase orders in the given state
44
     * 
45
     * @param status
46
     */
47
    public List<PurchaseOrder> getAllPurchaseOrders(POStatus status) throws PurchaseServiceException, org.apache.thrift.TException;
48
 
49
    /**
50
     * Returns the supplier with the given order id. Throws an exception if there is no such supplier.
51
     * 
52
     * @param id
53
     */
54
    public Supplier getSupplier(long id) throws PurchaseServiceException, org.apache.thrift.TException;
55
 
56
    /**
57
     * Creates a purchase for the given purchase order.
58
     * Throws an exception if no more purchases are allowed against the given purchase order.
59
     * 
60
     * @param purchaseOrderId
61
     * @param invoiceNumber
62
     * @param freightCharges
11801 manish.sha 63
     * @param purchaseComments
4496 mandeep.dh 64
     */
11801 manish.sha 65
    public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments) throws PurchaseServiceException, org.apache.thrift.TException;
4496 mandeep.dh 66
 
67
    /**
68
     * Marks a purchase as complete and updates the receivedOn time.
69
     * Throws an exception if no such purchase exists.
70
     * 
71
     * @param purchaseId
72
     */
73
    public long closePurchase(long purchaseId) throws PurchaseServiceException, org.apache.thrift.TException;
74
 
75
    /**
76
     * Returns all open or closed purchases for the given purchase order. Throws an exception if no such purchase order exists
77
     * 
78
     * @param purchaseOrderId
79
     * @param open
80
     */
81
    public List<Purchase> getAllPurchases(long purchaseOrderId, boolean open) throws PurchaseServiceException, org.apache.thrift.TException;
82
 
83
    /**
6385 amar.kumar 84
     * Returns all purchases for the given purchase order. Throws an exception if no such purchase order exists
85
     * 
86
     * @param purchaseOrderId
87
     */
88
    public List<Purchase> getPurchasesForPO(long purchaseOrderId) throws PurchaseServiceException, org.apache.thrift.TException;
89
 
90
    /**
4555 mandeep.dh 91
     * Returns the purchase order object for a given purchase
4496 mandeep.dh 92
     * 
93
     * @param purchaseId
94
     */
4555 mandeep.dh 95
    public PurchaseOrder getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException;
4496 mandeep.dh 96
 
4754 mandeep.dh 97
    /**
98
     * Creates purchase order objects from pending orders
99
     * 
100
     * @param warehouseId
101
     */
102
    public List<PurchaseOrder> getPendingPurchaseOrders(long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException;
103
 
104
    /**
105
     * Returns all the valid suppliers
106
     */
107
    public List<Supplier> getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException;
108
 
109
    /**
110
     * Fulfills a given purchase order with an item.
111
     * 
112
     * @param purchaseOrderId
113
     * @param itemId
114
     * @param quantity
115
     */
116
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException;
117
 
118
    /**
119
     * Amends a PO as per the new lineitems passed
120
     * 
121
     * @param purchaseOrder
122
     */
123
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException;
124
 
5185 mandeep.dh 125
    /**
126
     * Fulfills a given purchase id with an item and its quantity.
127
     * 
128
     * @param purchaseId
129
     * @param itemId
130
     * @param quantity
131
     */
132
    public void unFulfillPO(long purchaseId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException;
133
 
5443 mandeep.dh 134
    /**
5530 mandeep.dh 135
     * Fetches all invoices after a given date
5443 mandeep.dh 136
     * 
137
     * @param date
138
     */
139
    public List<Invoice> getInvoices(long date) throws org.apache.thrift.TException;
140
 
141
    /**
7410 amar.kumar 142
     * Fetches all invoices after a given date
143
     * 
144
     * @param warehouseId
145
     * @param supplierId
146
     * @param date
147
     */
148
    public List<Invoice> getInvoicesForWarehouse(long warehouseId, long supplierId, long date) throws org.apache.thrift.TException;
149
 
150
    /**
5443 mandeep.dh 151
     * Creates an invoice object
152
     * 
153
     * @param invoice
154
     */
155
    public void createInvoice(Invoice invoice) throws PurchaseServiceException, org.apache.thrift.TException;
156
 
5591 mandeep.dh 157
    /**
158
     * Creates a supplier
159
     * 
160
     * @param supplier
161
     */
162
    public Supplier addSupplier(Supplier supplier) throws org.apache.thrift.TException;
163
 
164
    /**
165
     * Updates a supplier
166
     * 
167
     * @param supplier
168
     */
169
    public void updateSupplier(Supplier supplier) throws org.apache.thrift.TException;
170
 
6467 amar.kumar 171
    /**
172
     * Create a new Purchase Return
173
     * 
174
     * @param purchaseReturn
175
     */
176
    public long createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException;
177
 
178
    /**
179
     * Create a new Purchase Return
180
     * 
181
     * @param id
182
     */
183
    public void settlePurchaseReturn(long id) throws org.apache.thrift.TException;
184
 
185
    /**
186
     * Create a new Purchase Return
187
     */
188
    public List<PurchaseReturn> getUnsettledPurchaseReturns() throws org.apache.thrift.TException;
189
 
6630 amar.kumar 190
    /**
191
     * Get invoice with given supplierId and invoiceNumber
192
     * 
193
     * @param invoiceNumber
194
     * @param supplierId
195
     */
196
    public List<PurchaseReturn> getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException;
197
 
6762 amar.kumar 198
    /**
199
     *  * Inserts new Invoice/LineItem/Purchase Entries for Billed Product done through Our External Billing
200
     * *
201
     * 
202
     * @param invoiceNumber
203
     * @param unitPrice
7672 rajveer 204
     * @param nlc
6762 amar.kumar 205
     * @param itemId
206
     */
7672 rajveer 207
    public long createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId) throws org.apache.thrift.TException;
6762 amar.kumar 208
 
209
    public void fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException;
210
 
7410 amar.kumar 211
    /**
212
     * Marks a purchase order as closedcomplete and updates the receivedOn time.
213
     * 
214
     * @param poId
215
     */
216
    public void closePO(long poId) throws PurchaseServiceException, org.apache.thrift.TException;
217
 
218
    /**
219
     * Check if invoice is already received with given supplierId and invoiceNumber
220
     * 
221
     * @param invoiceNumber
222
     * @param supplierId
223
     */
224
    public boolean isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException;
225
 
9829 amar.kumar 226
    /**
227
     * Change warehouseId of PO if no items have been received yet for the PO
228
     * 
229
     * @param id
230
     * @param warehouseId
231
     */
232
    public void changeWarehouseForPO(long id, long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException;
233
 
9925 amar.kumar 234
    /**
235
     * Change status of PO
236
     * 
237
     * @param id
238
     * @param poStatus
239
     */
240
    public void changePOStatus(long id, POStatus poStatus) throws PurchaseServiceException, org.apache.thrift.TException;
241
 
11751 manish.sha 242
    /**
243
     * Get Purchase Return from Id
244
     * 
245
     * @param id
246
     */
247
    public PurchaseReturn getPurchaseReturn(long id) throws PurchaseServiceException, org.apache.thrift.TException;
248
 
13600 manish.sha 249
    public boolean markPurchasereturnSettled(long id, SettlementType settlementType, String documentNumber, String settlementBy, long settledAmount) throws PurchaseServiceException, org.apache.thrift.TException;
250
 
251
    public List<PurchaseReturnSettlement> getPrSettlementsForPurchaseReturn(long purchaseReturnId) throws PurchaseServiceException, org.apache.thrift.TException;
252
 
253
    public void updatePurchaseReturn(PurchaseReturn purchaseReturn) throws PurchaseServiceException, org.apache.thrift.TException;
254
 
4496 mandeep.dh 255
  }
256
 
257
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
258
 
259
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
260
 
261
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
262
 
263
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
264
 
265
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSupplier_call> resultHandler) throws org.apache.thrift.TException;
266
 
11801 manish.sha 267
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.startPurchase_call> resultHandler) throws org.apache.thrift.TException;
4496 mandeep.dh 268
 
269
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePurchase_call> resultHandler) throws org.apache.thrift.TException;
270
 
271
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchases_call> resultHandler) throws org.apache.thrift.TException;
272
 
6385 amar.kumar 273
    public void getPurchasesForPO(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchasesForPO_call> resultHandler) throws org.apache.thrift.TException;
274
 
4555 mandeep.dh 275
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException;
4496 mandeep.dh 276
 
4754 mandeep.dh 277
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
278
 
279
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuppliers_call> resultHandler) throws org.apache.thrift.TException;
280
 
281
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fulfillPO_call> resultHandler) throws org.apache.thrift.TException;
282
 
283
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
284
 
5185 mandeep.dh 285
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.unFulfillPO_call> resultHandler) throws org.apache.thrift.TException;
286
 
5443 mandeep.dh 287
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoices_call> resultHandler) throws org.apache.thrift.TException;
288
 
7410 amar.kumar 289
    public void getInvoicesForWarehouse(long warehouseId, long supplierId, long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoicesForWarehouse_call> resultHandler) throws org.apache.thrift.TException;
290
 
5443 mandeep.dh 291
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createInvoice_call> resultHandler) throws org.apache.thrift.TException;
292
 
5591 mandeep.dh 293
    public void addSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addSupplier_call> resultHandler) throws org.apache.thrift.TException;
294
 
295
    public void updateSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateSupplier_call> resultHandler) throws org.apache.thrift.TException;
296
 
6467 amar.kumar 297
    public void createPurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
298
 
299
    public void settlePurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.settlePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
300
 
301
    public void getUnsettledPurchaseReturns(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUnsettledPurchaseReturns_call> resultHandler) throws org.apache.thrift.TException;
302
 
6630 amar.kumar 303
    public void getInvoice(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoice_call> resultHandler) throws org.apache.thrift.TException;
304
 
7672 rajveer 305
    public void createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseForOurExtBilling_call> resultHandler) throws org.apache.thrift.TException;
6762 amar.kumar 306
 
307
    public void fulfillPOForExtBilling(long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fulfillPOForExtBilling_call> resultHandler) throws org.apache.thrift.TException;
308
 
7410 amar.kumar 309
    public void closePO(long poId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePO_call> resultHandler) throws org.apache.thrift.TException;
310
 
311
    public void isInvoiceReceived(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.isInvoiceReceived_call> resultHandler) throws org.apache.thrift.TException;
312
 
9829 amar.kumar 313
    public void changeWarehouseForPO(long id, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.changeWarehouseForPO_call> resultHandler) throws org.apache.thrift.TException;
314
 
9925 amar.kumar 315
    public void changePOStatus(long id, POStatus poStatus, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.changePOStatus_call> resultHandler) throws org.apache.thrift.TException;
316
 
11751 manish.sha 317
    public void getPurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
318
 
13600 manish.sha 319
    public void markPurchasereturnSettled(long id, SettlementType settlementType, String documentNumber, String settlementBy, long settledAmount, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.markPurchasereturnSettled_call> resultHandler) throws org.apache.thrift.TException;
320
 
321
    public void getPrSettlementsForPurchaseReturn(long purchaseReturnId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPrSettlementsForPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
322
 
323
    public void updatePurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updatePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
324
 
4496 mandeep.dh 325
  }
326
 
327
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
328
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
329
      public Factory() {}
330
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
331
        return new Client(prot);
332
      }
333
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
334
        return new Client(iprot, oprot);
335
      }
336
    }
337
 
338
    public Client(org.apache.thrift.protocol.TProtocol prot)
339
    {
340
      super(prot, prot);
341
    }
342
 
343
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
344
      super(iprot, oprot);
345
    }
346
 
347
    public long createPurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
348
    {
349
      send_createPurchaseOrder(purchaseOrder);
350
      return recv_createPurchaseOrder();
351
    }
352
 
353
    public void send_createPurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
354
    {
355
      createPurchaseOrder_args args = new createPurchaseOrder_args();
356
      args.setPurchaseOrder(purchaseOrder);
357
      sendBase("createPurchaseOrder", args);
358
    }
359
 
360
    public long recv_createPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
361
    {
362
      createPurchaseOrder_result result = new createPurchaseOrder_result();
363
      receiveBase(result, "createPurchaseOrder");
364
      if (result.isSetSuccess()) {
365
        return result.success;
366
      }
367
      if (result.e != null) {
368
        throw result.e;
369
      }
370
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseOrder failed: unknown result");
371
    }
372
 
373
    public PurchaseOrder getPurchaseOrder(long id) throws PurchaseServiceException, org.apache.thrift.TException
374
    {
375
      send_getPurchaseOrder(id);
376
      return recv_getPurchaseOrder();
377
    }
378
 
379
    public void send_getPurchaseOrder(long id) throws org.apache.thrift.TException
380
    {
381
      getPurchaseOrder_args args = new getPurchaseOrder_args();
382
      args.setId(id);
383
      sendBase("getPurchaseOrder", args);
384
    }
385
 
386
    public PurchaseOrder recv_getPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
387
    {
388
      getPurchaseOrder_result result = new getPurchaseOrder_result();
389
      receiveBase(result, "getPurchaseOrder");
390
      if (result.isSetSuccess()) {
391
        return result.success;
392
      }
393
      if (result.e != null) {
394
        throw result.e;
395
      }
396
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrder failed: unknown result");
397
    }
398
 
399
    public List<PurchaseOrder> getAllPurchaseOrders(POStatus status) throws PurchaseServiceException, org.apache.thrift.TException
400
    {
401
      send_getAllPurchaseOrders(status);
402
      return recv_getAllPurchaseOrders();
403
    }
404
 
405
    public void send_getAllPurchaseOrders(POStatus status) throws org.apache.thrift.TException
406
    {
407
      getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
408
      args.setStatus(status);
409
      sendBase("getAllPurchaseOrders", args);
410
    }
411
 
412
    public List<PurchaseOrder> recv_getAllPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
413
    {
414
      getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
415
      receiveBase(result, "getAllPurchaseOrders");
416
      if (result.isSetSuccess()) {
417
        return result.success;
418
      }
419
      if (result.e != null) {
420
        throw result.e;
421
      }
422
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchaseOrders failed: unknown result");
423
    }
424
 
425
    public Supplier getSupplier(long id) throws PurchaseServiceException, org.apache.thrift.TException
426
    {
427
      send_getSupplier(id);
428
      return recv_getSupplier();
429
    }
430
 
431
    public void send_getSupplier(long id) throws org.apache.thrift.TException
432
    {
433
      getSupplier_args args = new getSupplier_args();
434
      args.setId(id);
435
      sendBase("getSupplier", args);
436
    }
437
 
438
    public Supplier recv_getSupplier() throws PurchaseServiceException, org.apache.thrift.TException
439
    {
440
      getSupplier_result result = new getSupplier_result();
441
      receiveBase(result, "getSupplier");
442
      if (result.isSetSuccess()) {
443
        return result.success;
444
      }
445
      if (result.e != null) {
446
        throw result.e;
447
      }
448
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSupplier failed: unknown result");
449
    }
450
 
11801 manish.sha 451
    public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments) throws PurchaseServiceException, org.apache.thrift.TException
4496 mandeep.dh 452
    {
11801 manish.sha 453
      send_startPurchase(purchaseOrderId, invoiceNumber, freightCharges, purchaseComments);
4496 mandeep.dh 454
      return recv_startPurchase();
455
    }
456
 
11801 manish.sha 457
    public void send_startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments) throws org.apache.thrift.TException
4496 mandeep.dh 458
    {
459
      startPurchase_args args = new startPurchase_args();
460
      args.setPurchaseOrderId(purchaseOrderId);
461
      args.setInvoiceNumber(invoiceNumber);
462
      args.setFreightCharges(freightCharges);
11801 manish.sha 463
      args.setPurchaseComments(purchaseComments);
4496 mandeep.dh 464
      sendBase("startPurchase", args);
465
    }
466
 
467
    public long recv_startPurchase() throws PurchaseServiceException, org.apache.thrift.TException
468
    {
469
      startPurchase_result result = new startPurchase_result();
470
      receiveBase(result, "startPurchase");
471
      if (result.isSetSuccess()) {
472
        return result.success;
473
      }
474
      if (result.e != null) {
475
        throw result.e;
476
      }
477
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startPurchase failed: unknown result");
478
    }
479
 
480
    public long closePurchase(long purchaseId) throws PurchaseServiceException, org.apache.thrift.TException
481
    {
482
      send_closePurchase(purchaseId);
483
      return recv_closePurchase();
484
    }
485
 
486
    public void send_closePurchase(long purchaseId) throws org.apache.thrift.TException
487
    {
488
      closePurchase_args args = new closePurchase_args();
489
      args.setPurchaseId(purchaseId);
490
      sendBase("closePurchase", args);
491
    }
492
 
493
    public long recv_closePurchase() throws PurchaseServiceException, org.apache.thrift.TException
494
    {
495
      closePurchase_result result = new closePurchase_result();
496
      receiveBase(result, "closePurchase");
497
      if (result.isSetSuccess()) {
498
        return result.success;
499
      }
500
      if (result.e != null) {
501
        throw result.e;
502
      }
503
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "closePurchase failed: unknown result");
504
    }
505
 
506
    public List<Purchase> getAllPurchases(long purchaseOrderId, boolean open) throws PurchaseServiceException, org.apache.thrift.TException
507
    {
508
      send_getAllPurchases(purchaseOrderId, open);
509
      return recv_getAllPurchases();
510
    }
511
 
512
    public void send_getAllPurchases(long purchaseOrderId, boolean open) throws org.apache.thrift.TException
513
    {
514
      getAllPurchases_args args = new getAllPurchases_args();
515
      args.setPurchaseOrderId(purchaseOrderId);
516
      args.setOpen(open);
517
      sendBase("getAllPurchases", args);
518
    }
519
 
520
    public List<Purchase> recv_getAllPurchases() throws PurchaseServiceException, org.apache.thrift.TException
521
    {
522
      getAllPurchases_result result = new getAllPurchases_result();
523
      receiveBase(result, "getAllPurchases");
524
      if (result.isSetSuccess()) {
525
        return result.success;
526
      }
527
      if (result.e != null) {
528
        throw result.e;
529
      }
530
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchases failed: unknown result");
531
    }
532
 
6385 amar.kumar 533
    public List<Purchase> getPurchasesForPO(long purchaseOrderId) throws PurchaseServiceException, org.apache.thrift.TException
534
    {
535
      send_getPurchasesForPO(purchaseOrderId);
536
      return recv_getPurchasesForPO();
537
    }
538
 
539
    public void send_getPurchasesForPO(long purchaseOrderId) throws org.apache.thrift.TException
540
    {
541
      getPurchasesForPO_args args = new getPurchasesForPO_args();
542
      args.setPurchaseOrderId(purchaseOrderId);
543
      sendBase("getPurchasesForPO", args);
544
    }
545
 
546
    public List<Purchase> recv_getPurchasesForPO() throws PurchaseServiceException, org.apache.thrift.TException
547
    {
548
      getPurchasesForPO_result result = new getPurchasesForPO_result();
549
      receiveBase(result, "getPurchasesForPO");
550
      if (result.isSetSuccess()) {
551
        return result.success;
552
      }
553
      if (result.e != null) {
554
        throw result.e;
555
      }
556
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchasesForPO failed: unknown result");
557
    }
558
 
4555 mandeep.dh 559
    public PurchaseOrder getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 560
    {
4555 mandeep.dh 561
      send_getPurchaseOrderForPurchase(purchaseId);
562
      return recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 563
    }
564
 
4555 mandeep.dh 565
    public void send_getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 566
    {
4555 mandeep.dh 567
      getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 568
      args.setPurchaseId(purchaseId);
4555 mandeep.dh 569
      sendBase("getPurchaseOrderForPurchase", args);
4496 mandeep.dh 570
    }
571
 
4555 mandeep.dh 572
    public PurchaseOrder recv_getPurchaseOrderForPurchase() throws org.apache.thrift.TException
4496 mandeep.dh 573
    {
4555 mandeep.dh 574
      getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
575
      receiveBase(result, "getPurchaseOrderForPurchase");
4496 mandeep.dh 576
      if (result.isSetSuccess()) {
577
        return result.success;
578
      }
4555 mandeep.dh 579
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrderForPurchase failed: unknown result");
4496 mandeep.dh 580
    }
581
 
4754 mandeep.dh 582
    public List<PurchaseOrder> getPendingPurchaseOrders(long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException
583
    {
584
      send_getPendingPurchaseOrders(warehouseId);
585
      return recv_getPendingPurchaseOrders();
586
    }
587
 
588
    public void send_getPendingPurchaseOrders(long warehouseId) throws org.apache.thrift.TException
589
    {
590
      getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
591
      args.setWarehouseId(warehouseId);
592
      sendBase("getPendingPurchaseOrders", args);
593
    }
594
 
595
    public List<PurchaseOrder> recv_getPendingPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
596
    {
597
      getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
598
      receiveBase(result, "getPendingPurchaseOrders");
599
      if (result.isSetSuccess()) {
600
        return result.success;
601
      }
602
      if (result.e != null) {
603
        throw result.e;
604
      }
605
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPendingPurchaseOrders failed: unknown result");
606
    }
607
 
608
    public List<Supplier> getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
609
    {
610
      send_getSuppliers();
611
      return recv_getSuppliers();
612
    }
613
 
614
    public void send_getSuppliers() throws org.apache.thrift.TException
615
    {
616
      getSuppliers_args args = new getSuppliers_args();
617
      sendBase("getSuppliers", args);
618
    }
619
 
620
    public List<Supplier> recv_getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
621
    {
622
      getSuppliers_result result = new getSuppliers_result();
623
      receiveBase(result, "getSuppliers");
624
      if (result.isSetSuccess()) {
625
        return result.success;
626
      }
627
      if (result.e != null) {
628
        throw result.e;
629
      }
630
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSuppliers failed: unknown result");
631
    }
632
 
633
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
634
    {
635
      send_fulfillPO(purchaseOrderId, itemId, quantity);
636
      recv_fulfillPO();
637
    }
638
 
639
    public void send_fulfillPO(long purchaseOrderId, long itemId, long quantity) throws org.apache.thrift.TException
640
    {
641
      fulfillPO_args args = new fulfillPO_args();
642
      args.setPurchaseOrderId(purchaseOrderId);
643
      args.setItemId(itemId);
644
      args.setQuantity(quantity);
645
      sendBase("fulfillPO", args);
646
    }
647
 
648
    public void recv_fulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
649
    {
650
      fulfillPO_result result = new fulfillPO_result();
651
      receiveBase(result, "fulfillPO");
652
      if (result.e != null) {
653
        throw result.e;
654
      }
655
      return;
656
    }
657
 
658
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
659
    {
660
      send_updatePurchaseOrder(purchaseOrder);
661
      recv_updatePurchaseOrder();
662
    }
663
 
664
    public void send_updatePurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
665
    {
666
      updatePurchaseOrder_args args = new updatePurchaseOrder_args();
667
      args.setPurchaseOrder(purchaseOrder);
668
      sendBase("updatePurchaseOrder", args);
669
    }
670
 
671
    public void recv_updatePurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
672
    {
673
      updatePurchaseOrder_result result = new updatePurchaseOrder_result();
674
      receiveBase(result, "updatePurchaseOrder");
675
      if (result.e != null) {
676
        throw result.e;
677
      }
678
      return;
679
    }
680
 
5185 mandeep.dh 681
    public void unFulfillPO(long purchaseId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
682
    {
683
      send_unFulfillPO(purchaseId, itemId, quantity);
684
      recv_unFulfillPO();
685
    }
686
 
687
    public void send_unFulfillPO(long purchaseId, long itemId, long quantity) throws org.apache.thrift.TException
688
    {
689
      unFulfillPO_args args = new unFulfillPO_args();
690
      args.setPurchaseId(purchaseId);
691
      args.setItemId(itemId);
692
      args.setQuantity(quantity);
693
      sendBase("unFulfillPO", args);
694
    }
695
 
696
    public void recv_unFulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
697
    {
698
      unFulfillPO_result result = new unFulfillPO_result();
699
      receiveBase(result, "unFulfillPO");
700
      if (result.e != null) {
701
        throw result.e;
702
      }
703
      return;
704
    }
705
 
5443 mandeep.dh 706
    public List<Invoice> getInvoices(long date) throws org.apache.thrift.TException
707
    {
708
      send_getInvoices(date);
709
      return recv_getInvoices();
710
    }
711
 
712
    public void send_getInvoices(long date) throws org.apache.thrift.TException
713
    {
714
      getInvoices_args args = new getInvoices_args();
715
      args.setDate(date);
716
      sendBase("getInvoices", args);
717
    }
718
 
719
    public List<Invoice> recv_getInvoices() throws org.apache.thrift.TException
720
    {
721
      getInvoices_result result = new getInvoices_result();
722
      receiveBase(result, "getInvoices");
723
      if (result.isSetSuccess()) {
724
        return result.success;
725
      }
726
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoices failed: unknown result");
727
    }
728
 
7410 amar.kumar 729
    public List<Invoice> getInvoicesForWarehouse(long warehouseId, long supplierId, long date) throws org.apache.thrift.TException
730
    {
731
      send_getInvoicesForWarehouse(warehouseId, supplierId, date);
732
      return recv_getInvoicesForWarehouse();
733
    }
734
 
735
    public void send_getInvoicesForWarehouse(long warehouseId, long supplierId, long date) throws org.apache.thrift.TException
736
    {
737
      getInvoicesForWarehouse_args args = new getInvoicesForWarehouse_args();
738
      args.setWarehouseId(warehouseId);
739
      args.setSupplierId(supplierId);
740
      args.setDate(date);
741
      sendBase("getInvoicesForWarehouse", args);
742
    }
743
 
744
    public List<Invoice> recv_getInvoicesForWarehouse() throws org.apache.thrift.TException
745
    {
746
      getInvoicesForWarehouse_result result = new getInvoicesForWarehouse_result();
747
      receiveBase(result, "getInvoicesForWarehouse");
748
      if (result.isSetSuccess()) {
749
        return result.success;
750
      }
751
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoicesForWarehouse failed: unknown result");
752
    }
753
 
5443 mandeep.dh 754
    public void createInvoice(Invoice invoice) throws PurchaseServiceException, org.apache.thrift.TException
755
    {
756
      send_createInvoice(invoice);
757
      recv_createInvoice();
758
    }
759
 
760
    public void send_createInvoice(Invoice invoice) throws org.apache.thrift.TException
761
    {
762
      createInvoice_args args = new createInvoice_args();
763
      args.setInvoice(invoice);
764
      sendBase("createInvoice", args);
765
    }
766
 
767
    public void recv_createInvoice() throws PurchaseServiceException, org.apache.thrift.TException
768
    {
769
      createInvoice_result result = new createInvoice_result();
770
      receiveBase(result, "createInvoice");
771
      if (result.e != null) {
772
        throw result.e;
773
      }
774
      return;
775
    }
776
 
5591 mandeep.dh 777
    public Supplier addSupplier(Supplier supplier) throws org.apache.thrift.TException
778
    {
779
      send_addSupplier(supplier);
780
      return recv_addSupplier();
781
    }
782
 
783
    public void send_addSupplier(Supplier supplier) throws org.apache.thrift.TException
784
    {
785
      addSupplier_args args = new addSupplier_args();
786
      args.setSupplier(supplier);
787
      sendBase("addSupplier", args);
788
    }
789
 
790
    public Supplier recv_addSupplier() throws org.apache.thrift.TException
791
    {
792
      addSupplier_result result = new addSupplier_result();
793
      receiveBase(result, "addSupplier");
794
      if (result.isSetSuccess()) {
795
        return result.success;
796
      }
797
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addSupplier failed: unknown result");
798
    }
799
 
800
    public void updateSupplier(Supplier supplier) throws org.apache.thrift.TException
801
    {
802
      send_updateSupplier(supplier);
803
      recv_updateSupplier();
804
    }
805
 
806
    public void send_updateSupplier(Supplier supplier) throws org.apache.thrift.TException
807
    {
808
      updateSupplier_args args = new updateSupplier_args();
809
      args.setSupplier(supplier);
810
      sendBase("updateSupplier", args);
811
    }
812
 
813
    public void recv_updateSupplier() throws org.apache.thrift.TException
814
    {
815
      updateSupplier_result result = new updateSupplier_result();
816
      receiveBase(result, "updateSupplier");
817
      return;
818
    }
819
 
6467 amar.kumar 820
    public long createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
821
    {
822
      send_createPurchaseReturn(purchaseReturn);
823
      return recv_createPurchaseReturn();
824
    }
825
 
826
    public void send_createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
827
    {
828
      createPurchaseReturn_args args = new createPurchaseReturn_args();
829
      args.setPurchaseReturn(purchaseReturn);
830
      sendBase("createPurchaseReturn", args);
831
    }
832
 
833
    public long recv_createPurchaseReturn() throws org.apache.thrift.TException
834
    {
835
      createPurchaseReturn_result result = new createPurchaseReturn_result();
836
      receiveBase(result, "createPurchaseReturn");
837
      if (result.isSetSuccess()) {
838
        return result.success;
839
      }
840
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseReturn failed: unknown result");
841
    }
842
 
843
    public void settlePurchaseReturn(long id) throws org.apache.thrift.TException
844
    {
845
      send_settlePurchaseReturn(id);
846
      recv_settlePurchaseReturn();
847
    }
848
 
849
    public void send_settlePurchaseReturn(long id) throws org.apache.thrift.TException
850
    {
851
      settlePurchaseReturn_args args = new settlePurchaseReturn_args();
852
      args.setId(id);
853
      sendBase("settlePurchaseReturn", args);
854
    }
855
 
856
    public void recv_settlePurchaseReturn() throws org.apache.thrift.TException
857
    {
858
      settlePurchaseReturn_result result = new settlePurchaseReturn_result();
859
      receiveBase(result, "settlePurchaseReturn");
860
      return;
861
    }
862
 
863
    public List<PurchaseReturn> getUnsettledPurchaseReturns() throws org.apache.thrift.TException
864
    {
865
      send_getUnsettledPurchaseReturns();
866
      return recv_getUnsettledPurchaseReturns();
867
    }
868
 
869
    public void send_getUnsettledPurchaseReturns() throws org.apache.thrift.TException
870
    {
871
      getUnsettledPurchaseReturns_args args = new getUnsettledPurchaseReturns_args();
872
      sendBase("getUnsettledPurchaseReturns", args);
873
    }
874
 
875
    public List<PurchaseReturn> recv_getUnsettledPurchaseReturns() throws org.apache.thrift.TException
876
    {
877
      getUnsettledPurchaseReturns_result result = new getUnsettledPurchaseReturns_result();
878
      receiveBase(result, "getUnsettledPurchaseReturns");
879
      if (result.isSetSuccess()) {
880
        return result.success;
881
      }
882
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUnsettledPurchaseReturns failed: unknown result");
883
    }
884
 
6630 amar.kumar 885
    public List<PurchaseReturn> getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
886
    {
887
      send_getInvoice(invoiceNumber, supplierId);
888
      return recv_getInvoice();
889
    }
890
 
891
    public void send_getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
892
    {
893
      getInvoice_args args = new getInvoice_args();
894
      args.setInvoiceNumber(invoiceNumber);
895
      args.setSupplierId(supplierId);
896
      sendBase("getInvoice", args);
897
    }
898
 
899
    public List<PurchaseReturn> recv_getInvoice() throws org.apache.thrift.TException
900
    {
901
      getInvoice_result result = new getInvoice_result();
902
      receiveBase(result, "getInvoice");
903
      if (result.isSetSuccess()) {
904
        return result.success;
905
      }
906
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoice failed: unknown result");
907
    }
908
 
7672 rajveer 909
    public long createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId) throws org.apache.thrift.TException
6762 amar.kumar 910
    {
7672 rajveer 911
      send_createPurchaseForOurExtBilling(invoiceNumber, unitPrice, nlc, itemId);
6762 amar.kumar 912
      return recv_createPurchaseForOurExtBilling();
913
    }
914
 
7672 rajveer 915
    public void send_createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId) throws org.apache.thrift.TException
6762 amar.kumar 916
    {
917
      createPurchaseForOurExtBilling_args args = new createPurchaseForOurExtBilling_args();
918
      args.setInvoiceNumber(invoiceNumber);
919
      args.setUnitPrice(unitPrice);
7672 rajveer 920
      args.setNlc(nlc);
6762 amar.kumar 921
      args.setItemId(itemId);
922
      sendBase("createPurchaseForOurExtBilling", args);
923
    }
924
 
925
    public long recv_createPurchaseForOurExtBilling() throws org.apache.thrift.TException
926
    {
927
      createPurchaseForOurExtBilling_result result = new createPurchaseForOurExtBilling_result();
928
      receiveBase(result, "createPurchaseForOurExtBilling");
929
      if (result.isSetSuccess()) {
930
        return result.success;
931
      }
932
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseForOurExtBilling failed: unknown result");
933
    }
934
 
935
    public void fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException
936
    {
937
      send_fulfillPOForExtBilling(itemId, quantity);
938
      recv_fulfillPOForExtBilling();
939
    }
940
 
941
    public void send_fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException
942
    {
943
      fulfillPOForExtBilling_args args = new fulfillPOForExtBilling_args();
944
      args.setItemId(itemId);
945
      args.setQuantity(quantity);
946
      sendBase("fulfillPOForExtBilling", args);
947
    }
948
 
949
    public void recv_fulfillPOForExtBilling() throws org.apache.thrift.TException
950
    {
951
      fulfillPOForExtBilling_result result = new fulfillPOForExtBilling_result();
952
      receiveBase(result, "fulfillPOForExtBilling");
953
      return;
954
    }
955
 
7410 amar.kumar 956
    public void closePO(long poId) throws PurchaseServiceException, org.apache.thrift.TException
957
    {
958
      send_closePO(poId);
959
      recv_closePO();
960
    }
961
 
962
    public void send_closePO(long poId) throws org.apache.thrift.TException
963
    {
964
      closePO_args args = new closePO_args();
965
      args.setPoId(poId);
966
      sendBase("closePO", args);
967
    }
968
 
969
    public void recv_closePO() throws PurchaseServiceException, org.apache.thrift.TException
970
    {
971
      closePO_result result = new closePO_result();
972
      receiveBase(result, "closePO");
973
      if (result.e != null) {
974
        throw result.e;
975
      }
976
      return;
977
    }
978
 
979
    public boolean isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
980
    {
981
      send_isInvoiceReceived(invoiceNumber, supplierId);
982
      return recv_isInvoiceReceived();
983
    }
984
 
985
    public void send_isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
986
    {
987
      isInvoiceReceived_args args = new isInvoiceReceived_args();
988
      args.setInvoiceNumber(invoiceNumber);
989
      args.setSupplierId(supplierId);
990
      sendBase("isInvoiceReceived", args);
991
    }
992
 
993
    public boolean recv_isInvoiceReceived() throws org.apache.thrift.TException
994
    {
995
      isInvoiceReceived_result result = new isInvoiceReceived_result();
996
      receiveBase(result, "isInvoiceReceived");
997
      if (result.isSetSuccess()) {
998
        return result.success;
999
      }
1000
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isInvoiceReceived failed: unknown result");
1001
    }
1002
 
9829 amar.kumar 1003
    public void changeWarehouseForPO(long id, long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException
1004
    {
1005
      send_changeWarehouseForPO(id, warehouseId);
1006
      recv_changeWarehouseForPO();
1007
    }
1008
 
1009
    public void send_changeWarehouseForPO(long id, long warehouseId) throws org.apache.thrift.TException
1010
    {
1011
      changeWarehouseForPO_args args = new changeWarehouseForPO_args();
1012
      args.setId(id);
1013
      args.setWarehouseId(warehouseId);
1014
      sendBase("changeWarehouseForPO", args);
1015
    }
1016
 
1017
    public void recv_changeWarehouseForPO() throws PurchaseServiceException, org.apache.thrift.TException
1018
    {
1019
      changeWarehouseForPO_result result = new changeWarehouseForPO_result();
1020
      receiveBase(result, "changeWarehouseForPO");
1021
      if (result.e != null) {
1022
        throw result.e;
1023
      }
1024
      return;
1025
    }
1026
 
9925 amar.kumar 1027
    public void changePOStatus(long id, POStatus poStatus) throws PurchaseServiceException, org.apache.thrift.TException
1028
    {
1029
      send_changePOStatus(id, poStatus);
1030
      recv_changePOStatus();
1031
    }
1032
 
1033
    public void send_changePOStatus(long id, POStatus poStatus) throws org.apache.thrift.TException
1034
    {
1035
      changePOStatus_args args = new changePOStatus_args();
1036
      args.setId(id);
1037
      args.setPoStatus(poStatus);
1038
      sendBase("changePOStatus", args);
1039
    }
1040
 
1041
    public void recv_changePOStatus() throws PurchaseServiceException, org.apache.thrift.TException
1042
    {
1043
      changePOStatus_result result = new changePOStatus_result();
1044
      receiveBase(result, "changePOStatus");
1045
      if (result.e != null) {
1046
        throw result.e;
1047
      }
1048
      return;
1049
    }
1050
 
11751 manish.sha 1051
    public PurchaseReturn getPurchaseReturn(long id) throws PurchaseServiceException, org.apache.thrift.TException
1052
    {
1053
      send_getPurchaseReturn(id);
1054
      return recv_getPurchaseReturn();
1055
    }
1056
 
1057
    public void send_getPurchaseReturn(long id) throws org.apache.thrift.TException
1058
    {
1059
      getPurchaseReturn_args args = new getPurchaseReturn_args();
1060
      args.setId(id);
1061
      sendBase("getPurchaseReturn", args);
1062
    }
1063
 
1064
    public PurchaseReturn recv_getPurchaseReturn() throws PurchaseServiceException, org.apache.thrift.TException
1065
    {
1066
      getPurchaseReturn_result result = new getPurchaseReturn_result();
1067
      receiveBase(result, "getPurchaseReturn");
1068
      if (result.isSetSuccess()) {
1069
        return result.success;
1070
      }
1071
      if (result.e != null) {
1072
        throw result.e;
1073
      }
1074
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseReturn failed: unknown result");
1075
    }
1076
 
13600 manish.sha 1077
    public boolean markPurchasereturnSettled(long id, SettlementType settlementType, String documentNumber, String settlementBy, long settledAmount) throws PurchaseServiceException, org.apache.thrift.TException
1078
    {
1079
      send_markPurchasereturnSettled(id, settlementType, documentNumber, settlementBy, settledAmount);
1080
      return recv_markPurchasereturnSettled();
1081
    }
1082
 
1083
    public void send_markPurchasereturnSettled(long id, SettlementType settlementType, String documentNumber, String settlementBy, long settledAmount) throws org.apache.thrift.TException
1084
    {
1085
      markPurchasereturnSettled_args args = new markPurchasereturnSettled_args();
1086
      args.setId(id);
1087
      args.setSettlementType(settlementType);
1088
      args.setDocumentNumber(documentNumber);
1089
      args.setSettlementBy(settlementBy);
1090
      args.setSettledAmount(settledAmount);
1091
      sendBase("markPurchasereturnSettled", args);
1092
    }
1093
 
1094
    public boolean recv_markPurchasereturnSettled() throws PurchaseServiceException, org.apache.thrift.TException
1095
    {
1096
      markPurchasereturnSettled_result result = new markPurchasereturnSettled_result();
1097
      receiveBase(result, "markPurchasereturnSettled");
1098
      if (result.isSetSuccess()) {
1099
        return result.success;
1100
      }
1101
      if (result.e != null) {
1102
        throw result.e;
1103
      }
1104
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "markPurchasereturnSettled failed: unknown result");
1105
    }
1106
 
1107
    public List<PurchaseReturnSettlement> getPrSettlementsForPurchaseReturn(long purchaseReturnId) throws PurchaseServiceException, org.apache.thrift.TException
1108
    {
1109
      send_getPrSettlementsForPurchaseReturn(purchaseReturnId);
1110
      return recv_getPrSettlementsForPurchaseReturn();
1111
    }
1112
 
1113
    public void send_getPrSettlementsForPurchaseReturn(long purchaseReturnId) throws org.apache.thrift.TException
1114
    {
1115
      getPrSettlementsForPurchaseReturn_args args = new getPrSettlementsForPurchaseReturn_args();
1116
      args.setPurchaseReturnId(purchaseReturnId);
1117
      sendBase("getPrSettlementsForPurchaseReturn", args);
1118
    }
1119
 
1120
    public List<PurchaseReturnSettlement> recv_getPrSettlementsForPurchaseReturn() throws PurchaseServiceException, org.apache.thrift.TException
1121
    {
1122
      getPrSettlementsForPurchaseReturn_result result = new getPrSettlementsForPurchaseReturn_result();
1123
      receiveBase(result, "getPrSettlementsForPurchaseReturn");
1124
      if (result.isSetSuccess()) {
1125
        return result.success;
1126
      }
1127
      if (result.e != null) {
1128
        throw result.e;
1129
      }
1130
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPrSettlementsForPurchaseReturn failed: unknown result");
1131
    }
1132
 
1133
    public void updatePurchaseReturn(PurchaseReturn purchaseReturn) throws PurchaseServiceException, org.apache.thrift.TException
1134
    {
1135
      send_updatePurchaseReturn(purchaseReturn);
1136
      recv_updatePurchaseReturn();
1137
    }
1138
 
1139
    public void send_updatePurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
1140
    {
1141
      updatePurchaseReturn_args args = new updatePurchaseReturn_args();
1142
      args.setPurchaseReturn(purchaseReturn);
1143
      sendBase("updatePurchaseReturn", args);
1144
    }
1145
 
1146
    public void recv_updatePurchaseReturn() throws PurchaseServiceException, org.apache.thrift.TException
1147
    {
1148
      updatePurchaseReturn_result result = new updatePurchaseReturn_result();
1149
      receiveBase(result, "updatePurchaseReturn");
1150
      if (result.e != null) {
1151
        throw result.e;
1152
      }
1153
      return;
1154
    }
1155
 
4496 mandeep.dh 1156
  }
1157
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
1158
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
1159
      private org.apache.thrift.async.TAsyncClientManager clientManager;
1160
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
1161
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
1162
        this.clientManager = clientManager;
1163
        this.protocolFactory = protocolFactory;
1164
      }
1165
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
1166
        return new AsyncClient(protocolFactory, clientManager, transport);
1167
      }
1168
    }
1169
 
1170
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
1171
      super(protocolFactory, clientManager, transport);
1172
    }
1173
 
1174
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1175
      checkReady();
1176
      createPurchaseOrder_call method_call = new createPurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
1177
      this.___currentMethod = method_call;
1178
      ___manager.call(method_call);
1179
    }
1180
 
1181
    public static class createPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1182
      private PurchaseOrder purchaseOrder;
1183
      public createPurchaseOrder_call(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<createPurchaseOrder_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1184
        super(client, protocolFactory, transport, resultHandler, false);
1185
        this.purchaseOrder = purchaseOrder;
1186
      }
1187
 
1188
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1189
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1190
        createPurchaseOrder_args args = new createPurchaseOrder_args();
1191
        args.setPurchaseOrder(purchaseOrder);
1192
        args.write(prot);
1193
        prot.writeMessageEnd();
1194
      }
1195
 
1196
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1197
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1198
          throw new IllegalStateException("Method call not finished!");
1199
        }
1200
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1201
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1202
        return (new Client(prot)).recv_createPurchaseOrder();
1203
      }
1204
    }
1205
 
1206
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1207
      checkReady();
1208
      getPurchaseOrder_call method_call = new getPurchaseOrder_call(id, resultHandler, this, ___protocolFactory, ___transport);
1209
      this.___currentMethod = method_call;
1210
      ___manager.call(method_call);
1211
    }
1212
 
1213
    public static class getPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1214
      private long id;
1215
      public getPurchaseOrder_call(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrder_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1216
        super(client, protocolFactory, transport, resultHandler, false);
1217
        this.id = id;
1218
      }
1219
 
1220
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1221
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1222
        getPurchaseOrder_args args = new getPurchaseOrder_args();
1223
        args.setId(id);
1224
        args.write(prot);
1225
        prot.writeMessageEnd();
1226
      }
1227
 
1228
      public PurchaseOrder getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1229
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1230
          throw new IllegalStateException("Method call not finished!");
1231
        }
1232
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1233
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1234
        return (new Client(prot)).recv_getPurchaseOrder();
1235
      }
1236
    }
1237
 
1238
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
1239
      checkReady();
1240
      getAllPurchaseOrders_call method_call = new getAllPurchaseOrders_call(status, resultHandler, this, ___protocolFactory, ___transport);
1241
      this.___currentMethod = method_call;
1242
      ___manager.call(method_call);
1243
    }
1244
 
1245
    public static class getAllPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
1246
      private POStatus status;
1247
      public getAllPurchaseOrders_call(POStatus status, org.apache.thrift.async.AsyncMethodCallback<getAllPurchaseOrders_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1248
        super(client, protocolFactory, transport, resultHandler, false);
1249
        this.status = status;
1250
      }
1251
 
1252
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1253
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
1254
        getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
1255
        args.setStatus(status);
1256
        args.write(prot);
1257
        prot.writeMessageEnd();
1258
      }
1259
 
1260
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1261
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1262
          throw new IllegalStateException("Method call not finished!");
1263
        }
1264
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1265
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1266
        return (new Client(prot)).recv_getAllPurchaseOrders();
1267
      }
1268
    }
1269
 
1270
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<getSupplier_call> resultHandler) throws org.apache.thrift.TException {
1271
      checkReady();
1272
      getSupplier_call method_call = new getSupplier_call(id, resultHandler, this, ___protocolFactory, ___transport);
1273
      this.___currentMethod = method_call;
1274
      ___manager.call(method_call);
1275
    }
1276
 
1277
    public static class getSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1278
      private long id;
1279
      public getSupplier_call(long id, org.apache.thrift.async.AsyncMethodCallback<getSupplier_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1280
        super(client, protocolFactory, transport, resultHandler, false);
1281
        this.id = id;
1282
      }
1283
 
1284
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1285
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1286
        getSupplier_args args = new getSupplier_args();
1287
        args.setId(id);
1288
        args.write(prot);
1289
        prot.writeMessageEnd();
1290
      }
1291
 
1292
      public Supplier getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1293
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1294
          throw new IllegalStateException("Method call not finished!");
1295
        }
1296
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1297
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1298
        return (new Client(prot)).recv_getSupplier();
1299
      }
1300
    }
1301
 
11801 manish.sha 1302
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments, org.apache.thrift.async.AsyncMethodCallback<startPurchase_call> resultHandler) throws org.apache.thrift.TException {
4496 mandeep.dh 1303
      checkReady();
11801 manish.sha 1304
      startPurchase_call method_call = new startPurchase_call(purchaseOrderId, invoiceNumber, freightCharges, purchaseComments, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 1305
      this.___currentMethod = method_call;
1306
      ___manager.call(method_call);
1307
    }
1308
 
1309
    public static class startPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
1310
      private long purchaseOrderId;
1311
      private String invoiceNumber;
1312
      private double freightCharges;
11801 manish.sha 1313
      private String purchaseComments;
1314
      public startPurchase_call(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments, org.apache.thrift.async.AsyncMethodCallback<startPurchase_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
4496 mandeep.dh 1315
        super(client, protocolFactory, transport, resultHandler, false);
1316
        this.purchaseOrderId = purchaseOrderId;
1317
        this.invoiceNumber = invoiceNumber;
1318
        this.freightCharges = freightCharges;
11801 manish.sha 1319
        this.purchaseComments = purchaseComments;
4496 mandeep.dh 1320
      }
1321
 
1322
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1323
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1324
        startPurchase_args args = new startPurchase_args();
1325
        args.setPurchaseOrderId(purchaseOrderId);
1326
        args.setInvoiceNumber(invoiceNumber);
1327
        args.setFreightCharges(freightCharges);
11801 manish.sha 1328
        args.setPurchaseComments(purchaseComments);
4496 mandeep.dh 1329
        args.write(prot);
1330
        prot.writeMessageEnd();
1331
      }
1332
 
1333
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1334
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1335
          throw new IllegalStateException("Method call not finished!");
1336
        }
1337
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1338
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1339
        return (new Client(prot)).recv_startPurchase();
1340
      }
1341
    }
1342
 
1343
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<closePurchase_call> resultHandler) throws org.apache.thrift.TException {
1344
      checkReady();
1345
      closePurchase_call method_call = new closePurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
1346
      this.___currentMethod = method_call;
1347
      ___manager.call(method_call);
1348
    }
1349
 
1350
    public static class closePurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
1351
      private long purchaseId;
1352
      public closePurchase_call(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<closePurchase_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1353
        super(client, protocolFactory, transport, resultHandler, false);
1354
        this.purchaseId = purchaseId;
1355
      }
1356
 
1357
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1358
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closePurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1359
        closePurchase_args args = new closePurchase_args();
1360
        args.setPurchaseId(purchaseId);
1361
        args.write(prot);
1362
        prot.writeMessageEnd();
1363
      }
1364
 
1365
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1366
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1367
          throw new IllegalStateException("Method call not finished!");
1368
        }
1369
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1370
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1371
        return (new Client(prot)).recv_closePurchase();
1372
      }
1373
    }
1374
 
1375
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<getAllPurchases_call> resultHandler) throws org.apache.thrift.TException {
1376
      checkReady();
1377
      getAllPurchases_call method_call = new getAllPurchases_call(purchaseOrderId, open, resultHandler, this, ___protocolFactory, ___transport);
1378
      this.___currentMethod = method_call;
1379
      ___manager.call(method_call);
1380
    }
1381
 
1382
    public static class getAllPurchases_call extends org.apache.thrift.async.TAsyncMethodCall {
1383
      private long purchaseOrderId;
1384
      private boolean open;
1385
      public getAllPurchases_call(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<getAllPurchases_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1386
        super(client, protocolFactory, transport, resultHandler, false);
1387
        this.purchaseOrderId = purchaseOrderId;
1388
        this.open = open;
1389
      }
1390
 
1391
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1392
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPurchases", org.apache.thrift.protocol.TMessageType.CALL, 0));
1393
        getAllPurchases_args args = new getAllPurchases_args();
1394
        args.setPurchaseOrderId(purchaseOrderId);
1395
        args.setOpen(open);
1396
        args.write(prot);
1397
        prot.writeMessageEnd();
1398
      }
1399
 
1400
      public List<Purchase> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1401
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1402
          throw new IllegalStateException("Method call not finished!");
1403
        }
1404
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1405
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1406
        return (new Client(prot)).recv_getAllPurchases();
1407
      }
1408
    }
1409
 
6385 amar.kumar 1410
    public void getPurchasesForPO(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<getPurchasesForPO_call> resultHandler) throws org.apache.thrift.TException {
1411
      checkReady();
1412
      getPurchasesForPO_call method_call = new getPurchasesForPO_call(purchaseOrderId, resultHandler, this, ___protocolFactory, ___transport);
1413
      this.___currentMethod = method_call;
1414
      ___manager.call(method_call);
1415
    }
1416
 
1417
    public static class getPurchasesForPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1418
      private long purchaseOrderId;
1419
      public getPurchasesForPO_call(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<getPurchasesForPO_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1420
        super(client, protocolFactory, transport, resultHandler, false);
1421
        this.purchaseOrderId = purchaseOrderId;
1422
      }
1423
 
1424
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1425
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchasesForPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1426
        getPurchasesForPO_args args = new getPurchasesForPO_args();
1427
        args.setPurchaseOrderId(purchaseOrderId);
1428
        args.write(prot);
1429
        prot.writeMessageEnd();
1430
      }
1431
 
1432
      public List<Purchase> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1433
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1434
          throw new IllegalStateException("Method call not finished!");
1435
        }
1436
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1437
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1438
        return (new Client(prot)).recv_getPurchasesForPO();
1439
      }
1440
    }
1441
 
4555 mandeep.dh 1442
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException {
4496 mandeep.dh 1443
      checkReady();
4555 mandeep.dh 1444
      getPurchaseOrderForPurchase_call method_call = new getPurchaseOrderForPurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 1445
      this.___currentMethod = method_call;
1446
      ___manager.call(method_call);
1447
    }
1448
 
4555 mandeep.dh 1449
    public static class getPurchaseOrderForPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
4496 mandeep.dh 1450
      private long purchaseId;
4555 mandeep.dh 1451
      public getPurchaseOrderForPurchase_call(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrderForPurchase_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
4496 mandeep.dh 1452
        super(client, protocolFactory, transport, resultHandler, false);
1453
        this.purchaseId = purchaseId;
1454
      }
1455
 
1456
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4555 mandeep.dh 1457
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrderForPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1458
        getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 1459
        args.setPurchaseId(purchaseId);
1460
        args.write(prot);
1461
        prot.writeMessageEnd();
1462
      }
1463
 
4555 mandeep.dh 1464
      public PurchaseOrder getResult() throws org.apache.thrift.TException {
4496 mandeep.dh 1465
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1466
          throw new IllegalStateException("Method call not finished!");
1467
        }
1468
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1469
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4555 mandeep.dh 1470
        return (new Client(prot)).recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 1471
      }
1472
    }
1473
 
4754 mandeep.dh 1474
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
1475
      checkReady();
1476
      getPendingPurchaseOrders_call method_call = new getPendingPurchaseOrders_call(warehouseId, resultHandler, this, ___protocolFactory, ___transport);
1477
      this.___currentMethod = method_call;
1478
      ___manager.call(method_call);
1479
    }
1480
 
1481
    public static class getPendingPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
1482
      private long warehouseId;
1483
      public getPendingPurchaseOrders_call(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<getPendingPurchaseOrders_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1484
        super(client, protocolFactory, transport, resultHandler, false);
1485
        this.warehouseId = warehouseId;
1486
      }
1487
 
1488
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1489
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPendingPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
1490
        getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
1491
        args.setWarehouseId(warehouseId);
1492
        args.write(prot);
1493
        prot.writeMessageEnd();
1494
      }
1495
 
1496
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1497
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1498
          throw new IllegalStateException("Method call not finished!");
1499
        }
1500
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1501
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1502
        return (new Client(prot)).recv_getPendingPurchaseOrders();
1503
      }
1504
    }
1505
 
1506
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<getSuppliers_call> resultHandler) throws org.apache.thrift.TException {
1507
      checkReady();
1508
      getSuppliers_call method_call = new getSuppliers_call(resultHandler, this, ___protocolFactory, ___transport);
1509
      this.___currentMethod = method_call;
1510
      ___manager.call(method_call);
1511
    }
1512
 
1513
    public static class getSuppliers_call extends org.apache.thrift.async.TAsyncMethodCall {
1514
      public getSuppliers_call(org.apache.thrift.async.AsyncMethodCallback<getSuppliers_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1515
        super(client, protocolFactory, transport, resultHandler, false);
1516
      }
1517
 
1518
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1519
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSuppliers", org.apache.thrift.protocol.TMessageType.CALL, 0));
1520
        getSuppliers_args args = new getSuppliers_args();
1521
        args.write(prot);
1522
        prot.writeMessageEnd();
1523
      }
1524
 
1525
      public List<Supplier> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1526
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1527
          throw new IllegalStateException("Method call not finished!");
1528
        }
1529
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1530
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1531
        return (new Client(prot)).recv_getSuppliers();
1532
      }
1533
    }
1534
 
1535
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPO_call> resultHandler) throws org.apache.thrift.TException {
1536
      checkReady();
1537
      fulfillPO_call method_call = new fulfillPO_call(purchaseOrderId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1538
      this.___currentMethod = method_call;
1539
      ___manager.call(method_call);
1540
    }
1541
 
1542
    public static class fulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1543
      private long purchaseOrderId;
1544
      private long itemId;
1545
      private long quantity;
1546
      public fulfillPO_call(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPO_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1547
        super(client, protocolFactory, transport, resultHandler, false);
1548
        this.purchaseOrderId = purchaseOrderId;
1549
        this.itemId = itemId;
1550
        this.quantity = quantity;
1551
      }
1552
 
1553
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1554
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1555
        fulfillPO_args args = new fulfillPO_args();
1556
        args.setPurchaseOrderId(purchaseOrderId);
1557
        args.setItemId(itemId);
1558
        args.setQuantity(quantity);
1559
        args.write(prot);
1560
        prot.writeMessageEnd();
1561
      }
1562
 
1563
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1564
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1565
          throw new IllegalStateException("Method call not finished!");
1566
        }
1567
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1568
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1569
        (new Client(prot)).recv_fulfillPO();
1570
      }
1571
    }
1572
 
1573
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1574
      checkReady();
1575
      updatePurchaseOrder_call method_call = new updatePurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
1576
      this.___currentMethod = method_call;
1577
      ___manager.call(method_call);
1578
    }
1579
 
1580
    public static class updatePurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1581
      private PurchaseOrder purchaseOrder;
1582
      public updatePurchaseOrder_call(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<updatePurchaseOrder_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1583
        super(client, protocolFactory, transport, resultHandler, false);
1584
        this.purchaseOrder = purchaseOrder;
1585
      }
1586
 
1587
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1588
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updatePurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1589
        updatePurchaseOrder_args args = new updatePurchaseOrder_args();
1590
        args.setPurchaseOrder(purchaseOrder);
1591
        args.write(prot);
1592
        prot.writeMessageEnd();
1593
      }
1594
 
1595
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1596
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1597
          throw new IllegalStateException("Method call not finished!");
1598
        }
1599
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1600
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1601
        (new Client(prot)).recv_updatePurchaseOrder();
1602
      }
1603
    }
1604
 
5185 mandeep.dh 1605
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<unFulfillPO_call> resultHandler) throws org.apache.thrift.TException {
1606
      checkReady();
1607
      unFulfillPO_call method_call = new unFulfillPO_call(purchaseId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1608
      this.___currentMethod = method_call;
1609
      ___manager.call(method_call);
1610
    }
1611
 
1612
    public static class unFulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1613
      private long purchaseId;
1614
      private long itemId;
1615
      private long quantity;
1616
      public unFulfillPO_call(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<unFulfillPO_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1617
        super(client, protocolFactory, transport, resultHandler, false);
1618
        this.purchaseId = purchaseId;
1619
        this.itemId = itemId;
1620
        this.quantity = quantity;
1621
      }
1622
 
1623
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1624
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unFulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1625
        unFulfillPO_args args = new unFulfillPO_args();
1626
        args.setPurchaseId(purchaseId);
1627
        args.setItemId(itemId);
1628
        args.setQuantity(quantity);
1629
        args.write(prot);
1630
        prot.writeMessageEnd();
1631
      }
1632
 
1633
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1634
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1635
          throw new IllegalStateException("Method call not finished!");
1636
        }
1637
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1638
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1639
        (new Client(prot)).recv_unFulfillPO();
1640
      }
1641
    }
1642
 
5443 mandeep.dh 1643
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<getInvoices_call> resultHandler) throws org.apache.thrift.TException {
1644
      checkReady();
1645
      getInvoices_call method_call = new getInvoices_call(date, resultHandler, this, ___protocolFactory, ___transport);
1646
      this.___currentMethod = method_call;
1647
      ___manager.call(method_call);
1648
    }
1649
 
1650
    public static class getInvoices_call extends org.apache.thrift.async.TAsyncMethodCall {
1651
      private long date;
1652
      public getInvoices_call(long date, org.apache.thrift.async.AsyncMethodCallback<getInvoices_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1653
        super(client, protocolFactory, transport, resultHandler, false);
1654
        this.date = date;
1655
      }
1656
 
1657
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1658
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoices", org.apache.thrift.protocol.TMessageType.CALL, 0));
1659
        getInvoices_args args = new getInvoices_args();
1660
        args.setDate(date);
1661
        args.write(prot);
1662
        prot.writeMessageEnd();
1663
      }
1664
 
1665
      public List<Invoice> getResult() throws org.apache.thrift.TException {
1666
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1667
          throw new IllegalStateException("Method call not finished!");
1668
        }
1669
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1670
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1671
        return (new Client(prot)).recv_getInvoices();
1672
      }
1673
    }
1674
 
7410 amar.kumar 1675
    public void getInvoicesForWarehouse(long warehouseId, long supplierId, long date, org.apache.thrift.async.AsyncMethodCallback<getInvoicesForWarehouse_call> resultHandler) throws org.apache.thrift.TException {
1676
      checkReady();
1677
      getInvoicesForWarehouse_call method_call = new getInvoicesForWarehouse_call(warehouseId, supplierId, date, resultHandler, this, ___protocolFactory, ___transport);
1678
      this.___currentMethod = method_call;
1679
      ___manager.call(method_call);
1680
    }
1681
 
1682
    public static class getInvoicesForWarehouse_call extends org.apache.thrift.async.TAsyncMethodCall {
1683
      private long warehouseId;
1684
      private long supplierId;
1685
      private long date;
1686
      public getInvoicesForWarehouse_call(long warehouseId, long supplierId, long date, org.apache.thrift.async.AsyncMethodCallback<getInvoicesForWarehouse_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1687
        super(client, protocolFactory, transport, resultHandler, false);
1688
        this.warehouseId = warehouseId;
1689
        this.supplierId = supplierId;
1690
        this.date = date;
1691
      }
1692
 
1693
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1694
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoicesForWarehouse", org.apache.thrift.protocol.TMessageType.CALL, 0));
1695
        getInvoicesForWarehouse_args args = new getInvoicesForWarehouse_args();
1696
        args.setWarehouseId(warehouseId);
1697
        args.setSupplierId(supplierId);
1698
        args.setDate(date);
1699
        args.write(prot);
1700
        prot.writeMessageEnd();
1701
      }
1702
 
1703
      public List<Invoice> getResult() throws org.apache.thrift.TException {
1704
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1705
          throw new IllegalStateException("Method call not finished!");
1706
        }
1707
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1708
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1709
        return (new Client(prot)).recv_getInvoicesForWarehouse();
1710
      }
1711
    }
1712
 
5443 mandeep.dh 1713
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<createInvoice_call> resultHandler) throws org.apache.thrift.TException {
1714
      checkReady();
1715
      createInvoice_call method_call = new createInvoice_call(invoice, resultHandler, this, ___protocolFactory, ___transport);
1716
      this.___currentMethod = method_call;
1717
      ___manager.call(method_call);
1718
    }
1719
 
1720
    public static class createInvoice_call extends org.apache.thrift.async.TAsyncMethodCall {
1721
      private Invoice invoice;
1722
      public createInvoice_call(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<createInvoice_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1723
        super(client, protocolFactory, transport, resultHandler, false);
1724
        this.invoice = invoice;
1725
      }
1726
 
1727
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1728
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createInvoice", org.apache.thrift.protocol.TMessageType.CALL, 0));
1729
        createInvoice_args args = new createInvoice_args();
1730
        args.setInvoice(invoice);
1731
        args.write(prot);
1732
        prot.writeMessageEnd();
1733
      }
1734
 
1735
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1736
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1737
          throw new IllegalStateException("Method call not finished!");
1738
        }
1739
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1740
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1741
        (new Client(prot)).recv_createInvoice();
1742
      }
1743
    }
1744
 
5591 mandeep.dh 1745
    public void addSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<addSupplier_call> resultHandler) throws org.apache.thrift.TException {
1746
      checkReady();
1747
      addSupplier_call method_call = new addSupplier_call(supplier, resultHandler, this, ___protocolFactory, ___transport);
1748
      this.___currentMethod = method_call;
1749
      ___manager.call(method_call);
1750
    }
1751
 
1752
    public static class addSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1753
      private Supplier supplier;
1754
      public addSupplier_call(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<addSupplier_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1755
        super(client, protocolFactory, transport, resultHandler, false);
1756
        this.supplier = supplier;
1757
      }
1758
 
1759
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1760
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1761
        addSupplier_args args = new addSupplier_args();
1762
        args.setSupplier(supplier);
1763
        args.write(prot);
1764
        prot.writeMessageEnd();
1765
      }
1766
 
1767
      public Supplier getResult() throws org.apache.thrift.TException {
1768
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1769
          throw new IllegalStateException("Method call not finished!");
1770
        }
1771
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1772
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1773
        return (new Client(prot)).recv_addSupplier();
1774
      }
1775
    }
1776
 
1777
    public void updateSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<updateSupplier_call> resultHandler) throws org.apache.thrift.TException {
1778
      checkReady();
1779
      updateSupplier_call method_call = new updateSupplier_call(supplier, resultHandler, this, ___protocolFactory, ___transport);
1780
      this.___currentMethod = method_call;
1781
      ___manager.call(method_call);
1782
    }
1783
 
1784
    public static class updateSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1785
      private Supplier supplier;
1786
      public updateSupplier_call(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<updateSupplier_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1787
        super(client, protocolFactory, transport, resultHandler, false);
1788
        this.supplier = supplier;
1789
      }
1790
 
1791
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1792
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1793
        updateSupplier_args args = new updateSupplier_args();
1794
        args.setSupplier(supplier);
1795
        args.write(prot);
1796
        prot.writeMessageEnd();
1797
      }
1798
 
1799
      public void getResult() throws org.apache.thrift.TException {
1800
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1801
          throw new IllegalStateException("Method call not finished!");
1802
        }
1803
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1804
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1805
        (new Client(prot)).recv_updateSupplier();
1806
      }
1807
    }
1808
 
6467 amar.kumar 1809
    public void createPurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<createPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1810
      checkReady();
1811
      createPurchaseReturn_call method_call = new createPurchaseReturn_call(purchaseReturn, resultHandler, this, ___protocolFactory, ___transport);
1812
      this.___currentMethod = method_call;
1813
      ___manager.call(method_call);
1814
    }
1815
 
1816
    public static class createPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1817
      private PurchaseReturn purchaseReturn;
1818
      public createPurchaseReturn_call(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<createPurchaseReturn_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1819
        super(client, protocolFactory, transport, resultHandler, false);
1820
        this.purchaseReturn = purchaseReturn;
1821
      }
1822
 
1823
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1824
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1825
        createPurchaseReturn_args args = new createPurchaseReturn_args();
1826
        args.setPurchaseReturn(purchaseReturn);
1827
        args.write(prot);
1828
        prot.writeMessageEnd();
1829
      }
1830
 
1831
      public long getResult() throws org.apache.thrift.TException {
1832
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1833
          throw new IllegalStateException("Method call not finished!");
1834
        }
1835
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1836
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1837
        return (new Client(prot)).recv_createPurchaseReturn();
1838
      }
1839
    }
1840
 
1841
    public void settlePurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<settlePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1842
      checkReady();
1843
      settlePurchaseReturn_call method_call = new settlePurchaseReturn_call(id, resultHandler, this, ___protocolFactory, ___transport);
1844
      this.___currentMethod = method_call;
1845
      ___manager.call(method_call);
1846
    }
1847
 
1848
    public static class settlePurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1849
      private long id;
1850
      public settlePurchaseReturn_call(long id, org.apache.thrift.async.AsyncMethodCallback<settlePurchaseReturn_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1851
        super(client, protocolFactory, transport, resultHandler, false);
1852
        this.id = id;
1853
      }
1854
 
1855
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1856
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("settlePurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1857
        settlePurchaseReturn_args args = new settlePurchaseReturn_args();
1858
        args.setId(id);
1859
        args.write(prot);
1860
        prot.writeMessageEnd();
1861
      }
1862
 
1863
      public void getResult() throws org.apache.thrift.TException {
1864
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1865
          throw new IllegalStateException("Method call not finished!");
1866
        }
1867
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1868
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1869
        (new Client(prot)).recv_settlePurchaseReturn();
1870
      }
1871
    }
1872
 
1873
    public void getUnsettledPurchaseReturns(org.apache.thrift.async.AsyncMethodCallback<getUnsettledPurchaseReturns_call> resultHandler) throws org.apache.thrift.TException {
1874
      checkReady();
1875
      getUnsettledPurchaseReturns_call method_call = new getUnsettledPurchaseReturns_call(resultHandler, this, ___protocolFactory, ___transport);
1876
      this.___currentMethod = method_call;
1877
      ___manager.call(method_call);
1878
    }
1879
 
1880
    public static class getUnsettledPurchaseReturns_call extends org.apache.thrift.async.TAsyncMethodCall {
1881
      public getUnsettledPurchaseReturns_call(org.apache.thrift.async.AsyncMethodCallback<getUnsettledPurchaseReturns_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1882
        super(client, protocolFactory, transport, resultHandler, false);
1883
      }
1884
 
1885
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1886
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUnsettledPurchaseReturns", org.apache.thrift.protocol.TMessageType.CALL, 0));
1887
        getUnsettledPurchaseReturns_args args = new getUnsettledPurchaseReturns_args();
1888
        args.write(prot);
1889
        prot.writeMessageEnd();
1890
      }
1891
 
1892
      public List<PurchaseReturn> getResult() throws org.apache.thrift.TException {
1893
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1894
          throw new IllegalStateException("Method call not finished!");
1895
        }
1896
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1897
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1898
        return (new Client(prot)).recv_getUnsettledPurchaseReturns();
1899
      }
1900
    }
1901
 
6630 amar.kumar 1902
    public void getInvoice(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<getInvoice_call> resultHandler) throws org.apache.thrift.TException {
1903
      checkReady();
1904
      getInvoice_call method_call = new getInvoice_call(invoiceNumber, supplierId, resultHandler, this, ___protocolFactory, ___transport);
1905
      this.___currentMethod = method_call;
1906
      ___manager.call(method_call);
1907
    }
1908
 
1909
    public static class getInvoice_call extends org.apache.thrift.async.TAsyncMethodCall {
1910
      private String invoiceNumber;
1911
      private long supplierId;
1912
      public getInvoice_call(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<getInvoice_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1913
        super(client, protocolFactory, transport, resultHandler, false);
1914
        this.invoiceNumber = invoiceNumber;
1915
        this.supplierId = supplierId;
1916
      }
1917
 
1918
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1919
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoice", org.apache.thrift.protocol.TMessageType.CALL, 0));
1920
        getInvoice_args args = new getInvoice_args();
1921
        args.setInvoiceNumber(invoiceNumber);
1922
        args.setSupplierId(supplierId);
1923
        args.write(prot);
1924
        prot.writeMessageEnd();
1925
      }
1926
 
1927
      public List<PurchaseReturn> getResult() throws org.apache.thrift.TException {
1928
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1929
          throw new IllegalStateException("Method call not finished!");
1930
        }
1931
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1932
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1933
        return (new Client(prot)).recv_getInvoice();
1934
      }
1935
    }
1936
 
7672 rajveer 1937
    public void createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId, org.apache.thrift.async.AsyncMethodCallback<createPurchaseForOurExtBilling_call> resultHandler) throws org.apache.thrift.TException {
6762 amar.kumar 1938
      checkReady();
7672 rajveer 1939
      createPurchaseForOurExtBilling_call method_call = new createPurchaseForOurExtBilling_call(invoiceNumber, unitPrice, nlc, itemId, resultHandler, this, ___protocolFactory, ___transport);
6762 amar.kumar 1940
      this.___currentMethod = method_call;
1941
      ___manager.call(method_call);
1942
    }
1943
 
1944
    public static class createPurchaseForOurExtBilling_call extends org.apache.thrift.async.TAsyncMethodCall {
1945
      private String invoiceNumber;
1946
      private double unitPrice;
7672 rajveer 1947
      private double nlc;
6762 amar.kumar 1948
      private long itemId;
7672 rajveer 1949
      public createPurchaseForOurExtBilling_call(String invoiceNumber, double unitPrice, double nlc, long itemId, org.apache.thrift.async.AsyncMethodCallback<createPurchaseForOurExtBilling_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
6762 amar.kumar 1950
        super(client, protocolFactory, transport, resultHandler, false);
1951
        this.invoiceNumber = invoiceNumber;
1952
        this.unitPrice = unitPrice;
7672 rajveer 1953
        this.nlc = nlc;
6762 amar.kumar 1954
        this.itemId = itemId;
1955
      }
1956
 
1957
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1958
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseForOurExtBilling", org.apache.thrift.protocol.TMessageType.CALL, 0));
1959
        createPurchaseForOurExtBilling_args args = new createPurchaseForOurExtBilling_args();
1960
        args.setInvoiceNumber(invoiceNumber);
1961
        args.setUnitPrice(unitPrice);
7672 rajveer 1962
        args.setNlc(nlc);
6762 amar.kumar 1963
        args.setItemId(itemId);
1964
        args.write(prot);
1965
        prot.writeMessageEnd();
1966
      }
1967
 
1968
      public long getResult() throws org.apache.thrift.TException {
1969
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1970
          throw new IllegalStateException("Method call not finished!");
1971
        }
1972
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1973
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1974
        return (new Client(prot)).recv_createPurchaseForOurExtBilling();
1975
      }
1976
    }
1977
 
1978
    public void fulfillPOForExtBilling(long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPOForExtBilling_call> resultHandler) throws org.apache.thrift.TException {
1979
      checkReady();
1980
      fulfillPOForExtBilling_call method_call = new fulfillPOForExtBilling_call(itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1981
      this.___currentMethod = method_call;
1982
      ___manager.call(method_call);
1983
    }
1984
 
1985
    public static class fulfillPOForExtBilling_call extends org.apache.thrift.async.TAsyncMethodCall {
1986
      private long itemId;
1987
      private long quantity;
1988
      public fulfillPOForExtBilling_call(long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPOForExtBilling_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1989
        super(client, protocolFactory, transport, resultHandler, false);
1990
        this.itemId = itemId;
1991
        this.quantity = quantity;
1992
      }
1993
 
1994
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1995
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fulfillPOForExtBilling", org.apache.thrift.protocol.TMessageType.CALL, 0));
1996
        fulfillPOForExtBilling_args args = new fulfillPOForExtBilling_args();
1997
        args.setItemId(itemId);
1998
        args.setQuantity(quantity);
1999
        args.write(prot);
2000
        prot.writeMessageEnd();
2001
      }
2002
 
2003
      public void getResult() throws org.apache.thrift.TException {
2004
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2005
          throw new IllegalStateException("Method call not finished!");
2006
        }
2007
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2008
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2009
        (new Client(prot)).recv_fulfillPOForExtBilling();
2010
      }
2011
    }
2012
 
7410 amar.kumar 2013
    public void closePO(long poId, org.apache.thrift.async.AsyncMethodCallback<closePO_call> resultHandler) throws org.apache.thrift.TException {
2014
      checkReady();
2015
      closePO_call method_call = new closePO_call(poId, resultHandler, this, ___protocolFactory, ___transport);
2016
      this.___currentMethod = method_call;
2017
      ___manager.call(method_call);
2018
    }
2019
 
2020
    public static class closePO_call extends org.apache.thrift.async.TAsyncMethodCall {
2021
      private long poId;
2022
      public closePO_call(long poId, org.apache.thrift.async.AsyncMethodCallback<closePO_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
2023
        super(client, protocolFactory, transport, resultHandler, false);
2024
        this.poId = poId;
2025
      }
2026
 
2027
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2028
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closePO", org.apache.thrift.protocol.TMessageType.CALL, 0));
2029
        closePO_args args = new closePO_args();
2030
        args.setPoId(poId);
2031
        args.write(prot);
2032
        prot.writeMessageEnd();
2033
      }
2034
 
2035
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2036
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2037
          throw new IllegalStateException("Method call not finished!");
2038
        }
2039
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2040
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2041
        (new Client(prot)).recv_closePO();
2042
      }
2043
    }
2044
 
2045
    public void isInvoiceReceived(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<isInvoiceReceived_call> resultHandler) throws org.apache.thrift.TException {
2046
      checkReady();
2047
      isInvoiceReceived_call method_call = new isInvoiceReceived_call(invoiceNumber, supplierId, resultHandler, this, ___protocolFactory, ___transport);
2048
      this.___currentMethod = method_call;
2049
      ___manager.call(method_call);
2050
    }
2051
 
2052
    public static class isInvoiceReceived_call extends org.apache.thrift.async.TAsyncMethodCall {
2053
      private String invoiceNumber;
2054
      private long supplierId;
2055
      public isInvoiceReceived_call(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<isInvoiceReceived_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
2056
        super(client, protocolFactory, transport, resultHandler, false);
2057
        this.invoiceNumber = invoiceNumber;
2058
        this.supplierId = supplierId;
2059
      }
2060
 
2061
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2062
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isInvoiceReceived", org.apache.thrift.protocol.TMessageType.CALL, 0));
2063
        isInvoiceReceived_args args = new isInvoiceReceived_args();
2064
        args.setInvoiceNumber(invoiceNumber);
2065
        args.setSupplierId(supplierId);
2066
        args.write(prot);
2067
        prot.writeMessageEnd();
2068
      }
2069
 
2070
      public boolean getResult() throws org.apache.thrift.TException {
2071
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2072
          throw new IllegalStateException("Method call not finished!");
2073
        }
2074
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2075
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2076
        return (new Client(prot)).recv_isInvoiceReceived();
2077
      }
2078
    }
2079
 
9829 amar.kumar 2080
    public void changeWarehouseForPO(long id, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<changeWarehouseForPO_call> resultHandler) throws org.apache.thrift.TException {
2081
      checkReady();
2082
      changeWarehouseForPO_call method_call = new changeWarehouseForPO_call(id, warehouseId, resultHandler, this, ___protocolFactory, ___transport);
2083
      this.___currentMethod = method_call;
2084
      ___manager.call(method_call);
2085
    }
2086
 
2087
    public static class changeWarehouseForPO_call extends org.apache.thrift.async.TAsyncMethodCall {
2088
      private long id;
2089
      private long warehouseId;
2090
      public changeWarehouseForPO_call(long id, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<changeWarehouseForPO_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
2091
        super(client, protocolFactory, transport, resultHandler, false);
2092
        this.id = id;
2093
        this.warehouseId = warehouseId;
2094
      }
2095
 
2096
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2097
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("changeWarehouseForPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
2098
        changeWarehouseForPO_args args = new changeWarehouseForPO_args();
2099
        args.setId(id);
2100
        args.setWarehouseId(warehouseId);
2101
        args.write(prot);
2102
        prot.writeMessageEnd();
2103
      }
2104
 
2105
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2106
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2107
          throw new IllegalStateException("Method call not finished!");
2108
        }
2109
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2110
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2111
        (new Client(prot)).recv_changeWarehouseForPO();
2112
      }
2113
    }
2114
 
9925 amar.kumar 2115
    public void changePOStatus(long id, POStatus poStatus, org.apache.thrift.async.AsyncMethodCallback<changePOStatus_call> resultHandler) throws org.apache.thrift.TException {
2116
      checkReady();
2117
      changePOStatus_call method_call = new changePOStatus_call(id, poStatus, resultHandler, this, ___protocolFactory, ___transport);
2118
      this.___currentMethod = method_call;
2119
      ___manager.call(method_call);
2120
    }
2121
 
2122
    public static class changePOStatus_call extends org.apache.thrift.async.TAsyncMethodCall {
2123
      private long id;
2124
      private POStatus poStatus;
2125
      public changePOStatus_call(long id, POStatus poStatus, org.apache.thrift.async.AsyncMethodCallback<changePOStatus_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
2126
        super(client, protocolFactory, transport, resultHandler, false);
2127
        this.id = id;
2128
        this.poStatus = poStatus;
2129
      }
2130
 
2131
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2132
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("changePOStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
2133
        changePOStatus_args args = new changePOStatus_args();
2134
        args.setId(id);
2135
        args.setPoStatus(poStatus);
2136
        args.write(prot);
2137
        prot.writeMessageEnd();
2138
      }
2139
 
2140
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2141
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2142
          throw new IllegalStateException("Method call not finished!");
2143
        }
2144
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2145
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2146
        (new Client(prot)).recv_changePOStatus();
2147
      }
2148
    }
2149
 
11751 manish.sha 2150
    public void getPurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
2151
      checkReady();
2152
      getPurchaseReturn_call method_call = new getPurchaseReturn_call(id, resultHandler, this, ___protocolFactory, ___transport);
2153
      this.___currentMethod = method_call;
2154
      ___manager.call(method_call);
2155
    }
2156
 
2157
    public static class getPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
2158
      private long id;
2159
      public getPurchaseReturn_call(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseReturn_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
2160
        super(client, protocolFactory, transport, resultHandler, false);
2161
        this.id = id;
2162
      }
2163
 
2164
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2165
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
2166
        getPurchaseReturn_args args = new getPurchaseReturn_args();
2167
        args.setId(id);
2168
        args.write(prot);
2169
        prot.writeMessageEnd();
2170
      }
2171
 
2172
      public PurchaseReturn getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2173
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2174
          throw new IllegalStateException("Method call not finished!");
2175
        }
2176
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2177
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2178
        return (new Client(prot)).recv_getPurchaseReturn();
2179
      }
2180
    }
2181
 
13600 manish.sha 2182
    public void markPurchasereturnSettled(long id, SettlementType settlementType, String documentNumber, String settlementBy, long settledAmount, org.apache.thrift.async.AsyncMethodCallback<markPurchasereturnSettled_call> resultHandler) throws org.apache.thrift.TException {
2183
      checkReady();
2184
      markPurchasereturnSettled_call method_call = new markPurchasereturnSettled_call(id, settlementType, documentNumber, settlementBy, settledAmount, resultHandler, this, ___protocolFactory, ___transport);
2185
      this.___currentMethod = method_call;
2186
      ___manager.call(method_call);
2187
    }
2188
 
2189
    public static class markPurchasereturnSettled_call extends org.apache.thrift.async.TAsyncMethodCall {
2190
      private long id;
2191
      private SettlementType settlementType;
2192
      private String documentNumber;
2193
      private String settlementBy;
2194
      private long settledAmount;
2195
      public markPurchasereturnSettled_call(long id, SettlementType settlementType, String documentNumber, String settlementBy, long settledAmount, org.apache.thrift.async.AsyncMethodCallback<markPurchasereturnSettled_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
2196
        super(client, protocolFactory, transport, resultHandler, false);
2197
        this.id = id;
2198
        this.settlementType = settlementType;
2199
        this.documentNumber = documentNumber;
2200
        this.settlementBy = settlementBy;
2201
        this.settledAmount = settledAmount;
2202
      }
2203
 
2204
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2205
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("markPurchasereturnSettled", org.apache.thrift.protocol.TMessageType.CALL, 0));
2206
        markPurchasereturnSettled_args args = new markPurchasereturnSettled_args();
2207
        args.setId(id);
2208
        args.setSettlementType(settlementType);
2209
        args.setDocumentNumber(documentNumber);
2210
        args.setSettlementBy(settlementBy);
2211
        args.setSettledAmount(settledAmount);
2212
        args.write(prot);
2213
        prot.writeMessageEnd();
2214
      }
2215
 
2216
      public boolean getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2217
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2218
          throw new IllegalStateException("Method call not finished!");
2219
        }
2220
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2221
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2222
        return (new Client(prot)).recv_markPurchasereturnSettled();
2223
      }
2224
    }
2225
 
2226
    public void getPrSettlementsForPurchaseReturn(long purchaseReturnId, org.apache.thrift.async.AsyncMethodCallback<getPrSettlementsForPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
2227
      checkReady();
2228
      getPrSettlementsForPurchaseReturn_call method_call = new getPrSettlementsForPurchaseReturn_call(purchaseReturnId, resultHandler, this, ___protocolFactory, ___transport);
2229
      this.___currentMethod = method_call;
2230
      ___manager.call(method_call);
2231
    }
2232
 
2233
    public static class getPrSettlementsForPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
2234
      private long purchaseReturnId;
2235
      public getPrSettlementsForPurchaseReturn_call(long purchaseReturnId, org.apache.thrift.async.AsyncMethodCallback<getPrSettlementsForPurchaseReturn_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
2236
        super(client, protocolFactory, transport, resultHandler, false);
2237
        this.purchaseReturnId = purchaseReturnId;
2238
      }
2239
 
2240
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2241
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPrSettlementsForPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
2242
        getPrSettlementsForPurchaseReturn_args args = new getPrSettlementsForPurchaseReturn_args();
2243
        args.setPurchaseReturnId(purchaseReturnId);
2244
        args.write(prot);
2245
        prot.writeMessageEnd();
2246
      }
2247
 
2248
      public List<PurchaseReturnSettlement> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2249
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2250
          throw new IllegalStateException("Method call not finished!");
2251
        }
2252
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2253
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2254
        return (new Client(prot)).recv_getPrSettlementsForPurchaseReturn();
2255
      }
2256
    }
2257
 
2258
    public void updatePurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<updatePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
2259
      checkReady();
2260
      updatePurchaseReturn_call method_call = new updatePurchaseReturn_call(purchaseReturn, resultHandler, this, ___protocolFactory, ___transport);
2261
      this.___currentMethod = method_call;
2262
      ___manager.call(method_call);
2263
    }
2264
 
2265
    public static class updatePurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
2266
      private PurchaseReturn purchaseReturn;
2267
      public updatePurchaseReturn_call(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<updatePurchaseReturn_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
2268
        super(client, protocolFactory, transport, resultHandler, false);
2269
        this.purchaseReturn = purchaseReturn;
2270
      }
2271
 
2272
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2273
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updatePurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
2274
        updatePurchaseReturn_args args = new updatePurchaseReturn_args();
2275
        args.setPurchaseReturn(purchaseReturn);
2276
        args.write(prot);
2277
        prot.writeMessageEnd();
2278
      }
2279
 
2280
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2281
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2282
          throw new IllegalStateException("Method call not finished!");
2283
        }
2284
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2285
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2286
        (new Client(prot)).recv_updatePurchaseReturn();
2287
      }
2288
    }
2289
 
4496 mandeep.dh 2290
  }
2291
 
2292
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
2293
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
2294
    public Processor(I iface) {
2295
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
2296
    }
2297
 
2298
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
2299
      super(iface, getProcessMap(processMap));
2300
    }
2301
 
2302
    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
2303
      processMap.put("createPurchaseOrder", new createPurchaseOrder());
2304
      processMap.put("getPurchaseOrder", new getPurchaseOrder());
2305
      processMap.put("getAllPurchaseOrders", new getAllPurchaseOrders());
2306
      processMap.put("getSupplier", new getSupplier());
2307
      processMap.put("startPurchase", new startPurchase());
2308
      processMap.put("closePurchase", new closePurchase());
2309
      processMap.put("getAllPurchases", new getAllPurchases());
6385 amar.kumar 2310
      processMap.put("getPurchasesForPO", new getPurchasesForPO());
4555 mandeep.dh 2311
      processMap.put("getPurchaseOrderForPurchase", new getPurchaseOrderForPurchase());
4754 mandeep.dh 2312
      processMap.put("getPendingPurchaseOrders", new getPendingPurchaseOrders());
2313
      processMap.put("getSuppliers", new getSuppliers());
2314
      processMap.put("fulfillPO", new fulfillPO());
2315
      processMap.put("updatePurchaseOrder", new updatePurchaseOrder());
5185 mandeep.dh 2316
      processMap.put("unFulfillPO", new unFulfillPO());
5443 mandeep.dh 2317
      processMap.put("getInvoices", new getInvoices());
7410 amar.kumar 2318
      processMap.put("getInvoicesForWarehouse", new getInvoicesForWarehouse());
5443 mandeep.dh 2319
      processMap.put("createInvoice", new createInvoice());
5591 mandeep.dh 2320
      processMap.put("addSupplier", new addSupplier());
2321
      processMap.put("updateSupplier", new updateSupplier());
6467 amar.kumar 2322
      processMap.put("createPurchaseReturn", new createPurchaseReturn());
2323
      processMap.put("settlePurchaseReturn", new settlePurchaseReturn());
2324
      processMap.put("getUnsettledPurchaseReturns", new getUnsettledPurchaseReturns());
6630 amar.kumar 2325
      processMap.put("getInvoice", new getInvoice());
6762 amar.kumar 2326
      processMap.put("createPurchaseForOurExtBilling", new createPurchaseForOurExtBilling());
2327
      processMap.put("fulfillPOForExtBilling", new fulfillPOForExtBilling());
7410 amar.kumar 2328
      processMap.put("closePO", new closePO());
2329
      processMap.put("isInvoiceReceived", new isInvoiceReceived());
9829 amar.kumar 2330
      processMap.put("changeWarehouseForPO", new changeWarehouseForPO());
9925 amar.kumar 2331
      processMap.put("changePOStatus", new changePOStatus());
11751 manish.sha 2332
      processMap.put("getPurchaseReturn", new getPurchaseReturn());
13600 manish.sha 2333
      processMap.put("markPurchasereturnSettled", new markPurchasereturnSettled());
2334
      processMap.put("getPrSettlementsForPurchaseReturn", new getPrSettlementsForPurchaseReturn());
2335
      processMap.put("updatePurchaseReturn", new updatePurchaseReturn());
4496 mandeep.dh 2336
      return processMap;
2337
    }
2338
 
2339
    private static class createPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseOrder_args> {
2340
      public createPurchaseOrder() {
2341
        super("createPurchaseOrder");
2342
      }
2343
 
2344
      protected createPurchaseOrder_args getEmptyArgsInstance() {
2345
        return new createPurchaseOrder_args();
2346
      }
2347
 
2348
      protected createPurchaseOrder_result getResult(I iface, createPurchaseOrder_args args) throws org.apache.thrift.TException {
2349
        createPurchaseOrder_result result = new createPurchaseOrder_result();
2350
        try {
2351
          result.success = iface.createPurchaseOrder(args.purchaseOrder);
2352
          result.setSuccessIsSet(true);
2353
        } catch (PurchaseServiceException e) {
2354
          result.e = e;
2355
        }
2356
        return result;
2357
      }
2358
    }
2359
 
2360
    private static class getPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrder_args> {
2361
      public getPurchaseOrder() {
2362
        super("getPurchaseOrder");
2363
      }
2364
 
2365
      protected getPurchaseOrder_args getEmptyArgsInstance() {
2366
        return new getPurchaseOrder_args();
2367
      }
2368
 
2369
      protected getPurchaseOrder_result getResult(I iface, getPurchaseOrder_args args) throws org.apache.thrift.TException {
2370
        getPurchaseOrder_result result = new getPurchaseOrder_result();
2371
        try {
2372
          result.success = iface.getPurchaseOrder(args.id);
2373
        } catch (PurchaseServiceException e) {
2374
          result.e = e;
2375
        }
2376
        return result;
2377
      }
2378
    }
2379
 
2380
    private static class getAllPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchaseOrders_args> {
2381
      public getAllPurchaseOrders() {
2382
        super("getAllPurchaseOrders");
2383
      }
2384
 
2385
      protected getAllPurchaseOrders_args getEmptyArgsInstance() {
2386
        return new getAllPurchaseOrders_args();
2387
      }
2388
 
2389
      protected getAllPurchaseOrders_result getResult(I iface, getAllPurchaseOrders_args args) throws org.apache.thrift.TException {
2390
        getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
2391
        try {
2392
          result.success = iface.getAllPurchaseOrders(args.status);
2393
        } catch (PurchaseServiceException e) {
2394
          result.e = e;
2395
        }
2396
        return result;
2397
      }
2398
    }
2399
 
2400
    private static class getSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSupplier_args> {
2401
      public getSupplier() {
2402
        super("getSupplier");
2403
      }
2404
 
2405
      protected getSupplier_args getEmptyArgsInstance() {
2406
        return new getSupplier_args();
2407
      }
2408
 
2409
      protected getSupplier_result getResult(I iface, getSupplier_args args) throws org.apache.thrift.TException {
2410
        getSupplier_result result = new getSupplier_result();
2411
        try {
2412
          result.success = iface.getSupplier(args.id);
2413
        } catch (PurchaseServiceException e) {
2414
          result.e = e;
2415
        }
2416
        return result;
2417
      }
2418
    }
2419
 
2420
    private static class startPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startPurchase_args> {
2421
      public startPurchase() {
2422
        super("startPurchase");
2423
      }
2424
 
2425
      protected startPurchase_args getEmptyArgsInstance() {
2426
        return new startPurchase_args();
2427
      }
2428
 
2429
      protected startPurchase_result getResult(I iface, startPurchase_args args) throws org.apache.thrift.TException {
2430
        startPurchase_result result = new startPurchase_result();
2431
        try {
11801 manish.sha 2432
          result.success = iface.startPurchase(args.purchaseOrderId, args.invoiceNumber, args.freightCharges, args.purchaseComments);
4496 mandeep.dh 2433
          result.setSuccessIsSet(true);
2434
        } catch (PurchaseServiceException e) {
2435
          result.e = e;
2436
        }
2437
        return result;
2438
      }
2439
    }
2440
 
2441
    private static class closePurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closePurchase_args> {
2442
      public closePurchase() {
2443
        super("closePurchase");
2444
      }
2445
 
2446
      protected closePurchase_args getEmptyArgsInstance() {
2447
        return new closePurchase_args();
2448
      }
2449
 
2450
      protected closePurchase_result getResult(I iface, closePurchase_args args) throws org.apache.thrift.TException {
2451
        closePurchase_result result = new closePurchase_result();
2452
        try {
2453
          result.success = iface.closePurchase(args.purchaseId);
2454
          result.setSuccessIsSet(true);
2455
        } catch (PurchaseServiceException e) {
2456
          result.e = e;
2457
        }
2458
        return result;
2459
      }
2460
    }
2461
 
2462
    private static class getAllPurchases<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchases_args> {
2463
      public getAllPurchases() {
2464
        super("getAllPurchases");
2465
      }
2466
 
2467
      protected getAllPurchases_args getEmptyArgsInstance() {
2468
        return new getAllPurchases_args();
2469
      }
2470
 
2471
      protected getAllPurchases_result getResult(I iface, getAllPurchases_args args) throws org.apache.thrift.TException {
2472
        getAllPurchases_result result = new getAllPurchases_result();
2473
        try {
2474
          result.success = iface.getAllPurchases(args.purchaseOrderId, args.open);
2475
        } catch (PurchaseServiceException e) {
2476
          result.e = e;
2477
        }
2478
        return result;
2479
      }
2480
    }
2481
 
6385 amar.kumar 2482
    private static class getPurchasesForPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchasesForPO_args> {
2483
      public getPurchasesForPO() {
2484
        super("getPurchasesForPO");
2485
      }
2486
 
2487
      protected getPurchasesForPO_args getEmptyArgsInstance() {
2488
        return new getPurchasesForPO_args();
2489
      }
2490
 
2491
      protected getPurchasesForPO_result getResult(I iface, getPurchasesForPO_args args) throws org.apache.thrift.TException {
2492
        getPurchasesForPO_result result = new getPurchasesForPO_result();
2493
        try {
2494
          result.success = iface.getPurchasesForPO(args.purchaseOrderId);
2495
        } catch (PurchaseServiceException e) {
2496
          result.e = e;
2497
        }
2498
        return result;
2499
      }
2500
    }
2501
 
4555 mandeep.dh 2502
    private static class getPurchaseOrderForPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrderForPurchase_args> {
2503
      public getPurchaseOrderForPurchase() {
2504
        super("getPurchaseOrderForPurchase");
4496 mandeep.dh 2505
      }
2506
 
4555 mandeep.dh 2507
      protected getPurchaseOrderForPurchase_args getEmptyArgsInstance() {
2508
        return new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 2509
      }
2510
 
4555 mandeep.dh 2511
      protected getPurchaseOrderForPurchase_result getResult(I iface, getPurchaseOrderForPurchase_args args) throws org.apache.thrift.TException {
2512
        getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
2513
        result.success = iface.getPurchaseOrderForPurchase(args.purchaseId);
4496 mandeep.dh 2514
        return result;
2515
      }
2516
    }
2517
 
4754 mandeep.dh 2518
    private static class getPendingPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPendingPurchaseOrders_args> {
2519
      public getPendingPurchaseOrders() {
2520
        super("getPendingPurchaseOrders");
2521
      }
2522
 
2523
      protected getPendingPurchaseOrders_args getEmptyArgsInstance() {
2524
        return new getPendingPurchaseOrders_args();
2525
      }
2526
 
2527
      protected getPendingPurchaseOrders_result getResult(I iface, getPendingPurchaseOrders_args args) throws org.apache.thrift.TException {
2528
        getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
2529
        try {
2530
          result.success = iface.getPendingPurchaseOrders(args.warehouseId);
2531
        } catch (PurchaseServiceException e) {
2532
          result.e = e;
2533
        }
2534
        return result;
2535
      }
2536
    }
2537
 
2538
    private static class getSuppliers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSuppliers_args> {
2539
      public getSuppliers() {
2540
        super("getSuppliers");
2541
      }
2542
 
2543
      protected getSuppliers_args getEmptyArgsInstance() {
2544
        return new getSuppliers_args();
2545
      }
2546
 
2547
      protected getSuppliers_result getResult(I iface, getSuppliers_args args) throws org.apache.thrift.TException {
2548
        getSuppliers_result result = new getSuppliers_result();
2549
        try {
2550
          result.success = iface.getSuppliers();
2551
        } catch (PurchaseServiceException e) {
2552
          result.e = e;
2553
        }
2554
        return result;
2555
      }
2556
    }
2557
 
2558
    private static class fulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fulfillPO_args> {
2559
      public fulfillPO() {
2560
        super("fulfillPO");
2561
      }
2562
 
2563
      protected fulfillPO_args getEmptyArgsInstance() {
2564
        return new fulfillPO_args();
2565
      }
2566
 
2567
      protected fulfillPO_result getResult(I iface, fulfillPO_args args) throws org.apache.thrift.TException {
2568
        fulfillPO_result result = new fulfillPO_result();
2569
        try {
2570
          iface.fulfillPO(args.purchaseOrderId, args.itemId, args.quantity);
2571
        } catch (PurchaseServiceException e) {
2572
          result.e = e;
2573
        }
2574
        return result;
2575
      }
2576
    }
2577
 
2578
    private static class updatePurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updatePurchaseOrder_args> {
2579
      public updatePurchaseOrder() {
2580
        super("updatePurchaseOrder");
2581
      }
2582
 
2583
      protected updatePurchaseOrder_args getEmptyArgsInstance() {
2584
        return new updatePurchaseOrder_args();
2585
      }
2586
 
2587
      protected updatePurchaseOrder_result getResult(I iface, updatePurchaseOrder_args args) throws org.apache.thrift.TException {
2588
        updatePurchaseOrder_result result = new updatePurchaseOrder_result();
2589
        try {
2590
          iface.updatePurchaseOrder(args.purchaseOrder);
2591
        } catch (PurchaseServiceException e) {
2592
          result.e = e;
2593
        }
2594
        return result;
2595
      }
2596
    }
2597
 
5185 mandeep.dh 2598
    private static class unFulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, unFulfillPO_args> {
2599
      public unFulfillPO() {
2600
        super("unFulfillPO");
2601
      }
2602
 
2603
      protected unFulfillPO_args getEmptyArgsInstance() {
2604
        return new unFulfillPO_args();
2605
      }
2606
 
2607
      protected unFulfillPO_result getResult(I iface, unFulfillPO_args args) throws org.apache.thrift.TException {
2608
        unFulfillPO_result result = new unFulfillPO_result();
2609
        try {
2610
          iface.unFulfillPO(args.purchaseId, args.itemId, args.quantity);
2611
        } catch (PurchaseServiceException e) {
2612
          result.e = e;
2613
        }
2614
        return result;
2615
      }
2616
    }
2617
 
5443 mandeep.dh 2618
    private static class getInvoices<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoices_args> {
2619
      public getInvoices() {
2620
        super("getInvoices");
2621
      }
2622
 
2623
      protected getInvoices_args getEmptyArgsInstance() {
2624
        return new getInvoices_args();
2625
      }
2626
 
2627
      protected getInvoices_result getResult(I iface, getInvoices_args args) throws org.apache.thrift.TException {
2628
        getInvoices_result result = new getInvoices_result();
2629
        result.success = iface.getInvoices(args.date);
2630
        return result;
2631
      }
2632
    }
2633
 
7410 amar.kumar 2634
    private static class getInvoicesForWarehouse<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoicesForWarehouse_args> {
2635
      public getInvoicesForWarehouse() {
2636
        super("getInvoicesForWarehouse");
2637
      }
2638
 
2639
      protected getInvoicesForWarehouse_args getEmptyArgsInstance() {
2640
        return new getInvoicesForWarehouse_args();
2641
      }
2642
 
2643
      protected getInvoicesForWarehouse_result getResult(I iface, getInvoicesForWarehouse_args args) throws org.apache.thrift.TException {
2644
        getInvoicesForWarehouse_result result = new getInvoicesForWarehouse_result();
2645
        result.success = iface.getInvoicesForWarehouse(args.warehouseId, args.supplierId, args.date);
2646
        return result;
2647
      }
2648
    }
2649
 
5443 mandeep.dh 2650
    private static class createInvoice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createInvoice_args> {
2651
      public createInvoice() {
2652
        super("createInvoice");
2653
      }
2654
 
2655
      protected createInvoice_args getEmptyArgsInstance() {
2656
        return new createInvoice_args();
2657
      }
2658
 
2659
      protected createInvoice_result getResult(I iface, createInvoice_args args) throws org.apache.thrift.TException {
2660
        createInvoice_result result = new createInvoice_result();
2661
        try {
2662
          iface.createInvoice(args.invoice);
2663
        } catch (PurchaseServiceException e) {
2664
          result.e = e;
2665
        }
2666
        return result;
2667
      }
2668
    }
2669
 
5591 mandeep.dh 2670
    private static class addSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addSupplier_args> {
2671
      public addSupplier() {
2672
        super("addSupplier");
2673
      }
2674
 
2675
      protected addSupplier_args getEmptyArgsInstance() {
2676
        return new addSupplier_args();
2677
      }
2678
 
2679
      protected addSupplier_result getResult(I iface, addSupplier_args args) throws org.apache.thrift.TException {
2680
        addSupplier_result result = new addSupplier_result();
2681
        result.success = iface.addSupplier(args.supplier);
2682
        return result;
2683
      }
2684
    }
2685
 
2686
    private static class updateSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateSupplier_args> {
2687
      public updateSupplier() {
2688
        super("updateSupplier");
2689
      }
2690
 
2691
      protected updateSupplier_args getEmptyArgsInstance() {
2692
        return new updateSupplier_args();
2693
      }
2694
 
2695
      protected updateSupplier_result getResult(I iface, updateSupplier_args args) throws org.apache.thrift.TException {
2696
        updateSupplier_result result = new updateSupplier_result();
2697
        iface.updateSupplier(args.supplier);
2698
        return result;
2699
      }
2700
    }
2701
 
6467 amar.kumar 2702
    private static class createPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseReturn_args> {
2703
      public createPurchaseReturn() {
2704
        super("createPurchaseReturn");
2705
      }
2706
 
2707
      protected createPurchaseReturn_args getEmptyArgsInstance() {
2708
        return new createPurchaseReturn_args();
2709
      }
2710
 
2711
      protected createPurchaseReturn_result getResult(I iface, createPurchaseReturn_args args) throws org.apache.thrift.TException {
2712
        createPurchaseReturn_result result = new createPurchaseReturn_result();
2713
        result.success = iface.createPurchaseReturn(args.purchaseReturn);
2714
        result.setSuccessIsSet(true);
2715
        return result;
2716
      }
2717
    }
2718
 
2719
    private static class settlePurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, settlePurchaseReturn_args> {
2720
      public settlePurchaseReturn() {
2721
        super("settlePurchaseReturn");
2722
      }
2723
 
2724
      protected settlePurchaseReturn_args getEmptyArgsInstance() {
2725
        return new settlePurchaseReturn_args();
2726
      }
2727
 
2728
      protected settlePurchaseReturn_result getResult(I iface, settlePurchaseReturn_args args) throws org.apache.thrift.TException {
2729
        settlePurchaseReturn_result result = new settlePurchaseReturn_result();
2730
        iface.settlePurchaseReturn(args.id);
2731
        return result;
2732
      }
2733
    }
2734
 
2735
    private static class getUnsettledPurchaseReturns<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUnsettledPurchaseReturns_args> {
2736
      public getUnsettledPurchaseReturns() {
2737
        super("getUnsettledPurchaseReturns");
2738
      }
2739
 
2740
      protected getUnsettledPurchaseReturns_args getEmptyArgsInstance() {
2741
        return new getUnsettledPurchaseReturns_args();
2742
      }
2743
 
2744
      protected getUnsettledPurchaseReturns_result getResult(I iface, getUnsettledPurchaseReturns_args args) throws org.apache.thrift.TException {
2745
        getUnsettledPurchaseReturns_result result = new getUnsettledPurchaseReturns_result();
2746
        result.success = iface.getUnsettledPurchaseReturns();
2747
        return result;
2748
      }
2749
    }
2750
 
6630 amar.kumar 2751
    private static class getInvoice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoice_args> {
2752
      public getInvoice() {
2753
        super("getInvoice");
2754
      }
2755
 
2756
      protected getInvoice_args getEmptyArgsInstance() {
2757
        return new getInvoice_args();
2758
      }
2759
 
2760
      protected getInvoice_result getResult(I iface, getInvoice_args args) throws org.apache.thrift.TException {
2761
        getInvoice_result result = new getInvoice_result();
2762
        result.success = iface.getInvoice(args.invoiceNumber, args.supplierId);
2763
        return result;
2764
      }
2765
    }
2766
 
6762 amar.kumar 2767
    private static class createPurchaseForOurExtBilling<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseForOurExtBilling_args> {
2768
      public createPurchaseForOurExtBilling() {
2769
        super("createPurchaseForOurExtBilling");
2770
      }
2771
 
2772
      protected createPurchaseForOurExtBilling_args getEmptyArgsInstance() {
2773
        return new createPurchaseForOurExtBilling_args();
2774
      }
2775
 
2776
      protected createPurchaseForOurExtBilling_result getResult(I iface, createPurchaseForOurExtBilling_args args) throws org.apache.thrift.TException {
2777
        createPurchaseForOurExtBilling_result result = new createPurchaseForOurExtBilling_result();
7672 rajveer 2778
        result.success = iface.createPurchaseForOurExtBilling(args.invoiceNumber, args.unitPrice, args.nlc, args.itemId);
6762 amar.kumar 2779
        result.setSuccessIsSet(true);
2780
        return result;
2781
      }
2782
    }
2783
 
2784
    private static class fulfillPOForExtBilling<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fulfillPOForExtBilling_args> {
2785
      public fulfillPOForExtBilling() {
2786
        super("fulfillPOForExtBilling");
2787
      }
2788
 
2789
      protected fulfillPOForExtBilling_args getEmptyArgsInstance() {
2790
        return new fulfillPOForExtBilling_args();
2791
      }
2792
 
2793
      protected fulfillPOForExtBilling_result getResult(I iface, fulfillPOForExtBilling_args args) throws org.apache.thrift.TException {
2794
        fulfillPOForExtBilling_result result = new fulfillPOForExtBilling_result();
2795
        iface.fulfillPOForExtBilling(args.itemId, args.quantity);
2796
        return result;
2797
      }
2798
    }
2799
 
7410 amar.kumar 2800
    private static class closePO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closePO_args> {
2801
      public closePO() {
2802
        super("closePO");
2803
      }
2804
 
2805
      protected closePO_args getEmptyArgsInstance() {
2806
        return new closePO_args();
2807
      }
2808
 
2809
      protected closePO_result getResult(I iface, closePO_args args) throws org.apache.thrift.TException {
2810
        closePO_result result = new closePO_result();
2811
        try {
2812
          iface.closePO(args.poId);
2813
        } catch (PurchaseServiceException e) {
2814
          result.e = e;
2815
        }
2816
        return result;
2817
      }
2818
    }
2819
 
2820
    private static class isInvoiceReceived<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isInvoiceReceived_args> {
2821
      public isInvoiceReceived() {
2822
        super("isInvoiceReceived");
2823
      }
2824
 
2825
      protected isInvoiceReceived_args getEmptyArgsInstance() {
2826
        return new isInvoiceReceived_args();
2827
      }
2828
 
2829
      protected isInvoiceReceived_result getResult(I iface, isInvoiceReceived_args args) throws org.apache.thrift.TException {
2830
        isInvoiceReceived_result result = new isInvoiceReceived_result();
2831
        result.success = iface.isInvoiceReceived(args.invoiceNumber, args.supplierId);
2832
        result.setSuccessIsSet(true);
2833
        return result;
2834
      }
2835
    }
2836
 
9829 amar.kumar 2837
    private static class changeWarehouseForPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, changeWarehouseForPO_args> {
2838
      public changeWarehouseForPO() {
2839
        super("changeWarehouseForPO");
2840
      }
2841
 
2842
      protected changeWarehouseForPO_args getEmptyArgsInstance() {
2843
        return new changeWarehouseForPO_args();
2844
      }
2845
 
2846
      protected changeWarehouseForPO_result getResult(I iface, changeWarehouseForPO_args args) throws org.apache.thrift.TException {
2847
        changeWarehouseForPO_result result = new changeWarehouseForPO_result();
2848
        try {
2849
          iface.changeWarehouseForPO(args.id, args.warehouseId);
2850
        } catch (PurchaseServiceException e) {
2851
          result.e = e;
2852
        }
2853
        return result;
2854
      }
2855
    }
2856
 
9925 amar.kumar 2857
    private static class changePOStatus<I extends Iface> extends org.apache.thrift.ProcessFunction<I, changePOStatus_args> {
2858
      public changePOStatus() {
2859
        super("changePOStatus");
2860
      }
2861
 
2862
      protected changePOStatus_args getEmptyArgsInstance() {
2863
        return new changePOStatus_args();
2864
      }
2865
 
2866
      protected changePOStatus_result getResult(I iface, changePOStatus_args args) throws org.apache.thrift.TException {
2867
        changePOStatus_result result = new changePOStatus_result();
2868
        try {
2869
          iface.changePOStatus(args.id, args.poStatus);
2870
        } catch (PurchaseServiceException e) {
2871
          result.e = e;
2872
        }
2873
        return result;
2874
      }
2875
    }
2876
 
11751 manish.sha 2877
    private static class getPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseReturn_args> {
2878
      public getPurchaseReturn() {
2879
        super("getPurchaseReturn");
2880
      }
2881
 
2882
      protected getPurchaseReturn_args getEmptyArgsInstance() {
2883
        return new getPurchaseReturn_args();
2884
      }
2885
 
2886
      protected getPurchaseReturn_result getResult(I iface, getPurchaseReturn_args args) throws org.apache.thrift.TException {
2887
        getPurchaseReturn_result result = new getPurchaseReturn_result();
2888
        try {
2889
          result.success = iface.getPurchaseReturn(args.id);
2890
        } catch (PurchaseServiceException e) {
2891
          result.e = e;
2892
        }
2893
        return result;
2894
      }
2895
    }
2896
 
13600 manish.sha 2897
    private static class markPurchasereturnSettled<I extends Iface> extends org.apache.thrift.ProcessFunction<I, markPurchasereturnSettled_args> {
2898
      public markPurchasereturnSettled() {
2899
        super("markPurchasereturnSettled");
2900
      }
2901
 
2902
      protected markPurchasereturnSettled_args getEmptyArgsInstance() {
2903
        return new markPurchasereturnSettled_args();
2904
      }
2905
 
2906
      protected markPurchasereturnSettled_result getResult(I iface, markPurchasereturnSettled_args args) throws org.apache.thrift.TException {
2907
        markPurchasereturnSettled_result result = new markPurchasereturnSettled_result();
2908
        try {
2909
          result.success = iface.markPurchasereturnSettled(args.id, args.settlementType, args.documentNumber, args.settlementBy, args.settledAmount);
2910
          result.setSuccessIsSet(true);
2911
        } catch (PurchaseServiceException e) {
2912
          result.e = e;
2913
        }
2914
        return result;
2915
      }
2916
    }
2917
 
2918
    private static class getPrSettlementsForPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPrSettlementsForPurchaseReturn_args> {
2919
      public getPrSettlementsForPurchaseReturn() {
2920
        super("getPrSettlementsForPurchaseReturn");
2921
      }
2922
 
2923
      protected getPrSettlementsForPurchaseReturn_args getEmptyArgsInstance() {
2924
        return new getPrSettlementsForPurchaseReturn_args();
2925
      }
2926
 
2927
      protected getPrSettlementsForPurchaseReturn_result getResult(I iface, getPrSettlementsForPurchaseReturn_args args) throws org.apache.thrift.TException {
2928
        getPrSettlementsForPurchaseReturn_result result = new getPrSettlementsForPurchaseReturn_result();
2929
        try {
2930
          result.success = iface.getPrSettlementsForPurchaseReturn(args.purchaseReturnId);
2931
        } catch (PurchaseServiceException e) {
2932
          result.e = e;
2933
        }
2934
        return result;
2935
      }
2936
    }
2937
 
2938
    private static class updatePurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updatePurchaseReturn_args> {
2939
      public updatePurchaseReturn() {
2940
        super("updatePurchaseReturn");
2941
      }
2942
 
2943
      protected updatePurchaseReturn_args getEmptyArgsInstance() {
2944
        return new updatePurchaseReturn_args();
2945
      }
2946
 
2947
      protected updatePurchaseReturn_result getResult(I iface, updatePurchaseReturn_args args) throws org.apache.thrift.TException {
2948
        updatePurchaseReturn_result result = new updatePurchaseReturn_result();
2949
        try {
2950
          iface.updatePurchaseReturn(args.purchaseReturn);
2951
        } catch (PurchaseServiceException e) {
2952
          result.e = e;
2953
        }
2954
        return result;
2955
      }
2956
    }
2957
 
4496 mandeep.dh 2958
  }
2959
 
2960
  public static class createPurchaseOrder_args implements org.apache.thrift.TBase<createPurchaseOrder_args, createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
2961
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_args");
2962
 
2963
    private static final org.apache.thrift.protocol.TField PURCHASE_ORDER_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseOrder", org.apache.thrift.protocol.TType.STRUCT, (short)1);
2964
 
2965
    private PurchaseOrder purchaseOrder; // required
2966
 
2967
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2968
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2969
      PURCHASE_ORDER((short)1, "purchaseOrder");
2970
 
2971
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2972
 
2973
      static {
2974
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2975
          byName.put(field.getFieldName(), field);
2976
        }
2977
      }
2978
 
2979
      /**
2980
       * Find the _Fields constant that matches fieldId, or null if its not found.
2981
       */
2982
      public static _Fields findByThriftId(int fieldId) {
2983
        switch(fieldId) {
2984
          case 1: // PURCHASE_ORDER
2985
            return PURCHASE_ORDER;
2986
          default:
2987
            return null;
2988
        }
2989
      }
2990
 
2991
      /**
2992
       * Find the _Fields constant that matches fieldId, throwing an exception
2993
       * if it is not found.
2994
       */
2995
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2996
        _Fields fields = findByThriftId(fieldId);
2997
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2998
        return fields;
2999
      }
3000
 
3001
      /**
3002
       * Find the _Fields constant that matches name, or null if its not found.
3003
       */
3004
      public static _Fields findByName(String name) {
3005
        return byName.get(name);
3006
      }
3007
 
3008
      private final short _thriftId;
3009
      private final String _fieldName;
3010
 
3011
      _Fields(short thriftId, String fieldName) {
3012
        _thriftId = thriftId;
3013
        _fieldName = fieldName;
3014
      }
3015
 
3016
      public short getThriftFieldId() {
3017
        return _thriftId;
3018
      }
3019
 
3020
      public String getFieldName() {
3021
        return _fieldName;
3022
      }
3023
    }
3024
 
3025
    // isset id assignments
3026
 
3027
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3028
    static {
3029
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3030
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3031
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
3032
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3033
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_args.class, metaDataMap);
3034
    }
3035
 
3036
    public createPurchaseOrder_args() {
3037
    }
3038
 
3039
    public createPurchaseOrder_args(
3040
      PurchaseOrder purchaseOrder)
3041
    {
3042
      this();
3043
      this.purchaseOrder = purchaseOrder;
3044
    }
3045
 
3046
    /**
3047
     * Performs a deep copy on <i>other</i>.
3048
     */
3049
    public createPurchaseOrder_args(createPurchaseOrder_args other) {
3050
      if (other.isSetPurchaseOrder()) {
3051
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
3052
      }
3053
    }
3054
 
3055
    public createPurchaseOrder_args deepCopy() {
3056
      return new createPurchaseOrder_args(this);
3057
    }
3058
 
3059
    @Override
3060
    public void clear() {
3061
      this.purchaseOrder = null;
3062
    }
3063
 
3064
    public PurchaseOrder getPurchaseOrder() {
3065
      return this.purchaseOrder;
3066
    }
3067
 
3068
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
3069
      this.purchaseOrder = purchaseOrder;
3070
    }
3071
 
3072
    public void unsetPurchaseOrder() {
3073
      this.purchaseOrder = null;
3074
    }
3075
 
3076
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
3077
    public boolean isSetPurchaseOrder() {
3078
      return this.purchaseOrder != null;
3079
    }
3080
 
3081
    public void setPurchaseOrderIsSet(boolean value) {
3082
      if (!value) {
3083
        this.purchaseOrder = null;
3084
      }
3085
    }
3086
 
3087
    public void setFieldValue(_Fields field, Object value) {
3088
      switch (field) {
3089
      case PURCHASE_ORDER:
3090
        if (value == null) {
3091
          unsetPurchaseOrder();
3092
        } else {
3093
          setPurchaseOrder((PurchaseOrder)value);
3094
        }
3095
        break;
3096
 
3097
      }
3098
    }
3099
 
3100
    public Object getFieldValue(_Fields field) {
3101
      switch (field) {
3102
      case PURCHASE_ORDER:
3103
        return getPurchaseOrder();
3104
 
3105
      }
3106
      throw new IllegalStateException();
3107
    }
3108
 
3109
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3110
    public boolean isSet(_Fields field) {
3111
      if (field == null) {
3112
        throw new IllegalArgumentException();
3113
      }
3114
 
3115
      switch (field) {
3116
      case PURCHASE_ORDER:
3117
        return isSetPurchaseOrder();
3118
      }
3119
      throw new IllegalStateException();
3120
    }
3121
 
3122
    @Override
3123
    public boolean equals(Object that) {
3124
      if (that == null)
3125
        return false;
3126
      if (that instanceof createPurchaseOrder_args)
3127
        return this.equals((createPurchaseOrder_args)that);
3128
      return false;
3129
    }
3130
 
3131
    public boolean equals(createPurchaseOrder_args that) {
3132
      if (that == null)
3133
        return false;
3134
 
3135
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
3136
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
3137
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
3138
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
3139
          return false;
3140
        if (!this.purchaseOrder.equals(that.purchaseOrder))
3141
          return false;
3142
      }
3143
 
3144
      return true;
3145
    }
3146
 
3147
    @Override
3148
    public int hashCode() {
3149
      return 0;
3150
    }
3151
 
3152
    public int compareTo(createPurchaseOrder_args other) {
3153
      if (!getClass().equals(other.getClass())) {
3154
        return getClass().getName().compareTo(other.getClass().getName());
3155
      }
3156
 
3157
      int lastComparison = 0;
3158
      createPurchaseOrder_args typedOther = (createPurchaseOrder_args)other;
3159
 
3160
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
3161
      if (lastComparison != 0) {
3162
        return lastComparison;
3163
      }
3164
      if (isSetPurchaseOrder()) {
3165
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
3166
        if (lastComparison != 0) {
3167
          return lastComparison;
3168
        }
3169
      }
3170
      return 0;
3171
    }
3172
 
3173
    public _Fields fieldForId(int fieldId) {
3174
      return _Fields.findByThriftId(fieldId);
3175
    }
3176
 
3177
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3178
      org.apache.thrift.protocol.TField field;
3179
      iprot.readStructBegin();
3180
      while (true)
3181
      {
3182
        field = iprot.readFieldBegin();
3183
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3184
          break;
3185
        }
3186
        switch (field.id) {
3187
          case 1: // PURCHASE_ORDER
3188
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3189
              this.purchaseOrder = new PurchaseOrder();
3190
              this.purchaseOrder.read(iprot);
3191
            } else { 
3192
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3193
            }
3194
            break;
3195
          default:
3196
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3197
        }
3198
        iprot.readFieldEnd();
3199
      }
3200
      iprot.readStructEnd();
3201
      validate();
3202
    }
3203
 
3204
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3205
      validate();
3206
 
3207
      oprot.writeStructBegin(STRUCT_DESC);
3208
      if (this.purchaseOrder != null) {
3209
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
3210
        this.purchaseOrder.write(oprot);
3211
        oprot.writeFieldEnd();
3212
      }
3213
      oprot.writeFieldStop();
3214
      oprot.writeStructEnd();
3215
    }
3216
 
3217
    @Override
3218
    public String toString() {
3219
      StringBuilder sb = new StringBuilder("createPurchaseOrder_args(");
3220
      boolean first = true;
3221
 
3222
      sb.append("purchaseOrder:");
3223
      if (this.purchaseOrder == null) {
3224
        sb.append("null");
3225
      } else {
3226
        sb.append(this.purchaseOrder);
3227
      }
3228
      first = false;
3229
      sb.append(")");
3230
      return sb.toString();
3231
    }
3232
 
3233
    public void validate() throws org.apache.thrift.TException {
3234
      // check for required fields
3235
    }
3236
 
3237
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3238
      try {
3239
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3240
      } catch (org.apache.thrift.TException te) {
3241
        throw new java.io.IOException(te);
3242
      }
3243
    }
3244
 
3245
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3246
      try {
3247
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3248
      } catch (org.apache.thrift.TException te) {
3249
        throw new java.io.IOException(te);
3250
      }
3251
    }
3252
 
3253
  }
3254
 
3255
  public static class createPurchaseOrder_result implements org.apache.thrift.TBase<createPurchaseOrder_result, createPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
3256
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_result");
3257
 
3258
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);
3259
    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
3260
 
3261
    private long success; // required
3262
    private PurchaseServiceException e; // required
3263
 
3264
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3265
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3266
      SUCCESS((short)0, "success"),
3267
      E((short)1, "e");
3268
 
3269
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3270
 
3271
      static {
3272
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3273
          byName.put(field.getFieldName(), field);
3274
        }
3275
      }
3276
 
3277
      /**
3278
       * Find the _Fields constant that matches fieldId, or null if its not found.
3279
       */
3280
      public static _Fields findByThriftId(int fieldId) {
3281
        switch(fieldId) {
3282
          case 0: // SUCCESS
3283
            return SUCCESS;
3284
          case 1: // E
3285
            return E;
3286
          default:
3287
            return null;
3288
        }
3289
      }
3290
 
3291
      /**
3292
       * Find the _Fields constant that matches fieldId, throwing an exception
3293
       * if it is not found.
3294
       */
3295
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3296
        _Fields fields = findByThriftId(fieldId);
3297
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3298
        return fields;
3299
      }
3300
 
3301
      /**
3302
       * Find the _Fields constant that matches name, or null if its not found.
3303
       */
3304
      public static _Fields findByName(String name) {
3305
        return byName.get(name);
3306
      }
3307
 
3308
      private final short _thriftId;
3309
      private final String _fieldName;
3310
 
3311
      _Fields(short thriftId, String fieldName) {
3312
        _thriftId = thriftId;
3313
        _fieldName = fieldName;
3314
      }
3315
 
3316
      public short getThriftFieldId() {
3317
        return _thriftId;
3318
      }
3319
 
3320
      public String getFieldName() {
3321
        return _fieldName;
3322
      }
3323
    }
3324
 
3325
    // isset id assignments
3326
    private static final int __SUCCESS_ISSET_ID = 0;
3327
    private BitSet __isset_bit_vector = new BitSet(1);
3328
 
3329
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3330
    static {
3331
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3332
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3333
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3334
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3335
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3336
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3337
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_result.class, metaDataMap);
3338
    }
3339
 
3340
    public createPurchaseOrder_result() {
3341
    }
3342
 
3343
    public createPurchaseOrder_result(
3344
      long success,
3345
      PurchaseServiceException e)
3346
    {
3347
      this();
3348
      this.success = success;
3349
      setSuccessIsSet(true);
3350
      this.e = e;
3351
    }
3352
 
3353
    /**
3354
     * Performs a deep copy on <i>other</i>.
3355
     */
3356
    public createPurchaseOrder_result(createPurchaseOrder_result other) {
3357
      __isset_bit_vector.clear();
3358
      __isset_bit_vector.or(other.__isset_bit_vector);
3359
      this.success = other.success;
3360
      if (other.isSetE()) {
3361
        this.e = new PurchaseServiceException(other.e);
3362
      }
3363
    }
3364
 
3365
    public createPurchaseOrder_result deepCopy() {
3366
      return new createPurchaseOrder_result(this);
3367
    }
3368
 
3369
    @Override
3370
    public void clear() {
3371
      setSuccessIsSet(false);
3372
      this.success = 0;
3373
      this.e = null;
3374
    }
3375
 
3376
    public long getSuccess() {
3377
      return this.success;
3378
    }
3379
 
3380
    public void setSuccess(long success) {
3381
      this.success = success;
3382
      setSuccessIsSet(true);
3383
    }
3384
 
3385
    public void unsetSuccess() {
3386
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
3387
    }
3388
 
3389
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
3390
    public boolean isSetSuccess() {
3391
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
3392
    }
3393
 
3394
    public void setSuccessIsSet(boolean value) {
3395
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
3396
    }
3397
 
3398
    public PurchaseServiceException getE() {
3399
      return this.e;
3400
    }
3401
 
3402
    public void setE(PurchaseServiceException e) {
3403
      this.e = e;
3404
    }
3405
 
3406
    public void unsetE() {
3407
      this.e = null;
3408
    }
3409
 
3410
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
3411
    public boolean isSetE() {
3412
      return this.e != null;
3413
    }
3414
 
3415
    public void setEIsSet(boolean value) {
3416
      if (!value) {
3417
        this.e = null;
3418
      }
3419
    }
3420
 
3421
    public void setFieldValue(_Fields field, Object value) {
3422
      switch (field) {
3423
      case SUCCESS:
3424
        if (value == null) {
3425
          unsetSuccess();
3426
        } else {
3427
          setSuccess((Long)value);
3428
        }
3429
        break;
3430
 
3431
      case E:
3432
        if (value == null) {
3433
          unsetE();
3434
        } else {
3435
          setE((PurchaseServiceException)value);
3436
        }
3437
        break;
3438
 
3439
      }
3440
    }
3441
 
3442
    public Object getFieldValue(_Fields field) {
3443
      switch (field) {
3444
      case SUCCESS:
3445
        return Long.valueOf(getSuccess());
3446
 
3447
      case E:
3448
        return getE();
3449
 
3450
      }
3451
      throw new IllegalStateException();
3452
    }
3453
 
3454
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3455
    public boolean isSet(_Fields field) {
3456
      if (field == null) {
3457
        throw new IllegalArgumentException();
3458
      }
3459
 
3460
      switch (field) {
3461
      case SUCCESS:
3462
        return isSetSuccess();
3463
      case E:
3464
        return isSetE();
3465
      }
3466
      throw new IllegalStateException();
3467
    }
3468
 
3469
    @Override
3470
    public boolean equals(Object that) {
3471
      if (that == null)
3472
        return false;
3473
      if (that instanceof createPurchaseOrder_result)
3474
        return this.equals((createPurchaseOrder_result)that);
3475
      return false;
3476
    }
3477
 
3478
    public boolean equals(createPurchaseOrder_result that) {
3479
      if (that == null)
3480
        return false;
3481
 
3482
      boolean this_present_success = true;
3483
      boolean that_present_success = true;
3484
      if (this_present_success || that_present_success) {
3485
        if (!(this_present_success && that_present_success))
3486
          return false;
3487
        if (this.success != that.success)
3488
          return false;
3489
      }
3490
 
3491
      boolean this_present_e = true && this.isSetE();
3492
      boolean that_present_e = true && that.isSetE();
3493
      if (this_present_e || that_present_e) {
3494
        if (!(this_present_e && that_present_e))
3495
          return false;
3496
        if (!this.e.equals(that.e))
3497
          return false;
3498
      }
3499
 
3500
      return true;
3501
    }
3502
 
3503
    @Override
3504
    public int hashCode() {
3505
      return 0;
3506
    }
3507
 
3508
    public int compareTo(createPurchaseOrder_result other) {
3509
      if (!getClass().equals(other.getClass())) {
3510
        return getClass().getName().compareTo(other.getClass().getName());
3511
      }
3512
 
3513
      int lastComparison = 0;
3514
      createPurchaseOrder_result typedOther = (createPurchaseOrder_result)other;
3515
 
3516
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3517
      if (lastComparison != 0) {
3518
        return lastComparison;
3519
      }
3520
      if (isSetSuccess()) {
3521
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3522
        if (lastComparison != 0) {
3523
          return lastComparison;
3524
        }
3525
      }
3526
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
3527
      if (lastComparison != 0) {
3528
        return lastComparison;
3529
      }
3530
      if (isSetE()) {
3531
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
3532
        if (lastComparison != 0) {
3533
          return lastComparison;
3534
        }
3535
      }
3536
      return 0;
3537
    }
3538
 
3539
    public _Fields fieldForId(int fieldId) {
3540
      return _Fields.findByThriftId(fieldId);
3541
    }
3542
 
3543
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3544
      org.apache.thrift.protocol.TField field;
3545
      iprot.readStructBegin();
3546
      while (true)
3547
      {
3548
        field = iprot.readFieldBegin();
3549
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3550
          break;
3551
        }
3552
        switch (field.id) {
3553
          case 0: // SUCCESS
3554
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3555
              this.success = iprot.readI64();
3556
              setSuccessIsSet(true);
3557
            } else { 
3558
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3559
            }
3560
            break;
3561
          case 1: // E
3562
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3563
              this.e = new PurchaseServiceException();
3564
              this.e.read(iprot);
3565
            } else { 
3566
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3567
            }
3568
            break;
3569
          default:
3570
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3571
        }
3572
        iprot.readFieldEnd();
3573
      }
3574
      iprot.readStructEnd();
3575
      validate();
3576
    }
3577
 
3578
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3579
      oprot.writeStructBegin(STRUCT_DESC);
3580
 
3581
      if (this.isSetSuccess()) {
3582
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3583
        oprot.writeI64(this.success);
3584
        oprot.writeFieldEnd();
3585
      } else if (this.isSetE()) {
3586
        oprot.writeFieldBegin(E_FIELD_DESC);
3587
        this.e.write(oprot);
3588
        oprot.writeFieldEnd();
3589
      }
3590
      oprot.writeFieldStop();
3591
      oprot.writeStructEnd();
3592
    }
3593
 
3594
    @Override
3595
    public String toString() {
3596
      StringBuilder sb = new StringBuilder("createPurchaseOrder_result(");
3597
      boolean first = true;
3598
 
3599
      sb.append("success:");
3600
      sb.append(this.success);
3601
      first = false;
3602
      if (!first) sb.append(", ");
3603
      sb.append("e:");
3604
      if (this.e == null) {
3605
        sb.append("null");
3606
      } else {
3607
        sb.append(this.e);
3608
      }
3609
      first = false;
3610
      sb.append(")");
3611
      return sb.toString();
3612
    }
3613
 
3614
    public void validate() throws org.apache.thrift.TException {
3615
      // check for required fields
3616
    }
3617
 
3618
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3619
      try {
3620
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3621
      } catch (org.apache.thrift.TException te) {
3622
        throw new java.io.IOException(te);
3623
      }
3624
    }
3625
 
3626
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3627
      try {
3628
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3629
      } catch (org.apache.thrift.TException te) {
3630
        throw new java.io.IOException(te);
3631
      }
3632
    }
3633
 
3634
  }
3635
 
3636
  public static class getPurchaseOrder_args implements org.apache.thrift.TBase<getPurchaseOrder_args, getPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
3637
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_args");
3638
 
3639
    private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);
3640
 
3641
    private long id; // required
3642
 
3643
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3644
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3645
      ID((short)1, "id");
3646
 
3647
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3648
 
3649
      static {
3650
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3651
          byName.put(field.getFieldName(), field);
3652
        }
3653
      }
3654
 
3655
      /**
3656
       * Find the _Fields constant that matches fieldId, or null if its not found.
3657
       */
3658
      public static _Fields findByThriftId(int fieldId) {
3659
        switch(fieldId) {
3660
          case 1: // ID
3661
            return ID;
3662
          default:
3663
            return null;
3664
        }
3665
      }
3666
 
3667
      /**
3668
       * Find the _Fields constant that matches fieldId, throwing an exception
3669
       * if it is not found.
3670
       */
3671
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3672
        _Fields fields = findByThriftId(fieldId);
3673
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3674
        return fields;
3675
      }
3676
 
3677
      /**
3678
       * Find the _Fields constant that matches name, or null if its not found.
3679
       */
3680
      public static _Fields findByName(String name) {
3681
        return byName.get(name);
3682
      }
3683
 
3684
      private final short _thriftId;
3685
      private final String _fieldName;
3686
 
3687
      _Fields(short thriftId, String fieldName) {
3688
        _thriftId = thriftId;
3689
        _fieldName = fieldName;
3690
      }
3691
 
3692
      public short getThriftFieldId() {
3693
        return _thriftId;
3694
      }
3695
 
3696
      public String getFieldName() {
3697
        return _fieldName;
3698
      }
3699
    }
3700
 
3701
    // isset id assignments
3702
    private static final int __ID_ISSET_ID = 0;
3703
    private BitSet __isset_bit_vector = new BitSet(1);
3704
 
3705
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3706
    static {
3707
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3708
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3709
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3710
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3711
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_args.class, metaDataMap);
3712
    }
3713
 
3714
    public getPurchaseOrder_args() {
3715
    }
3716
 
3717
    public getPurchaseOrder_args(
3718
      long id)
3719
    {
3720
      this();
3721
      this.id = id;
3722
      setIdIsSet(true);
3723
    }
3724
 
3725
    /**
3726
     * Performs a deep copy on <i>other</i>.
3727
     */
3728
    public getPurchaseOrder_args(getPurchaseOrder_args other) {
3729
      __isset_bit_vector.clear();
3730
      __isset_bit_vector.or(other.__isset_bit_vector);
3731
      this.id = other.id;
3732
    }
3733
 
3734
    public getPurchaseOrder_args deepCopy() {
3735
      return new getPurchaseOrder_args(this);
3736
    }
3737
 
3738
    @Override
3739
    public void clear() {
3740
      setIdIsSet(false);
3741
      this.id = 0;
3742
    }
3743
 
3744
    public long getId() {
3745
      return this.id;
3746
    }
3747
 
3748
    public void setId(long id) {
3749
      this.id = id;
3750
      setIdIsSet(true);
3751
    }
3752
 
3753
    public void unsetId() {
3754
      __isset_bit_vector.clear(__ID_ISSET_ID);
3755
    }
3756
 
3757
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
3758
    public boolean isSetId() {
3759
      return __isset_bit_vector.get(__ID_ISSET_ID);
3760
    }
3761
 
3762
    public void setIdIsSet(boolean value) {
3763
      __isset_bit_vector.set(__ID_ISSET_ID, value);
3764
    }
3765
 
3766
    public void setFieldValue(_Fields field, Object value) {
3767
      switch (field) {
3768
      case ID:
3769
        if (value == null) {
3770
          unsetId();
3771
        } else {
3772
          setId((Long)value);
3773
        }
3774
        break;
3775
 
3776
      }
3777
    }
3778
 
3779
    public Object getFieldValue(_Fields field) {
3780
      switch (field) {
3781
      case ID:
3782
        return Long.valueOf(getId());
3783
 
3784
      }
3785
      throw new IllegalStateException();
3786
    }
3787
 
3788
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3789
    public boolean isSet(_Fields field) {
3790
      if (field == null) {
3791
        throw new IllegalArgumentException();
3792
      }
3793
 
3794
      switch (field) {
3795
      case ID:
3796
        return isSetId();
3797
      }
3798
      throw new IllegalStateException();
3799
    }
3800
 
3801
    @Override
3802
    public boolean equals(Object that) {
3803
      if (that == null)
3804
        return false;
3805
      if (that instanceof getPurchaseOrder_args)
3806
        return this.equals((getPurchaseOrder_args)that);
3807
      return false;
3808
    }
3809
 
3810
    public boolean equals(getPurchaseOrder_args that) {
3811
      if (that == null)
3812
        return false;
3813
 
3814
      boolean this_present_id = true;
3815
      boolean that_present_id = true;
3816
      if (this_present_id || that_present_id) {
3817
        if (!(this_present_id && that_present_id))
3818
          return false;
3819
        if (this.id != that.id)
3820
          return false;
3821
      }
3822
 
3823
      return true;
3824
    }
3825
 
3826
    @Override
3827
    public int hashCode() {
3828
      return 0;
3829
    }
3830
 
3831
    public int compareTo(getPurchaseOrder_args other) {
3832
      if (!getClass().equals(other.getClass())) {
3833
        return getClass().getName().compareTo(other.getClass().getName());
3834
      }
3835
 
3836
      int lastComparison = 0;
3837
      getPurchaseOrder_args typedOther = (getPurchaseOrder_args)other;
3838
 
3839
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
3840
      if (lastComparison != 0) {
3841
        return lastComparison;
3842
      }
3843
      if (isSetId()) {
3844
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
3845
        if (lastComparison != 0) {
3846
          return lastComparison;
3847
        }
3848
      }
3849
      return 0;
3850
    }
3851
 
3852
    public _Fields fieldForId(int fieldId) {
3853
      return _Fields.findByThriftId(fieldId);
3854
    }
3855
 
3856
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3857
      org.apache.thrift.protocol.TField field;
3858
      iprot.readStructBegin();
3859
      while (true)
3860
      {
3861
        field = iprot.readFieldBegin();
3862
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3863
          break;
3864
        }
3865
        switch (field.id) {
3866
          case 1: // ID
3867
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3868
              this.id = iprot.readI64();
3869
              setIdIsSet(true);
3870
            } else { 
3871
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3872
            }
3873
            break;
3874
          default:
3875
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3876
        }
3877
        iprot.readFieldEnd();
3878
      }
3879
      iprot.readStructEnd();
3880
      validate();
3881
    }
3882
 
3883
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3884
      validate();
3885
 
3886
      oprot.writeStructBegin(STRUCT_DESC);
3887
      oprot.writeFieldBegin(ID_FIELD_DESC);
3888
      oprot.writeI64(this.id);
3889
      oprot.writeFieldEnd();
3890
      oprot.writeFieldStop();
3891
      oprot.writeStructEnd();
3892
    }
3893
 
3894
    @Override
3895
    public String toString() {
3896
      StringBuilder sb = new StringBuilder("getPurchaseOrder_args(");
3897
      boolean first = true;
3898
 
3899
      sb.append("id:");
3900
      sb.append(this.id);
3901
      first = false;
3902
      sb.append(")");
3903
      return sb.toString();
3904
    }
3905
 
3906
    public void validate() throws org.apache.thrift.TException {
3907
      // check for required fields
3908
    }
3909
 
3910
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3911
      try {
3912
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3913
      } catch (org.apache.thrift.TException te) {
3914
        throw new java.io.IOException(te);
3915
      }
3916
    }
3917
 
3918
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3919
      try {
20025 amit.gupta 3920
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
3921
        __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 3922
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3923
      } catch (org.apache.thrift.TException te) {
3924
        throw new java.io.IOException(te);
3925
      }
3926
    }
3927
 
3928
  }
3929
 
3930
  public static class getPurchaseOrder_result implements org.apache.thrift.TBase<getPurchaseOrder_result, getPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
3931
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_result");
3932
 
3933
    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);
3934
    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);
3935
 
3936
    private PurchaseOrder success; // required
3937
    private PurchaseServiceException e; // required
3938
 
3939
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3940
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3941
      SUCCESS((short)0, "success"),
3942
      E((short)1, "e");
3943
 
3944
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3945
 
3946
      static {
3947
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3948
          byName.put(field.getFieldName(), field);
3949
        }
3950
      }
3951
 
3952
      /**
3953
       * Find the _Fields constant that matches fieldId, or null if its not found.
3954
       */
3955
      public static _Fields findByThriftId(int fieldId) {
3956
        switch(fieldId) {
3957
          case 0: // SUCCESS
3958
            return SUCCESS;
3959
          case 1: // E
3960
            return E;
3961
          default:
3962
            return null;
3963
        }
3964
      }
3965
 
3966
      /**
3967
       * Find the _Fields constant that matches fieldId, throwing an exception
3968
       * if it is not found.
3969
       */
3970
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3971
        _Fields fields = findByThriftId(fieldId);
3972
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3973
        return fields;
3974
      }
3975
 
3976
      /**
3977
       * Find the _Fields constant that matches name, or null if its not found.
3978
       */
3979
      public static _Fields findByName(String name) {
3980
        return byName.get(name);
3981
      }
3982
 
3983
      private final short _thriftId;
3984
      private final String _fieldName;
3985
 
3986
      _Fields(short thriftId, String fieldName) {
3987
        _thriftId = thriftId;
3988
        _fieldName = fieldName;
3989
      }
3990
 
3991
      public short getThriftFieldId() {
3992
        return _thriftId;
3993
      }
3994
 
3995
      public String getFieldName() {
3996
        return _fieldName;
3997
      }
3998
    }
3999
 
4000
    // isset id assignments
4001
 
4002
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4003
    static {
4004
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4005
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4006
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
4007
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4008
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4009
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4010
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_result.class, metaDataMap);
4011
    }
4012
 
4013
    public getPurchaseOrder_result() {
4014
    }
4015
 
4016
    public getPurchaseOrder_result(
4017
      PurchaseOrder success,
4018
      PurchaseServiceException e)
4019
    {
4020
      this();
4021
      this.success = success;
4022
      this.e = e;
4023
    }
4024
 
4025
    /**
4026
     * Performs a deep copy on <i>other</i>.
4027
     */
4028
    public getPurchaseOrder_result(getPurchaseOrder_result other) {
4029
      if (other.isSetSuccess()) {
4030
        this.success = new PurchaseOrder(other.success);
4031
      }
4032
      if (other.isSetE()) {
4033
        this.e = new PurchaseServiceException(other.e);
4034
      }
4035
    }
4036
 
4037
    public getPurchaseOrder_result deepCopy() {
4038
      return new getPurchaseOrder_result(this);
4039
    }
4040
 
4041
    @Override
4042
    public void clear() {
4043
      this.success = null;
4044
      this.e = null;
4045
    }
4046
 
4047
    public PurchaseOrder getSuccess() {
4048
      return this.success;
4049
    }
4050
 
4051
    public void setSuccess(PurchaseOrder success) {
4052
      this.success = success;
4053
    }
4054
 
4055
    public void unsetSuccess() {
4056
      this.success = null;
4057
    }
4058
 
4059
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
4060
    public boolean isSetSuccess() {
4061
      return this.success != null;
4062
    }
4063
 
4064
    public void setSuccessIsSet(boolean value) {
4065
      if (!value) {
4066
        this.success = null;
4067
      }
4068
    }
4069
 
4070
    public PurchaseServiceException getE() {
4071
      return this.e;
4072
    }
4073
 
4074
    public void setE(PurchaseServiceException e) {
4075
      this.e = e;
4076
    }
4077
 
4078
    public void unsetE() {
4079
      this.e = null;
4080
    }
4081
 
4082
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
4083
    public boolean isSetE() {
4084
      return this.e != null;
4085
    }
4086
 
4087
    public void setEIsSet(boolean value) {
4088
      if (!value) {
4089
        this.e = null;
4090
      }
4091
    }
4092
 
4093
    public void setFieldValue(_Fields field, Object value) {
4094
      switch (field) {
4095
      case SUCCESS:
4096
        if (value == null) {
4097
          unsetSuccess();
4098
        } else {
4099
          setSuccess((PurchaseOrder)value);
4100
        }
4101
        break;
4102
 
4103
      case E:
4104
        if (value == null) {
4105
          unsetE();
4106
        } else {
4107
          setE((PurchaseServiceException)value);
4108
        }
4109
        break;
4110
 
4111
      }
4112
    }
4113
 
4114
    public Object getFieldValue(_Fields field) {
4115
      switch (field) {
4116
      case SUCCESS:
4117
        return getSuccess();
4118
 
4119
      case E:
4120
        return getE();
4121
 
4122
      }
4123
      throw new IllegalStateException();
4124
    }
4125
 
4126
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4127
    public boolean isSet(_Fields field) {
4128
      if (field == null) {
4129
        throw new IllegalArgumentException();
4130
      }
4131
 
4132
      switch (field) {
4133
      case SUCCESS:
4134
        return isSetSuccess();
4135
      case E:
4136
        return isSetE();
4137
      }
4138
      throw new IllegalStateException();
4139
    }
4140
 
4141
    @Override
4142
    public boolean equals(Object that) {
4143
      if (that == null)
4144
        return false;
4145
      if (that instanceof getPurchaseOrder_result)
4146
        return this.equals((getPurchaseOrder_result)that);
4147
      return false;
4148
    }
4149
 
4150
    public boolean equals(getPurchaseOrder_result that) {
4151
      if (that == null)
4152
        return false;
4153
 
4154
      boolean this_present_success = true && this.isSetSuccess();
4155
      boolean that_present_success = true && that.isSetSuccess();
4156
      if (this_present_success || that_present_success) {
4157
        if (!(this_present_success && that_present_success))
4158
          return false;
4159
        if (!this.success.equals(that.success))
4160
          return false;
4161
      }
4162
 
4163
      boolean this_present_e = true && this.isSetE();
4164
      boolean that_present_e = true && that.isSetE();
4165
      if (this_present_e || that_present_e) {
4166
        if (!(this_present_e && that_present_e))
4167
          return false;
4168
        if (!this.e.equals(that.e))
4169
          return false;
4170
      }
4171
 
4172
      return true;
4173
    }
4174
 
4175
    @Override
4176
    public int hashCode() {
4177
      return 0;
4178
    }
4179
 
4180
    public int compareTo(getPurchaseOrder_result other) {
4181
      if (!getClass().equals(other.getClass())) {
4182
        return getClass().getName().compareTo(other.getClass().getName());
4183
      }
4184
 
4185
      int lastComparison = 0;
4186
      getPurchaseOrder_result typedOther = (getPurchaseOrder_result)other;
4187
 
4188
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
4189
      if (lastComparison != 0) {
4190
        return lastComparison;
4191
      }
4192
      if (isSetSuccess()) {
4193
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4194
        if (lastComparison != 0) {
4195
          return lastComparison;
4196
        }
4197
      }
4198
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
4199
      if (lastComparison != 0) {
4200
        return lastComparison;
4201
      }
4202
      if (isSetE()) {
4203
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
4204
        if (lastComparison != 0) {
4205
          return lastComparison;
4206
        }
4207
      }
4208
      return 0;
4209
    }
4210
 
4211
    public _Fields fieldForId(int fieldId) {
4212
      return _Fields.findByThriftId(fieldId);
4213
    }
4214
 
4215
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4216
      org.apache.thrift.protocol.TField field;
4217
      iprot.readStructBegin();
4218
      while (true)
4219
      {
4220
        field = iprot.readFieldBegin();
4221
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4222
          break;
4223
        }
4224
        switch (field.id) {
4225
          case 0: // SUCCESS
4226
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4227
              this.success = new PurchaseOrder();
4228
              this.success.read(iprot);
4229
            } else { 
4230
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4231
            }
4232
            break;
4233
          case 1: // E
4234
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4235
              this.e = new PurchaseServiceException();
4236
              this.e.read(iprot);
4237
            } else { 
4238
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4239
            }
4240
            break;
4241
          default:
4242
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4243
        }
4244
        iprot.readFieldEnd();
4245
      }
4246
      iprot.readStructEnd();
4247
      validate();
4248
    }
4249
 
4250
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4251
      oprot.writeStructBegin(STRUCT_DESC);
4252
 
4253
      if (this.isSetSuccess()) {
4254
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4255
        this.success.write(oprot);
4256
        oprot.writeFieldEnd();
4257
      } else if (this.isSetE()) {
4258
        oprot.writeFieldBegin(E_FIELD_DESC);
4259
        this.e.write(oprot);
4260
        oprot.writeFieldEnd();
4261
      }
4262
      oprot.writeFieldStop();
4263
      oprot.writeStructEnd();
4264
    }
4265
 
4266
    @Override
4267
    public String toString() {
4268
      StringBuilder sb = new StringBuilder("getPurchaseOrder_result(");
4269
      boolean first = true;
4270
 
4271
      sb.append("success:");
4272
      if (this.success == null) {
4273
        sb.append("null");
4274
      } else {
4275
        sb.append(this.success);
4276
      }
4277
      first = false;
4278
      if (!first) sb.append(", ");
4279
      sb.append("e:");
4280
      if (this.e == null) {
4281
        sb.append("null");
4282
      } else {
4283
        sb.append(this.e);
4284
      }
4285
      first = false;
4286
      sb.append(")");
4287
      return sb.toString();
4288
    }
4289
 
4290
    public void validate() throws org.apache.thrift.TException {
4291
      // check for required fields
4292
    }
4293
 
4294
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4295
      try {
4296
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4297
      } catch (org.apache.thrift.TException te) {
4298
        throw new java.io.IOException(te);
4299
      }
4300
    }
4301
 
4302
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4303
      try {
4304
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4305
      } catch (org.apache.thrift.TException te) {
4306
        throw new java.io.IOException(te);
4307
      }
4308
    }
4309
 
4310
  }
4311
 
4312
  public static class getAllPurchaseOrders_args implements org.apache.thrift.TBase<getAllPurchaseOrders_args, getAllPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
4313
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_args");
4314
 
4315
    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);
4316
 
4317
    private POStatus status; // required
4318
 
4319
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4320
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4321
      /**
4322
       * 
4323
       * @see POStatus
4324
       */
4325
      STATUS((short)1, "status");
4326
 
4327
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4328
 
4329
      static {
4330
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4331
          byName.put(field.getFieldName(), field);
4332
        }
4333
      }
4334
 
4335
      /**
4336
       * Find the _Fields constant that matches fieldId, or null if its not found.
4337
       */
4338
      public static _Fields findByThriftId(int fieldId) {
4339
        switch(fieldId) {
4340
          case 1: // STATUS
4341
            return STATUS;
4342
          default:
4343
            return null;
4344
        }
4345
      }
4346
 
4347
      /**
4348
       * Find the _Fields constant that matches fieldId, throwing an exception
4349
       * if it is not found.
4350
       */
4351
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4352
        _Fields fields = findByThriftId(fieldId);
4353
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4354
        return fields;
4355
      }
4356
 
4357
      /**
4358
       * Find the _Fields constant that matches name, or null if its not found.
4359
       */
4360
      public static _Fields findByName(String name) {
4361
        return byName.get(name);
4362
      }
4363
 
4364
      private final short _thriftId;
4365
      private final String _fieldName;
4366
 
4367
      _Fields(short thriftId, String fieldName) {
4368
        _thriftId = thriftId;
4369
        _fieldName = fieldName;
4370
      }
4371
 
4372
      public short getThriftFieldId() {
4373
        return _thriftId;
4374
      }
4375
 
4376
      public String getFieldName() {
4377
        return _fieldName;
4378
      }
4379
    }
4380
 
4381
    // isset id assignments
4382
 
4383
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4384
    static {
4385
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4386
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4387
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, POStatus.class)));
4388
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4389
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_args.class, metaDataMap);
4390
    }
4391
 
4392
    public getAllPurchaseOrders_args() {
4393
    }
4394
 
4395
    public getAllPurchaseOrders_args(
4396
      POStatus status)
4397
    {
4398
      this();
4399
      this.status = status;
4400
    }
4401
 
4402
    /**
4403
     * Performs a deep copy on <i>other</i>.
4404
     */
4405
    public getAllPurchaseOrders_args(getAllPurchaseOrders_args other) {
4406
      if (other.isSetStatus()) {
4407
        this.status = other.status;
4408
      }
4409
    }
4410
 
4411
    public getAllPurchaseOrders_args deepCopy() {
4412
      return new getAllPurchaseOrders_args(this);
4413
    }
4414
 
4415
    @Override
4416
    public void clear() {
4417
      this.status = null;
4418
    }
4419
 
4420
    /**
4421
     * 
4422
     * @see POStatus
4423
     */
4424
    public POStatus getStatus() {
4425
      return this.status;
4426
    }
4427
 
4428
    /**
4429
     * 
4430
     * @see POStatus
4431
     */
4432
    public void setStatus(POStatus status) {
4433
      this.status = status;
4434
    }
4435
 
4436
    public void unsetStatus() {
4437
      this.status = null;
4438
    }
4439
 
4440
    /** Returns true if field status is set (has been assigned a value) and false otherwise */
4441
    public boolean isSetStatus() {
4442
      return this.status != null;
4443
    }
4444
 
4445
    public void setStatusIsSet(boolean value) {
4446
      if (!value) {
4447
        this.status = null;
4448
      }
4449
    }
4450
 
4451
    public void setFieldValue(_Fields field, Object value) {
4452
      switch (field) {
4453
      case STATUS:
4454
        if (value == null) {
4455
          unsetStatus();
4456
        } else {
4457
          setStatus((POStatus)value);
4458
        }
4459
        break;
4460
 
4461
      }
4462
    }
4463
 
4464
    public Object getFieldValue(_Fields field) {
4465
      switch (field) {
4466
      case STATUS:
4467
        return getStatus();
4468
 
4469
      }
4470
      throw new IllegalStateException();
4471
    }
4472
 
4473
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4474
    public boolean isSet(_Fields field) {
4475
      if (field == null) {
4476
        throw new IllegalArgumentException();
4477
      }
4478
 
4479
      switch (field) {
4480
      case STATUS:
4481
        return isSetStatus();
4482
      }
4483
      throw new IllegalStateException();
4484
    }
4485
 
4486
    @Override
4487
    public boolean equals(Object that) {
4488
      if (that == null)
4489
        return false;
4490
      if (that instanceof getAllPurchaseOrders_args)
4491
        return this.equals((getAllPurchaseOrders_args)that);
4492
      return false;
4493
    }
4494
 
4495
    public boolean equals(getAllPurchaseOrders_args that) {
4496
      if (that == null)
4497
        return false;
4498
 
4499
      boolean this_present_status = true && this.isSetStatus();
4500
      boolean that_present_status = true && that.isSetStatus();
4501
      if (this_present_status || that_present_status) {
4502
        if (!(this_present_status && that_present_status))
4503
          return false;
4504
        if (!this.status.equals(that.status))
4505
          return false;
4506
      }
4507
 
4508
      return true;
4509
    }
4510
 
4511
    @Override
4512
    public int hashCode() {
4513
      return 0;
4514
    }
4515
 
4516
    public int compareTo(getAllPurchaseOrders_args other) {
4517
      if (!getClass().equals(other.getClass())) {
4518
        return getClass().getName().compareTo(other.getClass().getName());
4519
      }
4520
 
4521
      int lastComparison = 0;
4522
      getAllPurchaseOrders_args typedOther = (getAllPurchaseOrders_args)other;
4523
 
4524
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
4525
      if (lastComparison != 0) {
4526
        return lastComparison;
4527
      }
4528
      if (isSetStatus()) {
4529
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
4530
        if (lastComparison != 0) {
4531
          return lastComparison;
4532
        }
4533
      }
4534
      return 0;
4535
    }
4536
 
4537
    public _Fields fieldForId(int fieldId) {
4538
      return _Fields.findByThriftId(fieldId);
4539
    }
4540
 
4541
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4542
      org.apache.thrift.protocol.TField field;
4543
      iprot.readStructBegin();
4544
      while (true)
4545
      {
4546
        field = iprot.readFieldBegin();
4547
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4548
          break;
4549
        }
4550
        switch (field.id) {
4551
          case 1: // STATUS
4552
            if (field.type == org.apache.thrift.protocol.TType.I32) {
4553
              this.status = POStatus.findByValue(iprot.readI32());
4554
            } else { 
4555
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4556
            }
4557
            break;
4558
          default:
4559
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4560
        }
4561
        iprot.readFieldEnd();
4562
      }
4563
      iprot.readStructEnd();
4564
      validate();
4565
    }
4566
 
4567
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4568
      validate();
4569
 
4570
      oprot.writeStructBegin(STRUCT_DESC);
4571
      if (this.status != null) {
4572
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4573
        oprot.writeI32(this.status.getValue());
4574
        oprot.writeFieldEnd();
4575
      }
4576
      oprot.writeFieldStop();
4577
      oprot.writeStructEnd();
4578
    }
4579
 
4580
    @Override
4581
    public String toString() {
4582
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_args(");
4583
      boolean first = true;
4584
 
4585
      sb.append("status:");
4586
      if (this.status == null) {
4587
        sb.append("null");
4588
      } else {
4589
        sb.append(this.status);
4590
      }
4591
      first = false;
4592
      sb.append(")");
4593
      return sb.toString();
4594
    }
4595
 
4596
    public void validate() throws org.apache.thrift.TException {
4597
      // check for required fields
4598
    }
4599
 
4600
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4601
      try {
4602
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4603
      } catch (org.apache.thrift.TException te) {
4604
        throw new java.io.IOException(te);
4605
      }
4606
    }
4607
 
4608
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4609
      try {
4610
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4611
      } catch (org.apache.thrift.TException te) {
4612
        throw new java.io.IOException(te);
4613
      }
4614
    }
4615
 
4616
  }
4617
 
4618
  public static class getAllPurchaseOrders_result implements org.apache.thrift.TBase<getAllPurchaseOrders_result, getAllPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
4619
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_result");
4620
 
4621
    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);
4622
    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);
4623
 
4624
    private List<PurchaseOrder> success; // required
4625
    private PurchaseServiceException e; // required
4626
 
4627
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4628
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4629
      SUCCESS((short)0, "success"),
4630
      E((short)1, "e");
4631
 
4632
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4633
 
4634
      static {
4635
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4636
          byName.put(field.getFieldName(), field);
4637
        }
4638
      }
4639
 
4640
      /**
4641
       * Find the _Fields constant that matches fieldId, or null if its not found.
4642
       */
4643
      public static _Fields findByThriftId(int fieldId) {
4644
        switch(fieldId) {
4645
          case 0: // SUCCESS
4646
            return SUCCESS;
4647
          case 1: // E
4648
            return E;
4649
          default:
4650
            return null;
4651
        }
4652
      }
4653
 
4654
      /**
4655
       * Find the _Fields constant that matches fieldId, throwing an exception
4656
       * if it is not found.
4657
       */
4658
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4659
        _Fields fields = findByThriftId(fieldId);
4660
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4661
        return fields;
4662
      }
4663
 
4664
      /**
4665
       * Find the _Fields constant that matches name, or null if its not found.
4666
       */
4667
      public static _Fields findByName(String name) {
4668
        return byName.get(name);
4669
      }
4670
 
4671
      private final short _thriftId;
4672
      private final String _fieldName;
4673
 
4674
      _Fields(short thriftId, String fieldName) {
4675
        _thriftId = thriftId;
4676
        _fieldName = fieldName;
4677
      }
4678
 
4679
      public short getThriftFieldId() {
4680
        return _thriftId;
4681
      }
4682
 
4683
      public String getFieldName() {
4684
        return _fieldName;
4685
      }
4686
    }
4687
 
4688
    // isset id assignments
4689
 
4690
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4691
    static {
4692
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4693
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4694
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
4695
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
4696
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4697
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4698
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4699
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_result.class, metaDataMap);
4700
    }
4701
 
4702
    public getAllPurchaseOrders_result() {
4703
    }
4704
 
4705
    public getAllPurchaseOrders_result(
4706
      List<PurchaseOrder> success,
4707
      PurchaseServiceException e)
4708
    {
4709
      this();
4710
      this.success = success;
4711
      this.e = e;
4712
    }
4713
 
4714
    /**
4715
     * Performs a deep copy on <i>other</i>.
4716
     */
4717
    public getAllPurchaseOrders_result(getAllPurchaseOrders_result other) {
4718
      if (other.isSetSuccess()) {
4719
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
4720
        for (PurchaseOrder other_element : other.success) {
4721
          __this__success.add(new PurchaseOrder(other_element));
4722
        }
4723
        this.success = __this__success;
4724
      }
4725
      if (other.isSetE()) {
4726
        this.e = new PurchaseServiceException(other.e);
4727
      }
4728
    }
4729
 
4730
    public getAllPurchaseOrders_result deepCopy() {
4731
      return new getAllPurchaseOrders_result(this);
4732
    }
4733
 
4734
    @Override
4735
    public void clear() {
4736
      this.success = null;
4737
      this.e = null;
4738
    }
4739
 
4740
    public int getSuccessSize() {
4741
      return (this.success == null) ? 0 : this.success.size();
4742
    }
4743
 
4744
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
4745
      return (this.success == null) ? null : this.success.iterator();
4746
    }
4747
 
4748
    public void addToSuccess(PurchaseOrder elem) {
4749
      if (this.success == null) {
4750
        this.success = new ArrayList<PurchaseOrder>();
4751
      }
4752
      this.success.add(elem);
4753
    }
4754
 
4755
    public List<PurchaseOrder> getSuccess() {
4756
      return this.success;
4757
    }
4758
 
4759
    public void setSuccess(List<PurchaseOrder> success) {
4760
      this.success = success;
4761
    }
4762
 
4763
    public void unsetSuccess() {
4764
      this.success = null;
4765
    }
4766
 
4767
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
4768
    public boolean isSetSuccess() {
4769
      return this.success != null;
4770
    }
4771
 
4772
    public void setSuccessIsSet(boolean value) {
4773
      if (!value) {
4774
        this.success = null;
4775
      }
4776
    }
4777
 
4778
    public PurchaseServiceException getE() {
4779
      return this.e;
4780
    }
4781
 
4782
    public void setE(PurchaseServiceException e) {
4783
      this.e = e;
4784
    }
4785
 
4786
    public void unsetE() {
4787
      this.e = null;
4788
    }
4789
 
4790
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
4791
    public boolean isSetE() {
4792
      return this.e != null;
4793
    }
4794
 
4795
    public void setEIsSet(boolean value) {
4796
      if (!value) {
4797
        this.e = null;
4798
      }
4799
    }
4800
 
4801
    public void setFieldValue(_Fields field, Object value) {
4802
      switch (field) {
4803
      case SUCCESS:
4804
        if (value == null) {
4805
          unsetSuccess();
4806
        } else {
4807
          setSuccess((List<PurchaseOrder>)value);
4808
        }
4809
        break;
4810
 
4811
      case E:
4812
        if (value == null) {
4813
          unsetE();
4814
        } else {
4815
          setE((PurchaseServiceException)value);
4816
        }
4817
        break;
4818
 
4819
      }
4820
    }
4821
 
4822
    public Object getFieldValue(_Fields field) {
4823
      switch (field) {
4824
      case SUCCESS:
4825
        return getSuccess();
4826
 
4827
      case E:
4828
        return getE();
4829
 
4830
      }
4831
      throw new IllegalStateException();
4832
    }
4833
 
4834
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4835
    public boolean isSet(_Fields field) {
4836
      if (field == null) {
4837
        throw new IllegalArgumentException();
4838
      }
4839
 
4840
      switch (field) {
4841
      case SUCCESS:
4842
        return isSetSuccess();
4843
      case E:
4844
        return isSetE();
4845
      }
4846
      throw new IllegalStateException();
4847
    }
4848
 
4849
    @Override
4850
    public boolean equals(Object that) {
4851
      if (that == null)
4852
        return false;
4853
      if (that instanceof getAllPurchaseOrders_result)
4854
        return this.equals((getAllPurchaseOrders_result)that);
4855
      return false;
4856
    }
4857
 
4858
    public boolean equals(getAllPurchaseOrders_result that) {
4859
      if (that == null)
4860
        return false;
4861
 
4862
      boolean this_present_success = true && this.isSetSuccess();
4863
      boolean that_present_success = true && that.isSetSuccess();
4864
      if (this_present_success || that_present_success) {
4865
        if (!(this_present_success && that_present_success))
4866
          return false;
4867
        if (!this.success.equals(that.success))
4868
          return false;
4869
      }
4870
 
4871
      boolean this_present_e = true && this.isSetE();
4872
      boolean that_present_e = true && that.isSetE();
4873
      if (this_present_e || that_present_e) {
4874
        if (!(this_present_e && that_present_e))
4875
          return false;
4876
        if (!this.e.equals(that.e))
4877
          return false;
4878
      }
4879
 
4880
      return true;
4881
    }
4882
 
4883
    @Override
4884
    public int hashCode() {
4885
      return 0;
4886
    }
4887
 
4888
    public int compareTo(getAllPurchaseOrders_result other) {
4889
      if (!getClass().equals(other.getClass())) {
4890
        return getClass().getName().compareTo(other.getClass().getName());
4891
      }
4892
 
4893
      int lastComparison = 0;
4894
      getAllPurchaseOrders_result typedOther = (getAllPurchaseOrders_result)other;
4895
 
4896
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
4897
      if (lastComparison != 0) {
4898
        return lastComparison;
4899
      }
4900
      if (isSetSuccess()) {
4901
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4902
        if (lastComparison != 0) {
4903
          return lastComparison;
4904
        }
4905
      }
4906
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
4907
      if (lastComparison != 0) {
4908
        return lastComparison;
4909
      }
4910
      if (isSetE()) {
4911
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
4912
        if (lastComparison != 0) {
4913
          return lastComparison;
4914
        }
4915
      }
4916
      return 0;
4917
    }
4918
 
4919
    public _Fields fieldForId(int fieldId) {
4920
      return _Fields.findByThriftId(fieldId);
4921
    }
4922
 
4923
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4924
      org.apache.thrift.protocol.TField field;
4925
      iprot.readStructBegin();
4926
      while (true)
4927
      {
4928
        field = iprot.readFieldBegin();
4929
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4930
          break;
4931
        }
4932
        switch (field.id) {
4933
          case 0: // SUCCESS
4934
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
4935
              {
4936
                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
4937
                this.success = new ArrayList<PurchaseOrder>(_list4.size);
4938
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
4939
                {
4940
                  PurchaseOrder _elem6; // required
4941
                  _elem6 = new PurchaseOrder();
4942
                  _elem6.read(iprot);
4943
                  this.success.add(_elem6);
4944
                }
4945
                iprot.readListEnd();
4946
              }
4947
            } else { 
4948
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4949
            }
4950
            break;
4951
          case 1: // E
4952
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4953
              this.e = new PurchaseServiceException();
4954
              this.e.read(iprot);
4955
            } else { 
4956
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4957
            }
4958
            break;
4959
          default:
4960
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4961
        }
4962
        iprot.readFieldEnd();
4963
      }
4964
      iprot.readStructEnd();
4965
      validate();
4966
    }
4967
 
4968
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4969
      oprot.writeStructBegin(STRUCT_DESC);
4970
 
4971
      if (this.isSetSuccess()) {
4972
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4973
        {
4974
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
4975
          for (PurchaseOrder _iter7 : this.success)
4976
          {
4977
            _iter7.write(oprot);
4978
          }
4979
          oprot.writeListEnd();
4980
        }
4981
        oprot.writeFieldEnd();
4982
      } else if (this.isSetE()) {
4983
        oprot.writeFieldBegin(E_FIELD_DESC);
4984
        this.e.write(oprot);
4985
        oprot.writeFieldEnd();
4986
      }
4987
      oprot.writeFieldStop();
4988
      oprot.writeStructEnd();
4989
    }
4990
 
4991
    @Override
4992
    public String toString() {
4993
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_result(");
4994
      boolean first = true;
4995
 
4996
      sb.append("success:");
4997
      if (this.success == null) {
4998
        sb.append("null");
4999
      } else {
5000
        sb.append(this.success);
5001
      }
5002
      first = false;
5003
      if (!first) sb.append(", ");
5004
      sb.append("e:");
5005
      if (this.e == null) {
5006
        sb.append("null");
5007
      } else {
5008
        sb.append(this.e);
5009
      }
5010
      first = false;
5011
      sb.append(")");
5012
      return sb.toString();
5013
    }
5014
 
5015
    public void validate() throws org.apache.thrift.TException {
5016
      // check for required fields
5017
    }
5018
 
5019
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5020
      try {
5021
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5022
      } catch (org.apache.thrift.TException te) {
5023
        throw new java.io.IOException(te);
5024
      }
5025
    }
5026
 
5027
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5028
      try {
5029
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5030
      } catch (org.apache.thrift.TException te) {
5031
        throw new java.io.IOException(te);
5032
      }
5033
    }
5034
 
5035
  }
5036
 
5037
  public static class getSupplier_args implements org.apache.thrift.TBase<getSupplier_args, getSupplier_args._Fields>, java.io.Serializable, Cloneable   {
5038
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_args");
5039
 
5040
    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);
5041
 
5042
    private long id; // required
5043
 
5044
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5045
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5046
      ID((short)1, "id");
5047
 
5048
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5049
 
5050
      static {
5051
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5052
          byName.put(field.getFieldName(), field);
5053
        }
5054
      }
5055
 
5056
      /**
5057
       * Find the _Fields constant that matches fieldId, or null if its not found.
5058
       */
5059
      public static _Fields findByThriftId(int fieldId) {
5060
        switch(fieldId) {
5061
          case 1: // ID
5062
            return ID;
5063
          default:
5064
            return null;
5065
        }
5066
      }
5067
 
5068
      /**
5069
       * Find the _Fields constant that matches fieldId, throwing an exception
5070
       * if it is not found.
5071
       */
5072
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5073
        _Fields fields = findByThriftId(fieldId);
5074
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5075
        return fields;
5076
      }
5077
 
5078
      /**
5079
       * Find the _Fields constant that matches name, or null if its not found.
5080
       */
5081
      public static _Fields findByName(String name) {
5082
        return byName.get(name);
5083
      }
5084
 
5085
      private final short _thriftId;
5086
      private final String _fieldName;
5087
 
5088
      _Fields(short thriftId, String fieldName) {
5089
        _thriftId = thriftId;
5090
        _fieldName = fieldName;
5091
      }
5092
 
5093
      public short getThriftFieldId() {
5094
        return _thriftId;
5095
      }
5096
 
5097
      public String getFieldName() {
5098
        return _fieldName;
5099
      }
5100
    }
5101
 
5102
    // isset id assignments
5103
    private static final int __ID_ISSET_ID = 0;
5104
    private BitSet __isset_bit_vector = new BitSet(1);
5105
 
5106
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5107
    static {
5108
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5109
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5110
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5111
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5112
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_args.class, metaDataMap);
5113
    }
5114
 
5115
    public getSupplier_args() {
5116
    }
5117
 
5118
    public getSupplier_args(
5119
      long id)
5120
    {
5121
      this();
5122
      this.id = id;
5123
      setIdIsSet(true);
5124
    }
5125
 
5126
    /**
5127
     * Performs a deep copy on <i>other</i>.
5128
     */
5129
    public getSupplier_args(getSupplier_args other) {
5130
      __isset_bit_vector.clear();
5131
      __isset_bit_vector.or(other.__isset_bit_vector);
5132
      this.id = other.id;
5133
    }
5134
 
5135
    public getSupplier_args deepCopy() {
5136
      return new getSupplier_args(this);
5137
    }
5138
 
5139
    @Override
5140
    public void clear() {
5141
      setIdIsSet(false);
5142
      this.id = 0;
5143
    }
5144
 
5145
    public long getId() {
5146
      return this.id;
5147
    }
5148
 
5149
    public void setId(long id) {
5150
      this.id = id;
5151
      setIdIsSet(true);
5152
    }
5153
 
5154
    public void unsetId() {
5155
      __isset_bit_vector.clear(__ID_ISSET_ID);
5156
    }
5157
 
5158
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
5159
    public boolean isSetId() {
5160
      return __isset_bit_vector.get(__ID_ISSET_ID);
5161
    }
5162
 
5163
    public void setIdIsSet(boolean value) {
5164
      __isset_bit_vector.set(__ID_ISSET_ID, value);
5165
    }
5166
 
5167
    public void setFieldValue(_Fields field, Object value) {
5168
      switch (field) {
5169
      case ID:
5170
        if (value == null) {
5171
          unsetId();
5172
        } else {
5173
          setId((Long)value);
5174
        }
5175
        break;
5176
 
5177
      }
5178
    }
5179
 
5180
    public Object getFieldValue(_Fields field) {
5181
      switch (field) {
5182
      case ID:
5183
        return Long.valueOf(getId());
5184
 
5185
      }
5186
      throw new IllegalStateException();
5187
    }
5188
 
5189
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5190
    public boolean isSet(_Fields field) {
5191
      if (field == null) {
5192
        throw new IllegalArgumentException();
5193
      }
5194
 
5195
      switch (field) {
5196
      case ID:
5197
        return isSetId();
5198
      }
5199
      throw new IllegalStateException();
5200
    }
5201
 
5202
    @Override
5203
    public boolean equals(Object that) {
5204
      if (that == null)
5205
        return false;
5206
      if (that instanceof getSupplier_args)
5207
        return this.equals((getSupplier_args)that);
5208
      return false;
5209
    }
5210
 
5211
    public boolean equals(getSupplier_args that) {
5212
      if (that == null)
5213
        return false;
5214
 
5215
      boolean this_present_id = true;
5216
      boolean that_present_id = true;
5217
      if (this_present_id || that_present_id) {
5218
        if (!(this_present_id && that_present_id))
5219
          return false;
5220
        if (this.id != that.id)
5221
          return false;
5222
      }
5223
 
5224
      return true;
5225
    }
5226
 
5227
    @Override
5228
    public int hashCode() {
5229
      return 0;
5230
    }
5231
 
5232
    public int compareTo(getSupplier_args other) {
5233
      if (!getClass().equals(other.getClass())) {
5234
        return getClass().getName().compareTo(other.getClass().getName());
5235
      }
5236
 
5237
      int lastComparison = 0;
5238
      getSupplier_args typedOther = (getSupplier_args)other;
5239
 
5240
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
5241
      if (lastComparison != 0) {
5242
        return lastComparison;
5243
      }
5244
      if (isSetId()) {
5245
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
5246
        if (lastComparison != 0) {
5247
          return lastComparison;
5248
        }
5249
      }
5250
      return 0;
5251
    }
5252
 
5253
    public _Fields fieldForId(int fieldId) {
5254
      return _Fields.findByThriftId(fieldId);
5255
    }
5256
 
5257
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5258
      org.apache.thrift.protocol.TField field;
5259
      iprot.readStructBegin();
5260
      while (true)
5261
      {
5262
        field = iprot.readFieldBegin();
5263
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5264
          break;
5265
        }
5266
        switch (field.id) {
5267
          case 1: // ID
5268
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5269
              this.id = iprot.readI64();
5270
              setIdIsSet(true);
5271
            } else { 
5272
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5273
            }
5274
            break;
5275
          default:
5276
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5277
        }
5278
        iprot.readFieldEnd();
5279
      }
5280
      iprot.readStructEnd();
5281
      validate();
5282
    }
5283
 
5284
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5285
      validate();
5286
 
5287
      oprot.writeStructBegin(STRUCT_DESC);
5288
      oprot.writeFieldBegin(ID_FIELD_DESC);
5289
      oprot.writeI64(this.id);
5290
      oprot.writeFieldEnd();
5291
      oprot.writeFieldStop();
5292
      oprot.writeStructEnd();
5293
    }
5294
 
5295
    @Override
5296
    public String toString() {
5297
      StringBuilder sb = new StringBuilder("getSupplier_args(");
5298
      boolean first = true;
5299
 
5300
      sb.append("id:");
5301
      sb.append(this.id);
5302
      first = false;
5303
      sb.append(")");
5304
      return sb.toString();
5305
    }
5306
 
5307
    public void validate() throws org.apache.thrift.TException {
5308
      // check for required fields
5309
    }
5310
 
5311
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5312
      try {
5313
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5314
      } catch (org.apache.thrift.TException te) {
5315
        throw new java.io.IOException(te);
5316
      }
5317
    }
5318
 
5319
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5320
      try {
5321
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5322
      } catch (org.apache.thrift.TException te) {
5323
        throw new java.io.IOException(te);
5324
      }
5325
    }
5326
 
5327
  }
5328
 
5329
  public static class getSupplier_result implements org.apache.thrift.TBase<getSupplier_result, getSupplier_result._Fields>, java.io.Serializable, Cloneable   {
5330
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_result");
5331
 
5332
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
5333
    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
5334
 
5335
    private Supplier success; // required
5336
    private PurchaseServiceException e; // required
5337
 
5338
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5339
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5340
      SUCCESS((short)0, "success"),
5341
      E((short)1, "e");
5342
 
5343
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5344
 
5345
      static {
5346
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5347
          byName.put(field.getFieldName(), field);
5348
        }
5349
      }
5350
 
5351
      /**
5352
       * Find the _Fields constant that matches fieldId, or null if its not found.
5353
       */
5354
      public static _Fields findByThriftId(int fieldId) {
5355
        switch(fieldId) {
5356
          case 0: // SUCCESS
5357
            return SUCCESS;
5358
          case 1: // E
5359
            return E;
5360
          default:
5361
            return null;
5362
        }
5363
      }
5364
 
5365
      /**
5366
       * Find the _Fields constant that matches fieldId, throwing an exception
5367
       * if it is not found.
5368
       */
5369
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5370
        _Fields fields = findByThriftId(fieldId);
5371
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5372
        return fields;
5373
      }
5374
 
5375
      /**
5376
       * Find the _Fields constant that matches name, or null if its not found.
5377
       */
5378
      public static _Fields findByName(String name) {
5379
        return byName.get(name);
5380
      }
5381
 
5382
      private final short _thriftId;
5383
      private final String _fieldName;
5384
 
5385
      _Fields(short thriftId, String fieldName) {
5386
        _thriftId = thriftId;
5387
        _fieldName = fieldName;
5388
      }
5389
 
5390
      public short getThriftFieldId() {
5391
        return _thriftId;
5392
      }
5393
 
5394
      public String getFieldName() {
5395
        return _fieldName;
5396
      }
5397
    }
5398
 
5399
    // isset id assignments
5400
 
5401
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5402
    static {
5403
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5404
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5405
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
5406
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5407
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5408
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5409
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_result.class, metaDataMap);
5410
    }
5411
 
5412
    public getSupplier_result() {
5413
    }
5414
 
5415
    public getSupplier_result(
5416
      Supplier success,
5417
      PurchaseServiceException e)
5418
    {
5419
      this();
5420
      this.success = success;
5421
      this.e = e;
5422
    }
5423
 
5424
    /**
5425
     * Performs a deep copy on <i>other</i>.
5426
     */
5427
    public getSupplier_result(getSupplier_result other) {
5428
      if (other.isSetSuccess()) {
5429
        this.success = new Supplier(other.success);
5430
      }
5431
      if (other.isSetE()) {
5432
        this.e = new PurchaseServiceException(other.e);
5433
      }
5434
    }
5435
 
5436
    public getSupplier_result deepCopy() {
5437
      return new getSupplier_result(this);
5438
    }
5439
 
5440
    @Override
5441
    public void clear() {
5442
      this.success = null;
5443
      this.e = null;
5444
    }
5445
 
5446
    public Supplier getSuccess() {
5447
      return this.success;
5448
    }
5449
 
5450
    public void setSuccess(Supplier success) {
5451
      this.success = success;
5452
    }
5453
 
5454
    public void unsetSuccess() {
5455
      this.success = null;
5456
    }
5457
 
5458
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5459
    public boolean isSetSuccess() {
5460
      return this.success != null;
5461
    }
5462
 
5463
    public void setSuccessIsSet(boolean value) {
5464
      if (!value) {
5465
        this.success = null;
5466
      }
5467
    }
5468
 
5469
    public PurchaseServiceException getE() {
5470
      return this.e;
5471
    }
5472
 
5473
    public void setE(PurchaseServiceException e) {
5474
      this.e = e;
5475
    }
5476
 
5477
    public void unsetE() {
5478
      this.e = null;
5479
    }
5480
 
5481
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
5482
    public boolean isSetE() {
5483
      return this.e != null;
5484
    }
5485
 
5486
    public void setEIsSet(boolean value) {
5487
      if (!value) {
5488
        this.e = null;
5489
      }
5490
    }
5491
 
5492
    public void setFieldValue(_Fields field, Object value) {
5493
      switch (field) {
5494
      case SUCCESS:
5495
        if (value == null) {
5496
          unsetSuccess();
5497
        } else {
5498
          setSuccess((Supplier)value);
5499
        }
5500
        break;
5501
 
5502
      case E:
5503
        if (value == null) {
5504
          unsetE();
5505
        } else {
5506
          setE((PurchaseServiceException)value);
5507
        }
5508
        break;
5509
 
5510
      }
5511
    }
5512
 
5513
    public Object getFieldValue(_Fields field) {
5514
      switch (field) {
5515
      case SUCCESS:
5516
        return getSuccess();
5517
 
5518
      case E:
5519
        return getE();
5520
 
5521
      }
5522
      throw new IllegalStateException();
5523
    }
5524
 
5525
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5526
    public boolean isSet(_Fields field) {
5527
      if (field == null) {
5528
        throw new IllegalArgumentException();
5529
      }
5530
 
5531
      switch (field) {
5532
      case SUCCESS:
5533
        return isSetSuccess();
5534
      case E:
5535
        return isSetE();
5536
      }
5537
      throw new IllegalStateException();
5538
    }
5539
 
5540
    @Override
5541
    public boolean equals(Object that) {
5542
      if (that == null)
5543
        return false;
5544
      if (that instanceof getSupplier_result)
5545
        return this.equals((getSupplier_result)that);
5546
      return false;
5547
    }
5548
 
5549
    public boolean equals(getSupplier_result that) {
5550
      if (that == null)
5551
        return false;
5552
 
5553
      boolean this_present_success = true && this.isSetSuccess();
5554
      boolean that_present_success = true && that.isSetSuccess();
5555
      if (this_present_success || that_present_success) {
5556
        if (!(this_present_success && that_present_success))
5557
          return false;
5558
        if (!this.success.equals(that.success))
5559
          return false;
5560
      }
5561
 
5562
      boolean this_present_e = true && this.isSetE();
5563
      boolean that_present_e = true && that.isSetE();
5564
      if (this_present_e || that_present_e) {
5565
        if (!(this_present_e && that_present_e))
5566
          return false;
5567
        if (!this.e.equals(that.e))
5568
          return false;
5569
      }
5570
 
5571
      return true;
5572
    }
5573
 
5574
    @Override
5575
    public int hashCode() {
5576
      return 0;
5577
    }
5578
 
5579
    public int compareTo(getSupplier_result other) {
5580
      if (!getClass().equals(other.getClass())) {
5581
        return getClass().getName().compareTo(other.getClass().getName());
5582
      }
5583
 
5584
      int lastComparison = 0;
5585
      getSupplier_result typedOther = (getSupplier_result)other;
5586
 
5587
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5588
      if (lastComparison != 0) {
5589
        return lastComparison;
5590
      }
5591
      if (isSetSuccess()) {
5592
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5593
        if (lastComparison != 0) {
5594
          return lastComparison;
5595
        }
5596
      }
5597
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
5598
      if (lastComparison != 0) {
5599
        return lastComparison;
5600
      }
5601
      if (isSetE()) {
5602
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
5603
        if (lastComparison != 0) {
5604
          return lastComparison;
5605
        }
5606
      }
5607
      return 0;
5608
    }
5609
 
5610
    public _Fields fieldForId(int fieldId) {
5611
      return _Fields.findByThriftId(fieldId);
5612
    }
5613
 
5614
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5615
      org.apache.thrift.protocol.TField field;
5616
      iprot.readStructBegin();
5617
      while (true)
5618
      {
5619
        field = iprot.readFieldBegin();
5620
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5621
          break;
5622
        }
5623
        switch (field.id) {
5624
          case 0: // SUCCESS
5625
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5626
              this.success = new Supplier();
5627
              this.success.read(iprot);
5628
            } else { 
5629
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5630
            }
5631
            break;
5632
          case 1: // E
5633
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5634
              this.e = new PurchaseServiceException();
5635
              this.e.read(iprot);
5636
            } else { 
5637
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5638
            }
5639
            break;
5640
          default:
5641
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5642
        }
5643
        iprot.readFieldEnd();
5644
      }
5645
      iprot.readStructEnd();
5646
      validate();
5647
    }
5648
 
5649
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5650
      oprot.writeStructBegin(STRUCT_DESC);
5651
 
5652
      if (this.isSetSuccess()) {
5653
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5654
        this.success.write(oprot);
5655
        oprot.writeFieldEnd();
5656
      } else if (this.isSetE()) {
5657
        oprot.writeFieldBegin(E_FIELD_DESC);
5658
        this.e.write(oprot);
5659
        oprot.writeFieldEnd();
5660
      }
5661
      oprot.writeFieldStop();
5662
      oprot.writeStructEnd();
5663
    }
5664
 
5665
    @Override
5666
    public String toString() {
5667
      StringBuilder sb = new StringBuilder("getSupplier_result(");
5668
      boolean first = true;
5669
 
5670
      sb.append("success:");
5671
      if (this.success == null) {
5672
        sb.append("null");
5673
      } else {
5674
        sb.append(this.success);
5675
      }
5676
      first = false;
5677
      if (!first) sb.append(", ");
5678
      sb.append("e:");
5679
      if (this.e == null) {
5680
        sb.append("null");
5681
      } else {
5682
        sb.append(this.e);
5683
      }
5684
      first = false;
5685
      sb.append(")");
5686
      return sb.toString();
5687
    }
5688
 
5689
    public void validate() throws org.apache.thrift.TException {
5690
      // check for required fields
5691
    }
5692
 
5693
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5694
      try {
5695
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5696
      } catch (org.apache.thrift.TException te) {
5697
        throw new java.io.IOException(te);
5698
      }
5699
    }
5700
 
5701
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5702
      try {
5703
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5704
      } catch (org.apache.thrift.TException te) {
5705
        throw new java.io.IOException(te);
5706
      }
5707
    }
5708
 
5709
  }
5710
 
5711
  public static class startPurchase_args implements org.apache.thrift.TBase<startPurchase_args, startPurchase_args._Fields>, java.io.Serializable, Cloneable   {
5712
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_args");
5713
 
5714
    private static final org.apache.thrift.protocol.TField PURCHASE_ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseOrderId", org.apache.thrift.protocol.TType.I64, (short)1);
5715
    private static final org.apache.thrift.protocol.TField INVOICE_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("invoiceNumber", org.apache.thrift.protocol.TType.STRING, (short)2);
5716
    private static final org.apache.thrift.protocol.TField FREIGHT_CHARGES_FIELD_DESC = new org.apache.thrift.protocol.TField("freightCharges", org.apache.thrift.protocol.TType.DOUBLE, (short)3);
11801 manish.sha 5717
    private static final org.apache.thrift.protocol.TField PURCHASE_COMMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseComments", org.apache.thrift.protocol.TType.STRING, (short)4);
4496 mandeep.dh 5718
 
5719
    private long purchaseOrderId; // required
5720
    private String invoiceNumber; // required
5721
    private double freightCharges; // required
11801 manish.sha 5722
    private String purchaseComments; // required
4496 mandeep.dh 5723
 
5724
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5725
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5726
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
5727
      INVOICE_NUMBER((short)2, "invoiceNumber"),
11801 manish.sha 5728
      FREIGHT_CHARGES((short)3, "freightCharges"),
5729
      PURCHASE_COMMENTS((short)4, "purchaseComments");
4496 mandeep.dh 5730
 
5731
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5732
 
5733
      static {
5734
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5735
          byName.put(field.getFieldName(), field);
5736
        }
5737
      }
5738
 
5739
      /**
5740
       * Find the _Fields constant that matches fieldId, or null if its not found.
5741
       */
5742
      public static _Fields findByThriftId(int fieldId) {
5743
        switch(fieldId) {
5744
          case 1: // PURCHASE_ORDER_ID
5745
            return PURCHASE_ORDER_ID;
5746
          case 2: // INVOICE_NUMBER
5747
            return INVOICE_NUMBER;
5748
          case 3: // FREIGHT_CHARGES
5749
            return FREIGHT_CHARGES;
11801 manish.sha 5750
          case 4: // PURCHASE_COMMENTS
5751
            return PURCHASE_COMMENTS;
4496 mandeep.dh 5752
          default:
5753
            return null;
5754
        }
5755
      }
5756
 
5757
      /**
5758
       * Find the _Fields constant that matches fieldId, throwing an exception
5759
       * if it is not found.
5760
       */
5761
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5762
        _Fields fields = findByThriftId(fieldId);
5763
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5764
        return fields;
5765
      }
5766
 
5767
      /**
5768
       * Find the _Fields constant that matches name, or null if its not found.
5769
       */
5770
      public static _Fields findByName(String name) {
5771
        return byName.get(name);
5772
      }
5773
 
5774
      private final short _thriftId;
5775
      private final String _fieldName;
5776
 
5777
      _Fields(short thriftId, String fieldName) {
5778
        _thriftId = thriftId;
5779
        _fieldName = fieldName;
5780
      }
5781
 
5782
      public short getThriftFieldId() {
5783
        return _thriftId;
5784
      }
5785
 
5786
      public String getFieldName() {
5787
        return _fieldName;
5788
      }
5789
    }
5790
 
5791
    // isset id assignments
5792
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
5793
    private static final int __FREIGHTCHARGES_ISSET_ID = 1;
5794
    private BitSet __isset_bit_vector = new BitSet(2);
5795
 
5796
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5797
    static {
5798
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5799
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5800
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5801
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5802
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
5803
      tmpMap.put(_Fields.FREIGHT_CHARGES, new org.apache.thrift.meta_data.FieldMetaData("freightCharges", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5804
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
11801 manish.sha 5805
      tmpMap.put(_Fields.PURCHASE_COMMENTS, new org.apache.thrift.meta_data.FieldMetaData("purchaseComments", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5806
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
4496 mandeep.dh 5807
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5808
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_args.class, metaDataMap);
5809
    }
5810
 
5811
    public startPurchase_args() {
5812
    }
5813
 
5814
    public startPurchase_args(
5815
      long purchaseOrderId,
5816
      String invoiceNumber,
11801 manish.sha 5817
      double freightCharges,
5818
      String purchaseComments)
4496 mandeep.dh 5819
    {
5820
      this();
5821
      this.purchaseOrderId = purchaseOrderId;
5822
      setPurchaseOrderIdIsSet(true);
5823
      this.invoiceNumber = invoiceNumber;
5824
      this.freightCharges = freightCharges;
5825
      setFreightChargesIsSet(true);
11801 manish.sha 5826
      this.purchaseComments = purchaseComments;
4496 mandeep.dh 5827
    }
5828
 
5829
    /**
5830
     * Performs a deep copy on <i>other</i>.
5831
     */
5832
    public startPurchase_args(startPurchase_args other) {
5833
      __isset_bit_vector.clear();
5834
      __isset_bit_vector.or(other.__isset_bit_vector);
5835
      this.purchaseOrderId = other.purchaseOrderId;
5836
      if (other.isSetInvoiceNumber()) {
5837
        this.invoiceNumber = other.invoiceNumber;
5838
      }
5839
      this.freightCharges = other.freightCharges;
11801 manish.sha 5840
      if (other.isSetPurchaseComments()) {
5841
        this.purchaseComments = other.purchaseComments;
5842
      }
4496 mandeep.dh 5843
    }
5844
 
5845
    public startPurchase_args deepCopy() {
5846
      return new startPurchase_args(this);
5847
    }
5848
 
5849
    @Override
5850
    public void clear() {
5851
      setPurchaseOrderIdIsSet(false);
5852
      this.purchaseOrderId = 0;
5853
      this.invoiceNumber = null;
5854
      setFreightChargesIsSet(false);
5855
      this.freightCharges = 0.0;
11801 manish.sha 5856
      this.purchaseComments = null;
4496 mandeep.dh 5857
    }
5858
 
5859
    public long getPurchaseOrderId() {
5860
      return this.purchaseOrderId;
5861
    }
5862
 
5863
    public void setPurchaseOrderId(long purchaseOrderId) {
5864
      this.purchaseOrderId = purchaseOrderId;
5865
      setPurchaseOrderIdIsSet(true);
5866
    }
5867
 
5868
    public void unsetPurchaseOrderId() {
5869
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
5870
    }
5871
 
5872
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
5873
    public boolean isSetPurchaseOrderId() {
5874
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
5875
    }
5876
 
5877
    public void setPurchaseOrderIdIsSet(boolean value) {
5878
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
5879
    }
5880
 
5881
    public String getInvoiceNumber() {
5882
      return this.invoiceNumber;
5883
    }
5884
 
5885
    public void setInvoiceNumber(String invoiceNumber) {
5886
      this.invoiceNumber = invoiceNumber;
5887
    }
5888
 
5889
    public void unsetInvoiceNumber() {
5890
      this.invoiceNumber = null;
5891
    }
5892
 
5893
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
5894
    public boolean isSetInvoiceNumber() {
5895
      return this.invoiceNumber != null;
5896
    }
5897
 
5898
    public void setInvoiceNumberIsSet(boolean value) {
5899
      if (!value) {
5900
        this.invoiceNumber = null;
5901
      }
5902
    }
5903
 
5904
    public double getFreightCharges() {
5905
      return this.freightCharges;
5906
    }
5907
 
5908
    public void setFreightCharges(double freightCharges) {
5909
      this.freightCharges = freightCharges;
5910
      setFreightChargesIsSet(true);
5911
    }
5912
 
5913
    public void unsetFreightCharges() {
5914
      __isset_bit_vector.clear(__FREIGHTCHARGES_ISSET_ID);
5915
    }
5916
 
5917
    /** Returns true if field freightCharges is set (has been assigned a value) and false otherwise */
5918
    public boolean isSetFreightCharges() {
5919
      return __isset_bit_vector.get(__FREIGHTCHARGES_ISSET_ID);
5920
    }
5921
 
5922
    public void setFreightChargesIsSet(boolean value) {
5923
      __isset_bit_vector.set(__FREIGHTCHARGES_ISSET_ID, value);
5924
    }
5925
 
11801 manish.sha 5926
    public String getPurchaseComments() {
5927
      return this.purchaseComments;
5928
    }
5929
 
5930
    public void setPurchaseComments(String purchaseComments) {
5931
      this.purchaseComments = purchaseComments;
5932
    }
5933
 
5934
    public void unsetPurchaseComments() {
5935
      this.purchaseComments = null;
5936
    }
5937
 
5938
    /** Returns true if field purchaseComments is set (has been assigned a value) and false otherwise */
5939
    public boolean isSetPurchaseComments() {
5940
      return this.purchaseComments != null;
5941
    }
5942
 
5943
    public void setPurchaseCommentsIsSet(boolean value) {
5944
      if (!value) {
5945
        this.purchaseComments = null;
5946
      }
5947
    }
5948
 
4496 mandeep.dh 5949
    public void setFieldValue(_Fields field, Object value) {
5950
      switch (field) {
5951
      case PURCHASE_ORDER_ID:
5952
        if (value == null) {
5953
          unsetPurchaseOrderId();
5954
        } else {
5955
          setPurchaseOrderId((Long)value);
5956
        }
5957
        break;
5958
 
5959
      case INVOICE_NUMBER:
5960
        if (value == null) {
5961
          unsetInvoiceNumber();
5962
        } else {
5963
          setInvoiceNumber((String)value);
5964
        }
5965
        break;
5966
 
5967
      case FREIGHT_CHARGES:
5968
        if (value == null) {
5969
          unsetFreightCharges();
5970
        } else {
5971
          setFreightCharges((Double)value);
5972
        }
5973
        break;
5974
 
11801 manish.sha 5975
      case PURCHASE_COMMENTS:
5976
        if (value == null) {
5977
          unsetPurchaseComments();
5978
        } else {
5979
          setPurchaseComments((String)value);
5980
        }
5981
        break;
5982
 
4496 mandeep.dh 5983
      }
5984
    }
5985
 
5986
    public Object getFieldValue(_Fields field) {
5987
      switch (field) {
5988
      case PURCHASE_ORDER_ID:
5989
        return Long.valueOf(getPurchaseOrderId());
5990
 
5991
      case INVOICE_NUMBER:
5992
        return getInvoiceNumber();
5993
 
5994
      case FREIGHT_CHARGES:
5995
        return Double.valueOf(getFreightCharges());
5996
 
11801 manish.sha 5997
      case PURCHASE_COMMENTS:
5998
        return getPurchaseComments();
5999
 
4496 mandeep.dh 6000
      }
6001
      throw new IllegalStateException();
6002
    }
6003
 
6004
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6005
    public boolean isSet(_Fields field) {
6006
      if (field == null) {
6007
        throw new IllegalArgumentException();
6008
      }
6009
 
6010
      switch (field) {
6011
      case PURCHASE_ORDER_ID:
6012
        return isSetPurchaseOrderId();
6013
      case INVOICE_NUMBER:
6014
        return isSetInvoiceNumber();
6015
      case FREIGHT_CHARGES:
6016
        return isSetFreightCharges();
11801 manish.sha 6017
      case PURCHASE_COMMENTS:
6018
        return isSetPurchaseComments();
4496 mandeep.dh 6019
      }
6020
      throw new IllegalStateException();
6021
    }
6022
 
6023
    @Override
6024
    public boolean equals(Object that) {
6025
      if (that == null)
6026
        return false;
6027
      if (that instanceof startPurchase_args)
6028
        return this.equals((startPurchase_args)that);
6029
      return false;
6030
    }
6031
 
6032
    public boolean equals(startPurchase_args that) {
6033
      if (that == null)
6034
        return false;
6035
 
6036
      boolean this_present_purchaseOrderId = true;
6037
      boolean that_present_purchaseOrderId = true;
6038
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
6039
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
6040
          return false;
6041
        if (this.purchaseOrderId != that.purchaseOrderId)
6042
          return false;
6043
      }
6044
 
6045
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
6046
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
6047
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
6048
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
6049
          return false;
6050
        if (!this.invoiceNumber.equals(that.invoiceNumber))
6051
          return false;
6052
      }
6053
 
6054
      boolean this_present_freightCharges = true;
6055
      boolean that_present_freightCharges = true;
6056
      if (this_present_freightCharges || that_present_freightCharges) {
6057
        if (!(this_present_freightCharges && that_present_freightCharges))
6058
          return false;
6059
        if (this.freightCharges != that.freightCharges)
6060
          return false;
6061
      }
6062
 
11801 manish.sha 6063
      boolean this_present_purchaseComments = true && this.isSetPurchaseComments();
6064
      boolean that_present_purchaseComments = true && that.isSetPurchaseComments();
6065
      if (this_present_purchaseComments || that_present_purchaseComments) {
6066
        if (!(this_present_purchaseComments && that_present_purchaseComments))
6067
          return false;
6068
        if (!this.purchaseComments.equals(that.purchaseComments))
6069
          return false;
6070
      }
6071
 
4496 mandeep.dh 6072
      return true;
6073
    }
6074
 
6075
    @Override
6076
    public int hashCode() {
6077
      return 0;
6078
    }
6079
 
6080
    public int compareTo(startPurchase_args other) {
6081
      if (!getClass().equals(other.getClass())) {
6082
        return getClass().getName().compareTo(other.getClass().getName());
6083
      }
6084
 
6085
      int lastComparison = 0;
6086
      startPurchase_args typedOther = (startPurchase_args)other;
6087
 
6088
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
6089
      if (lastComparison != 0) {
6090
        return lastComparison;
6091
      }
6092
      if (isSetPurchaseOrderId()) {
6093
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
6094
        if (lastComparison != 0) {
6095
          return lastComparison;
6096
        }
6097
      }
6098
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
6099
      if (lastComparison != 0) {
6100
        return lastComparison;
6101
      }
6102
      if (isSetInvoiceNumber()) {
6103
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
6104
        if (lastComparison != 0) {
6105
          return lastComparison;
6106
        }
6107
      }
6108
      lastComparison = Boolean.valueOf(isSetFreightCharges()).compareTo(typedOther.isSetFreightCharges());
6109
      if (lastComparison != 0) {
6110
        return lastComparison;
6111
      }
6112
      if (isSetFreightCharges()) {
6113
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freightCharges, typedOther.freightCharges);
6114
        if (lastComparison != 0) {
6115
          return lastComparison;
6116
        }
6117
      }
11801 manish.sha 6118
      lastComparison = Boolean.valueOf(isSetPurchaseComments()).compareTo(typedOther.isSetPurchaseComments());
6119
      if (lastComparison != 0) {
6120
        return lastComparison;
6121
      }
6122
      if (isSetPurchaseComments()) {
6123
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseComments, typedOther.purchaseComments);
6124
        if (lastComparison != 0) {
6125
          return lastComparison;
6126
        }
6127
      }
4496 mandeep.dh 6128
      return 0;
6129
    }
6130
 
6131
    public _Fields fieldForId(int fieldId) {
6132
      return _Fields.findByThriftId(fieldId);
6133
    }
6134
 
6135
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6136
      org.apache.thrift.protocol.TField field;
6137
      iprot.readStructBegin();
6138
      while (true)
6139
      {
6140
        field = iprot.readFieldBegin();
6141
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6142
          break;
6143
        }
6144
        switch (field.id) {
6145
          case 1: // PURCHASE_ORDER_ID
6146
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6147
              this.purchaseOrderId = iprot.readI64();
6148
              setPurchaseOrderIdIsSet(true);
6149
            } else { 
6150
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6151
            }
6152
            break;
6153
          case 2: // INVOICE_NUMBER
6154
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
6155
              this.invoiceNumber = iprot.readString();
6156
            } else { 
6157
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6158
            }
6159
            break;
6160
          case 3: // FREIGHT_CHARGES
6161
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
6162
              this.freightCharges = iprot.readDouble();
6163
              setFreightChargesIsSet(true);
6164
            } else { 
6165
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6166
            }
6167
            break;
11801 manish.sha 6168
          case 4: // PURCHASE_COMMENTS
6169
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
6170
              this.purchaseComments = iprot.readString();
6171
            } else { 
6172
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6173
            }
6174
            break;
4496 mandeep.dh 6175
          default:
6176
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6177
        }
6178
        iprot.readFieldEnd();
6179
      }
6180
      iprot.readStructEnd();
6181
      validate();
6182
    }
6183
 
6184
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6185
      validate();
6186
 
6187
      oprot.writeStructBegin(STRUCT_DESC);
6188
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
6189
      oprot.writeI64(this.purchaseOrderId);
6190
      oprot.writeFieldEnd();
6191
      if (this.invoiceNumber != null) {
6192
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
6193
        oprot.writeString(this.invoiceNumber);
6194
        oprot.writeFieldEnd();
6195
      }
6196
      oprot.writeFieldBegin(FREIGHT_CHARGES_FIELD_DESC);
6197
      oprot.writeDouble(this.freightCharges);
6198
      oprot.writeFieldEnd();
11801 manish.sha 6199
      if (this.purchaseComments != null) {
6200
        oprot.writeFieldBegin(PURCHASE_COMMENTS_FIELD_DESC);
6201
        oprot.writeString(this.purchaseComments);
6202
        oprot.writeFieldEnd();
6203
      }
4496 mandeep.dh 6204
      oprot.writeFieldStop();
6205
      oprot.writeStructEnd();
6206
    }
6207
 
6208
    @Override
6209
    public String toString() {
6210
      StringBuilder sb = new StringBuilder("startPurchase_args(");
6211
      boolean first = true;
6212
 
6213
      sb.append("purchaseOrderId:");
6214
      sb.append(this.purchaseOrderId);
6215
      first = false;
6216
      if (!first) sb.append(", ");
6217
      sb.append("invoiceNumber:");
6218
      if (this.invoiceNumber == null) {
6219
        sb.append("null");
6220
      } else {
6221
        sb.append(this.invoiceNumber);
6222
      }
6223
      first = false;
6224
      if (!first) sb.append(", ");
6225
      sb.append("freightCharges:");
6226
      sb.append(this.freightCharges);
6227
      first = false;
11801 manish.sha 6228
      if (!first) sb.append(", ");
6229
      sb.append("purchaseComments:");
6230
      if (this.purchaseComments == null) {
6231
        sb.append("null");
6232
      } else {
6233
        sb.append(this.purchaseComments);
6234
      }
6235
      first = false;
4496 mandeep.dh 6236
      sb.append(")");
6237
      return sb.toString();
6238
    }
6239
 
6240
    public void validate() throws org.apache.thrift.TException {
6241
      // check for required fields
6242
    }
6243
 
6244
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6245
      try {
6246
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6247
      } catch (org.apache.thrift.TException te) {
6248
        throw new java.io.IOException(te);
6249
      }
6250
    }
6251
 
6252
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6253
      try {
6254
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6255
      } catch (org.apache.thrift.TException te) {
6256
        throw new java.io.IOException(te);
6257
      }
6258
    }
6259
 
6260
  }
6261
 
6262
  public static class startPurchase_result implements org.apache.thrift.TBase<startPurchase_result, startPurchase_result._Fields>, java.io.Serializable, Cloneable   {
6263
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_result");
6264
 
6265
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);
6266
    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
6267
 
6268
    private long success; // required
6269
    private PurchaseServiceException e; // required
6270
 
6271
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6272
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6273
      SUCCESS((short)0, "success"),
6274
      E((short)1, "e");
6275
 
6276
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6277
 
6278
      static {
6279
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6280
          byName.put(field.getFieldName(), field);
6281
        }
6282
      }
6283
 
6284
      /**
6285
       * Find the _Fields constant that matches fieldId, or null if its not found.
6286
       */
6287
      public static _Fields findByThriftId(int fieldId) {
6288
        switch(fieldId) {
6289
          case 0: // SUCCESS
6290
            return SUCCESS;
6291
          case 1: // E
6292
            return E;
6293
          default:
6294
            return null;
6295
        }
6296
      }
6297
 
6298
      /**
6299
       * Find the _Fields constant that matches fieldId, throwing an exception
6300
       * if it is not found.
6301
       */
6302
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6303
        _Fields fields = findByThriftId(fieldId);
6304
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6305
        return fields;
6306
      }
6307
 
6308
      /**
6309
       * Find the _Fields constant that matches name, or null if its not found.
6310
       */
6311
      public static _Fields findByName(String name) {
6312
        return byName.get(name);
6313
      }
6314
 
6315
      private final short _thriftId;
6316
      private final String _fieldName;
6317
 
6318
      _Fields(short thriftId, String fieldName) {
6319
        _thriftId = thriftId;
6320
        _fieldName = fieldName;
6321
      }
6322
 
6323
      public short getThriftFieldId() {
6324
        return _thriftId;
6325
      }
6326
 
6327
      public String getFieldName() {
6328
        return _fieldName;
6329
      }
6330
    }
6331
 
6332
    // isset id assignments
6333
    private static final int __SUCCESS_ISSET_ID = 0;
6334
    private BitSet __isset_bit_vector = new BitSet(1);
6335
 
6336
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6337
    static {
6338
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6339
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6340
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6341
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6342
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6343
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6344
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_result.class, metaDataMap);
6345
    }
6346
 
6347
    public startPurchase_result() {
6348
    }
6349
 
6350
    public startPurchase_result(
6351
      long success,
6352
      PurchaseServiceException e)
6353
    {
6354
      this();
6355
      this.success = success;
6356
      setSuccessIsSet(true);
6357
      this.e = e;
6358
    }
6359
 
6360
    /**
6361
     * Performs a deep copy on <i>other</i>.
6362
     */
6363
    public startPurchase_result(startPurchase_result other) {
6364
      __isset_bit_vector.clear();
6365
      __isset_bit_vector.or(other.__isset_bit_vector);
6366
      this.success = other.success;
6367
      if (other.isSetE()) {
6368
        this.e = new PurchaseServiceException(other.e);
6369
      }
6370
    }
6371
 
6372
    public startPurchase_result deepCopy() {
6373
      return new startPurchase_result(this);
6374
    }
6375
 
6376
    @Override
6377
    public void clear() {
6378
      setSuccessIsSet(false);
6379
      this.success = 0;
6380
      this.e = null;
6381
    }
6382
 
6383
    public long getSuccess() {
6384
      return this.success;
6385
    }
6386
 
6387
    public void setSuccess(long success) {
6388
      this.success = success;
6389
      setSuccessIsSet(true);
6390
    }
6391
 
6392
    public void unsetSuccess() {
6393
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
6394
    }
6395
 
6396
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
6397
    public boolean isSetSuccess() {
6398
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
6399
    }
6400
 
6401
    public void setSuccessIsSet(boolean value) {
6402
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
6403
    }
6404
 
6405
    public PurchaseServiceException getE() {
6406
      return this.e;
6407
    }
6408
 
6409
    public void setE(PurchaseServiceException e) {
6410
      this.e = e;
6411
    }
6412
 
6413
    public void unsetE() {
6414
      this.e = null;
6415
    }
6416
 
6417
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
6418
    public boolean isSetE() {
6419
      return this.e != null;
6420
    }
6421
 
6422
    public void setEIsSet(boolean value) {
6423
      if (!value) {
6424
        this.e = null;
6425
      }
6426
    }
6427
 
6428
    public void setFieldValue(_Fields field, Object value) {
6429
      switch (field) {
6430
      case SUCCESS:
6431
        if (value == null) {
6432
          unsetSuccess();
6433
        } else {
6434
          setSuccess((Long)value);
6435
        }
6436
        break;
6437
 
6438
      case E:
6439
        if (value == null) {
6440
          unsetE();
6441
        } else {
6442
          setE((PurchaseServiceException)value);
6443
        }
6444
        break;
6445
 
6446
      }
6447
    }
6448
 
6449
    public Object getFieldValue(_Fields field) {
6450
      switch (field) {
6451
      case SUCCESS:
6452
        return Long.valueOf(getSuccess());
6453
 
6454
      case E:
6455
        return getE();
6456
 
6457
      }
6458
      throw new IllegalStateException();
6459
    }
6460
 
6461
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6462
    public boolean isSet(_Fields field) {
6463
      if (field == null) {
6464
        throw new IllegalArgumentException();
6465
      }
6466
 
6467
      switch (field) {
6468
      case SUCCESS:
6469
        return isSetSuccess();
6470
      case E:
6471
        return isSetE();
6472
      }
6473
      throw new IllegalStateException();
6474
    }
6475
 
6476
    @Override
6477
    public boolean equals(Object that) {
6478
      if (that == null)
6479
        return false;
6480
      if (that instanceof startPurchase_result)
6481
        return this.equals((startPurchase_result)that);
6482
      return false;
6483
    }
6484
 
6485
    public boolean equals(startPurchase_result that) {
6486
      if (that == null)
6487
        return false;
6488
 
6489
      boolean this_present_success = true;
6490
      boolean that_present_success = true;
6491
      if (this_present_success || that_present_success) {
6492
        if (!(this_present_success && that_present_success))
6493
          return false;
6494
        if (this.success != that.success)
6495
          return false;
6496
      }
6497
 
6498
      boolean this_present_e = true && this.isSetE();
6499
      boolean that_present_e = true && that.isSetE();
6500
      if (this_present_e || that_present_e) {
6501
        if (!(this_present_e && that_present_e))
6502
          return false;
6503
        if (!this.e.equals(that.e))
6504
          return false;
6505
      }
6506
 
6507
      return true;
6508
    }
6509
 
6510
    @Override
6511
    public int hashCode() {
6512
      return 0;
6513
    }
6514
 
6515
    public int compareTo(startPurchase_result other) {
6516
      if (!getClass().equals(other.getClass())) {
6517
        return getClass().getName().compareTo(other.getClass().getName());
6518
      }
6519
 
6520
      int lastComparison = 0;
6521
      startPurchase_result typedOther = (startPurchase_result)other;
6522
 
6523
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6524
      if (lastComparison != 0) {
6525
        return lastComparison;
6526
      }
6527
      if (isSetSuccess()) {
6528
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6529
        if (lastComparison != 0) {
6530
          return lastComparison;
6531
        }
6532
      }
6533
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
6534
      if (lastComparison != 0) {
6535
        return lastComparison;
6536
      }
6537
      if (isSetE()) {
6538
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
6539
        if (lastComparison != 0) {
6540
          return lastComparison;
6541
        }
6542
      }
6543
      return 0;
6544
    }
6545
 
6546
    public _Fields fieldForId(int fieldId) {
6547
      return _Fields.findByThriftId(fieldId);
6548
    }
6549
 
6550
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6551
      org.apache.thrift.protocol.TField field;
6552
      iprot.readStructBegin();
6553
      while (true)
6554
      {
6555
        field = iprot.readFieldBegin();
6556
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6557
          break;
6558
        }
6559
        switch (field.id) {
6560
          case 0: // SUCCESS
6561
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6562
              this.success = iprot.readI64();
6563
              setSuccessIsSet(true);
6564
            } else { 
6565
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6566
            }
6567
            break;
6568
          case 1: // E
6569
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6570
              this.e = new PurchaseServiceException();
6571
              this.e.read(iprot);
6572
            } else { 
6573
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6574
            }
6575
            break;
6576
          default:
6577
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6578
        }
6579
        iprot.readFieldEnd();
6580
      }
6581
      iprot.readStructEnd();
6582
      validate();
6583
    }
6584
 
6585
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6586
      oprot.writeStructBegin(STRUCT_DESC);
6587
 
6588
      if (this.isSetSuccess()) {
6589
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6590
        oprot.writeI64(this.success);
6591
        oprot.writeFieldEnd();
6592
      } else if (this.isSetE()) {
6593
        oprot.writeFieldBegin(E_FIELD_DESC);
6594
        this.e.write(oprot);
6595
        oprot.writeFieldEnd();
6596
      }
6597
      oprot.writeFieldStop();
6598
      oprot.writeStructEnd();
6599
    }
6600
 
6601
    @Override
6602
    public String toString() {
6603
      StringBuilder sb = new StringBuilder("startPurchase_result(");
6604
      boolean first = true;
6605
 
6606
      sb.append("success:");
6607
      sb.append(this.success);
6608
      first = false;
6609
      if (!first) sb.append(", ");
6610
      sb.append("e:");
6611
      if (this.e == null) {
6612
        sb.append("null");
6613
      } else {
6614
        sb.append(this.e);
6615
      }
6616
      first = false;
6617
      sb.append(")");
6618
      return sb.toString();
6619
    }
6620
 
6621
    public void validate() throws org.apache.thrift.TException {
6622
      // check for required fields
6623
    }
6624
 
6625
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6626
      try {
6627
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6628
      } catch (org.apache.thrift.TException te) {
6629
        throw new java.io.IOException(te);
6630
      }
6631
    }
6632
 
6633
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6634
      try {
6635
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6636
      } catch (org.apache.thrift.TException te) {
6637
        throw new java.io.IOException(te);
6638
      }
6639
    }
6640
 
6641
  }
6642
 
6643
  public static class closePurchase_args implements org.apache.thrift.TBase<closePurchase_args, closePurchase_args._Fields>, java.io.Serializable, Cloneable   {
6644
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_args");
6645
 
6646
    private static final org.apache.thrift.protocol.TField PURCHASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseId", org.apache.thrift.protocol.TType.I64, (short)1);
6647
 
6648
    private long purchaseId; // required
6649
 
6650
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6651
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6652
      PURCHASE_ID((short)1, "purchaseId");
6653
 
6654
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6655
 
6656
      static {
6657
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6658
          byName.put(field.getFieldName(), field);
6659
        }
6660
      }
6661
 
6662
      /**
6663
       * Find the _Fields constant that matches fieldId, or null if its not found.
6664
       */
6665
      public static _Fields findByThriftId(int fieldId) {
6666
        switch(fieldId) {
6667
          case 1: // PURCHASE_ID
6668
            return PURCHASE_ID;
6669
          default:
6670
            return null;
6671
        }
6672
      }
6673
 
6674
      /**
6675
       * Find the _Fields constant that matches fieldId, throwing an exception
6676
       * if it is not found.
6677
       */
6678
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6679
        _Fields fields = findByThriftId(fieldId);
6680
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6681
        return fields;
6682
      }
6683
 
6684
      /**
6685
       * Find the _Fields constant that matches name, or null if its not found.
6686
       */
6687
      public static _Fields findByName(String name) {
6688
        return byName.get(name);
6689
      }
6690
 
6691
      private final short _thriftId;
6692
      private final String _fieldName;
6693
 
6694
      _Fields(short thriftId, String fieldName) {
6695
        _thriftId = thriftId;
6696
        _fieldName = fieldName;
6697
      }
6698
 
6699
      public short getThriftFieldId() {
6700
        return _thriftId;
6701
      }
6702
 
6703
      public String getFieldName() {
6704
        return _fieldName;
6705
      }
6706
    }
6707
 
6708
    // isset id assignments
6709
    private static final int __PURCHASEID_ISSET_ID = 0;
6710
    private BitSet __isset_bit_vector = new BitSet(1);
6711
 
6712
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6713
    static {
6714
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6715
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6716
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6717
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6718
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_args.class, metaDataMap);
6719
    }
6720
 
6721
    public closePurchase_args() {
6722
    }
6723
 
6724
    public closePurchase_args(
6725
      long purchaseId)
6726
    {
6727
      this();
6728
      this.purchaseId = purchaseId;
6729
      setPurchaseIdIsSet(true);
6730
    }
6731
 
6732
    /**
6733
     * Performs a deep copy on <i>other</i>.
6734
     */
6735
    public closePurchase_args(closePurchase_args other) {
6736
      __isset_bit_vector.clear();
6737
      __isset_bit_vector.or(other.__isset_bit_vector);
6738
      this.purchaseId = other.purchaseId;
6739
    }
6740
 
6741
    public closePurchase_args deepCopy() {
6742
      return new closePurchase_args(this);
6743
    }
6744
 
6745
    @Override
6746
    public void clear() {
6747
      setPurchaseIdIsSet(false);
6748
      this.purchaseId = 0;
6749
    }
6750
 
6751
    public long getPurchaseId() {
6752
      return this.purchaseId;
6753
    }
6754
 
6755
    public void setPurchaseId(long purchaseId) {
6756
      this.purchaseId = purchaseId;
6757
      setPurchaseIdIsSet(true);
6758
    }
6759
 
6760
    public void unsetPurchaseId() {
6761
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
6762
    }
6763
 
6764
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
6765
    public boolean isSetPurchaseId() {
6766
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
6767
    }
6768
 
6769
    public void setPurchaseIdIsSet(boolean value) {
6770
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
6771
    }
6772
 
6773
    public void setFieldValue(_Fields field, Object value) {
6774
      switch (field) {
6775
      case PURCHASE_ID:
6776
        if (value == null) {
6777
          unsetPurchaseId();
6778
        } else {
6779
          setPurchaseId((Long)value);
6780
        }
6781
        break;
6782
 
6783
      }
6784
    }
6785
 
6786
    public Object getFieldValue(_Fields field) {
6787
      switch (field) {
6788
      case PURCHASE_ID:
6789
        return Long.valueOf(getPurchaseId());
6790
 
6791
      }
6792
      throw new IllegalStateException();
6793
    }
6794
 
6795
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6796
    public boolean isSet(_Fields field) {
6797
      if (field == null) {
6798
        throw new IllegalArgumentException();
6799
      }
6800
 
6801
      switch (field) {
6802
      case PURCHASE_ID:
6803
        return isSetPurchaseId();
6804
      }
6805
      throw new IllegalStateException();
6806
    }
6807
 
6808
    @Override
6809
    public boolean equals(Object that) {
6810
      if (that == null)
6811
        return false;
6812
      if (that instanceof closePurchase_args)
6813
        return this.equals((closePurchase_args)that);
6814
      return false;
6815
    }
6816
 
6817
    public boolean equals(closePurchase_args that) {
6818
      if (that == null)
6819
        return false;
6820
 
6821
      boolean this_present_purchaseId = true;
6822
      boolean that_present_purchaseId = true;
6823
      if (this_present_purchaseId || that_present_purchaseId) {
6824
        if (!(this_present_purchaseId && that_present_purchaseId))
6825
          return false;
6826
        if (this.purchaseId != that.purchaseId)
6827
          return false;
6828
      }
6829
 
6830
      return true;
6831
    }
6832
 
6833
    @Override
6834
    public int hashCode() {
6835
      return 0;
6836
    }
6837
 
6838
    public int compareTo(closePurchase_args other) {
6839
      if (!getClass().equals(other.getClass())) {
6840
        return getClass().getName().compareTo(other.getClass().getName());
6841
      }
6842
 
6843
      int lastComparison = 0;
6844
      closePurchase_args typedOther = (closePurchase_args)other;
6845
 
6846
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
6847
      if (lastComparison != 0) {
6848
        return lastComparison;
6849
      }
6850
      if (isSetPurchaseId()) {
6851
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
6852
        if (lastComparison != 0) {
6853
          return lastComparison;
6854
        }
6855
      }
6856
      return 0;
6857
    }
6858
 
6859
    public _Fields fieldForId(int fieldId) {
6860
      return _Fields.findByThriftId(fieldId);
6861
    }
6862
 
6863
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6864
      org.apache.thrift.protocol.TField field;
6865
      iprot.readStructBegin();
6866
      while (true)
6867
      {
6868
        field = iprot.readFieldBegin();
6869
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6870
          break;
6871
        }
6872
        switch (field.id) {
6873
          case 1: // PURCHASE_ID
6874
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6875
              this.purchaseId = iprot.readI64();
6876
              setPurchaseIdIsSet(true);
6877
            } else { 
6878
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6879
            }
6880
            break;
6881
          default:
6882
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6883
        }
6884
        iprot.readFieldEnd();
6885
      }
6886
      iprot.readStructEnd();
6887
      validate();
6888
    }
6889
 
6890
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6891
      validate();
6892
 
6893
      oprot.writeStructBegin(STRUCT_DESC);
6894
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
6895
      oprot.writeI64(this.purchaseId);
6896
      oprot.writeFieldEnd();
6897
      oprot.writeFieldStop();
6898
      oprot.writeStructEnd();
6899
    }
6900
 
6901
    @Override
6902
    public String toString() {
6903
      StringBuilder sb = new StringBuilder("closePurchase_args(");
6904
      boolean first = true;
6905
 
6906
      sb.append("purchaseId:");
6907
      sb.append(this.purchaseId);
6908
      first = false;
6909
      sb.append(")");
6910
      return sb.toString();
6911
    }
6912
 
6913
    public void validate() throws org.apache.thrift.TException {
6914
      // check for required fields
6915
    }
6916
 
6917
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6918
      try {
6919
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6920
      } catch (org.apache.thrift.TException te) {
6921
        throw new java.io.IOException(te);
6922
      }
6923
    }
6924
 
6925
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6926
      try {
20025 amit.gupta 6927
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
6928
        __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 6929
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6930
      } catch (org.apache.thrift.TException te) {
6931
        throw new java.io.IOException(te);
6932
      }
6933
    }
6934
 
6935
  }
6936
 
6937
  public static class closePurchase_result implements org.apache.thrift.TBase<closePurchase_result, closePurchase_result._Fields>, java.io.Serializable, Cloneable   {
6938
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_result");
6939
 
6940
    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);
6941
    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);
6942
 
6943
    private long success; // required
6944
    private PurchaseServiceException e; // required
6945
 
6946
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6947
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6948
      SUCCESS((short)0, "success"),
6949
      E((short)1, "e");
6950
 
6951
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6952
 
6953
      static {
6954
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6955
          byName.put(field.getFieldName(), field);
6956
        }
6957
      }
6958
 
6959
      /**
6960
       * Find the _Fields constant that matches fieldId, or null if its not found.
6961
       */
6962
      public static _Fields findByThriftId(int fieldId) {
6963
        switch(fieldId) {
6964
          case 0: // SUCCESS
6965
            return SUCCESS;
6966
          case 1: // E
6967
            return E;
6968
          default:
6969
            return null;
6970
        }
6971
      }
6972
 
6973
      /**
6974
       * Find the _Fields constant that matches fieldId, throwing an exception
6975
       * if it is not found.
6976
       */
6977
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6978
        _Fields fields = findByThriftId(fieldId);
6979
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6980
        return fields;
6981
      }
6982
 
6983
      /**
6984
       * Find the _Fields constant that matches name, or null if its not found.
6985
       */
6986
      public static _Fields findByName(String name) {
6987
        return byName.get(name);
6988
      }
6989
 
6990
      private final short _thriftId;
6991
      private final String _fieldName;
6992
 
6993
      _Fields(short thriftId, String fieldName) {
6994
        _thriftId = thriftId;
6995
        _fieldName = fieldName;
6996
      }
6997
 
6998
      public short getThriftFieldId() {
6999
        return _thriftId;
7000
      }
7001
 
7002
      public String getFieldName() {
7003
        return _fieldName;
7004
      }
7005
    }
7006
 
7007
    // isset id assignments
7008
    private static final int __SUCCESS_ISSET_ID = 0;
7009
    private BitSet __isset_bit_vector = new BitSet(1);
7010
 
7011
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7012
    static {
7013
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7014
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7015
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7016
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7017
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7018
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7019
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_result.class, metaDataMap);
7020
    }
7021
 
7022
    public closePurchase_result() {
7023
    }
7024
 
7025
    public closePurchase_result(
7026
      long success,
7027
      PurchaseServiceException e)
7028
    {
7029
      this();
7030
      this.success = success;
7031
      setSuccessIsSet(true);
7032
      this.e = e;
7033
    }
7034
 
7035
    /**
7036
     * Performs a deep copy on <i>other</i>.
7037
     */
7038
    public closePurchase_result(closePurchase_result other) {
7039
      __isset_bit_vector.clear();
7040
      __isset_bit_vector.or(other.__isset_bit_vector);
7041
      this.success = other.success;
7042
      if (other.isSetE()) {
7043
        this.e = new PurchaseServiceException(other.e);
7044
      }
7045
    }
7046
 
7047
    public closePurchase_result deepCopy() {
7048
      return new closePurchase_result(this);
7049
    }
7050
 
7051
    @Override
7052
    public void clear() {
7053
      setSuccessIsSet(false);
7054
      this.success = 0;
7055
      this.e = null;
7056
    }
7057
 
7058
    public long getSuccess() {
7059
      return this.success;
7060
    }
7061
 
7062
    public void setSuccess(long success) {
7063
      this.success = success;
7064
      setSuccessIsSet(true);
7065
    }
7066
 
7067
    public void unsetSuccess() {
7068
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7069
    }
7070
 
7071
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7072
    public boolean isSetSuccess() {
7073
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7074
    }
7075
 
7076
    public void setSuccessIsSet(boolean value) {
7077
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7078
    }
7079
 
7080
    public PurchaseServiceException getE() {
7081
      return this.e;
7082
    }
7083
 
7084
    public void setE(PurchaseServiceException e) {
7085
      this.e = e;
7086
    }
7087
 
7088
    public void unsetE() {
7089
      this.e = null;
7090
    }
7091
 
7092
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
7093
    public boolean isSetE() {
7094
      return this.e != null;
7095
    }
7096
 
7097
    public void setEIsSet(boolean value) {
7098
      if (!value) {
7099
        this.e = null;
7100
      }
7101
    }
7102
 
7103
    public void setFieldValue(_Fields field, Object value) {
7104
      switch (field) {
7105
      case SUCCESS:
7106
        if (value == null) {
7107
          unsetSuccess();
7108
        } else {
7109
          setSuccess((Long)value);
7110
        }
7111
        break;
7112
 
7113
      case E:
7114
        if (value == null) {
7115
          unsetE();
7116
        } else {
7117
          setE((PurchaseServiceException)value);
7118
        }
7119
        break;
7120
 
7121
      }
7122
    }
7123
 
7124
    public Object getFieldValue(_Fields field) {
7125
      switch (field) {
7126
      case SUCCESS:
7127
        return Long.valueOf(getSuccess());
7128
 
7129
      case E:
7130
        return getE();
7131
 
7132
      }
7133
      throw new IllegalStateException();
7134
    }
7135
 
7136
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7137
    public boolean isSet(_Fields field) {
7138
      if (field == null) {
7139
        throw new IllegalArgumentException();
7140
      }
7141
 
7142
      switch (field) {
7143
      case SUCCESS:
7144
        return isSetSuccess();
7145
      case E:
7146
        return isSetE();
7147
      }
7148
      throw new IllegalStateException();
7149
    }
7150
 
7151
    @Override
7152
    public boolean equals(Object that) {
7153
      if (that == null)
7154
        return false;
7155
      if (that instanceof closePurchase_result)
7156
        return this.equals((closePurchase_result)that);
7157
      return false;
7158
    }
7159
 
7160
    public boolean equals(closePurchase_result that) {
7161
      if (that == null)
7162
        return false;
7163
 
7164
      boolean this_present_success = true;
7165
      boolean that_present_success = true;
7166
      if (this_present_success || that_present_success) {
7167
        if (!(this_present_success && that_present_success))
7168
          return false;
7169
        if (this.success != that.success)
7170
          return false;
7171
      }
7172
 
7173
      boolean this_present_e = true && this.isSetE();
7174
      boolean that_present_e = true && that.isSetE();
7175
      if (this_present_e || that_present_e) {
7176
        if (!(this_present_e && that_present_e))
7177
          return false;
7178
        if (!this.e.equals(that.e))
7179
          return false;
7180
      }
7181
 
7182
      return true;
7183
    }
7184
 
7185
    @Override
7186
    public int hashCode() {
7187
      return 0;
7188
    }
7189
 
7190
    public int compareTo(closePurchase_result other) {
7191
      if (!getClass().equals(other.getClass())) {
7192
        return getClass().getName().compareTo(other.getClass().getName());
7193
      }
7194
 
7195
      int lastComparison = 0;
7196
      closePurchase_result typedOther = (closePurchase_result)other;
7197
 
7198
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7199
      if (lastComparison != 0) {
7200
        return lastComparison;
7201
      }
7202
      if (isSetSuccess()) {
7203
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7204
        if (lastComparison != 0) {
7205
          return lastComparison;
7206
        }
7207
      }
7208
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
7209
      if (lastComparison != 0) {
7210
        return lastComparison;
7211
      }
7212
      if (isSetE()) {
7213
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
7214
        if (lastComparison != 0) {
7215
          return lastComparison;
7216
        }
7217
      }
7218
      return 0;
7219
    }
7220
 
7221
    public _Fields fieldForId(int fieldId) {
7222
      return _Fields.findByThriftId(fieldId);
7223
    }
7224
 
7225
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7226
      org.apache.thrift.protocol.TField field;
7227
      iprot.readStructBegin();
7228
      while (true)
7229
      {
7230
        field = iprot.readFieldBegin();
7231
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7232
          break;
7233
        }
7234
        switch (field.id) {
7235
          case 0: // SUCCESS
7236
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7237
              this.success = iprot.readI64();
7238
              setSuccessIsSet(true);
7239
            } else { 
7240
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7241
            }
7242
            break;
7243
          case 1: // E
7244
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7245
              this.e = new PurchaseServiceException();
7246
              this.e.read(iprot);
7247
            } else { 
7248
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7249
            }
7250
            break;
7251
          default:
7252
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7253
        }
7254
        iprot.readFieldEnd();
7255
      }
7256
      iprot.readStructEnd();
7257
      validate();
7258
    }
7259
 
7260
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7261
      oprot.writeStructBegin(STRUCT_DESC);
7262
 
7263
      if (this.isSetSuccess()) {
7264
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7265
        oprot.writeI64(this.success);
7266
        oprot.writeFieldEnd();
7267
      } else if (this.isSetE()) {
7268
        oprot.writeFieldBegin(E_FIELD_DESC);
7269
        this.e.write(oprot);
7270
        oprot.writeFieldEnd();
7271
      }
7272
      oprot.writeFieldStop();
7273
      oprot.writeStructEnd();
7274
    }
7275
 
7276
    @Override
7277
    public String toString() {
7278
      StringBuilder sb = new StringBuilder("closePurchase_result(");
7279
      boolean first = true;
7280
 
7281
      sb.append("success:");
7282
      sb.append(this.success);
7283
      first = false;
7284
      if (!first) sb.append(", ");
7285
      sb.append("e:");
7286
      if (this.e == null) {
7287
        sb.append("null");
7288
      } else {
7289
        sb.append(this.e);
7290
      }
7291
      first = false;
7292
      sb.append(")");
7293
      return sb.toString();
7294
    }
7295
 
7296
    public void validate() throws org.apache.thrift.TException {
7297
      // check for required fields
7298
    }
7299
 
7300
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7301
      try {
7302
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7303
      } catch (org.apache.thrift.TException te) {
7304
        throw new java.io.IOException(te);
7305
      }
7306
    }
7307
 
7308
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7309
      try {
7310
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7311
      } catch (org.apache.thrift.TException te) {
7312
        throw new java.io.IOException(te);
7313
      }
7314
    }
7315
 
7316
  }
7317
 
7318
  public static class getAllPurchases_args implements org.apache.thrift.TBase<getAllPurchases_args, getAllPurchases_args._Fields>, java.io.Serializable, Cloneable   {
7319
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_args");
7320
 
7321
    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);
7322
    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);
7323
 
7324
    private long purchaseOrderId; // required
7325
    private boolean open; // required
7326
 
7327
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7328
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7329
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
7330
      OPEN((short)2, "open");
7331
 
7332
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7333
 
7334
      static {
7335
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7336
          byName.put(field.getFieldName(), field);
7337
        }
7338
      }
7339
 
7340
      /**
7341
       * Find the _Fields constant that matches fieldId, or null if its not found.
7342
       */
7343
      public static _Fields findByThriftId(int fieldId) {
7344
        switch(fieldId) {
7345
          case 1: // PURCHASE_ORDER_ID
7346
            return PURCHASE_ORDER_ID;
7347
          case 2: // OPEN
7348
            return OPEN;
7349
          default:
7350
            return null;
7351
        }
7352
      }
7353
 
7354
      /**
7355
       * Find the _Fields constant that matches fieldId, throwing an exception
7356
       * if it is not found.
7357
       */
7358
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7359
        _Fields fields = findByThriftId(fieldId);
7360
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7361
        return fields;
7362
      }
7363
 
7364
      /**
7365
       * Find the _Fields constant that matches name, or null if its not found.
7366
       */
7367
      public static _Fields findByName(String name) {
7368
        return byName.get(name);
7369
      }
7370
 
7371
      private final short _thriftId;
7372
      private final String _fieldName;
7373
 
7374
      _Fields(short thriftId, String fieldName) {
7375
        _thriftId = thriftId;
7376
        _fieldName = fieldName;
7377
      }
7378
 
7379
      public short getThriftFieldId() {
7380
        return _thriftId;
7381
      }
7382
 
7383
      public String getFieldName() {
7384
        return _fieldName;
7385
      }
7386
    }
7387
 
7388
    // isset id assignments
7389
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
7390
    private static final int __OPEN_ISSET_ID = 1;
7391
    private BitSet __isset_bit_vector = new BitSet(2);
7392
 
7393
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7394
    static {
7395
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7396
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7397
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7398
      tmpMap.put(_Fields.OPEN, new org.apache.thrift.meta_data.FieldMetaData("open", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7399
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
7400
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7401
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_args.class, metaDataMap);
7402
    }
7403
 
7404
    public getAllPurchases_args() {
7405
    }
7406
 
7407
    public getAllPurchases_args(
7408
      long purchaseOrderId,
7409
      boolean open)
7410
    {
7411
      this();
7412
      this.purchaseOrderId = purchaseOrderId;
7413
      setPurchaseOrderIdIsSet(true);
7414
      this.open = open;
7415
      setOpenIsSet(true);
7416
    }
7417
 
7418
    /**
7419
     * Performs a deep copy on <i>other</i>.
7420
     */
7421
    public getAllPurchases_args(getAllPurchases_args other) {
7422
      __isset_bit_vector.clear();
7423
      __isset_bit_vector.or(other.__isset_bit_vector);
7424
      this.purchaseOrderId = other.purchaseOrderId;
7425
      this.open = other.open;
7426
    }
7427
 
7428
    public getAllPurchases_args deepCopy() {
7429
      return new getAllPurchases_args(this);
7430
    }
7431
 
7432
    @Override
7433
    public void clear() {
7434
      setPurchaseOrderIdIsSet(false);
7435
      this.purchaseOrderId = 0;
7436
      setOpenIsSet(false);
7437
      this.open = false;
7438
    }
7439
 
7440
    public long getPurchaseOrderId() {
7441
      return this.purchaseOrderId;
7442
    }
7443
 
7444
    public void setPurchaseOrderId(long purchaseOrderId) {
7445
      this.purchaseOrderId = purchaseOrderId;
7446
      setPurchaseOrderIdIsSet(true);
7447
    }
7448
 
7449
    public void unsetPurchaseOrderId() {
7450
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
7451
    }
7452
 
7453
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
7454
    public boolean isSetPurchaseOrderId() {
7455
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
7456
    }
7457
 
7458
    public void setPurchaseOrderIdIsSet(boolean value) {
7459
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
7460
    }
7461
 
7462
    public boolean isOpen() {
7463
      return this.open;
7464
    }
7465
 
7466
    public void setOpen(boolean open) {
7467
      this.open = open;
7468
      setOpenIsSet(true);
7469
    }
7470
 
7471
    public void unsetOpen() {
7472
      __isset_bit_vector.clear(__OPEN_ISSET_ID);
7473
    }
7474
 
7475
    /** Returns true if field open is set (has been assigned a value) and false otherwise */
7476
    public boolean isSetOpen() {
7477
      return __isset_bit_vector.get(__OPEN_ISSET_ID);
7478
    }
7479
 
7480
    public void setOpenIsSet(boolean value) {
7481
      __isset_bit_vector.set(__OPEN_ISSET_ID, value);
7482
    }
7483
 
7484
    public void setFieldValue(_Fields field, Object value) {
7485
      switch (field) {
7486
      case PURCHASE_ORDER_ID:
7487
        if (value == null) {
7488
          unsetPurchaseOrderId();
7489
        } else {
7490
          setPurchaseOrderId((Long)value);
7491
        }
7492
        break;
7493
 
7494
      case OPEN:
7495
        if (value == null) {
7496
          unsetOpen();
7497
        } else {
7498
          setOpen((Boolean)value);
7499
        }
7500
        break;
7501
 
7502
      }
7503
    }
7504
 
7505
    public Object getFieldValue(_Fields field) {
7506
      switch (field) {
7507
      case PURCHASE_ORDER_ID:
7508
        return Long.valueOf(getPurchaseOrderId());
7509
 
7510
      case OPEN:
7511
        return Boolean.valueOf(isOpen());
7512
 
7513
      }
7514
      throw new IllegalStateException();
7515
    }
7516
 
7517
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7518
    public boolean isSet(_Fields field) {
7519
      if (field == null) {
7520
        throw new IllegalArgumentException();
7521
      }
7522
 
7523
      switch (field) {
7524
      case PURCHASE_ORDER_ID:
7525
        return isSetPurchaseOrderId();
7526
      case OPEN:
7527
        return isSetOpen();
7528
      }
7529
      throw new IllegalStateException();
7530
    }
7531
 
7532
    @Override
7533
    public boolean equals(Object that) {
7534
      if (that == null)
7535
        return false;
7536
      if (that instanceof getAllPurchases_args)
7537
        return this.equals((getAllPurchases_args)that);
7538
      return false;
7539
    }
7540
 
7541
    public boolean equals(getAllPurchases_args that) {
7542
      if (that == null)
7543
        return false;
7544
 
7545
      boolean this_present_purchaseOrderId = true;
7546
      boolean that_present_purchaseOrderId = true;
7547
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
7548
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
7549
          return false;
7550
        if (this.purchaseOrderId != that.purchaseOrderId)
7551
          return false;
7552
      }
7553
 
7554
      boolean this_present_open = true;
7555
      boolean that_present_open = true;
7556
      if (this_present_open || that_present_open) {
7557
        if (!(this_present_open && that_present_open))
7558
          return false;
7559
        if (this.open != that.open)
7560
          return false;
7561
      }
7562
 
7563
      return true;
7564
    }
7565
 
7566
    @Override
7567
    public int hashCode() {
7568
      return 0;
7569
    }
7570
 
7571
    public int compareTo(getAllPurchases_args other) {
7572
      if (!getClass().equals(other.getClass())) {
7573
        return getClass().getName().compareTo(other.getClass().getName());
7574
      }
7575
 
7576
      int lastComparison = 0;
7577
      getAllPurchases_args typedOther = (getAllPurchases_args)other;
7578
 
7579
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
7580
      if (lastComparison != 0) {
7581
        return lastComparison;
7582
      }
7583
      if (isSetPurchaseOrderId()) {
7584
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
7585
        if (lastComparison != 0) {
7586
          return lastComparison;
7587
        }
7588
      }
7589
      lastComparison = Boolean.valueOf(isSetOpen()).compareTo(typedOther.isSetOpen());
7590
      if (lastComparison != 0) {
7591
        return lastComparison;
7592
      }
7593
      if (isSetOpen()) {
7594
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.open, typedOther.open);
7595
        if (lastComparison != 0) {
7596
          return lastComparison;
7597
        }
7598
      }
7599
      return 0;
7600
    }
7601
 
7602
    public _Fields fieldForId(int fieldId) {
7603
      return _Fields.findByThriftId(fieldId);
7604
    }
7605
 
7606
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7607
      org.apache.thrift.protocol.TField field;
7608
      iprot.readStructBegin();
7609
      while (true)
7610
      {
7611
        field = iprot.readFieldBegin();
7612
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7613
          break;
7614
        }
7615
        switch (field.id) {
7616
          case 1: // PURCHASE_ORDER_ID
7617
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7618
              this.purchaseOrderId = iprot.readI64();
7619
              setPurchaseOrderIdIsSet(true);
7620
            } else { 
7621
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7622
            }
7623
            break;
7624
          case 2: // OPEN
7625
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
7626
              this.open = iprot.readBool();
7627
              setOpenIsSet(true);
7628
            } else { 
7629
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7630
            }
7631
            break;
7632
          default:
7633
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7634
        }
7635
        iprot.readFieldEnd();
7636
      }
7637
      iprot.readStructEnd();
7638
      validate();
7639
    }
7640
 
7641
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7642
      validate();
7643
 
7644
      oprot.writeStructBegin(STRUCT_DESC);
7645
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
7646
      oprot.writeI64(this.purchaseOrderId);
7647
      oprot.writeFieldEnd();
7648
      oprot.writeFieldBegin(OPEN_FIELD_DESC);
7649
      oprot.writeBool(this.open);
7650
      oprot.writeFieldEnd();
7651
      oprot.writeFieldStop();
7652
      oprot.writeStructEnd();
7653
    }
7654
 
7655
    @Override
7656
    public String toString() {
7657
      StringBuilder sb = new StringBuilder("getAllPurchases_args(");
7658
      boolean first = true;
7659
 
7660
      sb.append("purchaseOrderId:");
7661
      sb.append(this.purchaseOrderId);
7662
      first = false;
7663
      if (!first) sb.append(", ");
7664
      sb.append("open:");
7665
      sb.append(this.open);
7666
      first = false;
7667
      sb.append(")");
7668
      return sb.toString();
7669
    }
7670
 
7671
    public void validate() throws org.apache.thrift.TException {
7672
      // check for required fields
7673
    }
7674
 
7675
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7676
      try {
7677
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7678
      } catch (org.apache.thrift.TException te) {
7679
        throw new java.io.IOException(te);
7680
      }
7681
    }
7682
 
7683
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7684
      try {
20025 amit.gupta 7685
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
7686
        __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 7687
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7688
      } catch (org.apache.thrift.TException te) {
7689
        throw new java.io.IOException(te);
7690
      }
7691
    }
7692
 
7693
  }
7694
 
7695
  public static class getAllPurchases_result implements org.apache.thrift.TBase<getAllPurchases_result, getAllPurchases_result._Fields>, java.io.Serializable, Cloneable   {
7696
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_result");
7697
 
7698
    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);
7699
    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);
7700
 
7701
    private List<Purchase> success; // required
7702
    private PurchaseServiceException e; // required
7703
 
7704
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7705
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7706
      SUCCESS((short)0, "success"),
7707
      E((short)1, "e");
7708
 
7709
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7710
 
7711
      static {
7712
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7713
          byName.put(field.getFieldName(), field);
7714
        }
7715
      }
7716
 
7717
      /**
7718
       * Find the _Fields constant that matches fieldId, or null if its not found.
7719
       */
7720
      public static _Fields findByThriftId(int fieldId) {
7721
        switch(fieldId) {
7722
          case 0: // SUCCESS
7723
            return SUCCESS;
7724
          case 1: // E
7725
            return E;
7726
          default:
7727
            return null;
7728
        }
7729
      }
7730
 
7731
      /**
7732
       * Find the _Fields constant that matches fieldId, throwing an exception
7733
       * if it is not found.
7734
       */
7735
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7736
        _Fields fields = findByThriftId(fieldId);
7737
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7738
        return fields;
7739
      }
7740
 
7741
      /**
7742
       * Find the _Fields constant that matches name, or null if its not found.
7743
       */
7744
      public static _Fields findByName(String name) {
7745
        return byName.get(name);
7746
      }
7747
 
7748
      private final short _thriftId;
7749
      private final String _fieldName;
7750
 
7751
      _Fields(short thriftId, String fieldName) {
7752
        _thriftId = thriftId;
7753
        _fieldName = fieldName;
7754
      }
7755
 
7756
      public short getThriftFieldId() {
7757
        return _thriftId;
7758
      }
7759
 
7760
      public String getFieldName() {
7761
        return _fieldName;
7762
      }
7763
    }
7764
 
7765
    // isset id assignments
7766
 
7767
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7768
    static {
7769
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7770
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7771
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7772
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));
7773
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7774
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7775
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7776
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_result.class, metaDataMap);
7777
    }
7778
 
7779
    public getAllPurchases_result() {
7780
    }
7781
 
7782
    public getAllPurchases_result(
7783
      List<Purchase> success,
7784
      PurchaseServiceException e)
7785
    {
7786
      this();
7787
      this.success = success;
7788
      this.e = e;
7789
    }
7790
 
7791
    /**
7792
     * Performs a deep copy on <i>other</i>.
7793
     */
7794
    public getAllPurchases_result(getAllPurchases_result other) {
7795
      if (other.isSetSuccess()) {
7796
        List<Purchase> __this__success = new ArrayList<Purchase>();
7797
        for (Purchase other_element : other.success) {
7798
          __this__success.add(new Purchase(other_element));
7799
        }
7800
        this.success = __this__success;
7801
      }
7802
      if (other.isSetE()) {
7803
        this.e = new PurchaseServiceException(other.e);
7804
      }
7805
    }
7806
 
7807
    public getAllPurchases_result deepCopy() {
7808
      return new getAllPurchases_result(this);
7809
    }
7810
 
7811
    @Override
7812
    public void clear() {
7813
      this.success = null;
7814
      this.e = null;
7815
    }
7816
 
7817
    public int getSuccessSize() {
7818
      return (this.success == null) ? 0 : this.success.size();
7819
    }
7820
 
7821
    public java.util.Iterator<Purchase> getSuccessIterator() {
7822
      return (this.success == null) ? null : this.success.iterator();
7823
    }
7824
 
7825
    public void addToSuccess(Purchase elem) {
7826
      if (this.success == null) {
7827
        this.success = new ArrayList<Purchase>();
7828
      }
7829
      this.success.add(elem);
7830
    }
7831
 
7832
    public List<Purchase> getSuccess() {
7833
      return this.success;
7834
    }
7835
 
7836
    public void setSuccess(List<Purchase> success) {
7837
      this.success = success;
7838
    }
7839
 
7840
    public void unsetSuccess() {
7841
      this.success = null;
7842
    }
7843
 
7844
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7845
    public boolean isSetSuccess() {
7846
      return this.success != null;
7847
    }
7848
 
7849
    public void setSuccessIsSet(boolean value) {
7850
      if (!value) {
7851
        this.success = null;
7852
      }
7853
    }
7854
 
7855
    public PurchaseServiceException getE() {
7856
      return this.e;
7857
    }
7858
 
7859
    public void setE(PurchaseServiceException e) {
7860
      this.e = e;
7861
    }
7862
 
7863
    public void unsetE() {
7864
      this.e = null;
7865
    }
7866
 
7867
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
7868
    public boolean isSetE() {
7869
      return this.e != null;
7870
    }
7871
 
7872
    public void setEIsSet(boolean value) {
7873
      if (!value) {
7874
        this.e = null;
7875
      }
7876
    }
7877
 
7878
    public void setFieldValue(_Fields field, Object value) {
7879
      switch (field) {
7880
      case SUCCESS:
7881
        if (value == null) {
7882
          unsetSuccess();
7883
        } else {
7884
          setSuccess((List<Purchase>)value);
7885
        }
7886
        break;
7887
 
7888
      case E:
7889
        if (value == null) {
7890
          unsetE();
7891
        } else {
7892
          setE((PurchaseServiceException)value);
7893
        }
7894
        break;
7895
 
7896
      }
7897
    }
7898
 
7899
    public Object getFieldValue(_Fields field) {
7900
      switch (field) {
7901
      case SUCCESS:
7902
        return getSuccess();
7903
 
7904
      case E:
7905
        return getE();
7906
 
7907
      }
7908
      throw new IllegalStateException();
7909
    }
7910
 
7911
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7912
    public boolean isSet(_Fields field) {
7913
      if (field == null) {
7914
        throw new IllegalArgumentException();
7915
      }
7916
 
7917
      switch (field) {
7918
      case SUCCESS:
7919
        return isSetSuccess();
7920
      case E:
7921
        return isSetE();
7922
      }
7923
      throw new IllegalStateException();
7924
    }
7925
 
7926
    @Override
7927
    public boolean equals(Object that) {
7928
      if (that == null)
7929
        return false;
7930
      if (that instanceof getAllPurchases_result)
7931
        return this.equals((getAllPurchases_result)that);
7932
      return false;
7933
    }
7934
 
7935
    public boolean equals(getAllPurchases_result that) {
7936
      if (that == null)
7937
        return false;
7938
 
7939
      boolean this_present_success = true && this.isSetSuccess();
7940
      boolean that_present_success = true && that.isSetSuccess();
7941
      if (this_present_success || that_present_success) {
7942
        if (!(this_present_success && that_present_success))
7943
          return false;
7944
        if (!this.success.equals(that.success))
7945
          return false;
7946
      }
7947
 
7948
      boolean this_present_e = true && this.isSetE();
7949
      boolean that_present_e = true && that.isSetE();
7950
      if (this_present_e || that_present_e) {
7951
        if (!(this_present_e && that_present_e))
7952
          return false;
7953
        if (!this.e.equals(that.e))
7954
          return false;
7955
      }
7956
 
7957
      return true;
7958
    }
7959
 
7960
    @Override
7961
    public int hashCode() {
7962
      return 0;
7963
    }
7964
 
7965
    public int compareTo(getAllPurchases_result other) {
7966
      if (!getClass().equals(other.getClass())) {
7967
        return getClass().getName().compareTo(other.getClass().getName());
7968
      }
7969
 
7970
      int lastComparison = 0;
7971
      getAllPurchases_result typedOther = (getAllPurchases_result)other;
7972
 
7973
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7974
      if (lastComparison != 0) {
7975
        return lastComparison;
7976
      }
7977
      if (isSetSuccess()) {
7978
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7979
        if (lastComparison != 0) {
7980
          return lastComparison;
7981
        }
7982
      }
7983
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
7984
      if (lastComparison != 0) {
7985
        return lastComparison;
7986
      }
7987
      if (isSetE()) {
7988
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
7989
        if (lastComparison != 0) {
7990
          return lastComparison;
7991
        }
7992
      }
7993
      return 0;
7994
    }
7995
 
7996
    public _Fields fieldForId(int fieldId) {
7997
      return _Fields.findByThriftId(fieldId);
7998
    }
7999
 
8000
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8001
      org.apache.thrift.protocol.TField field;
8002
      iprot.readStructBegin();
8003
      while (true)
8004
      {
8005
        field = iprot.readFieldBegin();
8006
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8007
          break;
8008
        }
8009
        switch (field.id) {
8010
          case 0: // SUCCESS
8011
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8012
              {
8013
                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
8014
                this.success = new ArrayList<Purchase>(_list8.size);
8015
                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
8016
                {
8017
                  Purchase _elem10; // required
8018
                  _elem10 = new Purchase();
8019
                  _elem10.read(iprot);
8020
                  this.success.add(_elem10);
8021
                }
8022
                iprot.readListEnd();
8023
              }
8024
            } else { 
8025
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8026
            }
8027
            break;
8028
          case 1: // E
8029
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8030
              this.e = new PurchaseServiceException();
8031
              this.e.read(iprot);
8032
            } else { 
8033
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8034
            }
8035
            break;
8036
          default:
8037
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8038
        }
8039
        iprot.readFieldEnd();
8040
      }
8041
      iprot.readStructEnd();
8042
      validate();
8043
    }
8044
 
8045
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8046
      oprot.writeStructBegin(STRUCT_DESC);
8047
 
8048
      if (this.isSetSuccess()) {
8049
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8050
        {
8051
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
8052
          for (Purchase _iter11 : this.success)
8053
          {
8054
            _iter11.write(oprot);
8055
          }
8056
          oprot.writeListEnd();
8057
        }
8058
        oprot.writeFieldEnd();
8059
      } else if (this.isSetE()) {
8060
        oprot.writeFieldBegin(E_FIELD_DESC);
8061
        this.e.write(oprot);
8062
        oprot.writeFieldEnd();
8063
      }
8064
      oprot.writeFieldStop();
8065
      oprot.writeStructEnd();
8066
    }
8067
 
8068
    @Override
8069
    public String toString() {
8070
      StringBuilder sb = new StringBuilder("getAllPurchases_result(");
8071
      boolean first = true;
8072
 
8073
      sb.append("success:");
8074
      if (this.success == null) {
8075
        sb.append("null");
8076
      } else {
8077
        sb.append(this.success);
8078
      }
8079
      first = false;
8080
      if (!first) sb.append(", ");
8081
      sb.append("e:");
8082
      if (this.e == null) {
8083
        sb.append("null");
8084
      } else {
8085
        sb.append(this.e);
8086
      }
8087
      first = false;
8088
      sb.append(")");
8089
      return sb.toString();
8090
    }
8091
 
8092
    public void validate() throws org.apache.thrift.TException {
8093
      // check for required fields
8094
    }
8095
 
8096
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8097
      try {
8098
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8099
      } catch (org.apache.thrift.TException te) {
8100
        throw new java.io.IOException(te);
8101
      }
8102
    }
8103
 
8104
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8105
      try {
8106
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8107
      } catch (org.apache.thrift.TException te) {
8108
        throw new java.io.IOException(te);
8109
      }
8110
    }
8111
 
8112
  }
8113
 
6385 amar.kumar 8114
  public static class getPurchasesForPO_args implements org.apache.thrift.TBase<getPurchasesForPO_args, getPurchasesForPO_args._Fields>, java.io.Serializable, Cloneable   {
8115
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchasesForPO_args");
8116
 
8117
    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);
8118
 
8119
    private long purchaseOrderId; // required
8120
 
8121
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8122
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8123
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId");
8124
 
8125
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8126
 
8127
      static {
8128
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8129
          byName.put(field.getFieldName(), field);
8130
        }
8131
      }
8132
 
8133
      /**
8134
       * Find the _Fields constant that matches fieldId, or null if its not found.
8135
       */
8136
      public static _Fields findByThriftId(int fieldId) {
8137
        switch(fieldId) {
8138
          case 1: // PURCHASE_ORDER_ID
8139
            return PURCHASE_ORDER_ID;
8140
          default:
8141
            return null;
8142
        }
8143
      }
8144
 
8145
      /**
8146
       * Find the _Fields constant that matches fieldId, throwing an exception
8147
       * if it is not found.
8148
       */
8149
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8150
        _Fields fields = findByThriftId(fieldId);
8151
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8152
        return fields;
8153
      }
8154
 
8155
      /**
8156
       * Find the _Fields constant that matches name, or null if its not found.
8157
       */
8158
      public static _Fields findByName(String name) {
8159
        return byName.get(name);
8160
      }
8161
 
8162
      private final short _thriftId;
8163
      private final String _fieldName;
8164
 
8165
      _Fields(short thriftId, String fieldName) {
8166
        _thriftId = thriftId;
8167
        _fieldName = fieldName;
8168
      }
8169
 
8170
      public short getThriftFieldId() {
8171
        return _thriftId;
8172
      }
8173
 
8174
      public String getFieldName() {
8175
        return _fieldName;
8176
      }
8177
    }
8178
 
8179
    // isset id assignments
8180
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
8181
    private BitSet __isset_bit_vector = new BitSet(1);
8182
 
8183
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8184
    static {
8185
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8186
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8187
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8188
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8189
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchasesForPO_args.class, metaDataMap);
8190
    }
8191
 
8192
    public getPurchasesForPO_args() {
8193
    }
8194
 
8195
    public getPurchasesForPO_args(
8196
      long purchaseOrderId)
8197
    {
8198
      this();
8199
      this.purchaseOrderId = purchaseOrderId;
8200
      setPurchaseOrderIdIsSet(true);
8201
    }
8202
 
8203
    /**
8204
     * Performs a deep copy on <i>other</i>.
8205
     */
8206
    public getPurchasesForPO_args(getPurchasesForPO_args other) {
8207
      __isset_bit_vector.clear();
8208
      __isset_bit_vector.or(other.__isset_bit_vector);
8209
      this.purchaseOrderId = other.purchaseOrderId;
8210
    }
8211
 
8212
    public getPurchasesForPO_args deepCopy() {
8213
      return new getPurchasesForPO_args(this);
8214
    }
8215
 
8216
    @Override
8217
    public void clear() {
8218
      setPurchaseOrderIdIsSet(false);
8219
      this.purchaseOrderId = 0;
8220
    }
8221
 
8222
    public long getPurchaseOrderId() {
8223
      return this.purchaseOrderId;
8224
    }
8225
 
8226
    public void setPurchaseOrderId(long purchaseOrderId) {
8227
      this.purchaseOrderId = purchaseOrderId;
8228
      setPurchaseOrderIdIsSet(true);
8229
    }
8230
 
8231
    public void unsetPurchaseOrderId() {
8232
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
8233
    }
8234
 
8235
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
8236
    public boolean isSetPurchaseOrderId() {
8237
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
8238
    }
8239
 
8240
    public void setPurchaseOrderIdIsSet(boolean value) {
8241
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
8242
    }
8243
 
8244
    public void setFieldValue(_Fields field, Object value) {
8245
      switch (field) {
8246
      case PURCHASE_ORDER_ID:
8247
        if (value == null) {
8248
          unsetPurchaseOrderId();
8249
        } else {
8250
          setPurchaseOrderId((Long)value);
8251
        }
8252
        break;
8253
 
8254
      }
8255
    }
8256
 
8257
    public Object getFieldValue(_Fields field) {
8258
      switch (field) {
8259
      case PURCHASE_ORDER_ID:
8260
        return Long.valueOf(getPurchaseOrderId());
8261
 
8262
      }
8263
      throw new IllegalStateException();
8264
    }
8265
 
8266
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8267
    public boolean isSet(_Fields field) {
8268
      if (field == null) {
8269
        throw new IllegalArgumentException();
8270
      }
8271
 
8272
      switch (field) {
8273
      case PURCHASE_ORDER_ID:
8274
        return isSetPurchaseOrderId();
8275
      }
8276
      throw new IllegalStateException();
8277
    }
8278
 
8279
    @Override
8280
    public boolean equals(Object that) {
8281
      if (that == null)
8282
        return false;
8283
      if (that instanceof getPurchasesForPO_args)
8284
        return this.equals((getPurchasesForPO_args)that);
8285
      return false;
8286
    }
8287
 
8288
    public boolean equals(getPurchasesForPO_args that) {
8289
      if (that == null)
8290
        return false;
8291
 
8292
      boolean this_present_purchaseOrderId = true;
8293
      boolean that_present_purchaseOrderId = true;
8294
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
8295
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
8296
          return false;
8297
        if (this.purchaseOrderId != that.purchaseOrderId)
8298
          return false;
8299
      }
8300
 
8301
      return true;
8302
    }
8303
 
8304
    @Override
8305
    public int hashCode() {
8306
      return 0;
8307
    }
8308
 
8309
    public int compareTo(getPurchasesForPO_args other) {
8310
      if (!getClass().equals(other.getClass())) {
8311
        return getClass().getName().compareTo(other.getClass().getName());
8312
      }
8313
 
8314
      int lastComparison = 0;
8315
      getPurchasesForPO_args typedOther = (getPurchasesForPO_args)other;
8316
 
8317
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
8318
      if (lastComparison != 0) {
8319
        return lastComparison;
8320
      }
8321
      if (isSetPurchaseOrderId()) {
8322
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
8323
        if (lastComparison != 0) {
8324
          return lastComparison;
8325
        }
8326
      }
8327
      return 0;
8328
    }
8329
 
8330
    public _Fields fieldForId(int fieldId) {
8331
      return _Fields.findByThriftId(fieldId);
8332
    }
8333
 
8334
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8335
      org.apache.thrift.protocol.TField field;
8336
      iprot.readStructBegin();
8337
      while (true)
8338
      {
8339
        field = iprot.readFieldBegin();
8340
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8341
          break;
8342
        }
8343
        switch (field.id) {
8344
          case 1: // PURCHASE_ORDER_ID
8345
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8346
              this.purchaseOrderId = iprot.readI64();
8347
              setPurchaseOrderIdIsSet(true);
8348
            } else { 
8349
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8350
            }
8351
            break;
8352
          default:
8353
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8354
        }
8355
        iprot.readFieldEnd();
8356
      }
8357
      iprot.readStructEnd();
8358
      validate();
8359
    }
8360
 
8361
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8362
      validate();
8363
 
8364
      oprot.writeStructBegin(STRUCT_DESC);
8365
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
8366
      oprot.writeI64(this.purchaseOrderId);
8367
      oprot.writeFieldEnd();
8368
      oprot.writeFieldStop();
8369
      oprot.writeStructEnd();
8370
    }
8371
 
8372
    @Override
8373
    public String toString() {
8374
      StringBuilder sb = new StringBuilder("getPurchasesForPO_args(");
8375
      boolean first = true;
8376
 
8377
      sb.append("purchaseOrderId:");
8378
      sb.append(this.purchaseOrderId);
8379
      first = false;
8380
      sb.append(")");
8381
      return sb.toString();
8382
    }
8383
 
8384
    public void validate() throws org.apache.thrift.TException {
8385
      // check for required fields
8386
    }
8387
 
8388
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8389
      try {
8390
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8391
      } catch (org.apache.thrift.TException te) {
8392
        throw new java.io.IOException(te);
8393
      }
8394
    }
8395
 
8396
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8397
      try {
8398
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8399
        __isset_bit_vector = new BitSet(1);
8400
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8401
      } catch (org.apache.thrift.TException te) {
8402
        throw new java.io.IOException(te);
8403
      }
8404
    }
8405
 
8406
  }
8407
 
8408
  public static class getPurchasesForPO_result implements org.apache.thrift.TBase<getPurchasesForPO_result, getPurchasesForPO_result._Fields>, java.io.Serializable, Cloneable   {
8409
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchasesForPO_result");
8410
 
8411
    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);
8412
    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);
8413
 
8414
    private List<Purchase> success; // required
8415
    private PurchaseServiceException e; // required
8416
 
8417
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8418
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8419
      SUCCESS((short)0, "success"),
8420
      E((short)1, "e");
8421
 
8422
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8423
 
8424
      static {
8425
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8426
          byName.put(field.getFieldName(), field);
8427
        }
8428
      }
8429
 
8430
      /**
8431
       * Find the _Fields constant that matches fieldId, or null if its not found.
8432
       */
8433
      public static _Fields findByThriftId(int fieldId) {
8434
        switch(fieldId) {
8435
          case 0: // SUCCESS
8436
            return SUCCESS;
8437
          case 1: // E
8438
            return E;
8439
          default:
8440
            return null;
8441
        }
8442
      }
8443
 
8444
      /**
8445
       * Find the _Fields constant that matches fieldId, throwing an exception
8446
       * if it is not found.
8447
       */
8448
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8449
        _Fields fields = findByThriftId(fieldId);
8450
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8451
        return fields;
8452
      }
8453
 
8454
      /**
8455
       * Find the _Fields constant that matches name, or null if its not found.
8456
       */
8457
      public static _Fields findByName(String name) {
8458
        return byName.get(name);
8459
      }
8460
 
8461
      private final short _thriftId;
8462
      private final String _fieldName;
8463
 
8464
      _Fields(short thriftId, String fieldName) {
8465
        _thriftId = thriftId;
8466
        _fieldName = fieldName;
8467
      }
8468
 
8469
      public short getThriftFieldId() {
8470
        return _thriftId;
8471
      }
8472
 
8473
      public String getFieldName() {
8474
        return _fieldName;
8475
      }
8476
    }
8477
 
8478
    // isset id assignments
8479
 
8480
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8481
    static {
8482
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8483
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8484
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
8485
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));
8486
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8487
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
8488
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8489
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchasesForPO_result.class, metaDataMap);
8490
    }
8491
 
8492
    public getPurchasesForPO_result() {
8493
    }
8494
 
8495
    public getPurchasesForPO_result(
8496
      List<Purchase> success,
8497
      PurchaseServiceException e)
8498
    {
8499
      this();
8500
      this.success = success;
8501
      this.e = e;
8502
    }
8503
 
8504
    /**
8505
     * Performs a deep copy on <i>other</i>.
8506
     */
8507
    public getPurchasesForPO_result(getPurchasesForPO_result other) {
8508
      if (other.isSetSuccess()) {
8509
        List<Purchase> __this__success = new ArrayList<Purchase>();
8510
        for (Purchase other_element : other.success) {
8511
          __this__success.add(new Purchase(other_element));
8512
        }
8513
        this.success = __this__success;
8514
      }
8515
      if (other.isSetE()) {
8516
        this.e = new PurchaseServiceException(other.e);
8517
      }
8518
    }
8519
 
8520
    public getPurchasesForPO_result deepCopy() {
8521
      return new getPurchasesForPO_result(this);
8522
    }
8523
 
8524
    @Override
8525
    public void clear() {
8526
      this.success = null;
8527
      this.e = null;
8528
    }
8529
 
8530
    public int getSuccessSize() {
8531
      return (this.success == null) ? 0 : this.success.size();
8532
    }
8533
 
8534
    public java.util.Iterator<Purchase> getSuccessIterator() {
8535
      return (this.success == null) ? null : this.success.iterator();
8536
    }
8537
 
8538
    public void addToSuccess(Purchase elem) {
8539
      if (this.success == null) {
8540
        this.success = new ArrayList<Purchase>();
8541
      }
8542
      this.success.add(elem);
8543
    }
8544
 
8545
    public List<Purchase> getSuccess() {
8546
      return this.success;
8547
    }
8548
 
8549
    public void setSuccess(List<Purchase> success) {
8550
      this.success = success;
8551
    }
8552
 
8553
    public void unsetSuccess() {
8554
      this.success = null;
8555
    }
8556
 
8557
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8558
    public boolean isSetSuccess() {
8559
      return this.success != null;
8560
    }
8561
 
8562
    public void setSuccessIsSet(boolean value) {
8563
      if (!value) {
8564
        this.success = null;
8565
      }
8566
    }
8567
 
8568
    public PurchaseServiceException getE() {
8569
      return this.e;
8570
    }
8571
 
8572
    public void setE(PurchaseServiceException e) {
8573
      this.e = e;
8574
    }
8575
 
8576
    public void unsetE() {
8577
      this.e = null;
8578
    }
8579
 
8580
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
8581
    public boolean isSetE() {
8582
      return this.e != null;
8583
    }
8584
 
8585
    public void setEIsSet(boolean value) {
8586
      if (!value) {
8587
        this.e = null;
8588
      }
8589
    }
8590
 
8591
    public void setFieldValue(_Fields field, Object value) {
8592
      switch (field) {
8593
      case SUCCESS:
8594
        if (value == null) {
8595
          unsetSuccess();
8596
        } else {
8597
          setSuccess((List<Purchase>)value);
8598
        }
8599
        break;
8600
 
8601
      case E:
8602
        if (value == null) {
8603
          unsetE();
8604
        } else {
8605
          setE((PurchaseServiceException)value);
8606
        }
8607
        break;
8608
 
8609
      }
8610
    }
8611
 
8612
    public Object getFieldValue(_Fields field) {
8613
      switch (field) {
8614
      case SUCCESS:
8615
        return getSuccess();
8616
 
8617
      case E:
8618
        return getE();
8619
 
8620
      }
8621
      throw new IllegalStateException();
8622
    }
8623
 
8624
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8625
    public boolean isSet(_Fields field) {
8626
      if (field == null) {
8627
        throw new IllegalArgumentException();
8628
      }
8629
 
8630
      switch (field) {
8631
      case SUCCESS:
8632
        return isSetSuccess();
8633
      case E:
8634
        return isSetE();
8635
      }
8636
      throw new IllegalStateException();
8637
    }
8638
 
8639
    @Override
8640
    public boolean equals(Object that) {
8641
      if (that == null)
8642
        return false;
8643
      if (that instanceof getPurchasesForPO_result)
8644
        return this.equals((getPurchasesForPO_result)that);
8645
      return false;
8646
    }
8647
 
8648
    public boolean equals(getPurchasesForPO_result that) {
8649
      if (that == null)
8650
        return false;
8651
 
8652
      boolean this_present_success = true && this.isSetSuccess();
8653
      boolean that_present_success = true && that.isSetSuccess();
8654
      if (this_present_success || that_present_success) {
8655
        if (!(this_present_success && that_present_success))
8656
          return false;
8657
        if (!this.success.equals(that.success))
8658
          return false;
8659
      }
8660
 
8661
      boolean this_present_e = true && this.isSetE();
8662
      boolean that_present_e = true && that.isSetE();
8663
      if (this_present_e || that_present_e) {
8664
        if (!(this_present_e && that_present_e))
8665
          return false;
8666
        if (!this.e.equals(that.e))
8667
          return false;
8668
      }
8669
 
8670
      return true;
8671
    }
8672
 
8673
    @Override
8674
    public int hashCode() {
8675
      return 0;
8676
    }
8677
 
8678
    public int compareTo(getPurchasesForPO_result other) {
8679
      if (!getClass().equals(other.getClass())) {
8680
        return getClass().getName().compareTo(other.getClass().getName());
8681
      }
8682
 
8683
      int lastComparison = 0;
8684
      getPurchasesForPO_result typedOther = (getPurchasesForPO_result)other;
8685
 
8686
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8687
      if (lastComparison != 0) {
8688
        return lastComparison;
8689
      }
8690
      if (isSetSuccess()) {
8691
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8692
        if (lastComparison != 0) {
8693
          return lastComparison;
8694
        }
8695
      }
8696
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
8697
      if (lastComparison != 0) {
8698
        return lastComparison;
8699
      }
8700
      if (isSetE()) {
8701
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
8702
        if (lastComparison != 0) {
8703
          return lastComparison;
8704
        }
8705
      }
8706
      return 0;
8707
    }
8708
 
8709
    public _Fields fieldForId(int fieldId) {
8710
      return _Fields.findByThriftId(fieldId);
8711
    }
8712
 
8713
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8714
      org.apache.thrift.protocol.TField field;
8715
      iprot.readStructBegin();
8716
      while (true)
8717
      {
8718
        field = iprot.readFieldBegin();
8719
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8720
          break;
8721
        }
8722
        switch (field.id) {
8723
          case 0: // SUCCESS
8724
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8725
              {
8726
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
8727
                this.success = new ArrayList<Purchase>(_list12.size);
8728
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
8729
                {
8730
                  Purchase _elem14; // required
8731
                  _elem14 = new Purchase();
8732
                  _elem14.read(iprot);
8733
                  this.success.add(_elem14);
8734
                }
8735
                iprot.readListEnd();
8736
              }
8737
            } else { 
8738
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8739
            }
8740
            break;
8741
          case 1: // E
8742
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8743
              this.e = new PurchaseServiceException();
8744
              this.e.read(iprot);
8745
            } else { 
8746
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8747
            }
8748
            break;
8749
          default:
8750
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8751
        }
8752
        iprot.readFieldEnd();
8753
      }
8754
      iprot.readStructEnd();
8755
      validate();
8756
    }
8757
 
8758
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8759
      oprot.writeStructBegin(STRUCT_DESC);
8760
 
8761
      if (this.isSetSuccess()) {
8762
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8763
        {
8764
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
8765
          for (Purchase _iter15 : this.success)
8766
          {
8767
            _iter15.write(oprot);
8768
          }
8769
          oprot.writeListEnd();
8770
        }
8771
        oprot.writeFieldEnd();
8772
      } else if (this.isSetE()) {
8773
        oprot.writeFieldBegin(E_FIELD_DESC);
8774
        this.e.write(oprot);
8775
        oprot.writeFieldEnd();
8776
      }
8777
      oprot.writeFieldStop();
8778
      oprot.writeStructEnd();
8779
    }
8780
 
8781
    @Override
8782
    public String toString() {
8783
      StringBuilder sb = new StringBuilder("getPurchasesForPO_result(");
8784
      boolean first = true;
8785
 
8786
      sb.append("success:");
8787
      if (this.success == null) {
8788
        sb.append("null");
8789
      } else {
8790
        sb.append(this.success);
8791
      }
8792
      first = false;
8793
      if (!first) sb.append(", ");
8794
      sb.append("e:");
8795
      if (this.e == null) {
8796
        sb.append("null");
8797
      } else {
8798
        sb.append(this.e);
8799
      }
8800
      first = false;
8801
      sb.append(")");
8802
      return sb.toString();
8803
    }
8804
 
8805
    public void validate() throws org.apache.thrift.TException {
8806
      // check for required fields
8807
    }
8808
 
8809
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8810
      try {
8811
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8812
      } catch (org.apache.thrift.TException te) {
8813
        throw new java.io.IOException(te);
8814
      }
8815
    }
8816
 
8817
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8818
      try {
8819
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8820
      } catch (org.apache.thrift.TException te) {
8821
        throw new java.io.IOException(te);
8822
      }
8823
    }
8824
 
8825
  }
8826
 
4555 mandeep.dh 8827
  public static class getPurchaseOrderForPurchase_args implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_args, getPurchaseOrderForPurchase_args._Fields>, java.io.Serializable, Cloneable   {
8828
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_args");
4496 mandeep.dh 8829
 
8830
    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);
8831
 
8832
    private long purchaseId; // required
8833
 
8834
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8835
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4555 mandeep.dh 8836
      PURCHASE_ID((short)1, "purchaseId");
4496 mandeep.dh 8837
 
8838
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8839
 
8840
      static {
8841
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8842
          byName.put(field.getFieldName(), field);
8843
        }
8844
      }
8845
 
8846
      /**
8847
       * Find the _Fields constant that matches fieldId, or null if its not found.
8848
       */
8849
      public static _Fields findByThriftId(int fieldId) {
8850
        switch(fieldId) {
8851
          case 1: // PURCHASE_ID
8852
            return PURCHASE_ID;
8853
          default:
8854
            return null;
8855
        }
8856
      }
8857
 
8858
      /**
8859
       * Find the _Fields constant that matches fieldId, throwing an exception
8860
       * if it is not found.
8861
       */
8862
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8863
        _Fields fields = findByThriftId(fieldId);
8864
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8865
        return fields;
8866
      }
8867
 
8868
      /**
8869
       * Find the _Fields constant that matches name, or null if its not found.
8870
       */
8871
      public static _Fields findByName(String name) {
8872
        return byName.get(name);
8873
      }
8874
 
8875
      private final short _thriftId;
8876
      private final String _fieldName;
8877
 
8878
      _Fields(short thriftId, String fieldName) {
8879
        _thriftId = thriftId;
8880
        _fieldName = fieldName;
8881
      }
8882
 
8883
      public short getThriftFieldId() {
8884
        return _thriftId;
8885
      }
8886
 
8887
      public String getFieldName() {
8888
        return _fieldName;
8889
      }
8890
    }
8891
 
8892
    // isset id assignments
8893
    private static final int __PURCHASEID_ISSET_ID = 0;
4555 mandeep.dh 8894
    private BitSet __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 8895
 
8896
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8897
    static {
8898
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8899
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8900
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8901
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 8902
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_args.class, metaDataMap);
4496 mandeep.dh 8903
    }
8904
 
4555 mandeep.dh 8905
    public getPurchaseOrderForPurchase_args() {
4496 mandeep.dh 8906
    }
8907
 
4555 mandeep.dh 8908
    public getPurchaseOrderForPurchase_args(
8909
      long purchaseId)
4496 mandeep.dh 8910
    {
8911
      this();
8912
      this.purchaseId = purchaseId;
8913
      setPurchaseIdIsSet(true);
8914
    }
8915
 
8916
    /**
8917
     * Performs a deep copy on <i>other</i>.
8918
     */
4555 mandeep.dh 8919
    public getPurchaseOrderForPurchase_args(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 8920
      __isset_bit_vector.clear();
8921
      __isset_bit_vector.or(other.__isset_bit_vector);
8922
      this.purchaseId = other.purchaseId;
8923
    }
8924
 
4555 mandeep.dh 8925
    public getPurchaseOrderForPurchase_args deepCopy() {
8926
      return new getPurchaseOrderForPurchase_args(this);
4496 mandeep.dh 8927
    }
8928
 
8929
    @Override
8930
    public void clear() {
8931
      setPurchaseIdIsSet(false);
8932
      this.purchaseId = 0;
8933
    }
8934
 
8935
    public long getPurchaseId() {
8936
      return this.purchaseId;
8937
    }
8938
 
8939
    public void setPurchaseId(long purchaseId) {
8940
      this.purchaseId = purchaseId;
8941
      setPurchaseIdIsSet(true);
8942
    }
8943
 
8944
    public void unsetPurchaseId() {
8945
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
8946
    }
8947
 
8948
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
8949
    public boolean isSetPurchaseId() {
8950
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
8951
    }
8952
 
8953
    public void setPurchaseIdIsSet(boolean value) {
8954
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
8955
    }
8956
 
8957
    public void setFieldValue(_Fields field, Object value) {
8958
      switch (field) {
8959
      case PURCHASE_ID:
8960
        if (value == null) {
8961
          unsetPurchaseId();
8962
        } else {
8963
          setPurchaseId((Long)value);
8964
        }
8965
        break;
8966
 
8967
      }
8968
    }
8969
 
8970
    public Object getFieldValue(_Fields field) {
8971
      switch (field) {
8972
      case PURCHASE_ID:
8973
        return Long.valueOf(getPurchaseId());
8974
 
8975
      }
8976
      throw new IllegalStateException();
8977
    }
8978
 
8979
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8980
    public boolean isSet(_Fields field) {
8981
      if (field == null) {
8982
        throw new IllegalArgumentException();
8983
      }
8984
 
8985
      switch (field) {
8986
      case PURCHASE_ID:
8987
        return isSetPurchaseId();
8988
      }
8989
      throw new IllegalStateException();
8990
    }
8991
 
8992
    @Override
8993
    public boolean equals(Object that) {
8994
      if (that == null)
8995
        return false;
4555 mandeep.dh 8996
      if (that instanceof getPurchaseOrderForPurchase_args)
8997
        return this.equals((getPurchaseOrderForPurchase_args)that);
4496 mandeep.dh 8998
      return false;
8999
    }
9000
 
4555 mandeep.dh 9001
    public boolean equals(getPurchaseOrderForPurchase_args that) {
4496 mandeep.dh 9002
      if (that == null)
9003
        return false;
9004
 
9005
      boolean this_present_purchaseId = true;
9006
      boolean that_present_purchaseId = true;
9007
      if (this_present_purchaseId || that_present_purchaseId) {
9008
        if (!(this_present_purchaseId && that_present_purchaseId))
9009
          return false;
9010
        if (this.purchaseId != that.purchaseId)
9011
          return false;
9012
      }
9013
 
9014
      return true;
9015
    }
9016
 
9017
    @Override
9018
    public int hashCode() {
9019
      return 0;
9020
    }
9021
 
4555 mandeep.dh 9022
    public int compareTo(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 9023
      if (!getClass().equals(other.getClass())) {
9024
        return getClass().getName().compareTo(other.getClass().getName());
9025
      }
9026
 
9027
      int lastComparison = 0;
4555 mandeep.dh 9028
      getPurchaseOrderForPurchase_args typedOther = (getPurchaseOrderForPurchase_args)other;
4496 mandeep.dh 9029
 
9030
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
9031
      if (lastComparison != 0) {
9032
        return lastComparison;
9033
      }
9034
      if (isSetPurchaseId()) {
9035
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
9036
        if (lastComparison != 0) {
9037
          return lastComparison;
9038
        }
9039
      }
9040
      return 0;
9041
    }
9042
 
9043
    public _Fields fieldForId(int fieldId) {
9044
      return _Fields.findByThriftId(fieldId);
9045
    }
9046
 
9047
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9048
      org.apache.thrift.protocol.TField field;
9049
      iprot.readStructBegin();
9050
      while (true)
9051
      {
9052
        field = iprot.readFieldBegin();
9053
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9054
          break;
9055
        }
9056
        switch (field.id) {
9057
          case 1: // PURCHASE_ID
9058
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9059
              this.purchaseId = iprot.readI64();
9060
              setPurchaseIdIsSet(true);
9061
            } else { 
9062
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9063
            }
9064
            break;
9065
          default:
9066
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9067
        }
9068
        iprot.readFieldEnd();
9069
      }
9070
      iprot.readStructEnd();
9071
      validate();
9072
    }
9073
 
9074
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9075
      validate();
9076
 
9077
      oprot.writeStructBegin(STRUCT_DESC);
9078
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
9079
      oprot.writeI64(this.purchaseId);
9080
      oprot.writeFieldEnd();
9081
      oprot.writeFieldStop();
9082
      oprot.writeStructEnd();
9083
    }
9084
 
9085
    @Override
9086
    public String toString() {
4555 mandeep.dh 9087
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_args(");
4496 mandeep.dh 9088
      boolean first = true;
9089
 
9090
      sb.append("purchaseId:");
9091
      sb.append(this.purchaseId);
9092
      first = false;
9093
      sb.append(")");
9094
      return sb.toString();
9095
    }
9096
 
9097
    public void validate() throws org.apache.thrift.TException {
9098
      // check for required fields
9099
    }
9100
 
9101
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9102
      try {
9103
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9104
      } catch (org.apache.thrift.TException te) {
9105
        throw new java.io.IOException(te);
9106
      }
9107
    }
9108
 
9109
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9110
      try {
4555 mandeep.dh 9111
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9112
        __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 9113
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9114
      } catch (org.apache.thrift.TException te) {
9115
        throw new java.io.IOException(te);
9116
      }
9117
    }
9118
 
9119
  }
9120
 
4555 mandeep.dh 9121
  public static class getPurchaseOrderForPurchase_result implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_result, getPurchaseOrderForPurchase_result._Fields>, java.io.Serializable, Cloneable   {
9122
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_result");
4496 mandeep.dh 9123
 
4555 mandeep.dh 9124
    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 9125
 
4555 mandeep.dh 9126
    private PurchaseOrder success; // required
4496 mandeep.dh 9127
 
9128
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9129
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9130
      SUCCESS((short)0, "success");
9131
 
9132
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9133
 
9134
      static {
9135
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9136
          byName.put(field.getFieldName(), field);
9137
        }
9138
      }
9139
 
9140
      /**
9141
       * Find the _Fields constant that matches fieldId, or null if its not found.
9142
       */
9143
      public static _Fields findByThriftId(int fieldId) {
9144
        switch(fieldId) {
9145
          case 0: // SUCCESS
9146
            return SUCCESS;
9147
          default:
9148
            return null;
9149
        }
9150
      }
9151
 
9152
      /**
9153
       * Find the _Fields constant that matches fieldId, throwing an exception
9154
       * if it is not found.
9155
       */
9156
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9157
        _Fields fields = findByThriftId(fieldId);
9158
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9159
        return fields;
9160
      }
9161
 
9162
      /**
9163
       * Find the _Fields constant that matches name, or null if its not found.
9164
       */
9165
      public static _Fields findByName(String name) {
9166
        return byName.get(name);
9167
      }
9168
 
9169
      private final short _thriftId;
9170
      private final String _fieldName;
9171
 
9172
      _Fields(short thriftId, String fieldName) {
9173
        _thriftId = thriftId;
9174
        _fieldName = fieldName;
9175
      }
9176
 
9177
      public short getThriftFieldId() {
9178
        return _thriftId;
9179
      }
9180
 
9181
      public String getFieldName() {
9182
        return _fieldName;
9183
      }
9184
    }
9185
 
9186
    // isset id assignments
9187
 
9188
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9189
    static {
9190
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9191
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 9192
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
4496 mandeep.dh 9193
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 9194
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_result.class, metaDataMap);
4496 mandeep.dh 9195
    }
9196
 
4555 mandeep.dh 9197
    public getPurchaseOrderForPurchase_result() {
4496 mandeep.dh 9198
    }
9199
 
4555 mandeep.dh 9200
    public getPurchaseOrderForPurchase_result(
9201
      PurchaseOrder success)
4496 mandeep.dh 9202
    {
9203
      this();
9204
      this.success = success;
9205
    }
9206
 
9207
    /**
9208
     * Performs a deep copy on <i>other</i>.
9209
     */
4555 mandeep.dh 9210
    public getPurchaseOrderForPurchase_result(getPurchaseOrderForPurchase_result other) {
9211
      if (other.isSetSuccess()) {
9212
        this.success = new PurchaseOrder(other.success);
9213
      }
4496 mandeep.dh 9214
    }
9215
 
4555 mandeep.dh 9216
    public getPurchaseOrderForPurchase_result deepCopy() {
9217
      return new getPurchaseOrderForPurchase_result(this);
4496 mandeep.dh 9218
    }
9219
 
9220
    @Override
9221
    public void clear() {
4555 mandeep.dh 9222
      this.success = null;
4496 mandeep.dh 9223
    }
9224
 
4555 mandeep.dh 9225
    public PurchaseOrder getSuccess() {
4496 mandeep.dh 9226
      return this.success;
9227
    }
9228
 
4555 mandeep.dh 9229
    public void setSuccess(PurchaseOrder success) {
4496 mandeep.dh 9230
      this.success = success;
9231
    }
9232
 
9233
    public void unsetSuccess() {
4555 mandeep.dh 9234
      this.success = null;
4496 mandeep.dh 9235
    }
9236
 
9237
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9238
    public boolean isSetSuccess() {
4555 mandeep.dh 9239
      return this.success != null;
4496 mandeep.dh 9240
    }
9241
 
9242
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 9243
      if (!value) {
9244
        this.success = null;
9245
      }
4496 mandeep.dh 9246
    }
9247
 
9248
    public void setFieldValue(_Fields field, Object value) {
9249
      switch (field) {
9250
      case SUCCESS:
9251
        if (value == null) {
9252
          unsetSuccess();
9253
        } else {
4555 mandeep.dh 9254
          setSuccess((PurchaseOrder)value);
4496 mandeep.dh 9255
        }
9256
        break;
9257
 
9258
      }
9259
    }
9260
 
9261
    public Object getFieldValue(_Fields field) {
9262
      switch (field) {
9263
      case SUCCESS:
4555 mandeep.dh 9264
        return getSuccess();
4496 mandeep.dh 9265
 
9266
      }
9267
      throw new IllegalStateException();
9268
    }
9269
 
9270
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9271
    public boolean isSet(_Fields field) {
9272
      if (field == null) {
9273
        throw new IllegalArgumentException();
9274
      }
9275
 
9276
      switch (field) {
9277
      case SUCCESS:
9278
        return isSetSuccess();
9279
      }
9280
      throw new IllegalStateException();
9281
    }
9282
 
9283
    @Override
9284
    public boolean equals(Object that) {
9285
      if (that == null)
9286
        return false;
4555 mandeep.dh 9287
      if (that instanceof getPurchaseOrderForPurchase_result)
9288
        return this.equals((getPurchaseOrderForPurchase_result)that);
4496 mandeep.dh 9289
      return false;
9290
    }
9291
 
4555 mandeep.dh 9292
    public boolean equals(getPurchaseOrderForPurchase_result that) {
4496 mandeep.dh 9293
      if (that == null)
9294
        return false;
9295
 
4555 mandeep.dh 9296
      boolean this_present_success = true && this.isSetSuccess();
9297
      boolean that_present_success = true && that.isSetSuccess();
4496 mandeep.dh 9298
      if (this_present_success || that_present_success) {
9299
        if (!(this_present_success && that_present_success))
9300
          return false;
4555 mandeep.dh 9301
        if (!this.success.equals(that.success))
4496 mandeep.dh 9302
          return false;
9303
      }
9304
 
9305
      return true;
9306
    }
9307
 
9308
    @Override
9309
    public int hashCode() {
9310
      return 0;
9311
    }
9312
 
4555 mandeep.dh 9313
    public int compareTo(getPurchaseOrderForPurchase_result other) {
4496 mandeep.dh 9314
      if (!getClass().equals(other.getClass())) {
9315
        return getClass().getName().compareTo(other.getClass().getName());
9316
      }
9317
 
9318
      int lastComparison = 0;
4555 mandeep.dh 9319
      getPurchaseOrderForPurchase_result typedOther = (getPurchaseOrderForPurchase_result)other;
4496 mandeep.dh 9320
 
9321
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9322
      if (lastComparison != 0) {
9323
        return lastComparison;
9324
      }
9325
      if (isSetSuccess()) {
9326
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9327
        if (lastComparison != 0) {
9328
          return lastComparison;
9329
        }
9330
      }
9331
      return 0;
9332
    }
9333
 
9334
    public _Fields fieldForId(int fieldId) {
9335
      return _Fields.findByThriftId(fieldId);
9336
    }
9337
 
9338
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9339
      org.apache.thrift.protocol.TField field;
9340
      iprot.readStructBegin();
9341
      while (true)
9342
      {
9343
        field = iprot.readFieldBegin();
9344
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9345
          break;
9346
        }
9347
        switch (field.id) {
9348
          case 0: // SUCCESS
4555 mandeep.dh 9349
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9350
              this.success = new PurchaseOrder();
9351
              this.success.read(iprot);
4496 mandeep.dh 9352
            } else { 
9353
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9354
            }
9355
            break;
9356
          default:
9357
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9358
        }
9359
        iprot.readFieldEnd();
9360
      }
9361
      iprot.readStructEnd();
9362
      validate();
9363
    }
9364
 
9365
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9366
      oprot.writeStructBegin(STRUCT_DESC);
9367
 
9368
      if (this.isSetSuccess()) {
9369
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 9370
        this.success.write(oprot);
4496 mandeep.dh 9371
        oprot.writeFieldEnd();
9372
      }
9373
      oprot.writeFieldStop();
9374
      oprot.writeStructEnd();
9375
    }
9376
 
9377
    @Override
9378
    public String toString() {
4555 mandeep.dh 9379
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_result(");
4496 mandeep.dh 9380
      boolean first = true;
9381
 
9382
      sb.append("success:");
4555 mandeep.dh 9383
      if (this.success == null) {
9384
        sb.append("null");
9385
      } else {
9386
        sb.append(this.success);
9387
      }
4496 mandeep.dh 9388
      first = false;
9389
      sb.append(")");
9390
      return sb.toString();
9391
    }
9392
 
9393
    public void validate() throws org.apache.thrift.TException {
9394
      // check for required fields
9395
    }
9396
 
9397
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9398
      try {
9399
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9400
      } catch (org.apache.thrift.TException te) {
9401
        throw new java.io.IOException(te);
9402
      }
9403
    }
9404
 
9405
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9406
      try {
9407
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9408
      } catch (org.apache.thrift.TException te) {
9409
        throw new java.io.IOException(te);
9410
      }
9411
    }
9412
 
9413
  }
9414
 
4754 mandeep.dh 9415
  public static class getPendingPurchaseOrders_args implements org.apache.thrift.TBase<getPendingPurchaseOrders_args, getPendingPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
9416
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_args");
9417
 
9418
    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);
9419
 
9420
    private long warehouseId; // required
9421
 
9422
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9423
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9424
      WAREHOUSE_ID((short)1, "warehouseId");
9425
 
9426
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9427
 
9428
      static {
9429
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9430
          byName.put(field.getFieldName(), field);
9431
        }
9432
      }
9433
 
9434
      /**
9435
       * Find the _Fields constant that matches fieldId, or null if its not found.
9436
       */
9437
      public static _Fields findByThriftId(int fieldId) {
9438
        switch(fieldId) {
9439
          case 1: // WAREHOUSE_ID
9440
            return WAREHOUSE_ID;
9441
          default:
9442
            return null;
9443
        }
9444
      }
9445
 
9446
      /**
9447
       * Find the _Fields constant that matches fieldId, throwing an exception
9448
       * if it is not found.
9449
       */
9450
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9451
        _Fields fields = findByThriftId(fieldId);
9452
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9453
        return fields;
9454
      }
9455
 
9456
      /**
9457
       * Find the _Fields constant that matches name, or null if its not found.
9458
       */
9459
      public static _Fields findByName(String name) {
9460
        return byName.get(name);
9461
      }
9462
 
9463
      private final short _thriftId;
9464
      private final String _fieldName;
9465
 
9466
      _Fields(short thriftId, String fieldName) {
9467
        _thriftId = thriftId;
9468
        _fieldName = fieldName;
9469
      }
9470
 
9471
      public short getThriftFieldId() {
9472
        return _thriftId;
9473
      }
9474
 
9475
      public String getFieldName() {
9476
        return _fieldName;
9477
      }
9478
    }
9479
 
9480
    // isset id assignments
9481
    private static final int __WAREHOUSEID_ISSET_ID = 0;
9482
    private BitSet __isset_bit_vector = new BitSet(1);
9483
 
9484
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9485
    static {
9486
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9487
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9488
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9489
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9490
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_args.class, metaDataMap);
9491
    }
9492
 
9493
    public getPendingPurchaseOrders_args() {
9494
    }
9495
 
9496
    public getPendingPurchaseOrders_args(
9497
      long warehouseId)
9498
    {
9499
      this();
9500
      this.warehouseId = warehouseId;
9501
      setWarehouseIdIsSet(true);
9502
    }
9503
 
9504
    /**
9505
     * Performs a deep copy on <i>other</i>.
9506
     */
9507
    public getPendingPurchaseOrders_args(getPendingPurchaseOrders_args other) {
9508
      __isset_bit_vector.clear();
9509
      __isset_bit_vector.or(other.__isset_bit_vector);
9510
      this.warehouseId = other.warehouseId;
9511
    }
9512
 
9513
    public getPendingPurchaseOrders_args deepCopy() {
9514
      return new getPendingPurchaseOrders_args(this);
9515
    }
9516
 
9517
    @Override
9518
    public void clear() {
9519
      setWarehouseIdIsSet(false);
9520
      this.warehouseId = 0;
9521
    }
9522
 
9523
    public long getWarehouseId() {
9524
      return this.warehouseId;
9525
    }
9526
 
9527
    public void setWarehouseId(long warehouseId) {
9528
      this.warehouseId = warehouseId;
9529
      setWarehouseIdIsSet(true);
9530
    }
9531
 
9532
    public void unsetWarehouseId() {
9533
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
9534
    }
9535
 
9536
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
9537
    public boolean isSetWarehouseId() {
9538
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
9539
    }
9540
 
9541
    public void setWarehouseIdIsSet(boolean value) {
9542
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
9543
    }
9544
 
9545
    public void setFieldValue(_Fields field, Object value) {
9546
      switch (field) {
9547
      case WAREHOUSE_ID:
9548
        if (value == null) {
9549
          unsetWarehouseId();
9550
        } else {
9551
          setWarehouseId((Long)value);
9552
        }
9553
        break;
9554
 
9555
      }
9556
    }
9557
 
9558
    public Object getFieldValue(_Fields field) {
9559
      switch (field) {
9560
      case WAREHOUSE_ID:
9561
        return Long.valueOf(getWarehouseId());
9562
 
9563
      }
9564
      throw new IllegalStateException();
9565
    }
9566
 
9567
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9568
    public boolean isSet(_Fields field) {
9569
      if (field == null) {
9570
        throw new IllegalArgumentException();
9571
      }
9572
 
9573
      switch (field) {
9574
      case WAREHOUSE_ID:
9575
        return isSetWarehouseId();
9576
      }
9577
      throw new IllegalStateException();
9578
    }
9579
 
9580
    @Override
9581
    public boolean equals(Object that) {
9582
      if (that == null)
9583
        return false;
9584
      if (that instanceof getPendingPurchaseOrders_args)
9585
        return this.equals((getPendingPurchaseOrders_args)that);
9586
      return false;
9587
    }
9588
 
9589
    public boolean equals(getPendingPurchaseOrders_args that) {
9590
      if (that == null)
9591
        return false;
9592
 
9593
      boolean this_present_warehouseId = true;
9594
      boolean that_present_warehouseId = true;
9595
      if (this_present_warehouseId || that_present_warehouseId) {
9596
        if (!(this_present_warehouseId && that_present_warehouseId))
9597
          return false;
9598
        if (this.warehouseId != that.warehouseId)
9599
          return false;
9600
      }
9601
 
9602
      return true;
9603
    }
9604
 
9605
    @Override
9606
    public int hashCode() {
9607
      return 0;
9608
    }
9609
 
9610
    public int compareTo(getPendingPurchaseOrders_args other) {
9611
      if (!getClass().equals(other.getClass())) {
9612
        return getClass().getName().compareTo(other.getClass().getName());
9613
      }
9614
 
9615
      int lastComparison = 0;
9616
      getPendingPurchaseOrders_args typedOther = (getPendingPurchaseOrders_args)other;
9617
 
9618
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
9619
      if (lastComparison != 0) {
9620
        return lastComparison;
9621
      }
9622
      if (isSetWarehouseId()) {
9623
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
9624
        if (lastComparison != 0) {
9625
          return lastComparison;
9626
        }
9627
      }
9628
      return 0;
9629
    }
9630
 
9631
    public _Fields fieldForId(int fieldId) {
9632
      return _Fields.findByThriftId(fieldId);
9633
    }
9634
 
9635
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9636
      org.apache.thrift.protocol.TField field;
9637
      iprot.readStructBegin();
9638
      while (true)
9639
      {
9640
        field = iprot.readFieldBegin();
9641
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9642
          break;
9643
        }
9644
        switch (field.id) {
9645
          case 1: // WAREHOUSE_ID
9646
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9647
              this.warehouseId = iprot.readI64();
9648
              setWarehouseIdIsSet(true);
9649
            } else { 
9650
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9651
            }
9652
            break;
9653
          default:
9654
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9655
        }
9656
        iprot.readFieldEnd();
9657
      }
9658
      iprot.readStructEnd();
9659
      validate();
9660
    }
9661
 
9662
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9663
      validate();
9664
 
9665
      oprot.writeStructBegin(STRUCT_DESC);
9666
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
9667
      oprot.writeI64(this.warehouseId);
9668
      oprot.writeFieldEnd();
9669
      oprot.writeFieldStop();
9670
      oprot.writeStructEnd();
9671
    }
9672
 
9673
    @Override
9674
    public String toString() {
9675
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_args(");
9676
      boolean first = true;
9677
 
9678
      sb.append("warehouseId:");
9679
      sb.append(this.warehouseId);
9680
      first = false;
9681
      sb.append(")");
9682
      return sb.toString();
9683
    }
9684
 
9685
    public void validate() throws org.apache.thrift.TException {
9686
      // check for required fields
9687
    }
9688
 
9689
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9690
      try {
9691
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9692
      } catch (org.apache.thrift.TException te) {
9693
        throw new java.io.IOException(te);
9694
      }
9695
    }
9696
 
9697
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9698
      try {
9699
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9700
        __isset_bit_vector = new BitSet(1);
9701
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9702
      } catch (org.apache.thrift.TException te) {
9703
        throw new java.io.IOException(te);
9704
      }
9705
    }
9706
 
9707
  }
9708
 
9709
  public static class getPendingPurchaseOrders_result implements org.apache.thrift.TBase<getPendingPurchaseOrders_result, getPendingPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
9710
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_result");
9711
 
9712
    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);
9713
    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);
9714
 
9715
    private List<PurchaseOrder> success; // required
9716
    private PurchaseServiceException e; // required
9717
 
9718
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9719
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9720
      SUCCESS((short)0, "success"),
9721
      E((short)1, "e");
9722
 
9723
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9724
 
9725
      static {
9726
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9727
          byName.put(field.getFieldName(), field);
9728
        }
9729
      }
9730
 
9731
      /**
9732
       * Find the _Fields constant that matches fieldId, or null if its not found.
9733
       */
9734
      public static _Fields findByThriftId(int fieldId) {
9735
        switch(fieldId) {
9736
          case 0: // SUCCESS
9737
            return SUCCESS;
9738
          case 1: // E
9739
            return E;
9740
          default:
9741
            return null;
9742
        }
9743
      }
9744
 
9745
      /**
9746
       * Find the _Fields constant that matches fieldId, throwing an exception
9747
       * if it is not found.
9748
       */
9749
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9750
        _Fields fields = findByThriftId(fieldId);
9751
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9752
        return fields;
9753
      }
9754
 
9755
      /**
9756
       * Find the _Fields constant that matches name, or null if its not found.
9757
       */
9758
      public static _Fields findByName(String name) {
9759
        return byName.get(name);
9760
      }
9761
 
9762
      private final short _thriftId;
9763
      private final String _fieldName;
9764
 
9765
      _Fields(short thriftId, String fieldName) {
9766
        _thriftId = thriftId;
9767
        _fieldName = fieldName;
9768
      }
9769
 
9770
      public short getThriftFieldId() {
9771
        return _thriftId;
9772
      }
9773
 
9774
      public String getFieldName() {
9775
        return _fieldName;
9776
      }
9777
    }
9778
 
9779
    // isset id assignments
9780
 
9781
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9782
    static {
9783
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9784
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9785
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
9786
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
9787
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9788
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9789
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9790
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_result.class, metaDataMap);
9791
    }
9792
 
9793
    public getPendingPurchaseOrders_result() {
9794
    }
9795
 
9796
    public getPendingPurchaseOrders_result(
9797
      List<PurchaseOrder> success,
9798
      PurchaseServiceException e)
9799
    {
9800
      this();
9801
      this.success = success;
9802
      this.e = e;
9803
    }
9804
 
9805
    /**
9806
     * Performs a deep copy on <i>other</i>.
9807
     */
9808
    public getPendingPurchaseOrders_result(getPendingPurchaseOrders_result other) {
9809
      if (other.isSetSuccess()) {
9810
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
9811
        for (PurchaseOrder other_element : other.success) {
9812
          __this__success.add(new PurchaseOrder(other_element));
9813
        }
9814
        this.success = __this__success;
9815
      }
9816
      if (other.isSetE()) {
9817
        this.e = new PurchaseServiceException(other.e);
9818
      }
9819
    }
9820
 
9821
    public getPendingPurchaseOrders_result deepCopy() {
9822
      return new getPendingPurchaseOrders_result(this);
9823
    }
9824
 
9825
    @Override
9826
    public void clear() {
9827
      this.success = null;
9828
      this.e = null;
9829
    }
9830
 
9831
    public int getSuccessSize() {
9832
      return (this.success == null) ? 0 : this.success.size();
9833
    }
9834
 
9835
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
9836
      return (this.success == null) ? null : this.success.iterator();
9837
    }
9838
 
9839
    public void addToSuccess(PurchaseOrder elem) {
9840
      if (this.success == null) {
9841
        this.success = new ArrayList<PurchaseOrder>();
9842
      }
9843
      this.success.add(elem);
9844
    }
9845
 
9846
    public List<PurchaseOrder> getSuccess() {
9847
      return this.success;
9848
    }
9849
 
9850
    public void setSuccess(List<PurchaseOrder> success) {
9851
      this.success = success;
9852
    }
9853
 
9854
    public void unsetSuccess() {
9855
      this.success = null;
9856
    }
9857
 
9858
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9859
    public boolean isSetSuccess() {
9860
      return this.success != null;
9861
    }
9862
 
9863
    public void setSuccessIsSet(boolean value) {
9864
      if (!value) {
9865
        this.success = null;
9866
      }
9867
    }
9868
 
9869
    public PurchaseServiceException getE() {
9870
      return this.e;
9871
    }
9872
 
9873
    public void setE(PurchaseServiceException e) {
9874
      this.e = e;
9875
    }
9876
 
9877
    public void unsetE() {
9878
      this.e = null;
9879
    }
9880
 
9881
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
9882
    public boolean isSetE() {
9883
      return this.e != null;
9884
    }
9885
 
9886
    public void setEIsSet(boolean value) {
9887
      if (!value) {
9888
        this.e = null;
9889
      }
9890
    }
9891
 
9892
    public void setFieldValue(_Fields field, Object value) {
9893
      switch (field) {
9894
      case SUCCESS:
9895
        if (value == null) {
9896
          unsetSuccess();
9897
        } else {
9898
          setSuccess((List<PurchaseOrder>)value);
9899
        }
9900
        break;
9901
 
9902
      case E:
9903
        if (value == null) {
9904
          unsetE();
9905
        } else {
9906
          setE((PurchaseServiceException)value);
9907
        }
9908
        break;
9909
 
9910
      }
9911
    }
9912
 
9913
    public Object getFieldValue(_Fields field) {
9914
      switch (field) {
9915
      case SUCCESS:
9916
        return getSuccess();
9917
 
9918
      case E:
9919
        return getE();
9920
 
9921
      }
9922
      throw new IllegalStateException();
9923
    }
9924
 
9925
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9926
    public boolean isSet(_Fields field) {
9927
      if (field == null) {
9928
        throw new IllegalArgumentException();
9929
      }
9930
 
9931
      switch (field) {
9932
      case SUCCESS:
9933
        return isSetSuccess();
9934
      case E:
9935
        return isSetE();
9936
      }
9937
      throw new IllegalStateException();
9938
    }
9939
 
9940
    @Override
9941
    public boolean equals(Object that) {
9942
      if (that == null)
9943
        return false;
9944
      if (that instanceof getPendingPurchaseOrders_result)
9945
        return this.equals((getPendingPurchaseOrders_result)that);
9946
      return false;
9947
    }
9948
 
9949
    public boolean equals(getPendingPurchaseOrders_result that) {
9950
      if (that == null)
9951
        return false;
9952
 
9953
      boolean this_present_success = true && this.isSetSuccess();
9954
      boolean that_present_success = true && that.isSetSuccess();
9955
      if (this_present_success || that_present_success) {
9956
        if (!(this_present_success && that_present_success))
9957
          return false;
9958
        if (!this.success.equals(that.success))
9959
          return false;
9960
      }
9961
 
9962
      boolean this_present_e = true && this.isSetE();
9963
      boolean that_present_e = true && that.isSetE();
9964
      if (this_present_e || that_present_e) {
9965
        if (!(this_present_e && that_present_e))
9966
          return false;
9967
        if (!this.e.equals(that.e))
9968
          return false;
9969
      }
9970
 
9971
      return true;
9972
    }
9973
 
9974
    @Override
9975
    public int hashCode() {
9976
      return 0;
9977
    }
9978
 
9979
    public int compareTo(getPendingPurchaseOrders_result other) {
9980
      if (!getClass().equals(other.getClass())) {
9981
        return getClass().getName().compareTo(other.getClass().getName());
9982
      }
9983
 
9984
      int lastComparison = 0;
9985
      getPendingPurchaseOrders_result typedOther = (getPendingPurchaseOrders_result)other;
9986
 
9987
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9988
      if (lastComparison != 0) {
9989
        return lastComparison;
9990
      }
9991
      if (isSetSuccess()) {
9992
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9993
        if (lastComparison != 0) {
9994
          return lastComparison;
9995
        }
9996
      }
9997
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
9998
      if (lastComparison != 0) {
9999
        return lastComparison;
10000
      }
10001
      if (isSetE()) {
10002
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
10003
        if (lastComparison != 0) {
10004
          return lastComparison;
10005
        }
10006
      }
10007
      return 0;
10008
    }
10009
 
10010
    public _Fields fieldForId(int fieldId) {
10011
      return _Fields.findByThriftId(fieldId);
10012
    }
10013
 
10014
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10015
      org.apache.thrift.protocol.TField field;
10016
      iprot.readStructBegin();
10017
      while (true)
10018
      {
10019
        field = iprot.readFieldBegin();
10020
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10021
          break;
10022
        }
10023
        switch (field.id) {
10024
          case 0: // SUCCESS
10025
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
10026
              {
6385 amar.kumar 10027
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
10028
                this.success = new ArrayList<PurchaseOrder>(_list16.size);
10029
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
4754 mandeep.dh 10030
                {
6385 amar.kumar 10031
                  PurchaseOrder _elem18; // required
10032
                  _elem18 = new PurchaseOrder();
10033
                  _elem18.read(iprot);
10034
                  this.success.add(_elem18);
4754 mandeep.dh 10035
                }
10036
                iprot.readListEnd();
10037
              }
10038
            } else { 
10039
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10040
            }
10041
            break;
10042
          case 1: // E
10043
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10044
              this.e = new PurchaseServiceException();
10045
              this.e.read(iprot);
10046
            } else { 
10047
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10048
            }
10049
            break;
10050
          default:
10051
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10052
        }
10053
        iprot.readFieldEnd();
10054
      }
10055
      iprot.readStructEnd();
10056
      validate();
10057
    }
10058
 
10059
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10060
      oprot.writeStructBegin(STRUCT_DESC);
10061
 
10062
      if (this.isSetSuccess()) {
10063
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10064
        {
10065
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 10066
          for (PurchaseOrder _iter19 : this.success)
4754 mandeep.dh 10067
          {
6385 amar.kumar 10068
            _iter19.write(oprot);
4754 mandeep.dh 10069
          }
10070
          oprot.writeListEnd();
10071
        }
10072
        oprot.writeFieldEnd();
10073
      } else if (this.isSetE()) {
10074
        oprot.writeFieldBegin(E_FIELD_DESC);
10075
        this.e.write(oprot);
10076
        oprot.writeFieldEnd();
10077
      }
10078
      oprot.writeFieldStop();
10079
      oprot.writeStructEnd();
10080
    }
10081
 
10082
    @Override
10083
    public String toString() {
10084
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_result(");
10085
      boolean first = true;
10086
 
10087
      sb.append("success:");
10088
      if (this.success == null) {
10089
        sb.append("null");
10090
      } else {
10091
        sb.append(this.success);
10092
      }
10093
      first = false;
10094
      if (!first) sb.append(", ");
10095
      sb.append("e:");
10096
      if (this.e == null) {
10097
        sb.append("null");
10098
      } else {
10099
        sb.append(this.e);
10100
      }
10101
      first = false;
10102
      sb.append(")");
10103
      return sb.toString();
10104
    }
10105
 
10106
    public void validate() throws org.apache.thrift.TException {
10107
      // check for required fields
10108
    }
10109
 
10110
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10111
      try {
10112
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10113
      } catch (org.apache.thrift.TException te) {
10114
        throw new java.io.IOException(te);
10115
      }
10116
    }
10117
 
10118
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10119
      try {
10120
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10121
      } catch (org.apache.thrift.TException te) {
10122
        throw new java.io.IOException(te);
10123
      }
10124
    }
10125
 
10126
  }
10127
 
10128
  public static class getSuppliers_args implements org.apache.thrift.TBase<getSuppliers_args, getSuppliers_args._Fields>, java.io.Serializable, Cloneable   {
10129
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_args");
10130
 
10131
 
10132
 
10133
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10134
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10135
;
10136
 
10137
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10138
 
10139
      static {
10140
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10141
          byName.put(field.getFieldName(), field);
10142
        }
10143
      }
10144
 
10145
      /**
10146
       * Find the _Fields constant that matches fieldId, or null if its not found.
10147
       */
10148
      public static _Fields findByThriftId(int fieldId) {
10149
        switch(fieldId) {
10150
          default:
10151
            return null;
10152
        }
10153
      }
10154
 
10155
      /**
10156
       * Find the _Fields constant that matches fieldId, throwing an exception
10157
       * if it is not found.
10158
       */
10159
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10160
        _Fields fields = findByThriftId(fieldId);
10161
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10162
        return fields;
10163
      }
10164
 
10165
      /**
10166
       * Find the _Fields constant that matches name, or null if its not found.
10167
       */
10168
      public static _Fields findByName(String name) {
10169
        return byName.get(name);
10170
      }
10171
 
10172
      private final short _thriftId;
10173
      private final String _fieldName;
10174
 
10175
      _Fields(short thriftId, String fieldName) {
10176
        _thriftId = thriftId;
10177
        _fieldName = fieldName;
10178
      }
10179
 
10180
      public short getThriftFieldId() {
10181
        return _thriftId;
10182
      }
10183
 
10184
      public String getFieldName() {
10185
        return _fieldName;
10186
      }
10187
    }
10188
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10189
    static {
10190
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10191
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10192
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_args.class, metaDataMap);
10193
    }
10194
 
10195
    public getSuppliers_args() {
10196
    }
10197
 
10198
    /**
10199
     * Performs a deep copy on <i>other</i>.
10200
     */
10201
    public getSuppliers_args(getSuppliers_args other) {
10202
    }
10203
 
10204
    public getSuppliers_args deepCopy() {
10205
      return new getSuppliers_args(this);
10206
    }
10207
 
10208
    @Override
10209
    public void clear() {
10210
    }
10211
 
10212
    public void setFieldValue(_Fields field, Object value) {
10213
      switch (field) {
10214
      }
10215
    }
10216
 
10217
    public Object getFieldValue(_Fields field) {
10218
      switch (field) {
10219
      }
10220
      throw new IllegalStateException();
10221
    }
10222
 
10223
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10224
    public boolean isSet(_Fields field) {
10225
      if (field == null) {
10226
        throw new IllegalArgumentException();
10227
      }
10228
 
10229
      switch (field) {
10230
      }
10231
      throw new IllegalStateException();
10232
    }
10233
 
10234
    @Override
10235
    public boolean equals(Object that) {
10236
      if (that == null)
10237
        return false;
10238
      if (that instanceof getSuppliers_args)
10239
        return this.equals((getSuppliers_args)that);
10240
      return false;
10241
    }
10242
 
10243
    public boolean equals(getSuppliers_args that) {
10244
      if (that == null)
10245
        return false;
10246
 
10247
      return true;
10248
    }
10249
 
10250
    @Override
10251
    public int hashCode() {
10252
      return 0;
10253
    }
10254
 
10255
    public int compareTo(getSuppliers_args other) {
10256
      if (!getClass().equals(other.getClass())) {
10257
        return getClass().getName().compareTo(other.getClass().getName());
10258
      }
10259
 
10260
      int lastComparison = 0;
10261
      getSuppliers_args typedOther = (getSuppliers_args)other;
10262
 
10263
      return 0;
10264
    }
10265
 
10266
    public _Fields fieldForId(int fieldId) {
10267
      return _Fields.findByThriftId(fieldId);
10268
    }
10269
 
10270
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10271
      org.apache.thrift.protocol.TField field;
10272
      iprot.readStructBegin();
10273
      while (true)
10274
      {
10275
        field = iprot.readFieldBegin();
10276
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10277
          break;
10278
        }
10279
        switch (field.id) {
10280
          default:
10281
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10282
        }
10283
        iprot.readFieldEnd();
10284
      }
10285
      iprot.readStructEnd();
10286
      validate();
10287
    }
10288
 
10289
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10290
      validate();
10291
 
10292
      oprot.writeStructBegin(STRUCT_DESC);
10293
      oprot.writeFieldStop();
10294
      oprot.writeStructEnd();
10295
    }
10296
 
10297
    @Override
10298
    public String toString() {
10299
      StringBuilder sb = new StringBuilder("getSuppliers_args(");
10300
      boolean first = true;
10301
 
10302
      sb.append(")");
10303
      return sb.toString();
10304
    }
10305
 
10306
    public void validate() throws org.apache.thrift.TException {
10307
      // check for required fields
10308
    }
10309
 
10310
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10311
      try {
10312
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10313
      } catch (org.apache.thrift.TException te) {
10314
        throw new java.io.IOException(te);
10315
      }
10316
    }
10317
 
10318
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10319
      try {
10320
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10321
      } catch (org.apache.thrift.TException te) {
10322
        throw new java.io.IOException(te);
10323
      }
10324
    }
10325
 
10326
  }
10327
 
10328
  public static class getSuppliers_result implements org.apache.thrift.TBase<getSuppliers_result, getSuppliers_result._Fields>, java.io.Serializable, Cloneable   {
10329
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_result");
10330
 
10331
    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);
10332
    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);
10333
 
10334
    private List<Supplier> success; // required
10335
    private PurchaseServiceException e; // required
10336
 
10337
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10338
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10339
      SUCCESS((short)0, "success"),
10340
      E((short)1, "e");
10341
 
10342
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10343
 
10344
      static {
10345
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10346
          byName.put(field.getFieldName(), field);
10347
        }
10348
      }
10349
 
10350
      /**
10351
       * Find the _Fields constant that matches fieldId, or null if its not found.
10352
       */
10353
      public static _Fields findByThriftId(int fieldId) {
10354
        switch(fieldId) {
10355
          case 0: // SUCCESS
10356
            return SUCCESS;
10357
          case 1: // E
10358
            return E;
10359
          default:
10360
            return null;
10361
        }
10362
      }
10363
 
10364
      /**
10365
       * Find the _Fields constant that matches fieldId, throwing an exception
10366
       * if it is not found.
10367
       */
10368
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10369
        _Fields fields = findByThriftId(fieldId);
10370
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10371
        return fields;
10372
      }
10373
 
10374
      /**
10375
       * Find the _Fields constant that matches name, or null if its not found.
10376
       */
10377
      public static _Fields findByName(String name) {
10378
        return byName.get(name);
10379
      }
10380
 
10381
      private final short _thriftId;
10382
      private final String _fieldName;
10383
 
10384
      _Fields(short thriftId, String fieldName) {
10385
        _thriftId = thriftId;
10386
        _fieldName = fieldName;
10387
      }
10388
 
10389
      public short getThriftFieldId() {
10390
        return _thriftId;
10391
      }
10392
 
10393
      public String getFieldName() {
10394
        return _fieldName;
10395
      }
10396
    }
10397
 
10398
    // isset id assignments
10399
 
10400
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10401
    static {
10402
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10403
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10404
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
10405
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class))));
10406
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10407
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
10408
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10409
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_result.class, metaDataMap);
10410
    }
10411
 
10412
    public getSuppliers_result() {
10413
    }
10414
 
10415
    public getSuppliers_result(
10416
      List<Supplier> success,
10417
      PurchaseServiceException e)
10418
    {
10419
      this();
10420
      this.success = success;
10421
      this.e = e;
10422
    }
10423
 
10424
    /**
10425
     * Performs a deep copy on <i>other</i>.
10426
     */
10427
    public getSuppliers_result(getSuppliers_result other) {
10428
      if (other.isSetSuccess()) {
10429
        List<Supplier> __this__success = new ArrayList<Supplier>();
10430
        for (Supplier other_element : other.success) {
10431
          __this__success.add(new Supplier(other_element));
10432
        }
10433
        this.success = __this__success;
10434
      }
10435
      if (other.isSetE()) {
10436
        this.e = new PurchaseServiceException(other.e);
10437
      }
10438
    }
10439
 
10440
    public getSuppliers_result deepCopy() {
10441
      return new getSuppliers_result(this);
10442
    }
10443
 
10444
    @Override
10445
    public void clear() {
10446
      this.success = null;
10447
      this.e = null;
10448
    }
10449
 
10450
    public int getSuccessSize() {
10451
      return (this.success == null) ? 0 : this.success.size();
10452
    }
10453
 
10454
    public java.util.Iterator<Supplier> getSuccessIterator() {
10455
      return (this.success == null) ? null : this.success.iterator();
10456
    }
10457
 
10458
    public void addToSuccess(Supplier elem) {
10459
      if (this.success == null) {
10460
        this.success = new ArrayList<Supplier>();
10461
      }
10462
      this.success.add(elem);
10463
    }
10464
 
10465
    public List<Supplier> getSuccess() {
10466
      return this.success;
10467
    }
10468
 
10469
    public void setSuccess(List<Supplier> success) {
10470
      this.success = success;
10471
    }
10472
 
10473
    public void unsetSuccess() {
10474
      this.success = null;
10475
    }
10476
 
10477
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
10478
    public boolean isSetSuccess() {
10479
      return this.success != null;
10480
    }
10481
 
10482
    public void setSuccessIsSet(boolean value) {
10483
      if (!value) {
10484
        this.success = null;
10485
      }
10486
    }
10487
 
10488
    public PurchaseServiceException getE() {
10489
      return this.e;
10490
    }
10491
 
10492
    public void setE(PurchaseServiceException e) {
10493
      this.e = e;
10494
    }
10495
 
10496
    public void unsetE() {
10497
      this.e = null;
10498
    }
10499
 
10500
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
10501
    public boolean isSetE() {
10502
      return this.e != null;
10503
    }
10504
 
10505
    public void setEIsSet(boolean value) {
10506
      if (!value) {
10507
        this.e = null;
10508
      }
10509
    }
10510
 
10511
    public void setFieldValue(_Fields field, Object value) {
10512
      switch (field) {
10513
      case SUCCESS:
10514
        if (value == null) {
10515
          unsetSuccess();
10516
        } else {
10517
          setSuccess((List<Supplier>)value);
10518
        }
10519
        break;
10520
 
10521
      case E:
10522
        if (value == null) {
10523
          unsetE();
10524
        } else {
10525
          setE((PurchaseServiceException)value);
10526
        }
10527
        break;
10528
 
10529
      }
10530
    }
10531
 
10532
    public Object getFieldValue(_Fields field) {
10533
      switch (field) {
10534
      case SUCCESS:
10535
        return getSuccess();
10536
 
10537
      case E:
10538
        return getE();
10539
 
10540
      }
10541
      throw new IllegalStateException();
10542
    }
10543
 
10544
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10545
    public boolean isSet(_Fields field) {
10546
      if (field == null) {
10547
        throw new IllegalArgumentException();
10548
      }
10549
 
10550
      switch (field) {
10551
      case SUCCESS:
10552
        return isSetSuccess();
10553
      case E:
10554
        return isSetE();
10555
      }
10556
      throw new IllegalStateException();
10557
    }
10558
 
10559
    @Override
10560
    public boolean equals(Object that) {
10561
      if (that == null)
10562
        return false;
10563
      if (that instanceof getSuppliers_result)
10564
        return this.equals((getSuppliers_result)that);
10565
      return false;
10566
    }
10567
 
10568
    public boolean equals(getSuppliers_result that) {
10569
      if (that == null)
10570
        return false;
10571
 
10572
      boolean this_present_success = true && this.isSetSuccess();
10573
      boolean that_present_success = true && that.isSetSuccess();
10574
      if (this_present_success || that_present_success) {
10575
        if (!(this_present_success && that_present_success))
10576
          return false;
10577
        if (!this.success.equals(that.success))
10578
          return false;
10579
      }
10580
 
10581
      boolean this_present_e = true && this.isSetE();
10582
      boolean that_present_e = true && that.isSetE();
10583
      if (this_present_e || that_present_e) {
10584
        if (!(this_present_e && that_present_e))
10585
          return false;
10586
        if (!this.e.equals(that.e))
10587
          return false;
10588
      }
10589
 
10590
      return true;
10591
    }
10592
 
10593
    @Override
10594
    public int hashCode() {
10595
      return 0;
10596
    }
10597
 
10598
    public int compareTo(getSuppliers_result other) {
10599
      if (!getClass().equals(other.getClass())) {
10600
        return getClass().getName().compareTo(other.getClass().getName());
10601
      }
10602
 
10603
      int lastComparison = 0;
10604
      getSuppliers_result typedOther = (getSuppliers_result)other;
10605
 
10606
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
10607
      if (lastComparison != 0) {
10608
        return lastComparison;
10609
      }
10610
      if (isSetSuccess()) {
10611
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
10612
        if (lastComparison != 0) {
10613
          return lastComparison;
10614
        }
10615
      }
10616
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
10617
      if (lastComparison != 0) {
10618
        return lastComparison;
10619
      }
10620
      if (isSetE()) {
10621
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
10622
        if (lastComparison != 0) {
10623
          return lastComparison;
10624
        }
10625
      }
10626
      return 0;
10627
    }
10628
 
10629
    public _Fields fieldForId(int fieldId) {
10630
      return _Fields.findByThriftId(fieldId);
10631
    }
10632
 
10633
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10634
      org.apache.thrift.protocol.TField field;
10635
      iprot.readStructBegin();
10636
      while (true)
10637
      {
10638
        field = iprot.readFieldBegin();
10639
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10640
          break;
10641
        }
10642
        switch (field.id) {
10643
          case 0: // SUCCESS
10644
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
10645
              {
6385 amar.kumar 10646
                org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
10647
                this.success = new ArrayList<Supplier>(_list20.size);
10648
                for (int _i21 = 0; _i21 < _list20.size; ++_i21)
4754 mandeep.dh 10649
                {
6385 amar.kumar 10650
                  Supplier _elem22; // required
10651
                  _elem22 = new Supplier();
10652
                  _elem22.read(iprot);
10653
                  this.success.add(_elem22);
4754 mandeep.dh 10654
                }
10655
                iprot.readListEnd();
10656
              }
10657
            } else { 
10658
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10659
            }
10660
            break;
10661
          case 1: // E
10662
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10663
              this.e = new PurchaseServiceException();
10664
              this.e.read(iprot);
10665
            } else { 
10666
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10667
            }
10668
            break;
10669
          default:
10670
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10671
        }
10672
        iprot.readFieldEnd();
10673
      }
10674
      iprot.readStructEnd();
10675
      validate();
10676
    }
10677
 
10678
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10679
      oprot.writeStructBegin(STRUCT_DESC);
10680
 
10681
      if (this.isSetSuccess()) {
10682
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10683
        {
10684
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 10685
          for (Supplier _iter23 : this.success)
4754 mandeep.dh 10686
          {
6385 amar.kumar 10687
            _iter23.write(oprot);
4754 mandeep.dh 10688
          }
10689
          oprot.writeListEnd();
10690
        }
10691
        oprot.writeFieldEnd();
10692
      } else if (this.isSetE()) {
10693
        oprot.writeFieldBegin(E_FIELD_DESC);
10694
        this.e.write(oprot);
10695
        oprot.writeFieldEnd();
10696
      }
10697
      oprot.writeFieldStop();
10698
      oprot.writeStructEnd();
10699
    }
10700
 
10701
    @Override
10702
    public String toString() {
10703
      StringBuilder sb = new StringBuilder("getSuppliers_result(");
10704
      boolean first = true;
10705
 
10706
      sb.append("success:");
10707
      if (this.success == null) {
10708
        sb.append("null");
10709
      } else {
10710
        sb.append(this.success);
10711
      }
10712
      first = false;
10713
      if (!first) sb.append(", ");
10714
      sb.append("e:");
10715
      if (this.e == null) {
10716
        sb.append("null");
10717
      } else {
10718
        sb.append(this.e);
10719
      }
10720
      first = false;
10721
      sb.append(")");
10722
      return sb.toString();
10723
    }
10724
 
10725
    public void validate() throws org.apache.thrift.TException {
10726
      // check for required fields
10727
    }
10728
 
10729
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10730
      try {
10731
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10732
      } catch (org.apache.thrift.TException te) {
10733
        throw new java.io.IOException(te);
10734
      }
10735
    }
10736
 
10737
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10738
      try {
10739
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10740
      } catch (org.apache.thrift.TException te) {
10741
        throw new java.io.IOException(te);
10742
      }
10743
    }
10744
 
10745
  }
10746
 
10747
  public static class fulfillPO_args implements org.apache.thrift.TBase<fulfillPO_args, fulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
10748
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_args");
10749
 
10750
    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);
10751
    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);
10752
    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);
10753
 
10754
    private long purchaseOrderId; // required
10755
    private long itemId; // required
10756
    private long quantity; // required
10757
 
10758
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10759
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10760
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
10761
      ITEM_ID((short)2, "itemId"),
10762
      QUANTITY((short)3, "quantity");
10763
 
10764
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10765
 
10766
      static {
10767
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10768
          byName.put(field.getFieldName(), field);
10769
        }
10770
      }
10771
 
10772
      /**
10773
       * Find the _Fields constant that matches fieldId, or null if its not found.
10774
       */
10775
      public static _Fields findByThriftId(int fieldId) {
10776
        switch(fieldId) {
10777
          case 1: // PURCHASE_ORDER_ID
10778
            return PURCHASE_ORDER_ID;
10779
          case 2: // ITEM_ID
10780
            return ITEM_ID;
10781
          case 3: // QUANTITY
10782
            return QUANTITY;
10783
          default:
10784
            return null;
10785
        }
10786
      }
10787
 
10788
      /**
10789
       * Find the _Fields constant that matches fieldId, throwing an exception
10790
       * if it is not found.
10791
       */
10792
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10793
        _Fields fields = findByThriftId(fieldId);
10794
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10795
        return fields;
10796
      }
10797
 
10798
      /**
10799
       * Find the _Fields constant that matches name, or null if its not found.
10800
       */
10801
      public static _Fields findByName(String name) {
10802
        return byName.get(name);
10803
      }
10804
 
10805
      private final short _thriftId;
10806
      private final String _fieldName;
10807
 
10808
      _Fields(short thriftId, String fieldName) {
10809
        _thriftId = thriftId;
10810
        _fieldName = fieldName;
10811
      }
10812
 
10813
      public short getThriftFieldId() {
10814
        return _thriftId;
10815
      }
10816
 
10817
      public String getFieldName() {
10818
        return _fieldName;
10819
      }
10820
    }
10821
 
10822
    // isset id assignments
10823
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
10824
    private static final int __ITEMID_ISSET_ID = 1;
10825
    private static final int __QUANTITY_ISSET_ID = 2;
10826
    private BitSet __isset_bit_vector = new BitSet(3);
10827
 
10828
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10829
    static {
10830
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10831
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10832
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10833
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10834
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10835
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10836
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10837
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10838
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_args.class, metaDataMap);
10839
    }
10840
 
10841
    public fulfillPO_args() {
10842
    }
10843
 
10844
    public fulfillPO_args(
10845
      long purchaseOrderId,
10846
      long itemId,
10847
      long quantity)
10848
    {
10849
      this();
10850
      this.purchaseOrderId = purchaseOrderId;
10851
      setPurchaseOrderIdIsSet(true);
10852
      this.itemId = itemId;
10853
      setItemIdIsSet(true);
10854
      this.quantity = quantity;
10855
      setQuantityIsSet(true);
10856
    }
10857
 
10858
    /**
10859
     * Performs a deep copy on <i>other</i>.
10860
     */
10861
    public fulfillPO_args(fulfillPO_args other) {
10862
      __isset_bit_vector.clear();
10863
      __isset_bit_vector.or(other.__isset_bit_vector);
10864
      this.purchaseOrderId = other.purchaseOrderId;
10865
      this.itemId = other.itemId;
10866
      this.quantity = other.quantity;
10867
    }
10868
 
10869
    public fulfillPO_args deepCopy() {
10870
      return new fulfillPO_args(this);
10871
    }
10872
 
10873
    @Override
10874
    public void clear() {
10875
      setPurchaseOrderIdIsSet(false);
10876
      this.purchaseOrderId = 0;
10877
      setItemIdIsSet(false);
10878
      this.itemId = 0;
10879
      setQuantityIsSet(false);
10880
      this.quantity = 0;
10881
    }
10882
 
10883
    public long getPurchaseOrderId() {
10884
      return this.purchaseOrderId;
10885
    }
10886
 
10887
    public void setPurchaseOrderId(long purchaseOrderId) {
10888
      this.purchaseOrderId = purchaseOrderId;
10889
      setPurchaseOrderIdIsSet(true);
10890
    }
10891
 
10892
    public void unsetPurchaseOrderId() {
10893
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
10894
    }
10895
 
10896
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
10897
    public boolean isSetPurchaseOrderId() {
10898
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
10899
    }
10900
 
10901
    public void setPurchaseOrderIdIsSet(boolean value) {
10902
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
10903
    }
10904
 
10905
    public long getItemId() {
10906
      return this.itemId;
10907
    }
10908
 
10909
    public void setItemId(long itemId) {
10910
      this.itemId = itemId;
10911
      setItemIdIsSet(true);
10912
    }
10913
 
10914
    public void unsetItemId() {
10915
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
10916
    }
10917
 
10918
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
10919
    public boolean isSetItemId() {
10920
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
10921
    }
10922
 
10923
    public void setItemIdIsSet(boolean value) {
10924
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
10925
    }
10926
 
10927
    public long getQuantity() {
10928
      return this.quantity;
10929
    }
10930
 
10931
    public void setQuantity(long quantity) {
10932
      this.quantity = quantity;
10933
      setQuantityIsSet(true);
10934
    }
10935
 
10936
    public void unsetQuantity() {
10937
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
10938
    }
10939
 
10940
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
10941
    public boolean isSetQuantity() {
10942
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
10943
    }
10944
 
10945
    public void setQuantityIsSet(boolean value) {
10946
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
10947
    }
10948
 
10949
    public void setFieldValue(_Fields field, Object value) {
10950
      switch (field) {
10951
      case PURCHASE_ORDER_ID:
10952
        if (value == null) {
10953
          unsetPurchaseOrderId();
10954
        } else {
10955
          setPurchaseOrderId((Long)value);
10956
        }
10957
        break;
10958
 
10959
      case ITEM_ID:
10960
        if (value == null) {
10961
          unsetItemId();
10962
        } else {
10963
          setItemId((Long)value);
10964
        }
10965
        break;
10966
 
10967
      case QUANTITY:
10968
        if (value == null) {
10969
          unsetQuantity();
10970
        } else {
10971
          setQuantity((Long)value);
10972
        }
10973
        break;
10974
 
10975
      }
10976
    }
10977
 
10978
    public Object getFieldValue(_Fields field) {
10979
      switch (field) {
10980
      case PURCHASE_ORDER_ID:
10981
        return Long.valueOf(getPurchaseOrderId());
10982
 
10983
      case ITEM_ID:
10984
        return Long.valueOf(getItemId());
10985
 
10986
      case QUANTITY:
10987
        return Long.valueOf(getQuantity());
10988
 
10989
      }
10990
      throw new IllegalStateException();
10991
    }
10992
 
10993
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10994
    public boolean isSet(_Fields field) {
10995
      if (field == null) {
10996
        throw new IllegalArgumentException();
10997
      }
10998
 
10999
      switch (field) {
11000
      case PURCHASE_ORDER_ID:
11001
        return isSetPurchaseOrderId();
11002
      case ITEM_ID:
11003
        return isSetItemId();
11004
      case QUANTITY:
11005
        return isSetQuantity();
11006
      }
11007
      throw new IllegalStateException();
11008
    }
11009
 
11010
    @Override
11011
    public boolean equals(Object that) {
11012
      if (that == null)
11013
        return false;
11014
      if (that instanceof fulfillPO_args)
11015
        return this.equals((fulfillPO_args)that);
11016
      return false;
11017
    }
11018
 
11019
    public boolean equals(fulfillPO_args that) {
11020
      if (that == null)
11021
        return false;
11022
 
11023
      boolean this_present_purchaseOrderId = true;
11024
      boolean that_present_purchaseOrderId = true;
11025
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
11026
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
11027
          return false;
11028
        if (this.purchaseOrderId != that.purchaseOrderId)
11029
          return false;
11030
      }
11031
 
11032
      boolean this_present_itemId = true;
11033
      boolean that_present_itemId = true;
11034
      if (this_present_itemId || that_present_itemId) {
11035
        if (!(this_present_itemId && that_present_itemId))
11036
          return false;
11037
        if (this.itemId != that.itemId)
11038
          return false;
11039
      }
11040
 
11041
      boolean this_present_quantity = true;
11042
      boolean that_present_quantity = true;
11043
      if (this_present_quantity || that_present_quantity) {
11044
        if (!(this_present_quantity && that_present_quantity))
11045
          return false;
11046
        if (this.quantity != that.quantity)
11047
          return false;
11048
      }
11049
 
11050
      return true;
11051
    }
11052
 
11053
    @Override
11054
    public int hashCode() {
11055
      return 0;
11056
    }
11057
 
11058
    public int compareTo(fulfillPO_args other) {
11059
      if (!getClass().equals(other.getClass())) {
11060
        return getClass().getName().compareTo(other.getClass().getName());
11061
      }
11062
 
11063
      int lastComparison = 0;
11064
      fulfillPO_args typedOther = (fulfillPO_args)other;
11065
 
11066
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
11067
      if (lastComparison != 0) {
11068
        return lastComparison;
11069
      }
11070
      if (isSetPurchaseOrderId()) {
11071
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
11072
        if (lastComparison != 0) {
11073
          return lastComparison;
11074
        }
11075
      }
11076
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
11077
      if (lastComparison != 0) {
11078
        return lastComparison;
11079
      }
11080
      if (isSetItemId()) {
11081
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
11082
        if (lastComparison != 0) {
11083
          return lastComparison;
11084
        }
11085
      }
11086
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
11087
      if (lastComparison != 0) {
11088
        return lastComparison;
11089
      }
11090
      if (isSetQuantity()) {
11091
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
11092
        if (lastComparison != 0) {
11093
          return lastComparison;
11094
        }
11095
      }
11096
      return 0;
11097
    }
11098
 
11099
    public _Fields fieldForId(int fieldId) {
11100
      return _Fields.findByThriftId(fieldId);
11101
    }
11102
 
11103
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11104
      org.apache.thrift.protocol.TField field;
11105
      iprot.readStructBegin();
11106
      while (true)
11107
      {
11108
        field = iprot.readFieldBegin();
11109
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11110
          break;
11111
        }
11112
        switch (field.id) {
11113
          case 1: // PURCHASE_ORDER_ID
11114
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11115
              this.purchaseOrderId = iprot.readI64();
11116
              setPurchaseOrderIdIsSet(true);
11117
            } else { 
11118
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11119
            }
11120
            break;
11121
          case 2: // ITEM_ID
11122
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11123
              this.itemId = iprot.readI64();
11124
              setItemIdIsSet(true);
11125
            } else { 
11126
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11127
            }
11128
            break;
11129
          case 3: // QUANTITY
11130
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11131
              this.quantity = iprot.readI64();
11132
              setQuantityIsSet(true);
11133
            } else { 
11134
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11135
            }
11136
            break;
11137
          default:
11138
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11139
        }
11140
        iprot.readFieldEnd();
11141
      }
11142
      iprot.readStructEnd();
11143
      validate();
11144
    }
11145
 
11146
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11147
      validate();
11148
 
11149
      oprot.writeStructBegin(STRUCT_DESC);
11150
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
11151
      oprot.writeI64(this.purchaseOrderId);
11152
      oprot.writeFieldEnd();
11153
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
11154
      oprot.writeI64(this.itemId);
11155
      oprot.writeFieldEnd();
11156
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
11157
      oprot.writeI64(this.quantity);
11158
      oprot.writeFieldEnd();
11159
      oprot.writeFieldStop();
11160
      oprot.writeStructEnd();
11161
    }
11162
 
11163
    @Override
11164
    public String toString() {
11165
      StringBuilder sb = new StringBuilder("fulfillPO_args(");
11166
      boolean first = true;
11167
 
11168
      sb.append("purchaseOrderId:");
11169
      sb.append(this.purchaseOrderId);
11170
      first = false;
11171
      if (!first) sb.append(", ");
11172
      sb.append("itemId:");
11173
      sb.append(this.itemId);
11174
      first = false;
11175
      if (!first) sb.append(", ");
11176
      sb.append("quantity:");
11177
      sb.append(this.quantity);
11178
      first = false;
11179
      sb.append(")");
11180
      return sb.toString();
11181
    }
11182
 
11183
    public void validate() throws org.apache.thrift.TException {
11184
      // check for required fields
11185
    }
11186
 
11187
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11188
      try {
11189
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11190
      } catch (org.apache.thrift.TException te) {
11191
        throw new java.io.IOException(te);
11192
      }
11193
    }
11194
 
11195
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11196
      try {
11197
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
11198
        __isset_bit_vector = new BitSet(1);
11199
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11200
      } catch (org.apache.thrift.TException te) {
11201
        throw new java.io.IOException(te);
11202
      }
11203
    }
11204
 
11205
  }
11206
 
11207
  public static class fulfillPO_result implements org.apache.thrift.TBase<fulfillPO_result, fulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
11208
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_result");
11209
 
11210
    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);
11211
 
11212
    private PurchaseServiceException e; // required
11213
 
11214
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11215
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11216
      E((short)1, "e");
11217
 
11218
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11219
 
11220
      static {
11221
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11222
          byName.put(field.getFieldName(), field);
11223
        }
11224
      }
11225
 
11226
      /**
11227
       * Find the _Fields constant that matches fieldId, or null if its not found.
11228
       */
11229
      public static _Fields findByThriftId(int fieldId) {
11230
        switch(fieldId) {
11231
          case 1: // E
11232
            return E;
11233
          default:
11234
            return null;
11235
        }
11236
      }
11237
 
11238
      /**
11239
       * Find the _Fields constant that matches fieldId, throwing an exception
11240
       * if it is not found.
11241
       */
11242
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11243
        _Fields fields = findByThriftId(fieldId);
11244
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11245
        return fields;
11246
      }
11247
 
11248
      /**
11249
       * Find the _Fields constant that matches name, or null if its not found.
11250
       */
11251
      public static _Fields findByName(String name) {
11252
        return byName.get(name);
11253
      }
11254
 
11255
      private final short _thriftId;
11256
      private final String _fieldName;
11257
 
11258
      _Fields(short thriftId, String fieldName) {
11259
        _thriftId = thriftId;
11260
        _fieldName = fieldName;
11261
      }
11262
 
11263
      public short getThriftFieldId() {
11264
        return _thriftId;
11265
      }
11266
 
11267
      public String getFieldName() {
11268
        return _fieldName;
11269
      }
11270
    }
11271
 
11272
    // isset id assignments
11273
 
11274
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11275
    static {
11276
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11277
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11278
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11279
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11280
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_result.class, metaDataMap);
11281
    }
11282
 
11283
    public fulfillPO_result() {
11284
    }
11285
 
11286
    public fulfillPO_result(
11287
      PurchaseServiceException e)
11288
    {
11289
      this();
11290
      this.e = e;
11291
    }
11292
 
11293
    /**
11294
     * Performs a deep copy on <i>other</i>.
11295
     */
11296
    public fulfillPO_result(fulfillPO_result other) {
11297
      if (other.isSetE()) {
11298
        this.e = new PurchaseServiceException(other.e);
11299
      }
11300
    }
11301
 
11302
    public fulfillPO_result deepCopy() {
11303
      return new fulfillPO_result(this);
11304
    }
11305
 
11306
    @Override
11307
    public void clear() {
11308
      this.e = null;
11309
    }
11310
 
11311
    public PurchaseServiceException getE() {
11312
      return this.e;
11313
    }
11314
 
11315
    public void setE(PurchaseServiceException e) {
11316
      this.e = e;
11317
    }
11318
 
11319
    public void unsetE() {
11320
      this.e = null;
11321
    }
11322
 
11323
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
11324
    public boolean isSetE() {
11325
      return this.e != null;
11326
    }
11327
 
11328
    public void setEIsSet(boolean value) {
11329
      if (!value) {
11330
        this.e = null;
11331
      }
11332
    }
11333
 
11334
    public void setFieldValue(_Fields field, Object value) {
11335
      switch (field) {
11336
      case E:
11337
        if (value == null) {
11338
          unsetE();
11339
        } else {
11340
          setE((PurchaseServiceException)value);
11341
        }
11342
        break;
11343
 
11344
      }
11345
    }
11346
 
11347
    public Object getFieldValue(_Fields field) {
11348
      switch (field) {
11349
      case E:
11350
        return getE();
11351
 
11352
      }
11353
      throw new IllegalStateException();
11354
    }
11355
 
11356
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11357
    public boolean isSet(_Fields field) {
11358
      if (field == null) {
11359
        throw new IllegalArgumentException();
11360
      }
11361
 
11362
      switch (field) {
11363
      case E:
11364
        return isSetE();
11365
      }
11366
      throw new IllegalStateException();
11367
    }
11368
 
11369
    @Override
11370
    public boolean equals(Object that) {
11371
      if (that == null)
11372
        return false;
11373
      if (that instanceof fulfillPO_result)
11374
        return this.equals((fulfillPO_result)that);
11375
      return false;
11376
    }
11377
 
11378
    public boolean equals(fulfillPO_result that) {
11379
      if (that == null)
11380
        return false;
11381
 
11382
      boolean this_present_e = true && this.isSetE();
11383
      boolean that_present_e = true && that.isSetE();
11384
      if (this_present_e || that_present_e) {
11385
        if (!(this_present_e && that_present_e))
11386
          return false;
11387
        if (!this.e.equals(that.e))
11388
          return false;
11389
      }
11390
 
11391
      return true;
11392
    }
11393
 
11394
    @Override
11395
    public int hashCode() {
11396
      return 0;
11397
    }
11398
 
11399
    public int compareTo(fulfillPO_result other) {
11400
      if (!getClass().equals(other.getClass())) {
11401
        return getClass().getName().compareTo(other.getClass().getName());
11402
      }
11403
 
11404
      int lastComparison = 0;
11405
      fulfillPO_result typedOther = (fulfillPO_result)other;
11406
 
11407
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
11408
      if (lastComparison != 0) {
11409
        return lastComparison;
11410
      }
11411
      if (isSetE()) {
11412
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
11413
        if (lastComparison != 0) {
11414
          return lastComparison;
11415
        }
11416
      }
11417
      return 0;
11418
    }
11419
 
11420
    public _Fields fieldForId(int fieldId) {
11421
      return _Fields.findByThriftId(fieldId);
11422
    }
11423
 
11424
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11425
      org.apache.thrift.protocol.TField field;
11426
      iprot.readStructBegin();
11427
      while (true)
11428
      {
11429
        field = iprot.readFieldBegin();
11430
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11431
          break;
11432
        }
11433
        switch (field.id) {
11434
          case 1: // E
11435
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11436
              this.e = new PurchaseServiceException();
11437
              this.e.read(iprot);
11438
            } else { 
11439
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11440
            }
11441
            break;
11442
          default:
11443
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11444
        }
11445
        iprot.readFieldEnd();
11446
      }
11447
      iprot.readStructEnd();
11448
      validate();
11449
    }
11450
 
11451
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11452
      oprot.writeStructBegin(STRUCT_DESC);
11453
 
11454
      if (this.isSetE()) {
11455
        oprot.writeFieldBegin(E_FIELD_DESC);
11456
        this.e.write(oprot);
11457
        oprot.writeFieldEnd();
11458
      }
11459
      oprot.writeFieldStop();
11460
      oprot.writeStructEnd();
11461
    }
11462
 
11463
    @Override
11464
    public String toString() {
11465
      StringBuilder sb = new StringBuilder("fulfillPO_result(");
11466
      boolean first = true;
11467
 
11468
      sb.append("e:");
11469
      if (this.e == null) {
11470
        sb.append("null");
11471
      } else {
11472
        sb.append(this.e);
11473
      }
11474
      first = false;
11475
      sb.append(")");
11476
      return sb.toString();
11477
    }
11478
 
11479
    public void validate() throws org.apache.thrift.TException {
11480
      // check for required fields
11481
    }
11482
 
11483
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11484
      try {
11485
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11486
      } catch (org.apache.thrift.TException te) {
11487
        throw new java.io.IOException(te);
11488
      }
11489
    }
11490
 
11491
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11492
      try {
11493
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11494
      } catch (org.apache.thrift.TException te) {
11495
        throw new java.io.IOException(te);
11496
      }
11497
    }
11498
 
11499
  }
11500
 
11501
  public static class updatePurchaseOrder_args implements org.apache.thrift.TBase<updatePurchaseOrder_args, updatePurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
11502
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_args");
11503
 
11504
    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);
11505
 
11506
    private PurchaseOrder purchaseOrder; // required
11507
 
11508
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11509
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11510
      PURCHASE_ORDER((short)1, "purchaseOrder");
11511
 
11512
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11513
 
11514
      static {
11515
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11516
          byName.put(field.getFieldName(), field);
11517
        }
11518
      }
11519
 
11520
      /**
11521
       * Find the _Fields constant that matches fieldId, or null if its not found.
11522
       */
11523
      public static _Fields findByThriftId(int fieldId) {
11524
        switch(fieldId) {
11525
          case 1: // PURCHASE_ORDER
11526
            return PURCHASE_ORDER;
11527
          default:
11528
            return null;
11529
        }
11530
      }
11531
 
11532
      /**
11533
       * Find the _Fields constant that matches fieldId, throwing an exception
11534
       * if it is not found.
11535
       */
11536
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11537
        _Fields fields = findByThriftId(fieldId);
11538
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11539
        return fields;
11540
      }
11541
 
11542
      /**
11543
       * Find the _Fields constant that matches name, or null if its not found.
11544
       */
11545
      public static _Fields findByName(String name) {
11546
        return byName.get(name);
11547
      }
11548
 
11549
      private final short _thriftId;
11550
      private final String _fieldName;
11551
 
11552
      _Fields(short thriftId, String fieldName) {
11553
        _thriftId = thriftId;
11554
        _fieldName = fieldName;
11555
      }
11556
 
11557
      public short getThriftFieldId() {
11558
        return _thriftId;
11559
      }
11560
 
11561
      public String getFieldName() {
11562
        return _fieldName;
11563
      }
11564
    }
11565
 
11566
    // isset id assignments
11567
 
11568
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11569
    static {
11570
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11571
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11572
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
11573
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11574
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_args.class, metaDataMap);
11575
    }
11576
 
11577
    public updatePurchaseOrder_args() {
11578
    }
11579
 
11580
    public updatePurchaseOrder_args(
11581
      PurchaseOrder purchaseOrder)
11582
    {
11583
      this();
11584
      this.purchaseOrder = purchaseOrder;
11585
    }
11586
 
11587
    /**
11588
     * Performs a deep copy on <i>other</i>.
11589
     */
11590
    public updatePurchaseOrder_args(updatePurchaseOrder_args other) {
11591
      if (other.isSetPurchaseOrder()) {
11592
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
11593
      }
11594
    }
11595
 
11596
    public updatePurchaseOrder_args deepCopy() {
11597
      return new updatePurchaseOrder_args(this);
11598
    }
11599
 
11600
    @Override
11601
    public void clear() {
11602
      this.purchaseOrder = null;
11603
    }
11604
 
11605
    public PurchaseOrder getPurchaseOrder() {
11606
      return this.purchaseOrder;
11607
    }
11608
 
11609
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
11610
      this.purchaseOrder = purchaseOrder;
11611
    }
11612
 
11613
    public void unsetPurchaseOrder() {
11614
      this.purchaseOrder = null;
11615
    }
11616
 
11617
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
11618
    public boolean isSetPurchaseOrder() {
11619
      return this.purchaseOrder != null;
11620
    }
11621
 
11622
    public void setPurchaseOrderIsSet(boolean value) {
11623
      if (!value) {
11624
        this.purchaseOrder = null;
11625
      }
11626
    }
11627
 
11628
    public void setFieldValue(_Fields field, Object value) {
11629
      switch (field) {
11630
      case PURCHASE_ORDER:
11631
        if (value == null) {
11632
          unsetPurchaseOrder();
11633
        } else {
11634
          setPurchaseOrder((PurchaseOrder)value);
11635
        }
11636
        break;
11637
 
11638
      }
11639
    }
11640
 
11641
    public Object getFieldValue(_Fields field) {
11642
      switch (field) {
11643
      case PURCHASE_ORDER:
11644
        return getPurchaseOrder();
11645
 
11646
      }
11647
      throw new IllegalStateException();
11648
    }
11649
 
11650
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11651
    public boolean isSet(_Fields field) {
11652
      if (field == null) {
11653
        throw new IllegalArgumentException();
11654
      }
11655
 
11656
      switch (field) {
11657
      case PURCHASE_ORDER:
11658
        return isSetPurchaseOrder();
11659
      }
11660
      throw new IllegalStateException();
11661
    }
11662
 
11663
    @Override
11664
    public boolean equals(Object that) {
11665
      if (that == null)
11666
        return false;
11667
      if (that instanceof updatePurchaseOrder_args)
11668
        return this.equals((updatePurchaseOrder_args)that);
11669
      return false;
11670
    }
11671
 
11672
    public boolean equals(updatePurchaseOrder_args that) {
11673
      if (that == null)
11674
        return false;
11675
 
11676
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
11677
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
11678
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
11679
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
11680
          return false;
11681
        if (!this.purchaseOrder.equals(that.purchaseOrder))
11682
          return false;
11683
      }
11684
 
11685
      return true;
11686
    }
11687
 
11688
    @Override
11689
    public int hashCode() {
11690
      return 0;
11691
    }
11692
 
11693
    public int compareTo(updatePurchaseOrder_args other) {
11694
      if (!getClass().equals(other.getClass())) {
11695
        return getClass().getName().compareTo(other.getClass().getName());
11696
      }
11697
 
11698
      int lastComparison = 0;
11699
      updatePurchaseOrder_args typedOther = (updatePurchaseOrder_args)other;
11700
 
11701
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
11702
      if (lastComparison != 0) {
11703
        return lastComparison;
11704
      }
11705
      if (isSetPurchaseOrder()) {
11706
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
11707
        if (lastComparison != 0) {
11708
          return lastComparison;
11709
        }
11710
      }
11711
      return 0;
11712
    }
11713
 
11714
    public _Fields fieldForId(int fieldId) {
11715
      return _Fields.findByThriftId(fieldId);
11716
    }
11717
 
11718
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11719
      org.apache.thrift.protocol.TField field;
11720
      iprot.readStructBegin();
11721
      while (true)
11722
      {
11723
        field = iprot.readFieldBegin();
11724
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11725
          break;
11726
        }
11727
        switch (field.id) {
11728
          case 1: // PURCHASE_ORDER
11729
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11730
              this.purchaseOrder = new PurchaseOrder();
11731
              this.purchaseOrder.read(iprot);
11732
            } else { 
11733
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11734
            }
11735
            break;
11736
          default:
11737
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11738
        }
11739
        iprot.readFieldEnd();
11740
      }
11741
      iprot.readStructEnd();
11742
      validate();
11743
    }
11744
 
11745
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11746
      validate();
11747
 
11748
      oprot.writeStructBegin(STRUCT_DESC);
11749
      if (this.purchaseOrder != null) {
11750
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
11751
        this.purchaseOrder.write(oprot);
11752
        oprot.writeFieldEnd();
11753
      }
11754
      oprot.writeFieldStop();
11755
      oprot.writeStructEnd();
11756
    }
11757
 
11758
    @Override
11759
    public String toString() {
11760
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_args(");
11761
      boolean first = true;
11762
 
11763
      sb.append("purchaseOrder:");
11764
      if (this.purchaseOrder == null) {
11765
        sb.append("null");
11766
      } else {
11767
        sb.append(this.purchaseOrder);
11768
      }
11769
      first = false;
11770
      sb.append(")");
11771
      return sb.toString();
11772
    }
11773
 
11774
    public void validate() throws org.apache.thrift.TException {
11775
      // check for required fields
11776
    }
11777
 
11778
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11779
      try {
11780
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11781
      } catch (org.apache.thrift.TException te) {
11782
        throw new java.io.IOException(te);
11783
      }
11784
    }
11785
 
11786
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11787
      try {
11788
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11789
      } catch (org.apache.thrift.TException te) {
11790
        throw new java.io.IOException(te);
11791
      }
11792
    }
11793
 
11794
  }
11795
 
11796
  public static class updatePurchaseOrder_result implements org.apache.thrift.TBase<updatePurchaseOrder_result, updatePurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
11797
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_result");
11798
 
11799
    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);
11800
 
11801
    private PurchaseServiceException e; // required
11802
 
11803
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11804
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11805
      E((short)1, "e");
11806
 
11807
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11808
 
11809
      static {
11810
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11811
          byName.put(field.getFieldName(), field);
11812
        }
11813
      }
11814
 
11815
      /**
11816
       * Find the _Fields constant that matches fieldId, or null if its not found.
11817
       */
11818
      public static _Fields findByThriftId(int fieldId) {
11819
        switch(fieldId) {
11820
          case 1: // E
11821
            return E;
11822
          default:
11823
            return null;
11824
        }
11825
      }
11826
 
11827
      /**
11828
       * Find the _Fields constant that matches fieldId, throwing an exception
11829
       * if it is not found.
11830
       */
11831
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11832
        _Fields fields = findByThriftId(fieldId);
11833
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11834
        return fields;
11835
      }
11836
 
11837
      /**
11838
       * Find the _Fields constant that matches name, or null if its not found.
11839
       */
11840
      public static _Fields findByName(String name) {
11841
        return byName.get(name);
11842
      }
11843
 
11844
      private final short _thriftId;
11845
      private final String _fieldName;
11846
 
11847
      _Fields(short thriftId, String fieldName) {
11848
        _thriftId = thriftId;
11849
        _fieldName = fieldName;
11850
      }
11851
 
11852
      public short getThriftFieldId() {
11853
        return _thriftId;
11854
      }
11855
 
11856
      public String getFieldName() {
11857
        return _fieldName;
11858
      }
11859
    }
11860
 
11861
    // isset id assignments
11862
 
11863
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11864
    static {
11865
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11866
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11867
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11868
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11869
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_result.class, metaDataMap);
11870
    }
11871
 
11872
    public updatePurchaseOrder_result() {
11873
    }
11874
 
11875
    public updatePurchaseOrder_result(
11876
      PurchaseServiceException e)
11877
    {
11878
      this();
11879
      this.e = e;
11880
    }
11881
 
11882
    /**
11883
     * Performs a deep copy on <i>other</i>.
11884
     */
11885
    public updatePurchaseOrder_result(updatePurchaseOrder_result other) {
11886
      if (other.isSetE()) {
11887
        this.e = new PurchaseServiceException(other.e);
11888
      }
11889
    }
11890
 
11891
    public updatePurchaseOrder_result deepCopy() {
11892
      return new updatePurchaseOrder_result(this);
11893
    }
11894
 
11895
    @Override
11896
    public void clear() {
11897
      this.e = null;
11898
    }
11899
 
11900
    public PurchaseServiceException getE() {
11901
      return this.e;
11902
    }
11903
 
11904
    public void setE(PurchaseServiceException e) {
11905
      this.e = e;
11906
    }
11907
 
11908
    public void unsetE() {
11909
      this.e = null;
11910
    }
11911
 
11912
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
11913
    public boolean isSetE() {
11914
      return this.e != null;
11915
    }
11916
 
11917
    public void setEIsSet(boolean value) {
11918
      if (!value) {
11919
        this.e = null;
11920
      }
11921
    }
11922
 
11923
    public void setFieldValue(_Fields field, Object value) {
11924
      switch (field) {
11925
      case E:
11926
        if (value == null) {
11927
          unsetE();
11928
        } else {
11929
          setE((PurchaseServiceException)value);
11930
        }
11931
        break;
11932
 
11933
      }
11934
    }
11935
 
11936
    public Object getFieldValue(_Fields field) {
11937
      switch (field) {
11938
      case E:
11939
        return getE();
11940
 
11941
      }
11942
      throw new IllegalStateException();
11943
    }
11944
 
11945
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11946
    public boolean isSet(_Fields field) {
11947
      if (field == null) {
11948
        throw new IllegalArgumentException();
11949
      }
11950
 
11951
      switch (field) {
11952
      case E:
11953
        return isSetE();
11954
      }
11955
      throw new IllegalStateException();
11956
    }
11957
 
11958
    @Override
11959
    public boolean equals(Object that) {
11960
      if (that == null)
11961
        return false;
11962
      if (that instanceof updatePurchaseOrder_result)
11963
        return this.equals((updatePurchaseOrder_result)that);
11964
      return false;
11965
    }
11966
 
11967
    public boolean equals(updatePurchaseOrder_result that) {
11968
      if (that == null)
11969
        return false;
11970
 
11971
      boolean this_present_e = true && this.isSetE();
11972
      boolean that_present_e = true && that.isSetE();
11973
      if (this_present_e || that_present_e) {
11974
        if (!(this_present_e && that_present_e))
11975
          return false;
11976
        if (!this.e.equals(that.e))
11977
          return false;
11978
      }
11979
 
11980
      return true;
11981
    }
11982
 
11983
    @Override
11984
    public int hashCode() {
11985
      return 0;
11986
    }
11987
 
11988
    public int compareTo(updatePurchaseOrder_result other) {
11989
      if (!getClass().equals(other.getClass())) {
11990
        return getClass().getName().compareTo(other.getClass().getName());
11991
      }
11992
 
11993
      int lastComparison = 0;
11994
      updatePurchaseOrder_result typedOther = (updatePurchaseOrder_result)other;
11995
 
11996
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
11997
      if (lastComparison != 0) {
11998
        return lastComparison;
11999
      }
12000
      if (isSetE()) {
12001
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
12002
        if (lastComparison != 0) {
12003
          return lastComparison;
12004
        }
12005
      }
12006
      return 0;
12007
    }
12008
 
12009
    public _Fields fieldForId(int fieldId) {
12010
      return _Fields.findByThriftId(fieldId);
12011
    }
12012
 
12013
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12014
      org.apache.thrift.protocol.TField field;
12015
      iprot.readStructBegin();
12016
      while (true)
12017
      {
12018
        field = iprot.readFieldBegin();
12019
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12020
          break;
12021
        }
12022
        switch (field.id) {
12023
          case 1: // E
12024
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12025
              this.e = new PurchaseServiceException();
12026
              this.e.read(iprot);
12027
            } else { 
12028
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12029
            }
12030
            break;
12031
          default:
12032
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12033
        }
12034
        iprot.readFieldEnd();
12035
      }
12036
      iprot.readStructEnd();
12037
      validate();
12038
    }
12039
 
12040
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12041
      oprot.writeStructBegin(STRUCT_DESC);
12042
 
12043
      if (this.isSetE()) {
12044
        oprot.writeFieldBegin(E_FIELD_DESC);
12045
        this.e.write(oprot);
12046
        oprot.writeFieldEnd();
12047
      }
12048
      oprot.writeFieldStop();
12049
      oprot.writeStructEnd();
12050
    }
12051
 
12052
    @Override
12053
    public String toString() {
12054
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_result(");
12055
      boolean first = true;
12056
 
12057
      sb.append("e:");
12058
      if (this.e == null) {
12059
        sb.append("null");
12060
      } else {
12061
        sb.append(this.e);
12062
      }
12063
      first = false;
12064
      sb.append(")");
12065
      return sb.toString();
12066
    }
12067
 
12068
    public void validate() throws org.apache.thrift.TException {
12069
      // check for required fields
12070
    }
12071
 
12072
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12073
      try {
12074
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12075
      } catch (org.apache.thrift.TException te) {
12076
        throw new java.io.IOException(te);
12077
      }
12078
    }
12079
 
12080
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12081
      try {
12082
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12083
      } catch (org.apache.thrift.TException te) {
12084
        throw new java.io.IOException(te);
12085
      }
12086
    }
12087
 
12088
  }
12089
 
5185 mandeep.dh 12090
  public static class unFulfillPO_args implements org.apache.thrift.TBase<unFulfillPO_args, unFulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
12091
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_args");
12092
 
12093
    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);
12094
    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);
12095
    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);
12096
 
12097
    private long purchaseId; // required
12098
    private long itemId; // required
12099
    private long quantity; // required
12100
 
12101
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12102
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12103
      PURCHASE_ID((short)1, "purchaseId"),
12104
      ITEM_ID((short)2, "itemId"),
12105
      QUANTITY((short)3, "quantity");
12106
 
12107
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12108
 
12109
      static {
12110
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12111
          byName.put(field.getFieldName(), field);
12112
        }
12113
      }
12114
 
12115
      /**
12116
       * Find the _Fields constant that matches fieldId, or null if its not found.
12117
       */
12118
      public static _Fields findByThriftId(int fieldId) {
12119
        switch(fieldId) {
12120
          case 1: // PURCHASE_ID
12121
            return PURCHASE_ID;
12122
          case 2: // ITEM_ID
12123
            return ITEM_ID;
12124
          case 3: // QUANTITY
12125
            return QUANTITY;
12126
          default:
12127
            return null;
12128
        }
12129
      }
12130
 
12131
      /**
12132
       * Find the _Fields constant that matches fieldId, throwing an exception
12133
       * if it is not found.
12134
       */
12135
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12136
        _Fields fields = findByThriftId(fieldId);
12137
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12138
        return fields;
12139
      }
12140
 
12141
      /**
12142
       * Find the _Fields constant that matches name, or null if its not found.
12143
       */
12144
      public static _Fields findByName(String name) {
12145
        return byName.get(name);
12146
      }
12147
 
12148
      private final short _thriftId;
12149
      private final String _fieldName;
12150
 
12151
      _Fields(short thriftId, String fieldName) {
12152
        _thriftId = thriftId;
12153
        _fieldName = fieldName;
12154
      }
12155
 
12156
      public short getThriftFieldId() {
12157
        return _thriftId;
12158
      }
12159
 
12160
      public String getFieldName() {
12161
        return _fieldName;
12162
      }
12163
    }
12164
 
12165
    // isset id assignments
12166
    private static final int __PURCHASEID_ISSET_ID = 0;
12167
    private static final int __ITEMID_ISSET_ID = 1;
12168
    private static final int __QUANTITY_ISSET_ID = 2;
12169
    private BitSet __isset_bit_vector = new BitSet(3);
12170
 
12171
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12172
    static {
12173
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12174
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12175
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12176
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12177
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12178
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12179
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12180
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12181
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_args.class, metaDataMap);
12182
    }
12183
 
12184
    public unFulfillPO_args() {
12185
    }
12186
 
12187
    public unFulfillPO_args(
12188
      long purchaseId,
12189
      long itemId,
12190
      long quantity)
12191
    {
12192
      this();
12193
      this.purchaseId = purchaseId;
12194
      setPurchaseIdIsSet(true);
12195
      this.itemId = itemId;
12196
      setItemIdIsSet(true);
12197
      this.quantity = quantity;
12198
      setQuantityIsSet(true);
12199
    }
12200
 
12201
    /**
12202
     * Performs a deep copy on <i>other</i>.
12203
     */
12204
    public unFulfillPO_args(unFulfillPO_args other) {
12205
      __isset_bit_vector.clear();
12206
      __isset_bit_vector.or(other.__isset_bit_vector);
12207
      this.purchaseId = other.purchaseId;
12208
      this.itemId = other.itemId;
12209
      this.quantity = other.quantity;
12210
    }
12211
 
12212
    public unFulfillPO_args deepCopy() {
12213
      return new unFulfillPO_args(this);
12214
    }
12215
 
12216
    @Override
12217
    public void clear() {
12218
      setPurchaseIdIsSet(false);
12219
      this.purchaseId = 0;
12220
      setItemIdIsSet(false);
12221
      this.itemId = 0;
12222
      setQuantityIsSet(false);
12223
      this.quantity = 0;
12224
    }
12225
 
12226
    public long getPurchaseId() {
12227
      return this.purchaseId;
12228
    }
12229
 
12230
    public void setPurchaseId(long purchaseId) {
12231
      this.purchaseId = purchaseId;
12232
      setPurchaseIdIsSet(true);
12233
    }
12234
 
12235
    public void unsetPurchaseId() {
12236
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
12237
    }
12238
 
12239
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
12240
    public boolean isSetPurchaseId() {
12241
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
12242
    }
12243
 
12244
    public void setPurchaseIdIsSet(boolean value) {
12245
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
12246
    }
12247
 
12248
    public long getItemId() {
12249
      return this.itemId;
12250
    }
12251
 
12252
    public void setItemId(long itemId) {
12253
      this.itemId = itemId;
12254
      setItemIdIsSet(true);
12255
    }
12256
 
12257
    public void unsetItemId() {
12258
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
12259
    }
12260
 
12261
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
12262
    public boolean isSetItemId() {
12263
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
12264
    }
12265
 
12266
    public void setItemIdIsSet(boolean value) {
12267
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
12268
    }
12269
 
12270
    public long getQuantity() {
12271
      return this.quantity;
12272
    }
12273
 
12274
    public void setQuantity(long quantity) {
12275
      this.quantity = quantity;
12276
      setQuantityIsSet(true);
12277
    }
12278
 
12279
    public void unsetQuantity() {
12280
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
12281
    }
12282
 
12283
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
12284
    public boolean isSetQuantity() {
12285
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
12286
    }
12287
 
12288
    public void setQuantityIsSet(boolean value) {
12289
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
12290
    }
12291
 
12292
    public void setFieldValue(_Fields field, Object value) {
12293
      switch (field) {
12294
      case PURCHASE_ID:
12295
        if (value == null) {
12296
          unsetPurchaseId();
12297
        } else {
12298
          setPurchaseId((Long)value);
12299
        }
12300
        break;
12301
 
12302
      case ITEM_ID:
12303
        if (value == null) {
12304
          unsetItemId();
12305
        } else {
12306
          setItemId((Long)value);
12307
        }
12308
        break;
12309
 
12310
      case QUANTITY:
12311
        if (value == null) {
12312
          unsetQuantity();
12313
        } else {
12314
          setQuantity((Long)value);
12315
        }
12316
        break;
12317
 
12318
      }
12319
    }
12320
 
12321
    public Object getFieldValue(_Fields field) {
12322
      switch (field) {
12323
      case PURCHASE_ID:
12324
        return Long.valueOf(getPurchaseId());
12325
 
12326
      case ITEM_ID:
12327
        return Long.valueOf(getItemId());
12328
 
12329
      case QUANTITY:
12330
        return Long.valueOf(getQuantity());
12331
 
12332
      }
12333
      throw new IllegalStateException();
12334
    }
12335
 
12336
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12337
    public boolean isSet(_Fields field) {
12338
      if (field == null) {
12339
        throw new IllegalArgumentException();
12340
      }
12341
 
12342
      switch (field) {
12343
      case PURCHASE_ID:
12344
        return isSetPurchaseId();
12345
      case ITEM_ID:
12346
        return isSetItemId();
12347
      case QUANTITY:
12348
        return isSetQuantity();
12349
      }
12350
      throw new IllegalStateException();
12351
    }
12352
 
12353
    @Override
12354
    public boolean equals(Object that) {
12355
      if (that == null)
12356
        return false;
12357
      if (that instanceof unFulfillPO_args)
12358
        return this.equals((unFulfillPO_args)that);
12359
      return false;
12360
    }
12361
 
12362
    public boolean equals(unFulfillPO_args that) {
12363
      if (that == null)
12364
        return false;
12365
 
12366
      boolean this_present_purchaseId = true;
12367
      boolean that_present_purchaseId = true;
12368
      if (this_present_purchaseId || that_present_purchaseId) {
12369
        if (!(this_present_purchaseId && that_present_purchaseId))
12370
          return false;
12371
        if (this.purchaseId != that.purchaseId)
12372
          return false;
12373
      }
12374
 
12375
      boolean this_present_itemId = true;
12376
      boolean that_present_itemId = true;
12377
      if (this_present_itemId || that_present_itemId) {
12378
        if (!(this_present_itemId && that_present_itemId))
12379
          return false;
12380
        if (this.itemId != that.itemId)
12381
          return false;
12382
      }
12383
 
12384
      boolean this_present_quantity = true;
12385
      boolean that_present_quantity = true;
12386
      if (this_present_quantity || that_present_quantity) {
12387
        if (!(this_present_quantity && that_present_quantity))
12388
          return false;
12389
        if (this.quantity != that.quantity)
12390
          return false;
12391
      }
12392
 
12393
      return true;
12394
    }
12395
 
12396
    @Override
12397
    public int hashCode() {
12398
      return 0;
12399
    }
12400
 
12401
    public int compareTo(unFulfillPO_args other) {
12402
      if (!getClass().equals(other.getClass())) {
12403
        return getClass().getName().compareTo(other.getClass().getName());
12404
      }
12405
 
12406
      int lastComparison = 0;
12407
      unFulfillPO_args typedOther = (unFulfillPO_args)other;
12408
 
12409
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
12410
      if (lastComparison != 0) {
12411
        return lastComparison;
12412
      }
12413
      if (isSetPurchaseId()) {
12414
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
12415
        if (lastComparison != 0) {
12416
          return lastComparison;
12417
        }
12418
      }
12419
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
12420
      if (lastComparison != 0) {
12421
        return lastComparison;
12422
      }
12423
      if (isSetItemId()) {
12424
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
12425
        if (lastComparison != 0) {
12426
          return lastComparison;
12427
        }
12428
      }
12429
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
12430
      if (lastComparison != 0) {
12431
        return lastComparison;
12432
      }
12433
      if (isSetQuantity()) {
12434
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
12435
        if (lastComparison != 0) {
12436
          return lastComparison;
12437
        }
12438
      }
12439
      return 0;
12440
    }
12441
 
12442
    public _Fields fieldForId(int fieldId) {
12443
      return _Fields.findByThriftId(fieldId);
12444
    }
12445
 
12446
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12447
      org.apache.thrift.protocol.TField field;
12448
      iprot.readStructBegin();
12449
      while (true)
12450
      {
12451
        field = iprot.readFieldBegin();
12452
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12453
          break;
12454
        }
12455
        switch (field.id) {
12456
          case 1: // PURCHASE_ID
12457
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12458
              this.purchaseId = iprot.readI64();
12459
              setPurchaseIdIsSet(true);
12460
            } else { 
12461
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12462
            }
12463
            break;
12464
          case 2: // ITEM_ID
12465
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12466
              this.itemId = iprot.readI64();
12467
              setItemIdIsSet(true);
12468
            } else { 
12469
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12470
            }
12471
            break;
12472
          case 3: // QUANTITY
12473
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12474
              this.quantity = iprot.readI64();
12475
              setQuantityIsSet(true);
12476
            } else { 
12477
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12478
            }
12479
            break;
12480
          default:
12481
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12482
        }
12483
        iprot.readFieldEnd();
12484
      }
12485
      iprot.readStructEnd();
12486
      validate();
12487
    }
12488
 
12489
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12490
      validate();
12491
 
12492
      oprot.writeStructBegin(STRUCT_DESC);
12493
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
12494
      oprot.writeI64(this.purchaseId);
12495
      oprot.writeFieldEnd();
12496
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
12497
      oprot.writeI64(this.itemId);
12498
      oprot.writeFieldEnd();
12499
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
12500
      oprot.writeI64(this.quantity);
12501
      oprot.writeFieldEnd();
12502
      oprot.writeFieldStop();
12503
      oprot.writeStructEnd();
12504
    }
12505
 
12506
    @Override
12507
    public String toString() {
12508
      StringBuilder sb = new StringBuilder("unFulfillPO_args(");
12509
      boolean first = true;
12510
 
12511
      sb.append("purchaseId:");
12512
      sb.append(this.purchaseId);
12513
      first = false;
12514
      if (!first) sb.append(", ");
12515
      sb.append("itemId:");
12516
      sb.append(this.itemId);
12517
      first = false;
12518
      if (!first) sb.append(", ");
12519
      sb.append("quantity:");
12520
      sb.append(this.quantity);
12521
      first = false;
12522
      sb.append(")");
12523
      return sb.toString();
12524
    }
12525
 
12526
    public void validate() throws org.apache.thrift.TException {
12527
      // check for required fields
12528
    }
12529
 
12530
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12531
      try {
12532
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12533
      } catch (org.apache.thrift.TException te) {
12534
        throw new java.io.IOException(te);
12535
      }
12536
    }
12537
 
12538
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12539
      try {
12540
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
12541
        __isset_bit_vector = new BitSet(1);
12542
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12543
      } catch (org.apache.thrift.TException te) {
12544
        throw new java.io.IOException(te);
12545
      }
12546
    }
12547
 
12548
  }
12549
 
12550
  public static class unFulfillPO_result implements org.apache.thrift.TBase<unFulfillPO_result, unFulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
12551
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_result");
12552
 
12553
    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);
12554
 
12555
    private PurchaseServiceException e; // required
12556
 
12557
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12558
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12559
      E((short)1, "e");
12560
 
12561
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12562
 
12563
      static {
12564
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12565
          byName.put(field.getFieldName(), field);
12566
        }
12567
      }
12568
 
12569
      /**
12570
       * Find the _Fields constant that matches fieldId, or null if its not found.
12571
       */
12572
      public static _Fields findByThriftId(int fieldId) {
12573
        switch(fieldId) {
12574
          case 1: // E
12575
            return E;
12576
          default:
12577
            return null;
12578
        }
12579
      }
12580
 
12581
      /**
12582
       * Find the _Fields constant that matches fieldId, throwing an exception
12583
       * if it is not found.
12584
       */
12585
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12586
        _Fields fields = findByThriftId(fieldId);
12587
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12588
        return fields;
12589
      }
12590
 
12591
      /**
12592
       * Find the _Fields constant that matches name, or null if its not found.
12593
       */
12594
      public static _Fields findByName(String name) {
12595
        return byName.get(name);
12596
      }
12597
 
12598
      private final short _thriftId;
12599
      private final String _fieldName;
12600
 
12601
      _Fields(short thriftId, String fieldName) {
12602
        _thriftId = thriftId;
12603
        _fieldName = fieldName;
12604
      }
12605
 
12606
      public short getThriftFieldId() {
12607
        return _thriftId;
12608
      }
12609
 
12610
      public String getFieldName() {
12611
        return _fieldName;
12612
      }
12613
    }
12614
 
12615
    // isset id assignments
12616
 
12617
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12618
    static {
12619
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12620
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12621
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
12622
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12623
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_result.class, metaDataMap);
12624
    }
12625
 
12626
    public unFulfillPO_result() {
12627
    }
12628
 
12629
    public unFulfillPO_result(
12630
      PurchaseServiceException e)
12631
    {
12632
      this();
12633
      this.e = e;
12634
    }
12635
 
12636
    /**
12637
     * Performs a deep copy on <i>other</i>.
12638
     */
12639
    public unFulfillPO_result(unFulfillPO_result other) {
12640
      if (other.isSetE()) {
12641
        this.e = new PurchaseServiceException(other.e);
12642
      }
12643
    }
12644
 
12645
    public unFulfillPO_result deepCopy() {
12646
      return new unFulfillPO_result(this);
12647
    }
12648
 
12649
    @Override
12650
    public void clear() {
12651
      this.e = null;
12652
    }
12653
 
12654
    public PurchaseServiceException getE() {
12655
      return this.e;
12656
    }
12657
 
12658
    public void setE(PurchaseServiceException e) {
12659
      this.e = e;
12660
    }
12661
 
12662
    public void unsetE() {
12663
      this.e = null;
12664
    }
12665
 
12666
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
12667
    public boolean isSetE() {
12668
      return this.e != null;
12669
    }
12670
 
12671
    public void setEIsSet(boolean value) {
12672
      if (!value) {
12673
        this.e = null;
12674
      }
12675
    }
12676
 
12677
    public void setFieldValue(_Fields field, Object value) {
12678
      switch (field) {
12679
      case E:
12680
        if (value == null) {
12681
          unsetE();
12682
        } else {
12683
          setE((PurchaseServiceException)value);
12684
        }
12685
        break;
12686
 
12687
      }
12688
    }
12689
 
12690
    public Object getFieldValue(_Fields field) {
12691
      switch (field) {
12692
      case E:
12693
        return getE();
12694
 
12695
      }
12696
      throw new IllegalStateException();
12697
    }
12698
 
12699
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12700
    public boolean isSet(_Fields field) {
12701
      if (field == null) {
12702
        throw new IllegalArgumentException();
12703
      }
12704
 
12705
      switch (field) {
12706
      case E:
12707
        return isSetE();
12708
      }
12709
      throw new IllegalStateException();
12710
    }
12711
 
12712
    @Override
12713
    public boolean equals(Object that) {
12714
      if (that == null)
12715
        return false;
12716
      if (that instanceof unFulfillPO_result)
12717
        return this.equals((unFulfillPO_result)that);
12718
      return false;
12719
    }
12720
 
12721
    public boolean equals(unFulfillPO_result that) {
12722
      if (that == null)
12723
        return false;
12724
 
12725
      boolean this_present_e = true && this.isSetE();
12726
      boolean that_present_e = true && that.isSetE();
12727
      if (this_present_e || that_present_e) {
12728
        if (!(this_present_e && that_present_e))
12729
          return false;
12730
        if (!this.e.equals(that.e))
12731
          return false;
12732
      }
12733
 
12734
      return true;
12735
    }
12736
 
12737
    @Override
12738
    public int hashCode() {
12739
      return 0;
12740
    }
12741
 
12742
    public int compareTo(unFulfillPO_result other) {
12743
      if (!getClass().equals(other.getClass())) {
12744
        return getClass().getName().compareTo(other.getClass().getName());
12745
      }
12746
 
12747
      int lastComparison = 0;
12748
      unFulfillPO_result typedOther = (unFulfillPO_result)other;
12749
 
12750
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
12751
      if (lastComparison != 0) {
12752
        return lastComparison;
12753
      }
12754
      if (isSetE()) {
12755
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
12756
        if (lastComparison != 0) {
12757
          return lastComparison;
12758
        }
12759
      }
12760
      return 0;
12761
    }
12762
 
12763
    public _Fields fieldForId(int fieldId) {
12764
      return _Fields.findByThriftId(fieldId);
12765
    }
12766
 
12767
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12768
      org.apache.thrift.protocol.TField field;
12769
      iprot.readStructBegin();
12770
      while (true)
12771
      {
12772
        field = iprot.readFieldBegin();
12773
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12774
          break;
12775
        }
12776
        switch (field.id) {
12777
          case 1: // E
12778
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12779
              this.e = new PurchaseServiceException();
12780
              this.e.read(iprot);
12781
            } else { 
12782
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12783
            }
12784
            break;
12785
          default:
12786
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12787
        }
12788
        iprot.readFieldEnd();
12789
      }
12790
      iprot.readStructEnd();
12791
      validate();
12792
    }
12793
 
12794
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12795
      oprot.writeStructBegin(STRUCT_DESC);
12796
 
12797
      if (this.isSetE()) {
12798
        oprot.writeFieldBegin(E_FIELD_DESC);
12799
        this.e.write(oprot);
12800
        oprot.writeFieldEnd();
12801
      }
12802
      oprot.writeFieldStop();
12803
      oprot.writeStructEnd();
12804
    }
12805
 
12806
    @Override
12807
    public String toString() {
12808
      StringBuilder sb = new StringBuilder("unFulfillPO_result(");
12809
      boolean first = true;
12810
 
12811
      sb.append("e:");
12812
      if (this.e == null) {
12813
        sb.append("null");
12814
      } else {
12815
        sb.append(this.e);
12816
      }
12817
      first = false;
12818
      sb.append(")");
12819
      return sb.toString();
12820
    }
12821
 
12822
    public void validate() throws org.apache.thrift.TException {
12823
      // check for required fields
12824
    }
12825
 
12826
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12827
      try {
12828
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12829
      } catch (org.apache.thrift.TException te) {
12830
        throw new java.io.IOException(te);
12831
      }
12832
    }
12833
 
12834
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12835
      try {
12836
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12837
      } catch (org.apache.thrift.TException te) {
12838
        throw new java.io.IOException(te);
12839
      }
12840
    }
12841
 
12842
  }
12843
 
5443 mandeep.dh 12844
  public static class getInvoices_args implements org.apache.thrift.TBase<getInvoices_args, getInvoices_args._Fields>, java.io.Serializable, Cloneable   {
12845
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_args");
12846
 
12847
    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);
12848
 
12849
    private long date; // required
12850
 
12851
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12852
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12853
      DATE((short)1, "date");
12854
 
12855
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12856
 
12857
      static {
12858
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12859
          byName.put(field.getFieldName(), field);
12860
        }
12861
      }
12862
 
12863
      /**
12864
       * Find the _Fields constant that matches fieldId, or null if its not found.
12865
       */
12866
      public static _Fields findByThriftId(int fieldId) {
12867
        switch(fieldId) {
12868
          case 1: // DATE
12869
            return DATE;
12870
          default:
12871
            return null;
12872
        }
12873
      }
12874
 
12875
      /**
12876
       * Find the _Fields constant that matches fieldId, throwing an exception
12877
       * if it is not found.
12878
       */
12879
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12880
        _Fields fields = findByThriftId(fieldId);
12881
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12882
        return fields;
12883
      }
12884
 
12885
      /**
12886
       * Find the _Fields constant that matches name, or null if its not found.
12887
       */
12888
      public static _Fields findByName(String name) {
12889
        return byName.get(name);
12890
      }
12891
 
12892
      private final short _thriftId;
12893
      private final String _fieldName;
12894
 
12895
      _Fields(short thriftId, String fieldName) {
12896
        _thriftId = thriftId;
12897
        _fieldName = fieldName;
12898
      }
12899
 
12900
      public short getThriftFieldId() {
12901
        return _thriftId;
12902
      }
12903
 
12904
      public String getFieldName() {
12905
        return _fieldName;
12906
      }
12907
    }
12908
 
12909
    // isset id assignments
12910
    private static final int __DATE_ISSET_ID = 0;
12911
    private BitSet __isset_bit_vector = new BitSet(1);
12912
 
12913
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12914
    static {
12915
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12916
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12917
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12918
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12919
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_args.class, metaDataMap);
12920
    }
12921
 
12922
    public getInvoices_args() {
12923
    }
12924
 
12925
    public getInvoices_args(
12926
      long date)
12927
    {
12928
      this();
12929
      this.date = date;
12930
      setDateIsSet(true);
12931
    }
12932
 
12933
    /**
12934
     * Performs a deep copy on <i>other</i>.
12935
     */
12936
    public getInvoices_args(getInvoices_args other) {
12937
      __isset_bit_vector.clear();
12938
      __isset_bit_vector.or(other.__isset_bit_vector);
12939
      this.date = other.date;
12940
    }
12941
 
12942
    public getInvoices_args deepCopy() {
12943
      return new getInvoices_args(this);
12944
    }
12945
 
12946
    @Override
12947
    public void clear() {
12948
      setDateIsSet(false);
12949
      this.date = 0;
12950
    }
12951
 
12952
    public long getDate() {
12953
      return this.date;
12954
    }
12955
 
12956
    public void setDate(long date) {
12957
      this.date = date;
12958
      setDateIsSet(true);
12959
    }
12960
 
12961
    public void unsetDate() {
12962
      __isset_bit_vector.clear(__DATE_ISSET_ID);
12963
    }
12964
 
12965
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
12966
    public boolean isSetDate() {
12967
      return __isset_bit_vector.get(__DATE_ISSET_ID);
12968
    }
12969
 
12970
    public void setDateIsSet(boolean value) {
12971
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
12972
    }
12973
 
12974
    public void setFieldValue(_Fields field, Object value) {
12975
      switch (field) {
12976
      case DATE:
12977
        if (value == null) {
12978
          unsetDate();
12979
        } else {
12980
          setDate((Long)value);
12981
        }
12982
        break;
12983
 
12984
      }
12985
    }
12986
 
12987
    public Object getFieldValue(_Fields field) {
12988
      switch (field) {
12989
      case DATE:
12990
        return Long.valueOf(getDate());
12991
 
12992
      }
12993
      throw new IllegalStateException();
12994
    }
12995
 
12996
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12997
    public boolean isSet(_Fields field) {
12998
      if (field == null) {
12999
        throw new IllegalArgumentException();
13000
      }
13001
 
13002
      switch (field) {
13003
      case DATE:
13004
        return isSetDate();
13005
      }
13006
      throw new IllegalStateException();
13007
    }
13008
 
13009
    @Override
13010
    public boolean equals(Object that) {
13011
      if (that == null)
13012
        return false;
13013
      if (that instanceof getInvoices_args)
13014
        return this.equals((getInvoices_args)that);
13015
      return false;
13016
    }
13017
 
13018
    public boolean equals(getInvoices_args that) {
13019
      if (that == null)
13020
        return false;
13021
 
13022
      boolean this_present_date = true;
13023
      boolean that_present_date = true;
13024
      if (this_present_date || that_present_date) {
13025
        if (!(this_present_date && that_present_date))
13026
          return false;
13027
        if (this.date != that.date)
13028
          return false;
13029
      }
13030
 
13031
      return true;
13032
    }
13033
 
13034
    @Override
13035
    public int hashCode() {
13036
      return 0;
13037
    }
13038
 
13039
    public int compareTo(getInvoices_args other) {
13040
      if (!getClass().equals(other.getClass())) {
13041
        return getClass().getName().compareTo(other.getClass().getName());
13042
      }
13043
 
13044
      int lastComparison = 0;
13045
      getInvoices_args typedOther = (getInvoices_args)other;
13046
 
13047
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
13048
      if (lastComparison != 0) {
13049
        return lastComparison;
13050
      }
13051
      if (isSetDate()) {
13052
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
13053
        if (lastComparison != 0) {
13054
          return lastComparison;
13055
        }
13056
      }
13057
      return 0;
13058
    }
13059
 
13060
    public _Fields fieldForId(int fieldId) {
13061
      return _Fields.findByThriftId(fieldId);
13062
    }
13063
 
13064
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13065
      org.apache.thrift.protocol.TField field;
13066
      iprot.readStructBegin();
13067
      while (true)
13068
      {
13069
        field = iprot.readFieldBegin();
13070
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13071
          break;
13072
        }
13073
        switch (field.id) {
13074
          case 1: // DATE
13075
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13076
              this.date = iprot.readI64();
13077
              setDateIsSet(true);
13078
            } else { 
13079
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13080
            }
13081
            break;
13082
          default:
13083
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13084
        }
13085
        iprot.readFieldEnd();
13086
      }
13087
      iprot.readStructEnd();
13088
      validate();
13089
    }
13090
 
13091
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13092
      validate();
13093
 
13094
      oprot.writeStructBegin(STRUCT_DESC);
13095
      oprot.writeFieldBegin(DATE_FIELD_DESC);
13096
      oprot.writeI64(this.date);
13097
      oprot.writeFieldEnd();
13098
      oprot.writeFieldStop();
13099
      oprot.writeStructEnd();
13100
    }
13101
 
13102
    @Override
13103
    public String toString() {
13104
      StringBuilder sb = new StringBuilder("getInvoices_args(");
13105
      boolean first = true;
13106
 
13107
      sb.append("date:");
13108
      sb.append(this.date);
13109
      first = false;
13110
      sb.append(")");
13111
      return sb.toString();
13112
    }
13113
 
13114
    public void validate() throws org.apache.thrift.TException {
13115
      // check for required fields
13116
    }
13117
 
13118
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13119
      try {
13120
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13121
      } catch (org.apache.thrift.TException te) {
13122
        throw new java.io.IOException(te);
13123
      }
13124
    }
13125
 
13126
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13127
      try {
13128
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
13129
        __isset_bit_vector = new BitSet(1);
13130
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13131
      } catch (org.apache.thrift.TException te) {
13132
        throw new java.io.IOException(te);
13133
      }
13134
    }
13135
 
13136
  }
13137
 
13138
  public static class getInvoices_result implements org.apache.thrift.TBase<getInvoices_result, getInvoices_result._Fields>, java.io.Serializable, Cloneable   {
13139
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_result");
13140
 
13141
    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);
13142
 
13143
    private List<Invoice> success; // required
13144
 
13145
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13146
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13147
      SUCCESS((short)0, "success");
13148
 
13149
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13150
 
13151
      static {
13152
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13153
          byName.put(field.getFieldName(), field);
13154
        }
13155
      }
13156
 
13157
      /**
13158
       * Find the _Fields constant that matches fieldId, or null if its not found.
13159
       */
13160
      public static _Fields findByThriftId(int fieldId) {
13161
        switch(fieldId) {
13162
          case 0: // SUCCESS
13163
            return SUCCESS;
13164
          default:
13165
            return null;
13166
        }
13167
      }
13168
 
13169
      /**
13170
       * Find the _Fields constant that matches fieldId, throwing an exception
13171
       * if it is not found.
13172
       */
13173
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13174
        _Fields fields = findByThriftId(fieldId);
13175
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13176
        return fields;
13177
      }
13178
 
13179
      /**
13180
       * Find the _Fields constant that matches name, or null if its not found.
13181
       */
13182
      public static _Fields findByName(String name) {
13183
        return byName.get(name);
13184
      }
13185
 
13186
      private final short _thriftId;
13187
      private final String _fieldName;
13188
 
13189
      _Fields(short thriftId, String fieldName) {
13190
        _thriftId = thriftId;
13191
        _fieldName = fieldName;
13192
      }
13193
 
13194
      public short getThriftFieldId() {
13195
        return _thriftId;
13196
      }
13197
 
13198
      public String getFieldName() {
13199
        return _fieldName;
13200
      }
13201
    }
13202
 
13203
    // isset id assignments
13204
 
13205
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13206
    static {
13207
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13208
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13209
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
13210
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class))));
13211
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13212
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_result.class, metaDataMap);
13213
    }
13214
 
13215
    public getInvoices_result() {
13216
    }
13217
 
13218
    public getInvoices_result(
13219
      List<Invoice> success)
13220
    {
13221
      this();
13222
      this.success = success;
13223
    }
13224
 
13225
    /**
13226
     * Performs a deep copy on <i>other</i>.
13227
     */
13228
    public getInvoices_result(getInvoices_result other) {
13229
      if (other.isSetSuccess()) {
13230
        List<Invoice> __this__success = new ArrayList<Invoice>();
13231
        for (Invoice other_element : other.success) {
13232
          __this__success.add(new Invoice(other_element));
13233
        }
13234
        this.success = __this__success;
13235
      }
13236
    }
13237
 
13238
    public getInvoices_result deepCopy() {
13239
      return new getInvoices_result(this);
13240
    }
13241
 
13242
    @Override
13243
    public void clear() {
13244
      this.success = null;
13245
    }
13246
 
13247
    public int getSuccessSize() {
13248
      return (this.success == null) ? 0 : this.success.size();
13249
    }
13250
 
13251
    public java.util.Iterator<Invoice> getSuccessIterator() {
13252
      return (this.success == null) ? null : this.success.iterator();
13253
    }
13254
 
13255
    public void addToSuccess(Invoice elem) {
13256
      if (this.success == null) {
13257
        this.success = new ArrayList<Invoice>();
13258
      }
13259
      this.success.add(elem);
13260
    }
13261
 
13262
    public List<Invoice> getSuccess() {
13263
      return this.success;
13264
    }
13265
 
13266
    public void setSuccess(List<Invoice> success) {
13267
      this.success = success;
13268
    }
13269
 
13270
    public void unsetSuccess() {
13271
      this.success = null;
13272
    }
13273
 
13274
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
13275
    public boolean isSetSuccess() {
13276
      return this.success != null;
13277
    }
13278
 
13279
    public void setSuccessIsSet(boolean value) {
13280
      if (!value) {
13281
        this.success = null;
13282
      }
13283
    }
13284
 
13285
    public void setFieldValue(_Fields field, Object value) {
13286
      switch (field) {
13287
      case SUCCESS:
13288
        if (value == null) {
13289
          unsetSuccess();
13290
        } else {
13291
          setSuccess((List<Invoice>)value);
13292
        }
13293
        break;
13294
 
13295
      }
13296
    }
13297
 
13298
    public Object getFieldValue(_Fields field) {
13299
      switch (field) {
13300
      case SUCCESS:
13301
        return getSuccess();
13302
 
13303
      }
13304
      throw new IllegalStateException();
13305
    }
13306
 
13307
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13308
    public boolean isSet(_Fields field) {
13309
      if (field == null) {
13310
        throw new IllegalArgumentException();
13311
      }
13312
 
13313
      switch (field) {
13314
      case SUCCESS:
13315
        return isSetSuccess();
13316
      }
13317
      throw new IllegalStateException();
13318
    }
13319
 
13320
    @Override
13321
    public boolean equals(Object that) {
13322
      if (that == null)
13323
        return false;
13324
      if (that instanceof getInvoices_result)
13325
        return this.equals((getInvoices_result)that);
13326
      return false;
13327
    }
13328
 
13329
    public boolean equals(getInvoices_result that) {
13330
      if (that == null)
13331
        return false;
13332
 
13333
      boolean this_present_success = true && this.isSetSuccess();
13334
      boolean that_present_success = true && that.isSetSuccess();
13335
      if (this_present_success || that_present_success) {
13336
        if (!(this_present_success && that_present_success))
13337
          return false;
13338
        if (!this.success.equals(that.success))
13339
          return false;
13340
      }
13341
 
13342
      return true;
13343
    }
13344
 
13345
    @Override
13346
    public int hashCode() {
13347
      return 0;
13348
    }
13349
 
13350
    public int compareTo(getInvoices_result other) {
13351
      if (!getClass().equals(other.getClass())) {
13352
        return getClass().getName().compareTo(other.getClass().getName());
13353
      }
13354
 
13355
      int lastComparison = 0;
13356
      getInvoices_result typedOther = (getInvoices_result)other;
13357
 
13358
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
13359
      if (lastComparison != 0) {
13360
        return lastComparison;
13361
      }
13362
      if (isSetSuccess()) {
13363
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
13364
        if (lastComparison != 0) {
13365
          return lastComparison;
13366
        }
13367
      }
13368
      return 0;
13369
    }
13370
 
13371
    public _Fields fieldForId(int fieldId) {
13372
      return _Fields.findByThriftId(fieldId);
13373
    }
13374
 
13375
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13376
      org.apache.thrift.protocol.TField field;
13377
      iprot.readStructBegin();
13378
      while (true)
13379
      {
13380
        field = iprot.readFieldBegin();
13381
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13382
          break;
13383
        }
13384
        switch (field.id) {
13385
          case 0: // SUCCESS
13386
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
13387
              {
6385 amar.kumar 13388
                org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
13389
                this.success = new ArrayList<Invoice>(_list24.size);
13390
                for (int _i25 = 0; _i25 < _list24.size; ++_i25)
5443 mandeep.dh 13391
                {
6385 amar.kumar 13392
                  Invoice _elem26; // required
13393
                  _elem26 = new Invoice();
13394
                  _elem26.read(iprot);
13395
                  this.success.add(_elem26);
5443 mandeep.dh 13396
                }
13397
                iprot.readListEnd();
13398
              }
13399
            } else { 
13400
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13401
            }
13402
            break;
13403
          default:
13404
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13405
        }
13406
        iprot.readFieldEnd();
13407
      }
13408
      iprot.readStructEnd();
13409
      validate();
13410
    }
13411
 
13412
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13413
      oprot.writeStructBegin(STRUCT_DESC);
13414
 
13415
      if (this.isSetSuccess()) {
13416
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13417
        {
13418
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 13419
          for (Invoice _iter27 : this.success)
5443 mandeep.dh 13420
          {
6385 amar.kumar 13421
            _iter27.write(oprot);
5443 mandeep.dh 13422
          }
13423
          oprot.writeListEnd();
13424
        }
13425
        oprot.writeFieldEnd();
13426
      }
13427
      oprot.writeFieldStop();
13428
      oprot.writeStructEnd();
13429
    }
13430
 
13431
    @Override
13432
    public String toString() {
13433
      StringBuilder sb = new StringBuilder("getInvoices_result(");
13434
      boolean first = true;
13435
 
13436
      sb.append("success:");
13437
      if (this.success == null) {
13438
        sb.append("null");
13439
      } else {
13440
        sb.append(this.success);
13441
      }
13442
      first = false;
13443
      sb.append(")");
13444
      return sb.toString();
13445
    }
13446
 
13447
    public void validate() throws org.apache.thrift.TException {
13448
      // check for required fields
13449
    }
13450
 
13451
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13452
      try {
13453
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13454
      } catch (org.apache.thrift.TException te) {
13455
        throw new java.io.IOException(te);
13456
      }
13457
    }
13458
 
13459
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13460
      try {
13461
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13462
      } catch (org.apache.thrift.TException te) {
13463
        throw new java.io.IOException(te);
13464
      }
13465
    }
13466
 
13467
  }
13468
 
7410 amar.kumar 13469
  public static class getInvoicesForWarehouse_args implements org.apache.thrift.TBase<getInvoicesForWarehouse_args, getInvoicesForWarehouse_args._Fields>, java.io.Serializable, Cloneable   {
13470
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoicesForWarehouse_args");
13471
 
13472
    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);
13473
    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);
13474
    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);
13475
 
13476
    private long warehouseId; // required
13477
    private long supplierId; // required
13478
    private long date; // required
13479
 
13480
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13481
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13482
      WAREHOUSE_ID((short)1, "warehouseId"),
13483
      SUPPLIER_ID((short)2, "supplierId"),
13484
      DATE((short)3, "date");
13485
 
13486
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13487
 
13488
      static {
13489
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13490
          byName.put(field.getFieldName(), field);
13491
        }
13492
      }
13493
 
13494
      /**
13495
       * Find the _Fields constant that matches fieldId, or null if its not found.
13496
       */
13497
      public static _Fields findByThriftId(int fieldId) {
13498
        switch(fieldId) {
13499
          case 1: // WAREHOUSE_ID
13500
            return WAREHOUSE_ID;
13501
          case 2: // SUPPLIER_ID
13502
            return SUPPLIER_ID;
13503
          case 3: // DATE
13504
            return DATE;
13505
          default:
13506
            return null;
13507
        }
13508
      }
13509
 
13510
      /**
13511
       * Find the _Fields constant that matches fieldId, throwing an exception
13512
       * if it is not found.
13513
       */
13514
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13515
        _Fields fields = findByThriftId(fieldId);
13516
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13517
        return fields;
13518
      }
13519
 
13520
      /**
13521
       * Find the _Fields constant that matches name, or null if its not found.
13522
       */
13523
      public static _Fields findByName(String name) {
13524
        return byName.get(name);
13525
      }
13526
 
13527
      private final short _thriftId;
13528
      private final String _fieldName;
13529
 
13530
      _Fields(short thriftId, String fieldName) {
13531
        _thriftId = thriftId;
13532
        _fieldName = fieldName;
13533
      }
13534
 
13535
      public short getThriftFieldId() {
13536
        return _thriftId;
13537
      }
13538
 
13539
      public String getFieldName() {
13540
        return _fieldName;
13541
      }
13542
    }
13543
 
13544
    // isset id assignments
13545
    private static final int __WAREHOUSEID_ISSET_ID = 0;
13546
    private static final int __SUPPLIERID_ISSET_ID = 1;
13547
    private static final int __DATE_ISSET_ID = 2;
13548
    private BitSet __isset_bit_vector = new BitSet(3);
13549
 
13550
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13551
    static {
13552
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13553
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13554
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13555
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13556
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13557
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13558
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13559
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13560
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoicesForWarehouse_args.class, metaDataMap);
13561
    }
13562
 
13563
    public getInvoicesForWarehouse_args() {
13564
    }
13565
 
13566
    public getInvoicesForWarehouse_args(
13567
      long warehouseId,
13568
      long supplierId,
13569
      long date)
13570
    {
13571
      this();
13572
      this.warehouseId = warehouseId;
13573
      setWarehouseIdIsSet(true);
13574
      this.supplierId = supplierId;
13575
      setSupplierIdIsSet(true);
13576
      this.date = date;
13577
      setDateIsSet(true);
13578
    }
13579
 
13580
    /**
13581
     * Performs a deep copy on <i>other</i>.
13582
     */
13583
    public getInvoicesForWarehouse_args(getInvoicesForWarehouse_args other) {
13584
      __isset_bit_vector.clear();
13585
      __isset_bit_vector.or(other.__isset_bit_vector);
13586
      this.warehouseId = other.warehouseId;
13587
      this.supplierId = other.supplierId;
13588
      this.date = other.date;
13589
    }
13590
 
13591
    public getInvoicesForWarehouse_args deepCopy() {
13592
      return new getInvoicesForWarehouse_args(this);
13593
    }
13594
 
13595
    @Override
13596
    public void clear() {
13597
      setWarehouseIdIsSet(false);
13598
      this.warehouseId = 0;
13599
      setSupplierIdIsSet(false);
13600
      this.supplierId = 0;
13601
      setDateIsSet(false);
13602
      this.date = 0;
13603
    }
13604
 
13605
    public long getWarehouseId() {
13606
      return this.warehouseId;
13607
    }
13608
 
13609
    public void setWarehouseId(long warehouseId) {
13610
      this.warehouseId = warehouseId;
13611
      setWarehouseIdIsSet(true);
13612
    }
13613
 
13614
    public void unsetWarehouseId() {
13615
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
13616
    }
13617
 
13618
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
13619
    public boolean isSetWarehouseId() {
13620
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
13621
    }
13622
 
13623
    public void setWarehouseIdIsSet(boolean value) {
13624
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
13625
    }
13626
 
13627
    public long getSupplierId() {
13628
      return this.supplierId;
13629
    }
13630
 
13631
    public void setSupplierId(long supplierId) {
13632
      this.supplierId = supplierId;
13633
      setSupplierIdIsSet(true);
13634
    }
13635
 
13636
    public void unsetSupplierId() {
13637
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
13638
    }
13639
 
13640
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
13641
    public boolean isSetSupplierId() {
13642
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
13643
    }
13644
 
13645
    public void setSupplierIdIsSet(boolean value) {
13646
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
13647
    }
13648
 
13649
    public long getDate() {
13650
      return this.date;
13651
    }
13652
 
13653
    public void setDate(long date) {
13654
      this.date = date;
13655
      setDateIsSet(true);
13656
    }
13657
 
13658
    public void unsetDate() {
13659
      __isset_bit_vector.clear(__DATE_ISSET_ID);
13660
    }
13661
 
13662
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
13663
    public boolean isSetDate() {
13664
      return __isset_bit_vector.get(__DATE_ISSET_ID);
13665
    }
13666
 
13667
    public void setDateIsSet(boolean value) {
13668
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
13669
    }
13670
 
13671
    public void setFieldValue(_Fields field, Object value) {
13672
      switch (field) {
13673
      case WAREHOUSE_ID:
13674
        if (value == null) {
13675
          unsetWarehouseId();
13676
        } else {
13677
          setWarehouseId((Long)value);
13678
        }
13679
        break;
13680
 
13681
      case SUPPLIER_ID:
13682
        if (value == null) {
13683
          unsetSupplierId();
13684
        } else {
13685
          setSupplierId((Long)value);
13686
        }
13687
        break;
13688
 
13689
      case DATE:
13690
        if (value == null) {
13691
          unsetDate();
13692
        } else {
13693
          setDate((Long)value);
13694
        }
13695
        break;
13696
 
13697
      }
13698
    }
13699
 
13700
    public Object getFieldValue(_Fields field) {
13701
      switch (field) {
13702
      case WAREHOUSE_ID:
13703
        return Long.valueOf(getWarehouseId());
13704
 
13705
      case SUPPLIER_ID:
13706
        return Long.valueOf(getSupplierId());
13707
 
13708
      case DATE:
13709
        return Long.valueOf(getDate());
13710
 
13711
      }
13712
      throw new IllegalStateException();
13713
    }
13714
 
13715
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13716
    public boolean isSet(_Fields field) {
13717
      if (field == null) {
13718
        throw new IllegalArgumentException();
13719
      }
13720
 
13721
      switch (field) {
13722
      case WAREHOUSE_ID:
13723
        return isSetWarehouseId();
13724
      case SUPPLIER_ID:
13725
        return isSetSupplierId();
13726
      case DATE:
13727
        return isSetDate();
13728
      }
13729
      throw new IllegalStateException();
13730
    }
13731
 
13732
    @Override
13733
    public boolean equals(Object that) {
13734
      if (that == null)
13735
        return false;
13736
      if (that instanceof getInvoicesForWarehouse_args)
13737
        return this.equals((getInvoicesForWarehouse_args)that);
13738
      return false;
13739
    }
13740
 
13741
    public boolean equals(getInvoicesForWarehouse_args that) {
13742
      if (that == null)
13743
        return false;
13744
 
13745
      boolean this_present_warehouseId = true;
13746
      boolean that_present_warehouseId = true;
13747
      if (this_present_warehouseId || that_present_warehouseId) {
13748
        if (!(this_present_warehouseId && that_present_warehouseId))
13749
          return false;
13750
        if (this.warehouseId != that.warehouseId)
13751
          return false;
13752
      }
13753
 
13754
      boolean this_present_supplierId = true;
13755
      boolean that_present_supplierId = true;
13756
      if (this_present_supplierId || that_present_supplierId) {
13757
        if (!(this_present_supplierId && that_present_supplierId))
13758
          return false;
13759
        if (this.supplierId != that.supplierId)
13760
          return false;
13761
      }
13762
 
13763
      boolean this_present_date = true;
13764
      boolean that_present_date = true;
13765
      if (this_present_date || that_present_date) {
13766
        if (!(this_present_date && that_present_date))
13767
          return false;
13768
        if (this.date != that.date)
13769
          return false;
13770
      }
13771
 
13772
      return true;
13773
    }
13774
 
13775
    @Override
13776
    public int hashCode() {
13777
      return 0;
13778
    }
13779
 
13780
    public int compareTo(getInvoicesForWarehouse_args other) {
13781
      if (!getClass().equals(other.getClass())) {
13782
        return getClass().getName().compareTo(other.getClass().getName());
13783
      }
13784
 
13785
      int lastComparison = 0;
13786
      getInvoicesForWarehouse_args typedOther = (getInvoicesForWarehouse_args)other;
13787
 
13788
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
13789
      if (lastComparison != 0) {
13790
        return lastComparison;
13791
      }
13792
      if (isSetWarehouseId()) {
13793
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
13794
        if (lastComparison != 0) {
13795
          return lastComparison;
13796
        }
13797
      }
13798
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
13799
      if (lastComparison != 0) {
13800
        return lastComparison;
13801
      }
13802
      if (isSetSupplierId()) {
13803
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
13804
        if (lastComparison != 0) {
13805
          return lastComparison;
13806
        }
13807
      }
13808
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
13809
      if (lastComparison != 0) {
13810
        return lastComparison;
13811
      }
13812
      if (isSetDate()) {
13813
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
13814
        if (lastComparison != 0) {
13815
          return lastComparison;
13816
        }
13817
      }
13818
      return 0;
13819
    }
13820
 
13821
    public _Fields fieldForId(int fieldId) {
13822
      return _Fields.findByThriftId(fieldId);
13823
    }
13824
 
13825
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13826
      org.apache.thrift.protocol.TField field;
13827
      iprot.readStructBegin();
13828
      while (true)
13829
      {
13830
        field = iprot.readFieldBegin();
13831
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13832
          break;
13833
        }
13834
        switch (field.id) {
13835
          case 1: // WAREHOUSE_ID
13836
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13837
              this.warehouseId = iprot.readI64();
13838
              setWarehouseIdIsSet(true);
13839
            } else { 
13840
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13841
            }
13842
            break;
13843
          case 2: // SUPPLIER_ID
13844
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13845
              this.supplierId = iprot.readI64();
13846
              setSupplierIdIsSet(true);
13847
            } else { 
13848
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13849
            }
13850
            break;
13851
          case 3: // DATE
13852
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13853
              this.date = iprot.readI64();
13854
              setDateIsSet(true);
13855
            } else { 
13856
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13857
            }
13858
            break;
13859
          default:
13860
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13861
        }
13862
        iprot.readFieldEnd();
13863
      }
13864
      iprot.readStructEnd();
13865
      validate();
13866
    }
13867
 
13868
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13869
      validate();
13870
 
13871
      oprot.writeStructBegin(STRUCT_DESC);
13872
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
13873
      oprot.writeI64(this.warehouseId);
13874
      oprot.writeFieldEnd();
13875
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
13876
      oprot.writeI64(this.supplierId);
13877
      oprot.writeFieldEnd();
13878
      oprot.writeFieldBegin(DATE_FIELD_DESC);
13879
      oprot.writeI64(this.date);
13880
      oprot.writeFieldEnd();
13881
      oprot.writeFieldStop();
13882
      oprot.writeStructEnd();
13883
    }
13884
 
13885
    @Override
13886
    public String toString() {
13887
      StringBuilder sb = new StringBuilder("getInvoicesForWarehouse_args(");
13888
      boolean first = true;
13889
 
13890
      sb.append("warehouseId:");
13891
      sb.append(this.warehouseId);
13892
      first = false;
13893
      if (!first) sb.append(", ");
13894
      sb.append("supplierId:");
13895
      sb.append(this.supplierId);
13896
      first = false;
13897
      if (!first) sb.append(", ");
13898
      sb.append("date:");
13899
      sb.append(this.date);
13900
      first = false;
13901
      sb.append(")");
13902
      return sb.toString();
13903
    }
13904
 
13905
    public void validate() throws org.apache.thrift.TException {
13906
      // check for required fields
13907
    }
13908
 
13909
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13910
      try {
13911
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13912
      } catch (org.apache.thrift.TException te) {
13913
        throw new java.io.IOException(te);
13914
      }
13915
    }
13916
 
13917
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13918
      try {
13919
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
13920
        __isset_bit_vector = new BitSet(1);
13921
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13922
      } catch (org.apache.thrift.TException te) {
13923
        throw new java.io.IOException(te);
13924
      }
13925
    }
13926
 
13927
  }
13928
 
13929
  public static class getInvoicesForWarehouse_result implements org.apache.thrift.TBase<getInvoicesForWarehouse_result, getInvoicesForWarehouse_result._Fields>, java.io.Serializable, Cloneable   {
13930
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoicesForWarehouse_result");
13931
 
13932
    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);
13933
 
13934
    private List<Invoice> success; // required
13935
 
13936
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13937
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13938
      SUCCESS((short)0, "success");
13939
 
13940
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13941
 
13942
      static {
13943
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13944
          byName.put(field.getFieldName(), field);
13945
        }
13946
      }
13947
 
13948
      /**
13949
       * Find the _Fields constant that matches fieldId, or null if its not found.
13950
       */
13951
      public static _Fields findByThriftId(int fieldId) {
13952
        switch(fieldId) {
13953
          case 0: // SUCCESS
13954
            return SUCCESS;
13955
          default:
13956
            return null;
13957
        }
13958
      }
13959
 
13960
      /**
13961
       * Find the _Fields constant that matches fieldId, throwing an exception
13962
       * if it is not found.
13963
       */
13964
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13965
        _Fields fields = findByThriftId(fieldId);
13966
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13967
        return fields;
13968
      }
13969
 
13970
      /**
13971
       * Find the _Fields constant that matches name, or null if its not found.
13972
       */
13973
      public static _Fields findByName(String name) {
13974
        return byName.get(name);
13975
      }
13976
 
13977
      private final short _thriftId;
13978
      private final String _fieldName;
13979
 
13980
      _Fields(short thriftId, String fieldName) {
13981
        _thriftId = thriftId;
13982
        _fieldName = fieldName;
13983
      }
13984
 
13985
      public short getThriftFieldId() {
13986
        return _thriftId;
13987
      }
13988
 
13989
      public String getFieldName() {
13990
        return _fieldName;
13991
      }
13992
    }
13993
 
13994
    // isset id assignments
13995
 
13996
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13997
    static {
13998
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13999
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14000
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
14001
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class))));
14002
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14003
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoicesForWarehouse_result.class, metaDataMap);
14004
    }
14005
 
14006
    public getInvoicesForWarehouse_result() {
14007
    }
14008
 
14009
    public getInvoicesForWarehouse_result(
14010
      List<Invoice> success)
14011
    {
14012
      this();
14013
      this.success = success;
14014
    }
14015
 
14016
    /**
14017
     * Performs a deep copy on <i>other</i>.
14018
     */
14019
    public getInvoicesForWarehouse_result(getInvoicesForWarehouse_result other) {
14020
      if (other.isSetSuccess()) {
14021
        List<Invoice> __this__success = new ArrayList<Invoice>();
14022
        for (Invoice other_element : other.success) {
14023
          __this__success.add(new Invoice(other_element));
14024
        }
14025
        this.success = __this__success;
14026
      }
14027
    }
14028
 
14029
    public getInvoicesForWarehouse_result deepCopy() {
14030
      return new getInvoicesForWarehouse_result(this);
14031
    }
14032
 
14033
    @Override
14034
    public void clear() {
14035
      this.success = null;
14036
    }
14037
 
14038
    public int getSuccessSize() {
14039
      return (this.success == null) ? 0 : this.success.size();
14040
    }
14041
 
14042
    public java.util.Iterator<Invoice> getSuccessIterator() {
14043
      return (this.success == null) ? null : this.success.iterator();
14044
    }
14045
 
14046
    public void addToSuccess(Invoice elem) {
14047
      if (this.success == null) {
14048
        this.success = new ArrayList<Invoice>();
14049
      }
14050
      this.success.add(elem);
14051
    }
14052
 
14053
    public List<Invoice> getSuccess() {
14054
      return this.success;
14055
    }
14056
 
14057
    public void setSuccess(List<Invoice> success) {
14058
      this.success = success;
14059
    }
14060
 
14061
    public void unsetSuccess() {
14062
      this.success = null;
14063
    }
14064
 
14065
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
14066
    public boolean isSetSuccess() {
14067
      return this.success != null;
14068
    }
14069
 
14070
    public void setSuccessIsSet(boolean value) {
14071
      if (!value) {
14072
        this.success = null;
14073
      }
14074
    }
14075
 
14076
    public void setFieldValue(_Fields field, Object value) {
14077
      switch (field) {
14078
      case SUCCESS:
14079
        if (value == null) {
14080
          unsetSuccess();
14081
        } else {
14082
          setSuccess((List<Invoice>)value);
14083
        }
14084
        break;
14085
 
14086
      }
14087
    }
14088
 
14089
    public Object getFieldValue(_Fields field) {
14090
      switch (field) {
14091
      case SUCCESS:
14092
        return getSuccess();
14093
 
14094
      }
14095
      throw new IllegalStateException();
14096
    }
14097
 
14098
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14099
    public boolean isSet(_Fields field) {
14100
      if (field == null) {
14101
        throw new IllegalArgumentException();
14102
      }
14103
 
14104
      switch (field) {
14105
      case SUCCESS:
14106
        return isSetSuccess();
14107
      }
14108
      throw new IllegalStateException();
14109
    }
14110
 
14111
    @Override
14112
    public boolean equals(Object that) {
14113
      if (that == null)
14114
        return false;
14115
      if (that instanceof getInvoicesForWarehouse_result)
14116
        return this.equals((getInvoicesForWarehouse_result)that);
14117
      return false;
14118
    }
14119
 
14120
    public boolean equals(getInvoicesForWarehouse_result that) {
14121
      if (that == null)
14122
        return false;
14123
 
14124
      boolean this_present_success = true && this.isSetSuccess();
14125
      boolean that_present_success = true && that.isSetSuccess();
14126
      if (this_present_success || that_present_success) {
14127
        if (!(this_present_success && that_present_success))
14128
          return false;
14129
        if (!this.success.equals(that.success))
14130
          return false;
14131
      }
14132
 
14133
      return true;
14134
    }
14135
 
14136
    @Override
14137
    public int hashCode() {
14138
      return 0;
14139
    }
14140
 
14141
    public int compareTo(getInvoicesForWarehouse_result other) {
14142
      if (!getClass().equals(other.getClass())) {
14143
        return getClass().getName().compareTo(other.getClass().getName());
14144
      }
14145
 
14146
      int lastComparison = 0;
14147
      getInvoicesForWarehouse_result typedOther = (getInvoicesForWarehouse_result)other;
14148
 
14149
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
14150
      if (lastComparison != 0) {
14151
        return lastComparison;
14152
      }
14153
      if (isSetSuccess()) {
14154
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
14155
        if (lastComparison != 0) {
14156
          return lastComparison;
14157
        }
14158
      }
14159
      return 0;
14160
    }
14161
 
14162
    public _Fields fieldForId(int fieldId) {
14163
      return _Fields.findByThriftId(fieldId);
14164
    }
14165
 
14166
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14167
      org.apache.thrift.protocol.TField field;
14168
      iprot.readStructBegin();
14169
      while (true)
14170
      {
14171
        field = iprot.readFieldBegin();
14172
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14173
          break;
14174
        }
14175
        switch (field.id) {
14176
          case 0: // SUCCESS
14177
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
14178
              {
14179
                org.apache.thrift.protocol.TList _list28 = iprot.readListBegin();
14180
                this.success = new ArrayList<Invoice>(_list28.size);
14181
                for (int _i29 = 0; _i29 < _list28.size; ++_i29)
14182
                {
14183
                  Invoice _elem30; // required
14184
                  _elem30 = new Invoice();
14185
                  _elem30.read(iprot);
14186
                  this.success.add(_elem30);
14187
                }
14188
                iprot.readListEnd();
14189
              }
14190
            } else { 
14191
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14192
            }
14193
            break;
14194
          default:
14195
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14196
        }
14197
        iprot.readFieldEnd();
14198
      }
14199
      iprot.readStructEnd();
14200
      validate();
14201
    }
14202
 
14203
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14204
      oprot.writeStructBegin(STRUCT_DESC);
14205
 
14206
      if (this.isSetSuccess()) {
14207
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14208
        {
14209
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
14210
          for (Invoice _iter31 : this.success)
14211
          {
14212
            _iter31.write(oprot);
14213
          }
14214
          oprot.writeListEnd();
14215
        }
14216
        oprot.writeFieldEnd();
14217
      }
14218
      oprot.writeFieldStop();
14219
      oprot.writeStructEnd();
14220
    }
14221
 
14222
    @Override
14223
    public String toString() {
14224
      StringBuilder sb = new StringBuilder("getInvoicesForWarehouse_result(");
14225
      boolean first = true;
14226
 
14227
      sb.append("success:");
14228
      if (this.success == null) {
14229
        sb.append("null");
14230
      } else {
14231
        sb.append(this.success);
14232
      }
14233
      first = false;
14234
      sb.append(")");
14235
      return sb.toString();
14236
    }
14237
 
14238
    public void validate() throws org.apache.thrift.TException {
14239
      // check for required fields
14240
    }
14241
 
14242
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14243
      try {
14244
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14245
      } catch (org.apache.thrift.TException te) {
14246
        throw new java.io.IOException(te);
14247
      }
14248
    }
14249
 
14250
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14251
      try {
14252
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14253
      } catch (org.apache.thrift.TException te) {
14254
        throw new java.io.IOException(te);
14255
      }
14256
    }
14257
 
14258
  }
14259
 
5443 mandeep.dh 14260
  public static class createInvoice_args implements org.apache.thrift.TBase<createInvoice_args, createInvoice_args._Fields>, java.io.Serializable, Cloneable   {
14261
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_args");
14262
 
14263
    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);
14264
 
14265
    private Invoice invoice; // required
14266
 
14267
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14268
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14269
      INVOICE((short)1, "invoice");
14270
 
14271
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14272
 
14273
      static {
14274
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14275
          byName.put(field.getFieldName(), field);
14276
        }
14277
      }
14278
 
14279
      /**
14280
       * Find the _Fields constant that matches fieldId, or null if its not found.
14281
       */
14282
      public static _Fields findByThriftId(int fieldId) {
14283
        switch(fieldId) {
14284
          case 1: // INVOICE
14285
            return INVOICE;
14286
          default:
14287
            return null;
14288
        }
14289
      }
14290
 
14291
      /**
14292
       * Find the _Fields constant that matches fieldId, throwing an exception
14293
       * if it is not found.
14294
       */
14295
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14296
        _Fields fields = findByThriftId(fieldId);
14297
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14298
        return fields;
14299
      }
14300
 
14301
      /**
14302
       * Find the _Fields constant that matches name, or null if its not found.
14303
       */
14304
      public static _Fields findByName(String name) {
14305
        return byName.get(name);
14306
      }
14307
 
14308
      private final short _thriftId;
14309
      private final String _fieldName;
14310
 
14311
      _Fields(short thriftId, String fieldName) {
14312
        _thriftId = thriftId;
14313
        _fieldName = fieldName;
14314
      }
14315
 
14316
      public short getThriftFieldId() {
14317
        return _thriftId;
14318
      }
14319
 
14320
      public String getFieldName() {
14321
        return _fieldName;
14322
      }
14323
    }
14324
 
14325
    // isset id assignments
14326
 
14327
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14328
    static {
14329
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14330
      tmpMap.put(_Fields.INVOICE, new org.apache.thrift.meta_data.FieldMetaData("invoice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14331
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class)));
14332
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14333
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_args.class, metaDataMap);
14334
    }
14335
 
14336
    public createInvoice_args() {
14337
    }
14338
 
14339
    public createInvoice_args(
14340
      Invoice invoice)
14341
    {
14342
      this();
14343
      this.invoice = invoice;
14344
    }
14345
 
14346
    /**
14347
     * Performs a deep copy on <i>other</i>.
14348
     */
14349
    public createInvoice_args(createInvoice_args other) {
14350
      if (other.isSetInvoice()) {
14351
        this.invoice = new Invoice(other.invoice);
14352
      }
14353
    }
14354
 
14355
    public createInvoice_args deepCopy() {
14356
      return new createInvoice_args(this);
14357
    }
14358
 
14359
    @Override
14360
    public void clear() {
14361
      this.invoice = null;
14362
    }
14363
 
14364
    public Invoice getInvoice() {
14365
      return this.invoice;
14366
    }
14367
 
14368
    public void setInvoice(Invoice invoice) {
14369
      this.invoice = invoice;
14370
    }
14371
 
14372
    public void unsetInvoice() {
14373
      this.invoice = null;
14374
    }
14375
 
14376
    /** Returns true if field invoice is set (has been assigned a value) and false otherwise */
14377
    public boolean isSetInvoice() {
14378
      return this.invoice != null;
14379
    }
14380
 
14381
    public void setInvoiceIsSet(boolean value) {
14382
      if (!value) {
14383
        this.invoice = null;
14384
      }
14385
    }
14386
 
14387
    public void setFieldValue(_Fields field, Object value) {
14388
      switch (field) {
14389
      case INVOICE:
14390
        if (value == null) {
14391
          unsetInvoice();
14392
        } else {
14393
          setInvoice((Invoice)value);
14394
        }
14395
        break;
14396
 
14397
      }
14398
    }
14399
 
14400
    public Object getFieldValue(_Fields field) {
14401
      switch (field) {
14402
      case INVOICE:
14403
        return getInvoice();
14404
 
14405
      }
14406
      throw new IllegalStateException();
14407
    }
14408
 
14409
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14410
    public boolean isSet(_Fields field) {
14411
      if (field == null) {
14412
        throw new IllegalArgumentException();
14413
      }
14414
 
14415
      switch (field) {
14416
      case INVOICE:
14417
        return isSetInvoice();
14418
      }
14419
      throw new IllegalStateException();
14420
    }
14421
 
14422
    @Override
14423
    public boolean equals(Object that) {
14424
      if (that == null)
14425
        return false;
14426
      if (that instanceof createInvoice_args)
14427
        return this.equals((createInvoice_args)that);
14428
      return false;
14429
    }
14430
 
14431
    public boolean equals(createInvoice_args that) {
14432
      if (that == null)
14433
        return false;
14434
 
14435
      boolean this_present_invoice = true && this.isSetInvoice();
14436
      boolean that_present_invoice = true && that.isSetInvoice();
14437
      if (this_present_invoice || that_present_invoice) {
14438
        if (!(this_present_invoice && that_present_invoice))
14439
          return false;
14440
        if (!this.invoice.equals(that.invoice))
14441
          return false;
14442
      }
14443
 
14444
      return true;
14445
    }
14446
 
14447
    @Override
14448
    public int hashCode() {
14449
      return 0;
14450
    }
14451
 
14452
    public int compareTo(createInvoice_args other) {
14453
      if (!getClass().equals(other.getClass())) {
14454
        return getClass().getName().compareTo(other.getClass().getName());
14455
      }
14456
 
14457
      int lastComparison = 0;
14458
      createInvoice_args typedOther = (createInvoice_args)other;
14459
 
14460
      lastComparison = Boolean.valueOf(isSetInvoice()).compareTo(typedOther.isSetInvoice());
14461
      if (lastComparison != 0) {
14462
        return lastComparison;
14463
      }
14464
      if (isSetInvoice()) {
14465
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoice, typedOther.invoice);
14466
        if (lastComparison != 0) {
14467
          return lastComparison;
14468
        }
14469
      }
14470
      return 0;
14471
    }
14472
 
14473
    public _Fields fieldForId(int fieldId) {
14474
      return _Fields.findByThriftId(fieldId);
14475
    }
14476
 
14477
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14478
      org.apache.thrift.protocol.TField field;
14479
      iprot.readStructBegin();
14480
      while (true)
14481
      {
14482
        field = iprot.readFieldBegin();
14483
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14484
          break;
14485
        }
14486
        switch (field.id) {
14487
          case 1: // INVOICE
14488
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14489
              this.invoice = new Invoice();
14490
              this.invoice.read(iprot);
14491
            } else { 
14492
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14493
            }
14494
            break;
14495
          default:
14496
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14497
        }
14498
        iprot.readFieldEnd();
14499
      }
14500
      iprot.readStructEnd();
14501
      validate();
14502
    }
14503
 
14504
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14505
      validate();
14506
 
14507
      oprot.writeStructBegin(STRUCT_DESC);
14508
      if (this.invoice != null) {
14509
        oprot.writeFieldBegin(INVOICE_FIELD_DESC);
14510
        this.invoice.write(oprot);
14511
        oprot.writeFieldEnd();
14512
      }
14513
      oprot.writeFieldStop();
14514
      oprot.writeStructEnd();
14515
    }
14516
 
14517
    @Override
14518
    public String toString() {
14519
      StringBuilder sb = new StringBuilder("createInvoice_args(");
14520
      boolean first = true;
14521
 
14522
      sb.append("invoice:");
14523
      if (this.invoice == null) {
14524
        sb.append("null");
14525
      } else {
14526
        sb.append(this.invoice);
14527
      }
14528
      first = false;
14529
      sb.append(")");
14530
      return sb.toString();
14531
    }
14532
 
14533
    public void validate() throws org.apache.thrift.TException {
14534
      // check for required fields
14535
    }
14536
 
14537
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14538
      try {
14539
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14540
      } catch (org.apache.thrift.TException te) {
14541
        throw new java.io.IOException(te);
14542
      }
14543
    }
14544
 
14545
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14546
      try {
14547
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14548
      } catch (org.apache.thrift.TException te) {
14549
        throw new java.io.IOException(te);
14550
      }
14551
    }
14552
 
14553
  }
14554
 
14555
  public static class createInvoice_result implements org.apache.thrift.TBase<createInvoice_result, createInvoice_result._Fields>, java.io.Serializable, Cloneable   {
14556
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_result");
14557
 
14558
    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);
14559
 
14560
    private PurchaseServiceException e; // required
14561
 
14562
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14563
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14564
      E((short)1, "e");
14565
 
14566
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14567
 
14568
      static {
14569
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14570
          byName.put(field.getFieldName(), field);
14571
        }
14572
      }
14573
 
14574
      /**
14575
       * Find the _Fields constant that matches fieldId, or null if its not found.
14576
       */
14577
      public static _Fields findByThriftId(int fieldId) {
14578
        switch(fieldId) {
14579
          case 1: // E
14580
            return E;
14581
          default:
14582
            return null;
14583
        }
14584
      }
14585
 
14586
      /**
14587
       * Find the _Fields constant that matches fieldId, throwing an exception
14588
       * if it is not found.
14589
       */
14590
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14591
        _Fields fields = findByThriftId(fieldId);
14592
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14593
        return fields;
14594
      }
14595
 
14596
      /**
14597
       * Find the _Fields constant that matches name, or null if its not found.
14598
       */
14599
      public static _Fields findByName(String name) {
14600
        return byName.get(name);
14601
      }
14602
 
14603
      private final short _thriftId;
14604
      private final String _fieldName;
14605
 
14606
      _Fields(short thriftId, String fieldName) {
14607
        _thriftId = thriftId;
14608
        _fieldName = fieldName;
14609
      }
14610
 
14611
      public short getThriftFieldId() {
14612
        return _thriftId;
14613
      }
14614
 
14615
      public String getFieldName() {
14616
        return _fieldName;
14617
      }
14618
    }
14619
 
14620
    // isset id assignments
14621
 
14622
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14623
    static {
14624
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14625
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14626
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
14627
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14628
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_result.class, metaDataMap);
14629
    }
14630
 
14631
    public createInvoice_result() {
14632
    }
14633
 
14634
    public createInvoice_result(
14635
      PurchaseServiceException e)
14636
    {
14637
      this();
14638
      this.e = e;
14639
    }
14640
 
14641
    /**
14642
     * Performs a deep copy on <i>other</i>.
14643
     */
14644
    public createInvoice_result(createInvoice_result other) {
14645
      if (other.isSetE()) {
14646
        this.e = new PurchaseServiceException(other.e);
14647
      }
14648
    }
14649
 
14650
    public createInvoice_result deepCopy() {
14651
      return new createInvoice_result(this);
14652
    }
14653
 
14654
    @Override
14655
    public void clear() {
14656
      this.e = null;
14657
    }
14658
 
14659
    public PurchaseServiceException getE() {
14660
      return this.e;
14661
    }
14662
 
14663
    public void setE(PurchaseServiceException e) {
14664
      this.e = e;
14665
    }
14666
 
14667
    public void unsetE() {
14668
      this.e = null;
14669
    }
14670
 
14671
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
14672
    public boolean isSetE() {
14673
      return this.e != null;
14674
    }
14675
 
14676
    public void setEIsSet(boolean value) {
14677
      if (!value) {
14678
        this.e = null;
14679
      }
14680
    }
14681
 
14682
    public void setFieldValue(_Fields field, Object value) {
14683
      switch (field) {
14684
      case E:
14685
        if (value == null) {
14686
          unsetE();
14687
        } else {
14688
          setE((PurchaseServiceException)value);
14689
        }
14690
        break;
14691
 
14692
      }
14693
    }
14694
 
14695
    public Object getFieldValue(_Fields field) {
14696
      switch (field) {
14697
      case E:
14698
        return getE();
14699
 
14700
      }
14701
      throw new IllegalStateException();
14702
    }
14703
 
14704
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14705
    public boolean isSet(_Fields field) {
14706
      if (field == null) {
14707
        throw new IllegalArgumentException();
14708
      }
14709
 
14710
      switch (field) {
14711
      case E:
14712
        return isSetE();
14713
      }
14714
      throw new IllegalStateException();
14715
    }
14716
 
14717
    @Override
14718
    public boolean equals(Object that) {
14719
      if (that == null)
14720
        return false;
14721
      if (that instanceof createInvoice_result)
14722
        return this.equals((createInvoice_result)that);
14723
      return false;
14724
    }
14725
 
14726
    public boolean equals(createInvoice_result that) {
14727
      if (that == null)
14728
        return false;
14729
 
14730
      boolean this_present_e = true && this.isSetE();
14731
      boolean that_present_e = true && that.isSetE();
14732
      if (this_present_e || that_present_e) {
14733
        if (!(this_present_e && that_present_e))
14734
          return false;
14735
        if (!this.e.equals(that.e))
14736
          return false;
14737
      }
14738
 
14739
      return true;
14740
    }
14741
 
14742
    @Override
14743
    public int hashCode() {
14744
      return 0;
14745
    }
14746
 
14747
    public int compareTo(createInvoice_result other) {
14748
      if (!getClass().equals(other.getClass())) {
14749
        return getClass().getName().compareTo(other.getClass().getName());
14750
      }
14751
 
14752
      int lastComparison = 0;
14753
      createInvoice_result typedOther = (createInvoice_result)other;
14754
 
14755
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
14756
      if (lastComparison != 0) {
14757
        return lastComparison;
14758
      }
14759
      if (isSetE()) {
14760
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
14761
        if (lastComparison != 0) {
14762
          return lastComparison;
14763
        }
14764
      }
14765
      return 0;
14766
    }
14767
 
14768
    public _Fields fieldForId(int fieldId) {
14769
      return _Fields.findByThriftId(fieldId);
14770
    }
14771
 
14772
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14773
      org.apache.thrift.protocol.TField field;
14774
      iprot.readStructBegin();
14775
      while (true)
14776
      {
14777
        field = iprot.readFieldBegin();
14778
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14779
          break;
14780
        }
14781
        switch (field.id) {
14782
          case 1: // E
14783
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14784
              this.e = new PurchaseServiceException();
14785
              this.e.read(iprot);
14786
            } else { 
14787
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14788
            }
14789
            break;
14790
          default:
14791
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14792
        }
14793
        iprot.readFieldEnd();
14794
      }
14795
      iprot.readStructEnd();
14796
      validate();
14797
    }
14798
 
14799
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14800
      oprot.writeStructBegin(STRUCT_DESC);
14801
 
14802
      if (this.isSetE()) {
14803
        oprot.writeFieldBegin(E_FIELD_DESC);
14804
        this.e.write(oprot);
14805
        oprot.writeFieldEnd();
14806
      }
14807
      oprot.writeFieldStop();
14808
      oprot.writeStructEnd();
14809
    }
14810
 
14811
    @Override
14812
    public String toString() {
14813
      StringBuilder sb = new StringBuilder("createInvoice_result(");
14814
      boolean first = true;
14815
 
14816
      sb.append("e:");
14817
      if (this.e == null) {
14818
        sb.append("null");
14819
      } else {
14820
        sb.append(this.e);
14821
      }
14822
      first = false;
14823
      sb.append(")");
14824
      return sb.toString();
14825
    }
14826
 
14827
    public void validate() throws org.apache.thrift.TException {
14828
      // check for required fields
14829
    }
14830
 
14831
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14832
      try {
14833
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14834
      } catch (org.apache.thrift.TException te) {
14835
        throw new java.io.IOException(te);
14836
      }
14837
    }
14838
 
14839
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14840
      try {
14841
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14842
      } catch (org.apache.thrift.TException te) {
14843
        throw new java.io.IOException(te);
14844
      }
14845
    }
14846
 
14847
  }
14848
 
5591 mandeep.dh 14849
  public static class addSupplier_args implements org.apache.thrift.TBase<addSupplier_args, addSupplier_args._Fields>, java.io.Serializable, Cloneable   {
14850
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSupplier_args");
14851
 
14852
    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);
14853
 
14854
    private Supplier supplier; // required
14855
 
14856
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14857
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14858
      SUPPLIER((short)1, "supplier");
14859
 
14860
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14861
 
14862
      static {
14863
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14864
          byName.put(field.getFieldName(), field);
14865
        }
14866
      }
14867
 
14868
      /**
14869
       * Find the _Fields constant that matches fieldId, or null if its not found.
14870
       */
14871
      public static _Fields findByThriftId(int fieldId) {
14872
        switch(fieldId) {
14873
          case 1: // SUPPLIER
14874
            return SUPPLIER;
14875
          default:
14876
            return null;
14877
        }
14878
      }
14879
 
14880
      /**
14881
       * Find the _Fields constant that matches fieldId, throwing an exception
14882
       * if it is not found.
14883
       */
14884
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14885
        _Fields fields = findByThriftId(fieldId);
14886
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14887
        return fields;
14888
      }
14889
 
14890
      /**
14891
       * Find the _Fields constant that matches name, or null if its not found.
14892
       */
14893
      public static _Fields findByName(String name) {
14894
        return byName.get(name);
14895
      }
14896
 
14897
      private final short _thriftId;
14898
      private final String _fieldName;
14899
 
14900
      _Fields(short thriftId, String fieldName) {
14901
        _thriftId = thriftId;
14902
        _fieldName = fieldName;
14903
      }
14904
 
14905
      public short getThriftFieldId() {
14906
        return _thriftId;
14907
      }
14908
 
14909
      public String getFieldName() {
14910
        return _fieldName;
14911
      }
14912
    }
14913
 
14914
    // isset id assignments
14915
 
14916
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14917
    static {
14918
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14919
      tmpMap.put(_Fields.SUPPLIER, new org.apache.thrift.meta_data.FieldMetaData("supplier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14920
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
14921
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14922
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSupplier_args.class, metaDataMap);
14923
    }
14924
 
14925
    public addSupplier_args() {
14926
    }
14927
 
14928
    public addSupplier_args(
14929
      Supplier supplier)
14930
    {
14931
      this();
14932
      this.supplier = supplier;
14933
    }
14934
 
14935
    /**
14936
     * Performs a deep copy on <i>other</i>.
14937
     */
14938
    public addSupplier_args(addSupplier_args other) {
14939
      if (other.isSetSupplier()) {
14940
        this.supplier = new Supplier(other.supplier);
14941
      }
14942
    }
14943
 
14944
    public addSupplier_args deepCopy() {
14945
      return new addSupplier_args(this);
14946
    }
14947
 
14948
    @Override
14949
    public void clear() {
14950
      this.supplier = null;
14951
    }
14952
 
14953
    public Supplier getSupplier() {
14954
      return this.supplier;
14955
    }
14956
 
14957
    public void setSupplier(Supplier supplier) {
14958
      this.supplier = supplier;
14959
    }
14960
 
14961
    public void unsetSupplier() {
14962
      this.supplier = null;
14963
    }
14964
 
14965
    /** Returns true if field supplier is set (has been assigned a value) and false otherwise */
14966
    public boolean isSetSupplier() {
14967
      return this.supplier != null;
14968
    }
14969
 
14970
    public void setSupplierIsSet(boolean value) {
14971
      if (!value) {
14972
        this.supplier = null;
14973
      }
14974
    }
14975
 
14976
    public void setFieldValue(_Fields field, Object value) {
14977
      switch (field) {
14978
      case SUPPLIER:
14979
        if (value == null) {
14980
          unsetSupplier();
14981
        } else {
14982
          setSupplier((Supplier)value);
14983
        }
14984
        break;
14985
 
14986
      }
14987
    }
14988
 
14989
    public Object getFieldValue(_Fields field) {
14990
      switch (field) {
14991
      case SUPPLIER:
14992
        return getSupplier();
14993
 
14994
      }
14995
      throw new IllegalStateException();
14996
    }
14997
 
14998
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14999
    public boolean isSet(_Fields field) {
15000
      if (field == null) {
15001
        throw new IllegalArgumentException();
15002
      }
15003
 
15004
      switch (field) {
15005
      case SUPPLIER:
15006
        return isSetSupplier();
15007
      }
15008
      throw new IllegalStateException();
15009
    }
15010
 
15011
    @Override
15012
    public boolean equals(Object that) {
15013
      if (that == null)
15014
        return false;
15015
      if (that instanceof addSupplier_args)
15016
        return this.equals((addSupplier_args)that);
15017
      return false;
15018
    }
15019
 
15020
    public boolean equals(addSupplier_args that) {
15021
      if (that == null)
15022
        return false;
15023
 
15024
      boolean this_present_supplier = true && this.isSetSupplier();
15025
      boolean that_present_supplier = true && that.isSetSupplier();
15026
      if (this_present_supplier || that_present_supplier) {
15027
        if (!(this_present_supplier && that_present_supplier))
15028
          return false;
15029
        if (!this.supplier.equals(that.supplier))
15030
          return false;
15031
      }
15032
 
15033
      return true;
15034
    }
15035
 
15036
    @Override
15037
    public int hashCode() {
15038
      return 0;
15039
    }
15040
 
15041
    public int compareTo(addSupplier_args other) {
15042
      if (!getClass().equals(other.getClass())) {
15043
        return getClass().getName().compareTo(other.getClass().getName());
15044
      }
15045
 
15046
      int lastComparison = 0;
15047
      addSupplier_args typedOther = (addSupplier_args)other;
15048
 
15049
      lastComparison = Boolean.valueOf(isSetSupplier()).compareTo(typedOther.isSetSupplier());
15050
      if (lastComparison != 0) {
15051
        return lastComparison;
15052
      }
15053
      if (isSetSupplier()) {
15054
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplier, typedOther.supplier);
15055
        if (lastComparison != 0) {
15056
          return lastComparison;
15057
        }
15058
      }
15059
      return 0;
15060
    }
15061
 
15062
    public _Fields fieldForId(int fieldId) {
15063
      return _Fields.findByThriftId(fieldId);
15064
    }
15065
 
15066
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15067
      org.apache.thrift.protocol.TField field;
15068
      iprot.readStructBegin();
15069
      while (true)
15070
      {
15071
        field = iprot.readFieldBegin();
15072
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15073
          break;
15074
        }
15075
        switch (field.id) {
15076
          case 1: // SUPPLIER
15077
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15078
              this.supplier = new Supplier();
15079
              this.supplier.read(iprot);
15080
            } else { 
15081
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15082
            }
15083
            break;
15084
          default:
15085
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15086
        }
15087
        iprot.readFieldEnd();
15088
      }
15089
      iprot.readStructEnd();
15090
      validate();
15091
    }
15092
 
15093
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15094
      validate();
15095
 
15096
      oprot.writeStructBegin(STRUCT_DESC);
15097
      if (this.supplier != null) {
15098
        oprot.writeFieldBegin(SUPPLIER_FIELD_DESC);
15099
        this.supplier.write(oprot);
15100
        oprot.writeFieldEnd();
15101
      }
15102
      oprot.writeFieldStop();
15103
      oprot.writeStructEnd();
15104
    }
15105
 
15106
    @Override
15107
    public String toString() {
15108
      StringBuilder sb = new StringBuilder("addSupplier_args(");
15109
      boolean first = true;
15110
 
15111
      sb.append("supplier:");
15112
      if (this.supplier == null) {
15113
        sb.append("null");
15114
      } else {
15115
        sb.append(this.supplier);
15116
      }
15117
      first = false;
15118
      sb.append(")");
15119
      return sb.toString();
15120
    }
15121
 
15122
    public void validate() throws org.apache.thrift.TException {
15123
      // check for required fields
15124
    }
15125
 
15126
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15127
      try {
15128
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15129
      } catch (org.apache.thrift.TException te) {
15130
        throw new java.io.IOException(te);
15131
      }
15132
    }
15133
 
15134
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15135
      try {
15136
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15137
      } catch (org.apache.thrift.TException te) {
15138
        throw new java.io.IOException(te);
15139
      }
15140
    }
15141
 
15142
  }
15143
 
15144
  public static class addSupplier_result implements org.apache.thrift.TBase<addSupplier_result, addSupplier_result._Fields>, java.io.Serializable, Cloneable   {
15145
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSupplier_result");
15146
 
15147
    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);
15148
 
15149
    private Supplier success; // required
15150
 
15151
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15152
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15153
      SUCCESS((short)0, "success");
15154
 
15155
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15156
 
15157
      static {
15158
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15159
          byName.put(field.getFieldName(), field);
15160
        }
15161
      }
15162
 
15163
      /**
15164
       * Find the _Fields constant that matches fieldId, or null if its not found.
15165
       */
15166
      public static _Fields findByThriftId(int fieldId) {
15167
        switch(fieldId) {
15168
          case 0: // SUCCESS
15169
            return SUCCESS;
15170
          default:
15171
            return null;
15172
        }
15173
      }
15174
 
15175
      /**
15176
       * Find the _Fields constant that matches fieldId, throwing an exception
15177
       * if it is not found.
15178
       */
15179
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15180
        _Fields fields = findByThriftId(fieldId);
15181
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15182
        return fields;
15183
      }
15184
 
15185
      /**
15186
       * Find the _Fields constant that matches name, or null if its not found.
15187
       */
15188
      public static _Fields findByName(String name) {
15189
        return byName.get(name);
15190
      }
15191
 
15192
      private final short _thriftId;
15193
      private final String _fieldName;
15194
 
15195
      _Fields(short thriftId, String fieldName) {
15196
        _thriftId = thriftId;
15197
        _fieldName = fieldName;
15198
      }
15199
 
15200
      public short getThriftFieldId() {
15201
        return _thriftId;
15202
      }
15203
 
15204
      public String getFieldName() {
15205
        return _fieldName;
15206
      }
15207
    }
15208
 
15209
    // isset id assignments
15210
 
15211
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15212
    static {
15213
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15214
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15215
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
15216
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15217
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSupplier_result.class, metaDataMap);
15218
    }
15219
 
15220
    public addSupplier_result() {
15221
    }
15222
 
15223
    public addSupplier_result(
15224
      Supplier success)
15225
    {
15226
      this();
15227
      this.success = success;
15228
    }
15229
 
15230
    /**
15231
     * Performs a deep copy on <i>other</i>.
15232
     */
15233
    public addSupplier_result(addSupplier_result other) {
15234
      if (other.isSetSuccess()) {
15235
        this.success = new Supplier(other.success);
15236
      }
15237
    }
15238
 
15239
    public addSupplier_result deepCopy() {
15240
      return new addSupplier_result(this);
15241
    }
15242
 
15243
    @Override
15244
    public void clear() {
15245
      this.success = null;
15246
    }
15247
 
15248
    public Supplier getSuccess() {
15249
      return this.success;
15250
    }
15251
 
15252
    public void setSuccess(Supplier success) {
15253
      this.success = success;
15254
    }
15255
 
15256
    public void unsetSuccess() {
15257
      this.success = null;
15258
    }
15259
 
15260
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
15261
    public boolean isSetSuccess() {
15262
      return this.success != null;
15263
    }
15264
 
15265
    public void setSuccessIsSet(boolean value) {
15266
      if (!value) {
15267
        this.success = null;
15268
      }
15269
    }
15270
 
15271
    public void setFieldValue(_Fields field, Object value) {
15272
      switch (field) {
15273
      case SUCCESS:
15274
        if (value == null) {
15275
          unsetSuccess();
15276
        } else {
15277
          setSuccess((Supplier)value);
15278
        }
15279
        break;
15280
 
15281
      }
15282
    }
15283
 
15284
    public Object getFieldValue(_Fields field) {
15285
      switch (field) {
15286
      case SUCCESS:
15287
        return getSuccess();
15288
 
15289
      }
15290
      throw new IllegalStateException();
15291
    }
15292
 
15293
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15294
    public boolean isSet(_Fields field) {
15295
      if (field == null) {
15296
        throw new IllegalArgumentException();
15297
      }
15298
 
15299
      switch (field) {
15300
      case SUCCESS:
15301
        return isSetSuccess();
15302
      }
15303
      throw new IllegalStateException();
15304
    }
15305
 
15306
    @Override
15307
    public boolean equals(Object that) {
15308
      if (that == null)
15309
        return false;
15310
      if (that instanceof addSupplier_result)
15311
        return this.equals((addSupplier_result)that);
15312
      return false;
15313
    }
15314
 
15315
    public boolean equals(addSupplier_result that) {
15316
      if (that == null)
15317
        return false;
15318
 
15319
      boolean this_present_success = true && this.isSetSuccess();
15320
      boolean that_present_success = true && that.isSetSuccess();
15321
      if (this_present_success || that_present_success) {
15322
        if (!(this_present_success && that_present_success))
15323
          return false;
15324
        if (!this.success.equals(that.success))
15325
          return false;
15326
      }
15327
 
15328
      return true;
15329
    }
15330
 
15331
    @Override
15332
    public int hashCode() {
15333
      return 0;
15334
    }
15335
 
15336
    public int compareTo(addSupplier_result other) {
15337
      if (!getClass().equals(other.getClass())) {
15338
        return getClass().getName().compareTo(other.getClass().getName());
15339
      }
15340
 
15341
      int lastComparison = 0;
15342
      addSupplier_result typedOther = (addSupplier_result)other;
15343
 
15344
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
15345
      if (lastComparison != 0) {
15346
        return lastComparison;
15347
      }
15348
      if (isSetSuccess()) {
15349
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
15350
        if (lastComparison != 0) {
15351
          return lastComparison;
15352
        }
15353
      }
15354
      return 0;
15355
    }
15356
 
15357
    public _Fields fieldForId(int fieldId) {
15358
      return _Fields.findByThriftId(fieldId);
15359
    }
15360
 
15361
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15362
      org.apache.thrift.protocol.TField field;
15363
      iprot.readStructBegin();
15364
      while (true)
15365
      {
15366
        field = iprot.readFieldBegin();
15367
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15368
          break;
15369
        }
15370
        switch (field.id) {
15371
          case 0: // SUCCESS
15372
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15373
              this.success = new Supplier();
15374
              this.success.read(iprot);
15375
            } else { 
15376
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15377
            }
15378
            break;
15379
          default:
15380
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15381
        }
15382
        iprot.readFieldEnd();
15383
      }
15384
      iprot.readStructEnd();
15385
      validate();
15386
    }
15387
 
15388
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15389
      oprot.writeStructBegin(STRUCT_DESC);
15390
 
15391
      if (this.isSetSuccess()) {
15392
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15393
        this.success.write(oprot);
15394
        oprot.writeFieldEnd();
15395
      }
15396
      oprot.writeFieldStop();
15397
      oprot.writeStructEnd();
15398
    }
15399
 
15400
    @Override
15401
    public String toString() {
15402
      StringBuilder sb = new StringBuilder("addSupplier_result(");
15403
      boolean first = true;
15404
 
15405
      sb.append("success:");
15406
      if (this.success == null) {
15407
        sb.append("null");
15408
      } else {
15409
        sb.append(this.success);
15410
      }
15411
      first = false;
15412
      sb.append(")");
15413
      return sb.toString();
15414
    }
15415
 
15416
    public void validate() throws org.apache.thrift.TException {
15417
      // check for required fields
15418
    }
15419
 
15420
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15421
      try {
15422
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15423
      } catch (org.apache.thrift.TException te) {
15424
        throw new java.io.IOException(te);
15425
      }
15426
    }
15427
 
15428
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15429
      try {
15430
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15431
      } catch (org.apache.thrift.TException te) {
15432
        throw new java.io.IOException(te);
15433
      }
15434
    }
15435
 
15436
  }
15437
 
15438
  public static class updateSupplier_args implements org.apache.thrift.TBase<updateSupplier_args, updateSupplier_args._Fields>, java.io.Serializable, Cloneable   {
15439
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSupplier_args");
15440
 
15441
    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);
15442
 
15443
    private Supplier supplier; // required
15444
 
15445
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15446
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15447
      SUPPLIER((short)1, "supplier");
15448
 
15449
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15450
 
15451
      static {
15452
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15453
          byName.put(field.getFieldName(), field);
15454
        }
15455
      }
15456
 
15457
      /**
15458
       * Find the _Fields constant that matches fieldId, or null if its not found.
15459
       */
15460
      public static _Fields findByThriftId(int fieldId) {
15461
        switch(fieldId) {
15462
          case 1: // SUPPLIER
15463
            return SUPPLIER;
15464
          default:
15465
            return null;
15466
        }
15467
      }
15468
 
15469
      /**
15470
       * Find the _Fields constant that matches fieldId, throwing an exception
15471
       * if it is not found.
15472
       */
15473
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15474
        _Fields fields = findByThriftId(fieldId);
15475
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15476
        return fields;
15477
      }
15478
 
15479
      /**
15480
       * Find the _Fields constant that matches name, or null if its not found.
15481
       */
15482
      public static _Fields findByName(String name) {
15483
        return byName.get(name);
15484
      }
15485
 
15486
      private final short _thriftId;
15487
      private final String _fieldName;
15488
 
15489
      _Fields(short thriftId, String fieldName) {
15490
        _thriftId = thriftId;
15491
        _fieldName = fieldName;
15492
      }
15493
 
15494
      public short getThriftFieldId() {
15495
        return _thriftId;
15496
      }
15497
 
15498
      public String getFieldName() {
15499
        return _fieldName;
15500
      }
15501
    }
15502
 
15503
    // isset id assignments
15504
 
15505
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15506
    static {
15507
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15508
      tmpMap.put(_Fields.SUPPLIER, new org.apache.thrift.meta_data.FieldMetaData("supplier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15509
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
15510
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15511
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSupplier_args.class, metaDataMap);
15512
    }
15513
 
15514
    public updateSupplier_args() {
15515
    }
15516
 
15517
    public updateSupplier_args(
15518
      Supplier supplier)
15519
    {
15520
      this();
15521
      this.supplier = supplier;
15522
    }
15523
 
15524
    /**
15525
     * Performs a deep copy on <i>other</i>.
15526
     */
15527
    public updateSupplier_args(updateSupplier_args other) {
15528
      if (other.isSetSupplier()) {
15529
        this.supplier = new Supplier(other.supplier);
15530
      }
15531
    }
15532
 
15533
    public updateSupplier_args deepCopy() {
15534
      return new updateSupplier_args(this);
15535
    }
15536
 
15537
    @Override
15538
    public void clear() {
15539
      this.supplier = null;
15540
    }
15541
 
15542
    public Supplier getSupplier() {
15543
      return this.supplier;
15544
    }
15545
 
15546
    public void setSupplier(Supplier supplier) {
15547
      this.supplier = supplier;
15548
    }
15549
 
15550
    public void unsetSupplier() {
15551
      this.supplier = null;
15552
    }
15553
 
15554
    /** Returns true if field supplier is set (has been assigned a value) and false otherwise */
15555
    public boolean isSetSupplier() {
15556
      return this.supplier != null;
15557
    }
15558
 
15559
    public void setSupplierIsSet(boolean value) {
15560
      if (!value) {
15561
        this.supplier = null;
15562
      }
15563
    }
15564
 
15565
    public void setFieldValue(_Fields field, Object value) {
15566
      switch (field) {
15567
      case SUPPLIER:
15568
        if (value == null) {
15569
          unsetSupplier();
15570
        } else {
15571
          setSupplier((Supplier)value);
15572
        }
15573
        break;
15574
 
15575
      }
15576
    }
15577
 
15578
    public Object getFieldValue(_Fields field) {
15579
      switch (field) {
15580
      case SUPPLIER:
15581
        return getSupplier();
15582
 
15583
      }
15584
      throw new IllegalStateException();
15585
    }
15586
 
15587
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15588
    public boolean isSet(_Fields field) {
15589
      if (field == null) {
15590
        throw new IllegalArgumentException();
15591
      }
15592
 
15593
      switch (field) {
15594
      case SUPPLIER:
15595
        return isSetSupplier();
15596
      }
15597
      throw new IllegalStateException();
15598
    }
15599
 
15600
    @Override
15601
    public boolean equals(Object that) {
15602
      if (that == null)
15603
        return false;
15604
      if (that instanceof updateSupplier_args)
15605
        return this.equals((updateSupplier_args)that);
15606
      return false;
15607
    }
15608
 
15609
    public boolean equals(updateSupplier_args that) {
15610
      if (that == null)
15611
        return false;
15612
 
15613
      boolean this_present_supplier = true && this.isSetSupplier();
15614
      boolean that_present_supplier = true && that.isSetSupplier();
15615
      if (this_present_supplier || that_present_supplier) {
15616
        if (!(this_present_supplier && that_present_supplier))
15617
          return false;
15618
        if (!this.supplier.equals(that.supplier))
15619
          return false;
15620
      }
15621
 
15622
      return true;
15623
    }
15624
 
15625
    @Override
15626
    public int hashCode() {
15627
      return 0;
15628
    }
15629
 
15630
    public int compareTo(updateSupplier_args other) {
15631
      if (!getClass().equals(other.getClass())) {
15632
        return getClass().getName().compareTo(other.getClass().getName());
15633
      }
15634
 
15635
      int lastComparison = 0;
15636
      updateSupplier_args typedOther = (updateSupplier_args)other;
15637
 
15638
      lastComparison = Boolean.valueOf(isSetSupplier()).compareTo(typedOther.isSetSupplier());
15639
      if (lastComparison != 0) {
15640
        return lastComparison;
15641
      }
15642
      if (isSetSupplier()) {
15643
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplier, typedOther.supplier);
15644
        if (lastComparison != 0) {
15645
          return lastComparison;
15646
        }
15647
      }
15648
      return 0;
15649
    }
15650
 
15651
    public _Fields fieldForId(int fieldId) {
15652
      return _Fields.findByThriftId(fieldId);
15653
    }
15654
 
15655
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15656
      org.apache.thrift.protocol.TField field;
15657
      iprot.readStructBegin();
15658
      while (true)
15659
      {
15660
        field = iprot.readFieldBegin();
15661
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15662
          break;
15663
        }
15664
        switch (field.id) {
15665
          case 1: // SUPPLIER
15666
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15667
              this.supplier = new Supplier();
15668
              this.supplier.read(iprot);
15669
            } else { 
15670
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15671
            }
15672
            break;
15673
          default:
15674
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15675
        }
15676
        iprot.readFieldEnd();
15677
      }
15678
      iprot.readStructEnd();
15679
      validate();
15680
    }
15681
 
15682
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15683
      validate();
15684
 
15685
      oprot.writeStructBegin(STRUCT_DESC);
15686
      if (this.supplier != null) {
15687
        oprot.writeFieldBegin(SUPPLIER_FIELD_DESC);
15688
        this.supplier.write(oprot);
15689
        oprot.writeFieldEnd();
15690
      }
15691
      oprot.writeFieldStop();
15692
      oprot.writeStructEnd();
15693
    }
15694
 
15695
    @Override
15696
    public String toString() {
15697
      StringBuilder sb = new StringBuilder("updateSupplier_args(");
15698
      boolean first = true;
15699
 
15700
      sb.append("supplier:");
15701
      if (this.supplier == null) {
15702
        sb.append("null");
15703
      } else {
15704
        sb.append(this.supplier);
15705
      }
15706
      first = false;
15707
      sb.append(")");
15708
      return sb.toString();
15709
    }
15710
 
15711
    public void validate() throws org.apache.thrift.TException {
15712
      // check for required fields
15713
    }
15714
 
15715
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15716
      try {
15717
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15718
      } catch (org.apache.thrift.TException te) {
15719
        throw new java.io.IOException(te);
15720
      }
15721
    }
15722
 
15723
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15724
      try {
15725
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15726
      } catch (org.apache.thrift.TException te) {
15727
        throw new java.io.IOException(te);
15728
      }
15729
    }
15730
 
15731
  }
15732
 
15733
  public static class updateSupplier_result implements org.apache.thrift.TBase<updateSupplier_result, updateSupplier_result._Fields>, java.io.Serializable, Cloneable   {
15734
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSupplier_result");
15735
 
15736
 
15737
 
15738
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15739
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15740
;
15741
 
15742
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15743
 
15744
      static {
15745
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15746
          byName.put(field.getFieldName(), field);
15747
        }
15748
      }
15749
 
15750
      /**
15751
       * Find the _Fields constant that matches fieldId, or null if its not found.
15752
       */
15753
      public static _Fields findByThriftId(int fieldId) {
15754
        switch(fieldId) {
15755
          default:
15756
            return null;
15757
        }
15758
      }
15759
 
15760
      /**
15761
       * Find the _Fields constant that matches fieldId, throwing an exception
15762
       * if it is not found.
15763
       */
15764
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15765
        _Fields fields = findByThriftId(fieldId);
15766
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15767
        return fields;
15768
      }
15769
 
15770
      /**
15771
       * Find the _Fields constant that matches name, or null if its not found.
15772
       */
15773
      public static _Fields findByName(String name) {
15774
        return byName.get(name);
15775
      }
15776
 
15777
      private final short _thriftId;
15778
      private final String _fieldName;
15779
 
15780
      _Fields(short thriftId, String fieldName) {
15781
        _thriftId = thriftId;
15782
        _fieldName = fieldName;
15783
      }
15784
 
15785
      public short getThriftFieldId() {
15786
        return _thriftId;
15787
      }
15788
 
15789
      public String getFieldName() {
15790
        return _fieldName;
15791
      }
15792
    }
15793
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15794
    static {
15795
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15796
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15797
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSupplier_result.class, metaDataMap);
15798
    }
15799
 
15800
    public updateSupplier_result() {
15801
    }
15802
 
15803
    /**
15804
     * Performs a deep copy on <i>other</i>.
15805
     */
15806
    public updateSupplier_result(updateSupplier_result other) {
15807
    }
15808
 
15809
    public updateSupplier_result deepCopy() {
15810
      return new updateSupplier_result(this);
15811
    }
15812
 
15813
    @Override
15814
    public void clear() {
15815
    }
15816
 
15817
    public void setFieldValue(_Fields field, Object value) {
15818
      switch (field) {
15819
      }
15820
    }
15821
 
15822
    public Object getFieldValue(_Fields field) {
15823
      switch (field) {
15824
      }
15825
      throw new IllegalStateException();
15826
    }
15827
 
15828
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15829
    public boolean isSet(_Fields field) {
15830
      if (field == null) {
15831
        throw new IllegalArgumentException();
15832
      }
15833
 
15834
      switch (field) {
15835
      }
15836
      throw new IllegalStateException();
15837
    }
15838
 
15839
    @Override
15840
    public boolean equals(Object that) {
15841
      if (that == null)
15842
        return false;
15843
      if (that instanceof updateSupplier_result)
15844
        return this.equals((updateSupplier_result)that);
15845
      return false;
15846
    }
15847
 
15848
    public boolean equals(updateSupplier_result that) {
15849
      if (that == null)
15850
        return false;
15851
 
15852
      return true;
15853
    }
15854
 
15855
    @Override
15856
    public int hashCode() {
15857
      return 0;
15858
    }
15859
 
15860
    public int compareTo(updateSupplier_result other) {
15861
      if (!getClass().equals(other.getClass())) {
15862
        return getClass().getName().compareTo(other.getClass().getName());
15863
      }
15864
 
15865
      int lastComparison = 0;
15866
      updateSupplier_result typedOther = (updateSupplier_result)other;
15867
 
15868
      return 0;
15869
    }
15870
 
15871
    public _Fields fieldForId(int fieldId) {
15872
      return _Fields.findByThriftId(fieldId);
15873
    }
15874
 
15875
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15876
      org.apache.thrift.protocol.TField field;
15877
      iprot.readStructBegin();
15878
      while (true)
15879
      {
15880
        field = iprot.readFieldBegin();
15881
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15882
          break;
15883
        }
15884
        switch (field.id) {
15885
          default:
15886
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15887
        }
15888
        iprot.readFieldEnd();
15889
      }
15890
      iprot.readStructEnd();
15891
      validate();
15892
    }
15893
 
15894
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15895
      oprot.writeStructBegin(STRUCT_DESC);
15896
 
15897
      oprot.writeFieldStop();
15898
      oprot.writeStructEnd();
15899
    }
15900
 
15901
    @Override
15902
    public String toString() {
15903
      StringBuilder sb = new StringBuilder("updateSupplier_result(");
15904
      boolean first = true;
15905
 
15906
      sb.append(")");
15907
      return sb.toString();
15908
    }
15909
 
15910
    public void validate() throws org.apache.thrift.TException {
15911
      // check for required fields
15912
    }
15913
 
15914
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15915
      try {
15916
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15917
      } catch (org.apache.thrift.TException te) {
15918
        throw new java.io.IOException(te);
15919
      }
15920
    }
15921
 
15922
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15923
      try {
15924
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15925
      } catch (org.apache.thrift.TException te) {
15926
        throw new java.io.IOException(te);
15927
      }
15928
    }
15929
 
15930
  }
15931
 
6467 amar.kumar 15932
  public static class createPurchaseReturn_args implements org.apache.thrift.TBase<createPurchaseReturn_args, createPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
15933
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseReturn_args");
15934
 
15935
    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);
15936
 
15937
    private PurchaseReturn purchaseReturn; // required
15938
 
15939
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15940
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15941
      PURCHASE_RETURN((short)1, "purchaseReturn");
15942
 
15943
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15944
 
15945
      static {
15946
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15947
          byName.put(field.getFieldName(), field);
15948
        }
15949
      }
15950
 
15951
      /**
15952
       * Find the _Fields constant that matches fieldId, or null if its not found.
15953
       */
15954
      public static _Fields findByThriftId(int fieldId) {
15955
        switch(fieldId) {
15956
          case 1: // PURCHASE_RETURN
15957
            return PURCHASE_RETURN;
15958
          default:
15959
            return null;
15960
        }
15961
      }
15962
 
15963
      /**
15964
       * Find the _Fields constant that matches fieldId, throwing an exception
15965
       * if it is not found.
15966
       */
15967
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15968
        _Fields fields = findByThriftId(fieldId);
15969
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15970
        return fields;
15971
      }
15972
 
15973
      /**
15974
       * Find the _Fields constant that matches name, or null if its not found.
15975
       */
15976
      public static _Fields findByName(String name) {
15977
        return byName.get(name);
15978
      }
15979
 
15980
      private final short _thriftId;
15981
      private final String _fieldName;
15982
 
15983
      _Fields(short thriftId, String fieldName) {
15984
        _thriftId = thriftId;
15985
        _fieldName = fieldName;
15986
      }
15987
 
15988
      public short getThriftFieldId() {
15989
        return _thriftId;
15990
      }
15991
 
15992
      public String getFieldName() {
15993
        return _fieldName;
15994
      }
15995
    }
15996
 
15997
    // isset id assignments
15998
 
15999
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16000
    static {
16001
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16002
      tmpMap.put(_Fields.PURCHASE_RETURN, new org.apache.thrift.meta_data.FieldMetaData("purchaseReturn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16003
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class)));
16004
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16005
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseReturn_args.class, metaDataMap);
16006
    }
16007
 
16008
    public createPurchaseReturn_args() {
16009
    }
16010
 
16011
    public createPurchaseReturn_args(
16012
      PurchaseReturn purchaseReturn)
16013
    {
16014
      this();
16015
      this.purchaseReturn = purchaseReturn;
16016
    }
16017
 
16018
    /**
16019
     * Performs a deep copy on <i>other</i>.
16020
     */
16021
    public createPurchaseReturn_args(createPurchaseReturn_args other) {
16022
      if (other.isSetPurchaseReturn()) {
16023
        this.purchaseReturn = new PurchaseReturn(other.purchaseReturn);
16024
      }
16025
    }
16026
 
16027
    public createPurchaseReturn_args deepCopy() {
16028
      return new createPurchaseReturn_args(this);
16029
    }
16030
 
16031
    @Override
16032
    public void clear() {
16033
      this.purchaseReturn = null;
16034
    }
16035
 
16036
    public PurchaseReturn getPurchaseReturn() {
16037
      return this.purchaseReturn;
16038
    }
16039
 
16040
    public void setPurchaseReturn(PurchaseReturn purchaseReturn) {
16041
      this.purchaseReturn = purchaseReturn;
16042
    }
16043
 
16044
    public void unsetPurchaseReturn() {
16045
      this.purchaseReturn = null;
16046
    }
16047
 
16048
    /** Returns true if field purchaseReturn is set (has been assigned a value) and false otherwise */
16049
    public boolean isSetPurchaseReturn() {
16050
      return this.purchaseReturn != null;
16051
    }
16052
 
16053
    public void setPurchaseReturnIsSet(boolean value) {
16054
      if (!value) {
16055
        this.purchaseReturn = null;
16056
      }
16057
    }
16058
 
16059
    public void setFieldValue(_Fields field, Object value) {
16060
      switch (field) {
16061
      case PURCHASE_RETURN:
16062
        if (value == null) {
16063
          unsetPurchaseReturn();
16064
        } else {
16065
          setPurchaseReturn((PurchaseReturn)value);
16066
        }
16067
        break;
16068
 
16069
      }
16070
    }
16071
 
16072
    public Object getFieldValue(_Fields field) {
16073
      switch (field) {
16074
      case PURCHASE_RETURN:
16075
        return getPurchaseReturn();
16076
 
16077
      }
16078
      throw new IllegalStateException();
16079
    }
16080
 
16081
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16082
    public boolean isSet(_Fields field) {
16083
      if (field == null) {
16084
        throw new IllegalArgumentException();
16085
      }
16086
 
16087
      switch (field) {
16088
      case PURCHASE_RETURN:
16089
        return isSetPurchaseReturn();
16090
      }
16091
      throw new IllegalStateException();
16092
    }
16093
 
16094
    @Override
16095
    public boolean equals(Object that) {
16096
      if (that == null)
16097
        return false;
16098
      if (that instanceof createPurchaseReturn_args)
16099
        return this.equals((createPurchaseReturn_args)that);
16100
      return false;
16101
    }
16102
 
16103
    public boolean equals(createPurchaseReturn_args that) {
16104
      if (that == null)
16105
        return false;
16106
 
16107
      boolean this_present_purchaseReturn = true && this.isSetPurchaseReturn();
16108
      boolean that_present_purchaseReturn = true && that.isSetPurchaseReturn();
16109
      if (this_present_purchaseReturn || that_present_purchaseReturn) {
16110
        if (!(this_present_purchaseReturn && that_present_purchaseReturn))
16111
          return false;
16112
        if (!this.purchaseReturn.equals(that.purchaseReturn))
16113
          return false;
16114
      }
16115
 
16116
      return true;
16117
    }
16118
 
16119
    @Override
16120
    public int hashCode() {
16121
      return 0;
16122
    }
16123
 
16124
    public int compareTo(createPurchaseReturn_args other) {
16125
      if (!getClass().equals(other.getClass())) {
16126
        return getClass().getName().compareTo(other.getClass().getName());
16127
      }
16128
 
16129
      int lastComparison = 0;
16130
      createPurchaseReturn_args typedOther = (createPurchaseReturn_args)other;
16131
 
16132
      lastComparison = Boolean.valueOf(isSetPurchaseReturn()).compareTo(typedOther.isSetPurchaseReturn());
16133
      if (lastComparison != 0) {
16134
        return lastComparison;
16135
      }
16136
      if (isSetPurchaseReturn()) {
16137
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseReturn, typedOther.purchaseReturn);
16138
        if (lastComparison != 0) {
16139
          return lastComparison;
16140
        }
16141
      }
16142
      return 0;
16143
    }
16144
 
16145
    public _Fields fieldForId(int fieldId) {
16146
      return _Fields.findByThriftId(fieldId);
16147
    }
16148
 
16149
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16150
      org.apache.thrift.protocol.TField field;
16151
      iprot.readStructBegin();
16152
      while (true)
16153
      {
16154
        field = iprot.readFieldBegin();
16155
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16156
          break;
16157
        }
16158
        switch (field.id) {
16159
          case 1: // PURCHASE_RETURN
16160
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
16161
              this.purchaseReturn = new PurchaseReturn();
16162
              this.purchaseReturn.read(iprot);
16163
            } else { 
16164
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16165
            }
16166
            break;
16167
          default:
16168
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16169
        }
16170
        iprot.readFieldEnd();
16171
      }
16172
      iprot.readStructEnd();
16173
      validate();
16174
    }
16175
 
16176
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16177
      validate();
16178
 
16179
      oprot.writeStructBegin(STRUCT_DESC);
16180
      if (this.purchaseReturn != null) {
16181
        oprot.writeFieldBegin(PURCHASE_RETURN_FIELD_DESC);
16182
        this.purchaseReturn.write(oprot);
16183
        oprot.writeFieldEnd();
16184
      }
16185
      oprot.writeFieldStop();
16186
      oprot.writeStructEnd();
16187
    }
16188
 
16189
    @Override
16190
    public String toString() {
16191
      StringBuilder sb = new StringBuilder("createPurchaseReturn_args(");
16192
      boolean first = true;
16193
 
16194
      sb.append("purchaseReturn:");
16195
      if (this.purchaseReturn == null) {
16196
        sb.append("null");
16197
      } else {
16198
        sb.append(this.purchaseReturn);
16199
      }
16200
      first = false;
16201
      sb.append(")");
16202
      return sb.toString();
16203
    }
16204
 
16205
    public void validate() throws org.apache.thrift.TException {
16206
      // check for required fields
16207
    }
16208
 
16209
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16210
      try {
16211
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16212
      } catch (org.apache.thrift.TException te) {
16213
        throw new java.io.IOException(te);
16214
      }
16215
    }
16216
 
16217
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16218
      try {
16219
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16220
      } catch (org.apache.thrift.TException te) {
16221
        throw new java.io.IOException(te);
16222
      }
16223
    }
16224
 
16225
  }
16226
 
16227
  public static class createPurchaseReturn_result implements org.apache.thrift.TBase<createPurchaseReturn_result, createPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
16228
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseReturn_result");
16229
 
16230
    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);
16231
 
16232
    private long success; // required
16233
 
16234
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16235
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16236
      SUCCESS((short)0, "success");
16237
 
16238
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16239
 
16240
      static {
16241
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16242
          byName.put(field.getFieldName(), field);
16243
        }
16244
      }
16245
 
16246
      /**
16247
       * Find the _Fields constant that matches fieldId, or null if its not found.
16248
       */
16249
      public static _Fields findByThriftId(int fieldId) {
16250
        switch(fieldId) {
16251
          case 0: // SUCCESS
16252
            return SUCCESS;
16253
          default:
16254
            return null;
16255
        }
16256
      }
16257
 
16258
      /**
16259
       * Find the _Fields constant that matches fieldId, throwing an exception
16260
       * if it is not found.
16261
       */
16262
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16263
        _Fields fields = findByThriftId(fieldId);
16264
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16265
        return fields;
16266
      }
16267
 
16268
      /**
16269
       * Find the _Fields constant that matches name, or null if its not found.
16270
       */
16271
      public static _Fields findByName(String name) {
16272
        return byName.get(name);
16273
      }
16274
 
16275
      private final short _thriftId;
16276
      private final String _fieldName;
16277
 
16278
      _Fields(short thriftId, String fieldName) {
16279
        _thriftId = thriftId;
16280
        _fieldName = fieldName;
16281
      }
16282
 
16283
      public short getThriftFieldId() {
16284
        return _thriftId;
16285
      }
16286
 
16287
      public String getFieldName() {
16288
        return _fieldName;
16289
      }
16290
    }
16291
 
16292
    // isset id assignments
16293
    private static final int __SUCCESS_ISSET_ID = 0;
16294
    private BitSet __isset_bit_vector = new BitSet(1);
16295
 
16296
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16297
    static {
16298
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16299
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16300
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
16301
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16302
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseReturn_result.class, metaDataMap);
16303
    }
16304
 
16305
    public createPurchaseReturn_result() {
16306
    }
16307
 
16308
    public createPurchaseReturn_result(
16309
      long success)
16310
    {
16311
      this();
16312
      this.success = success;
16313
      setSuccessIsSet(true);
16314
    }
16315
 
16316
    /**
16317
     * Performs a deep copy on <i>other</i>.
16318
     */
16319
    public createPurchaseReturn_result(createPurchaseReturn_result other) {
16320
      __isset_bit_vector.clear();
16321
      __isset_bit_vector.or(other.__isset_bit_vector);
16322
      this.success = other.success;
16323
    }
16324
 
16325
    public createPurchaseReturn_result deepCopy() {
16326
      return new createPurchaseReturn_result(this);
16327
    }
16328
 
16329
    @Override
16330
    public void clear() {
16331
      setSuccessIsSet(false);
16332
      this.success = 0;
16333
    }
16334
 
16335
    public long getSuccess() {
16336
      return this.success;
16337
    }
16338
 
16339
    public void setSuccess(long success) {
16340
      this.success = success;
16341
      setSuccessIsSet(true);
16342
    }
16343
 
16344
    public void unsetSuccess() {
16345
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
16346
    }
16347
 
16348
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
16349
    public boolean isSetSuccess() {
16350
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
16351
    }
16352
 
16353
    public void setSuccessIsSet(boolean value) {
16354
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
16355
    }
16356
 
16357
    public void setFieldValue(_Fields field, Object value) {
16358
      switch (field) {
16359
      case SUCCESS:
16360
        if (value == null) {
16361
          unsetSuccess();
16362
        } else {
16363
          setSuccess((Long)value);
16364
        }
16365
        break;
16366
 
16367
      }
16368
    }
16369
 
16370
    public Object getFieldValue(_Fields field) {
16371
      switch (field) {
16372
      case SUCCESS:
16373
        return Long.valueOf(getSuccess());
16374
 
16375
      }
16376
      throw new IllegalStateException();
16377
    }
16378
 
16379
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16380
    public boolean isSet(_Fields field) {
16381
      if (field == null) {
16382
        throw new IllegalArgumentException();
16383
      }
16384
 
16385
      switch (field) {
16386
      case SUCCESS:
16387
        return isSetSuccess();
16388
      }
16389
      throw new IllegalStateException();
16390
    }
16391
 
16392
    @Override
16393
    public boolean equals(Object that) {
16394
      if (that == null)
16395
        return false;
16396
      if (that instanceof createPurchaseReturn_result)
16397
        return this.equals((createPurchaseReturn_result)that);
16398
      return false;
16399
    }
16400
 
16401
    public boolean equals(createPurchaseReturn_result that) {
16402
      if (that == null)
16403
        return false;
16404
 
16405
      boolean this_present_success = true;
16406
      boolean that_present_success = true;
16407
      if (this_present_success || that_present_success) {
16408
        if (!(this_present_success && that_present_success))
16409
          return false;
16410
        if (this.success != that.success)
16411
          return false;
16412
      }
16413
 
16414
      return true;
16415
    }
16416
 
16417
    @Override
16418
    public int hashCode() {
16419
      return 0;
16420
    }
16421
 
16422
    public int compareTo(createPurchaseReturn_result other) {
16423
      if (!getClass().equals(other.getClass())) {
16424
        return getClass().getName().compareTo(other.getClass().getName());
16425
      }
16426
 
16427
      int lastComparison = 0;
16428
      createPurchaseReturn_result typedOther = (createPurchaseReturn_result)other;
16429
 
16430
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
16431
      if (lastComparison != 0) {
16432
        return lastComparison;
16433
      }
16434
      if (isSetSuccess()) {
16435
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
16436
        if (lastComparison != 0) {
16437
          return lastComparison;
16438
        }
16439
      }
16440
      return 0;
16441
    }
16442
 
16443
    public _Fields fieldForId(int fieldId) {
16444
      return _Fields.findByThriftId(fieldId);
16445
    }
16446
 
16447
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16448
      org.apache.thrift.protocol.TField field;
16449
      iprot.readStructBegin();
16450
      while (true)
16451
      {
16452
        field = iprot.readFieldBegin();
16453
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16454
          break;
16455
        }
16456
        switch (field.id) {
16457
          case 0: // SUCCESS
16458
            if (field.type == org.apache.thrift.protocol.TType.I64) {
16459
              this.success = iprot.readI64();
16460
              setSuccessIsSet(true);
16461
            } else { 
16462
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16463
            }
16464
            break;
16465
          default:
16466
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16467
        }
16468
        iprot.readFieldEnd();
16469
      }
16470
      iprot.readStructEnd();
16471
      validate();
16472
    }
16473
 
16474
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16475
      oprot.writeStructBegin(STRUCT_DESC);
16476
 
16477
      if (this.isSetSuccess()) {
16478
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16479
        oprot.writeI64(this.success);
16480
        oprot.writeFieldEnd();
16481
      }
16482
      oprot.writeFieldStop();
16483
      oprot.writeStructEnd();
16484
    }
16485
 
16486
    @Override
16487
    public String toString() {
16488
      StringBuilder sb = new StringBuilder("createPurchaseReturn_result(");
16489
      boolean first = true;
16490
 
16491
      sb.append("success:");
16492
      sb.append(this.success);
16493
      first = false;
16494
      sb.append(")");
16495
      return sb.toString();
16496
    }
16497
 
16498
    public void validate() throws org.apache.thrift.TException {
16499
      // check for required fields
16500
    }
16501
 
16502
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16503
      try {
16504
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16505
      } catch (org.apache.thrift.TException te) {
16506
        throw new java.io.IOException(te);
16507
      }
16508
    }
16509
 
16510
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16511
      try {
16512
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16513
      } catch (org.apache.thrift.TException te) {
16514
        throw new java.io.IOException(te);
16515
      }
16516
    }
16517
 
16518
  }
16519
 
16520
  public static class settlePurchaseReturn_args implements org.apache.thrift.TBase<settlePurchaseReturn_args, settlePurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
16521
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("settlePurchaseReturn_args");
16522
 
16523
    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);
16524
 
16525
    private long id; // required
16526
 
16527
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16528
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16529
      ID((short)1, "id");
16530
 
16531
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16532
 
16533
      static {
16534
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16535
          byName.put(field.getFieldName(), field);
16536
        }
16537
      }
16538
 
16539
      /**
16540
       * Find the _Fields constant that matches fieldId, or null if its not found.
16541
       */
16542
      public static _Fields findByThriftId(int fieldId) {
16543
        switch(fieldId) {
16544
          case 1: // ID
16545
            return ID;
16546
          default:
16547
            return null;
16548
        }
16549
      }
16550
 
16551
      /**
16552
       * Find the _Fields constant that matches fieldId, throwing an exception
16553
       * if it is not found.
16554
       */
16555
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16556
        _Fields fields = findByThriftId(fieldId);
16557
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16558
        return fields;
16559
      }
16560
 
16561
      /**
16562
       * Find the _Fields constant that matches name, or null if its not found.
16563
       */
16564
      public static _Fields findByName(String name) {
16565
        return byName.get(name);
16566
      }
16567
 
16568
      private final short _thriftId;
16569
      private final String _fieldName;
16570
 
16571
      _Fields(short thriftId, String fieldName) {
16572
        _thriftId = thriftId;
16573
        _fieldName = fieldName;
16574
      }
16575
 
16576
      public short getThriftFieldId() {
16577
        return _thriftId;
16578
      }
16579
 
16580
      public String getFieldName() {
16581
        return _fieldName;
16582
      }
16583
    }
16584
 
16585
    // isset id assignments
16586
    private static final int __ID_ISSET_ID = 0;
16587
    private BitSet __isset_bit_vector = new BitSet(1);
16588
 
16589
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16590
    static {
16591
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16592
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16593
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
16594
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16595
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(settlePurchaseReturn_args.class, metaDataMap);
16596
    }
16597
 
16598
    public settlePurchaseReturn_args() {
16599
    }
16600
 
16601
    public settlePurchaseReturn_args(
16602
      long id)
16603
    {
16604
      this();
16605
      this.id = id;
16606
      setIdIsSet(true);
16607
    }
16608
 
16609
    /**
16610
     * Performs a deep copy on <i>other</i>.
16611
     */
16612
    public settlePurchaseReturn_args(settlePurchaseReturn_args other) {
16613
      __isset_bit_vector.clear();
16614
      __isset_bit_vector.or(other.__isset_bit_vector);
16615
      this.id = other.id;
16616
    }
16617
 
16618
    public settlePurchaseReturn_args deepCopy() {
16619
      return new settlePurchaseReturn_args(this);
16620
    }
16621
 
16622
    @Override
16623
    public void clear() {
16624
      setIdIsSet(false);
16625
      this.id = 0;
16626
    }
16627
 
16628
    public long getId() {
16629
      return this.id;
16630
    }
16631
 
16632
    public void setId(long id) {
16633
      this.id = id;
16634
      setIdIsSet(true);
16635
    }
16636
 
16637
    public void unsetId() {
16638
      __isset_bit_vector.clear(__ID_ISSET_ID);
16639
    }
16640
 
16641
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
16642
    public boolean isSetId() {
16643
      return __isset_bit_vector.get(__ID_ISSET_ID);
16644
    }
16645
 
16646
    public void setIdIsSet(boolean value) {
16647
      __isset_bit_vector.set(__ID_ISSET_ID, value);
16648
    }
16649
 
16650
    public void setFieldValue(_Fields field, Object value) {
16651
      switch (field) {
16652
      case ID:
16653
        if (value == null) {
16654
          unsetId();
16655
        } else {
16656
          setId((Long)value);
16657
        }
16658
        break;
16659
 
16660
      }
16661
    }
16662
 
16663
    public Object getFieldValue(_Fields field) {
16664
      switch (field) {
16665
      case ID:
16666
        return Long.valueOf(getId());
16667
 
16668
      }
16669
      throw new IllegalStateException();
16670
    }
16671
 
16672
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16673
    public boolean isSet(_Fields field) {
16674
      if (field == null) {
16675
        throw new IllegalArgumentException();
16676
      }
16677
 
16678
      switch (field) {
16679
      case ID:
16680
        return isSetId();
16681
      }
16682
      throw new IllegalStateException();
16683
    }
16684
 
16685
    @Override
16686
    public boolean equals(Object that) {
16687
      if (that == null)
16688
        return false;
16689
      if (that instanceof settlePurchaseReturn_args)
16690
        return this.equals((settlePurchaseReturn_args)that);
16691
      return false;
16692
    }
16693
 
16694
    public boolean equals(settlePurchaseReturn_args that) {
16695
      if (that == null)
16696
        return false;
16697
 
16698
      boolean this_present_id = true;
16699
      boolean that_present_id = true;
16700
      if (this_present_id || that_present_id) {
16701
        if (!(this_present_id && that_present_id))
16702
          return false;
16703
        if (this.id != that.id)
16704
          return false;
16705
      }
16706
 
16707
      return true;
16708
    }
16709
 
16710
    @Override
16711
    public int hashCode() {
16712
      return 0;
16713
    }
16714
 
16715
    public int compareTo(settlePurchaseReturn_args other) {
16716
      if (!getClass().equals(other.getClass())) {
16717
        return getClass().getName().compareTo(other.getClass().getName());
16718
      }
16719
 
16720
      int lastComparison = 0;
16721
      settlePurchaseReturn_args typedOther = (settlePurchaseReturn_args)other;
16722
 
16723
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
16724
      if (lastComparison != 0) {
16725
        return lastComparison;
16726
      }
16727
      if (isSetId()) {
16728
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
16729
        if (lastComparison != 0) {
16730
          return lastComparison;
16731
        }
16732
      }
16733
      return 0;
16734
    }
16735
 
16736
    public _Fields fieldForId(int fieldId) {
16737
      return _Fields.findByThriftId(fieldId);
16738
    }
16739
 
16740
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16741
      org.apache.thrift.protocol.TField field;
16742
      iprot.readStructBegin();
16743
      while (true)
16744
      {
16745
        field = iprot.readFieldBegin();
16746
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16747
          break;
16748
        }
16749
        switch (field.id) {
16750
          case 1: // ID
16751
            if (field.type == org.apache.thrift.protocol.TType.I64) {
16752
              this.id = iprot.readI64();
16753
              setIdIsSet(true);
16754
            } else { 
16755
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16756
            }
16757
            break;
16758
          default:
16759
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16760
        }
16761
        iprot.readFieldEnd();
16762
      }
16763
      iprot.readStructEnd();
16764
      validate();
16765
    }
16766
 
16767
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16768
      validate();
16769
 
16770
      oprot.writeStructBegin(STRUCT_DESC);
16771
      oprot.writeFieldBegin(ID_FIELD_DESC);
16772
      oprot.writeI64(this.id);
16773
      oprot.writeFieldEnd();
16774
      oprot.writeFieldStop();
16775
      oprot.writeStructEnd();
16776
    }
16777
 
16778
    @Override
16779
    public String toString() {
16780
      StringBuilder sb = new StringBuilder("settlePurchaseReturn_args(");
16781
      boolean first = true;
16782
 
16783
      sb.append("id:");
16784
      sb.append(this.id);
16785
      first = false;
16786
      sb.append(")");
16787
      return sb.toString();
16788
    }
16789
 
16790
    public void validate() throws org.apache.thrift.TException {
16791
      // check for required fields
16792
    }
16793
 
16794
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16795
      try {
16796
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16797
      } catch (org.apache.thrift.TException te) {
16798
        throw new java.io.IOException(te);
16799
      }
16800
    }
16801
 
16802
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16803
      try {
16804
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
16805
        __isset_bit_vector = new BitSet(1);
16806
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16807
      } catch (org.apache.thrift.TException te) {
16808
        throw new java.io.IOException(te);
16809
      }
16810
    }
16811
 
16812
  }
16813
 
16814
  public static class settlePurchaseReturn_result implements org.apache.thrift.TBase<settlePurchaseReturn_result, settlePurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
16815
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("settlePurchaseReturn_result");
16816
 
16817
 
16818
 
16819
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16820
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16821
;
16822
 
16823
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16824
 
16825
      static {
16826
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16827
          byName.put(field.getFieldName(), field);
16828
        }
16829
      }
16830
 
16831
      /**
16832
       * Find the _Fields constant that matches fieldId, or null if its not found.
16833
       */
16834
      public static _Fields findByThriftId(int fieldId) {
16835
        switch(fieldId) {
16836
          default:
16837
            return null;
16838
        }
16839
      }
16840
 
16841
      /**
16842
       * Find the _Fields constant that matches fieldId, throwing an exception
16843
       * if it is not found.
16844
       */
16845
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16846
        _Fields fields = findByThriftId(fieldId);
16847
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16848
        return fields;
16849
      }
16850
 
16851
      /**
16852
       * Find the _Fields constant that matches name, or null if its not found.
16853
       */
16854
      public static _Fields findByName(String name) {
16855
        return byName.get(name);
16856
      }
16857
 
16858
      private final short _thriftId;
16859
      private final String _fieldName;
16860
 
16861
      _Fields(short thriftId, String fieldName) {
16862
        _thriftId = thriftId;
16863
        _fieldName = fieldName;
16864
      }
16865
 
16866
      public short getThriftFieldId() {
16867
        return _thriftId;
16868
      }
16869
 
16870
      public String getFieldName() {
16871
        return _fieldName;
16872
      }
16873
    }
16874
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16875
    static {
16876
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16877
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16878
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(settlePurchaseReturn_result.class, metaDataMap);
16879
    }
16880
 
16881
    public settlePurchaseReturn_result() {
16882
    }
16883
 
16884
    /**
16885
     * Performs a deep copy on <i>other</i>.
16886
     */
16887
    public settlePurchaseReturn_result(settlePurchaseReturn_result other) {
16888
    }
16889
 
16890
    public settlePurchaseReturn_result deepCopy() {
16891
      return new settlePurchaseReturn_result(this);
16892
    }
16893
 
16894
    @Override
16895
    public void clear() {
16896
    }
16897
 
16898
    public void setFieldValue(_Fields field, Object value) {
16899
      switch (field) {
16900
      }
16901
    }
16902
 
16903
    public Object getFieldValue(_Fields field) {
16904
      switch (field) {
16905
      }
16906
      throw new IllegalStateException();
16907
    }
16908
 
16909
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16910
    public boolean isSet(_Fields field) {
16911
      if (field == null) {
16912
        throw new IllegalArgumentException();
16913
      }
16914
 
16915
      switch (field) {
16916
      }
16917
      throw new IllegalStateException();
16918
    }
16919
 
16920
    @Override
16921
    public boolean equals(Object that) {
16922
      if (that == null)
16923
        return false;
16924
      if (that instanceof settlePurchaseReturn_result)
16925
        return this.equals((settlePurchaseReturn_result)that);
16926
      return false;
16927
    }
16928
 
16929
    public boolean equals(settlePurchaseReturn_result that) {
16930
      if (that == null)
16931
        return false;
16932
 
16933
      return true;
16934
    }
16935
 
16936
    @Override
16937
    public int hashCode() {
16938
      return 0;
16939
    }
16940
 
16941
    public int compareTo(settlePurchaseReturn_result other) {
16942
      if (!getClass().equals(other.getClass())) {
16943
        return getClass().getName().compareTo(other.getClass().getName());
16944
      }
16945
 
16946
      int lastComparison = 0;
16947
      settlePurchaseReturn_result typedOther = (settlePurchaseReturn_result)other;
16948
 
16949
      return 0;
16950
    }
16951
 
16952
    public _Fields fieldForId(int fieldId) {
16953
      return _Fields.findByThriftId(fieldId);
16954
    }
16955
 
16956
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16957
      org.apache.thrift.protocol.TField field;
16958
      iprot.readStructBegin();
16959
      while (true)
16960
      {
16961
        field = iprot.readFieldBegin();
16962
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16963
          break;
16964
        }
16965
        switch (field.id) {
16966
          default:
16967
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16968
        }
16969
        iprot.readFieldEnd();
16970
      }
16971
      iprot.readStructEnd();
16972
      validate();
16973
    }
16974
 
16975
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16976
      oprot.writeStructBegin(STRUCT_DESC);
16977
 
16978
      oprot.writeFieldStop();
16979
      oprot.writeStructEnd();
16980
    }
16981
 
16982
    @Override
16983
    public String toString() {
16984
      StringBuilder sb = new StringBuilder("settlePurchaseReturn_result(");
16985
      boolean first = true;
16986
 
16987
      sb.append(")");
16988
      return sb.toString();
16989
    }
16990
 
16991
    public void validate() throws org.apache.thrift.TException {
16992
      // check for required fields
16993
    }
16994
 
16995
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16996
      try {
16997
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16998
      } catch (org.apache.thrift.TException te) {
16999
        throw new java.io.IOException(te);
17000
      }
17001
    }
17002
 
17003
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17004
      try {
17005
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17006
      } catch (org.apache.thrift.TException te) {
17007
        throw new java.io.IOException(te);
17008
      }
17009
    }
17010
 
17011
  }
17012
 
17013
  public static class getUnsettledPurchaseReturns_args implements org.apache.thrift.TBase<getUnsettledPurchaseReturns_args, getUnsettledPurchaseReturns_args._Fields>, java.io.Serializable, Cloneable   {
17014
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUnsettledPurchaseReturns_args");
17015
 
17016
 
17017
 
17018
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17019
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17020
;
17021
 
17022
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17023
 
17024
      static {
17025
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17026
          byName.put(field.getFieldName(), field);
17027
        }
17028
      }
17029
 
17030
      /**
17031
       * Find the _Fields constant that matches fieldId, or null if its not found.
17032
       */
17033
      public static _Fields findByThriftId(int fieldId) {
17034
        switch(fieldId) {
17035
          default:
17036
            return null;
17037
        }
17038
      }
17039
 
17040
      /**
17041
       * Find the _Fields constant that matches fieldId, throwing an exception
17042
       * if it is not found.
17043
       */
17044
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17045
        _Fields fields = findByThriftId(fieldId);
17046
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17047
        return fields;
17048
      }
17049
 
17050
      /**
17051
       * Find the _Fields constant that matches name, or null if its not found.
17052
       */
17053
      public static _Fields findByName(String name) {
17054
        return byName.get(name);
17055
      }
17056
 
17057
      private final short _thriftId;
17058
      private final String _fieldName;
17059
 
17060
      _Fields(short thriftId, String fieldName) {
17061
        _thriftId = thriftId;
17062
        _fieldName = fieldName;
17063
      }
17064
 
17065
      public short getThriftFieldId() {
17066
        return _thriftId;
17067
      }
17068
 
17069
      public String getFieldName() {
17070
        return _fieldName;
17071
      }
17072
    }
17073
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17074
    static {
17075
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17076
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17077
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUnsettledPurchaseReturns_args.class, metaDataMap);
17078
    }
17079
 
17080
    public getUnsettledPurchaseReturns_args() {
17081
    }
17082
 
17083
    /**
17084
     * Performs a deep copy on <i>other</i>.
17085
     */
17086
    public getUnsettledPurchaseReturns_args(getUnsettledPurchaseReturns_args other) {
17087
    }
17088
 
17089
    public getUnsettledPurchaseReturns_args deepCopy() {
17090
      return new getUnsettledPurchaseReturns_args(this);
17091
    }
17092
 
17093
    @Override
17094
    public void clear() {
17095
    }
17096
 
17097
    public void setFieldValue(_Fields field, Object value) {
17098
      switch (field) {
17099
      }
17100
    }
17101
 
17102
    public Object getFieldValue(_Fields field) {
17103
      switch (field) {
17104
      }
17105
      throw new IllegalStateException();
17106
    }
17107
 
17108
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17109
    public boolean isSet(_Fields field) {
17110
      if (field == null) {
17111
        throw new IllegalArgumentException();
17112
      }
17113
 
17114
      switch (field) {
17115
      }
17116
      throw new IllegalStateException();
17117
    }
17118
 
17119
    @Override
17120
    public boolean equals(Object that) {
17121
      if (that == null)
17122
        return false;
17123
      if (that instanceof getUnsettledPurchaseReturns_args)
17124
        return this.equals((getUnsettledPurchaseReturns_args)that);
17125
      return false;
17126
    }
17127
 
17128
    public boolean equals(getUnsettledPurchaseReturns_args that) {
17129
      if (that == null)
17130
        return false;
17131
 
17132
      return true;
17133
    }
17134
 
17135
    @Override
17136
    public int hashCode() {
17137
      return 0;
17138
    }
17139
 
17140
    public int compareTo(getUnsettledPurchaseReturns_args other) {
17141
      if (!getClass().equals(other.getClass())) {
17142
        return getClass().getName().compareTo(other.getClass().getName());
17143
      }
17144
 
17145
      int lastComparison = 0;
17146
      getUnsettledPurchaseReturns_args typedOther = (getUnsettledPurchaseReturns_args)other;
17147
 
17148
      return 0;
17149
    }
17150
 
17151
    public _Fields fieldForId(int fieldId) {
17152
      return _Fields.findByThriftId(fieldId);
17153
    }
17154
 
17155
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17156
      org.apache.thrift.protocol.TField field;
17157
      iprot.readStructBegin();
17158
      while (true)
17159
      {
17160
        field = iprot.readFieldBegin();
17161
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17162
          break;
17163
        }
17164
        switch (field.id) {
17165
          default:
17166
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17167
        }
17168
        iprot.readFieldEnd();
17169
      }
17170
      iprot.readStructEnd();
17171
      validate();
17172
    }
17173
 
17174
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17175
      validate();
17176
 
17177
      oprot.writeStructBegin(STRUCT_DESC);
17178
      oprot.writeFieldStop();
17179
      oprot.writeStructEnd();
17180
    }
17181
 
17182
    @Override
17183
    public String toString() {
17184
      StringBuilder sb = new StringBuilder("getUnsettledPurchaseReturns_args(");
17185
      boolean first = true;
17186
 
17187
      sb.append(")");
17188
      return sb.toString();
17189
    }
17190
 
17191
    public void validate() throws org.apache.thrift.TException {
17192
      // check for required fields
17193
    }
17194
 
17195
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17196
      try {
17197
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17198
      } catch (org.apache.thrift.TException te) {
17199
        throw new java.io.IOException(te);
17200
      }
17201
    }
17202
 
17203
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17204
      try {
17205
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17206
      } catch (org.apache.thrift.TException te) {
17207
        throw new java.io.IOException(te);
17208
      }
17209
    }
17210
 
17211
  }
17212
 
17213
  public static class getUnsettledPurchaseReturns_result implements org.apache.thrift.TBase<getUnsettledPurchaseReturns_result, getUnsettledPurchaseReturns_result._Fields>, java.io.Serializable, Cloneable   {
17214
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUnsettledPurchaseReturns_result");
17215
 
17216
    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);
17217
 
17218
    private List<PurchaseReturn> success; // required
17219
 
17220
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17221
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17222
      SUCCESS((short)0, "success");
17223
 
17224
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17225
 
17226
      static {
17227
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17228
          byName.put(field.getFieldName(), field);
17229
        }
17230
      }
17231
 
17232
      /**
17233
       * Find the _Fields constant that matches fieldId, or null if its not found.
17234
       */
17235
      public static _Fields findByThriftId(int fieldId) {
17236
        switch(fieldId) {
17237
          case 0: // SUCCESS
17238
            return SUCCESS;
17239
          default:
17240
            return null;
17241
        }
17242
      }
17243
 
17244
      /**
17245
       * Find the _Fields constant that matches fieldId, throwing an exception
17246
       * if it is not found.
17247
       */
17248
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17249
        _Fields fields = findByThriftId(fieldId);
17250
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17251
        return fields;
17252
      }
17253
 
17254
      /**
17255
       * Find the _Fields constant that matches name, or null if its not found.
17256
       */
17257
      public static _Fields findByName(String name) {
17258
        return byName.get(name);
17259
      }
17260
 
17261
      private final short _thriftId;
17262
      private final String _fieldName;
17263
 
17264
      _Fields(short thriftId, String fieldName) {
17265
        _thriftId = thriftId;
17266
        _fieldName = fieldName;
17267
      }
17268
 
17269
      public short getThriftFieldId() {
17270
        return _thriftId;
17271
      }
17272
 
17273
      public String getFieldName() {
17274
        return _fieldName;
17275
      }
17276
    }
17277
 
17278
    // isset id assignments
17279
 
17280
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17281
    static {
17282
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17283
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17284
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
17285
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class))));
17286
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17287
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUnsettledPurchaseReturns_result.class, metaDataMap);
17288
    }
17289
 
17290
    public getUnsettledPurchaseReturns_result() {
17291
    }
17292
 
17293
    public getUnsettledPurchaseReturns_result(
17294
      List<PurchaseReturn> success)
17295
    {
17296
      this();
17297
      this.success = success;
17298
    }
17299
 
17300
    /**
17301
     * Performs a deep copy on <i>other</i>.
17302
     */
17303
    public getUnsettledPurchaseReturns_result(getUnsettledPurchaseReturns_result other) {
17304
      if (other.isSetSuccess()) {
17305
        List<PurchaseReturn> __this__success = new ArrayList<PurchaseReturn>();
17306
        for (PurchaseReturn other_element : other.success) {
17307
          __this__success.add(new PurchaseReturn(other_element));
17308
        }
17309
        this.success = __this__success;
17310
      }
17311
    }
17312
 
17313
    public getUnsettledPurchaseReturns_result deepCopy() {
17314
      return new getUnsettledPurchaseReturns_result(this);
17315
    }
17316
 
17317
    @Override
17318
    public void clear() {
17319
      this.success = null;
17320
    }
17321
 
17322
    public int getSuccessSize() {
17323
      return (this.success == null) ? 0 : this.success.size();
17324
    }
17325
 
17326
    public java.util.Iterator<PurchaseReturn> getSuccessIterator() {
17327
      return (this.success == null) ? null : this.success.iterator();
17328
    }
17329
 
17330
    public void addToSuccess(PurchaseReturn elem) {
17331
      if (this.success == null) {
17332
        this.success = new ArrayList<PurchaseReturn>();
17333
      }
17334
      this.success.add(elem);
17335
    }
17336
 
17337
    public List<PurchaseReturn> getSuccess() {
17338
      return this.success;
17339
    }
17340
 
17341
    public void setSuccess(List<PurchaseReturn> success) {
17342
      this.success = success;
17343
    }
17344
 
17345
    public void unsetSuccess() {
17346
      this.success = null;
17347
    }
17348
 
17349
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
17350
    public boolean isSetSuccess() {
17351
      return this.success != null;
17352
    }
17353
 
17354
    public void setSuccessIsSet(boolean value) {
17355
      if (!value) {
17356
        this.success = null;
17357
      }
17358
    }
17359
 
17360
    public void setFieldValue(_Fields field, Object value) {
17361
      switch (field) {
17362
      case SUCCESS:
17363
        if (value == null) {
17364
          unsetSuccess();
17365
        } else {
17366
          setSuccess((List<PurchaseReturn>)value);
17367
        }
17368
        break;
17369
 
17370
      }
17371
    }
17372
 
17373
    public Object getFieldValue(_Fields field) {
17374
      switch (field) {
17375
      case SUCCESS:
17376
        return getSuccess();
17377
 
17378
      }
17379
      throw new IllegalStateException();
17380
    }
17381
 
17382
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17383
    public boolean isSet(_Fields field) {
17384
      if (field == null) {
17385
        throw new IllegalArgumentException();
17386
      }
17387
 
17388
      switch (field) {
17389
      case SUCCESS:
17390
        return isSetSuccess();
17391
      }
17392
      throw new IllegalStateException();
17393
    }
17394
 
17395
    @Override
17396
    public boolean equals(Object that) {
17397
      if (that == null)
17398
        return false;
17399
      if (that instanceof getUnsettledPurchaseReturns_result)
17400
        return this.equals((getUnsettledPurchaseReturns_result)that);
17401
      return false;
17402
    }
17403
 
17404
    public boolean equals(getUnsettledPurchaseReturns_result that) {
17405
      if (that == null)
17406
        return false;
17407
 
17408
      boolean this_present_success = true && this.isSetSuccess();
17409
      boolean that_present_success = true && that.isSetSuccess();
17410
      if (this_present_success || that_present_success) {
17411
        if (!(this_present_success && that_present_success))
17412
          return false;
17413
        if (!this.success.equals(that.success))
17414
          return false;
17415
      }
17416
 
17417
      return true;
17418
    }
17419
 
17420
    @Override
17421
    public int hashCode() {
17422
      return 0;
17423
    }
17424
 
17425
    public int compareTo(getUnsettledPurchaseReturns_result other) {
17426
      if (!getClass().equals(other.getClass())) {
17427
        return getClass().getName().compareTo(other.getClass().getName());
17428
      }
17429
 
17430
      int lastComparison = 0;
17431
      getUnsettledPurchaseReturns_result typedOther = (getUnsettledPurchaseReturns_result)other;
17432
 
17433
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
17434
      if (lastComparison != 0) {
17435
        return lastComparison;
17436
      }
17437
      if (isSetSuccess()) {
17438
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
17439
        if (lastComparison != 0) {
17440
          return lastComparison;
17441
        }
17442
      }
17443
      return 0;
17444
    }
17445
 
17446
    public _Fields fieldForId(int fieldId) {
17447
      return _Fields.findByThriftId(fieldId);
17448
    }
17449
 
17450
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17451
      org.apache.thrift.protocol.TField field;
17452
      iprot.readStructBegin();
17453
      while (true)
17454
      {
17455
        field = iprot.readFieldBegin();
17456
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17457
          break;
17458
        }
17459
        switch (field.id) {
17460
          case 0: // SUCCESS
17461
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
17462
              {
7410 amar.kumar 17463
                org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
17464
                this.success = new ArrayList<PurchaseReturn>(_list32.size);
17465
                for (int _i33 = 0; _i33 < _list32.size; ++_i33)
6467 amar.kumar 17466
                {
7410 amar.kumar 17467
                  PurchaseReturn _elem34; // required
17468
                  _elem34 = new PurchaseReturn();
17469
                  _elem34.read(iprot);
17470
                  this.success.add(_elem34);
6467 amar.kumar 17471
                }
17472
                iprot.readListEnd();
17473
              }
17474
            } else { 
17475
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17476
            }
17477
            break;
17478
          default:
17479
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17480
        }
17481
        iprot.readFieldEnd();
17482
      }
17483
      iprot.readStructEnd();
17484
      validate();
17485
    }
17486
 
17487
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17488
      oprot.writeStructBegin(STRUCT_DESC);
17489
 
17490
      if (this.isSetSuccess()) {
17491
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17492
        {
17493
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7410 amar.kumar 17494
          for (PurchaseReturn _iter35 : this.success)
6467 amar.kumar 17495
          {
7410 amar.kumar 17496
            _iter35.write(oprot);
6467 amar.kumar 17497
          }
17498
          oprot.writeListEnd();
17499
        }
17500
        oprot.writeFieldEnd();
17501
      }
17502
      oprot.writeFieldStop();
17503
      oprot.writeStructEnd();
17504
    }
17505
 
17506
    @Override
17507
    public String toString() {
17508
      StringBuilder sb = new StringBuilder("getUnsettledPurchaseReturns_result(");
17509
      boolean first = true;
17510
 
17511
      sb.append("success:");
17512
      if (this.success == null) {
17513
        sb.append("null");
17514
      } else {
17515
        sb.append(this.success);
17516
      }
17517
      first = false;
17518
      sb.append(")");
17519
      return sb.toString();
17520
    }
17521
 
17522
    public void validate() throws org.apache.thrift.TException {
17523
      // check for required fields
17524
    }
17525
 
17526
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17527
      try {
17528
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17529
      } catch (org.apache.thrift.TException te) {
17530
        throw new java.io.IOException(te);
17531
      }
17532
    }
17533
 
17534
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17535
      try {
17536
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17537
      } catch (org.apache.thrift.TException te) {
17538
        throw new java.io.IOException(te);
17539
      }
17540
    }
17541
 
17542
  }
17543
 
6630 amar.kumar 17544
  public static class getInvoice_args implements org.apache.thrift.TBase<getInvoice_args, getInvoice_args._Fields>, java.io.Serializable, Cloneable   {
17545
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoice_args");
17546
 
17547
    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);
17548
    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);
17549
 
17550
    private String invoiceNumber; // required
17551
    private long supplierId; // required
17552
 
17553
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17554
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17555
      INVOICE_NUMBER((short)1, "invoiceNumber"),
17556
      SUPPLIER_ID((short)2, "supplierId");
17557
 
17558
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17559
 
17560
      static {
17561
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17562
          byName.put(field.getFieldName(), field);
17563
        }
17564
      }
17565
 
17566
      /**
17567
       * Find the _Fields constant that matches fieldId, or null if its not found.
17568
       */
17569
      public static _Fields findByThriftId(int fieldId) {
17570
        switch(fieldId) {
17571
          case 1: // INVOICE_NUMBER
17572
            return INVOICE_NUMBER;
17573
          case 2: // SUPPLIER_ID
17574
            return SUPPLIER_ID;
17575
          default:
17576
            return null;
17577
        }
17578
      }
17579
 
17580
      /**
17581
       * Find the _Fields constant that matches fieldId, throwing an exception
17582
       * if it is not found.
17583
       */
17584
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17585
        _Fields fields = findByThriftId(fieldId);
17586
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17587
        return fields;
17588
      }
17589
 
17590
      /**
17591
       * Find the _Fields constant that matches name, or null if its not found.
17592
       */
17593
      public static _Fields findByName(String name) {
17594
        return byName.get(name);
17595
      }
17596
 
17597
      private final short _thriftId;
17598
      private final String _fieldName;
17599
 
17600
      _Fields(short thriftId, String fieldName) {
17601
        _thriftId = thriftId;
17602
        _fieldName = fieldName;
17603
      }
17604
 
17605
      public short getThriftFieldId() {
17606
        return _thriftId;
17607
      }
17608
 
17609
      public String getFieldName() {
17610
        return _fieldName;
17611
      }
17612
    }
17613
 
17614
    // isset id assignments
17615
    private static final int __SUPPLIERID_ISSET_ID = 0;
17616
    private BitSet __isset_bit_vector = new BitSet(1);
17617
 
17618
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17619
    static {
17620
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17621
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17622
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
17623
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17624
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
17625
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17626
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoice_args.class, metaDataMap);
17627
    }
17628
 
17629
    public getInvoice_args() {
17630
    }
17631
 
17632
    public getInvoice_args(
17633
      String invoiceNumber,
17634
      long supplierId)
17635
    {
17636
      this();
17637
      this.invoiceNumber = invoiceNumber;
17638
      this.supplierId = supplierId;
17639
      setSupplierIdIsSet(true);
17640
    }
17641
 
17642
    /**
17643
     * Performs a deep copy on <i>other</i>.
17644
     */
17645
    public getInvoice_args(getInvoice_args other) {
17646
      __isset_bit_vector.clear();
17647
      __isset_bit_vector.or(other.__isset_bit_vector);
17648
      if (other.isSetInvoiceNumber()) {
17649
        this.invoiceNumber = other.invoiceNumber;
17650
      }
17651
      this.supplierId = other.supplierId;
17652
    }
17653
 
17654
    public getInvoice_args deepCopy() {
17655
      return new getInvoice_args(this);
17656
    }
17657
 
17658
    @Override
17659
    public void clear() {
17660
      this.invoiceNumber = null;
17661
      setSupplierIdIsSet(false);
17662
      this.supplierId = 0;
17663
    }
17664
 
17665
    public String getInvoiceNumber() {
17666
      return this.invoiceNumber;
17667
    }
17668
 
17669
    public void setInvoiceNumber(String invoiceNumber) {
17670
      this.invoiceNumber = invoiceNumber;
17671
    }
17672
 
17673
    public void unsetInvoiceNumber() {
17674
      this.invoiceNumber = null;
17675
    }
17676
 
17677
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
17678
    public boolean isSetInvoiceNumber() {
17679
      return this.invoiceNumber != null;
17680
    }
17681
 
17682
    public void setInvoiceNumberIsSet(boolean value) {
17683
      if (!value) {
17684
        this.invoiceNumber = null;
17685
      }
17686
    }
17687
 
17688
    public long getSupplierId() {
17689
      return this.supplierId;
17690
    }
17691
 
17692
    public void setSupplierId(long supplierId) {
17693
      this.supplierId = supplierId;
17694
      setSupplierIdIsSet(true);
17695
    }
17696
 
17697
    public void unsetSupplierId() {
17698
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
17699
    }
17700
 
17701
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
17702
    public boolean isSetSupplierId() {
17703
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
17704
    }
17705
 
17706
    public void setSupplierIdIsSet(boolean value) {
17707
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
17708
    }
17709
 
17710
    public void setFieldValue(_Fields field, Object value) {
17711
      switch (field) {
17712
      case INVOICE_NUMBER:
17713
        if (value == null) {
17714
          unsetInvoiceNumber();
17715
        } else {
17716
          setInvoiceNumber((String)value);
17717
        }
17718
        break;
17719
 
17720
      case SUPPLIER_ID:
17721
        if (value == null) {
17722
          unsetSupplierId();
17723
        } else {
17724
          setSupplierId((Long)value);
17725
        }
17726
        break;
17727
 
17728
      }
17729
    }
17730
 
17731
    public Object getFieldValue(_Fields field) {
17732
      switch (field) {
17733
      case INVOICE_NUMBER:
17734
        return getInvoiceNumber();
17735
 
17736
      case SUPPLIER_ID:
17737
        return Long.valueOf(getSupplierId());
17738
 
17739
      }
17740
      throw new IllegalStateException();
17741
    }
17742
 
17743
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17744
    public boolean isSet(_Fields field) {
17745
      if (field == null) {
17746
        throw new IllegalArgumentException();
17747
      }
17748
 
17749
      switch (field) {
17750
      case INVOICE_NUMBER:
17751
        return isSetInvoiceNumber();
17752
      case SUPPLIER_ID:
17753
        return isSetSupplierId();
17754
      }
17755
      throw new IllegalStateException();
17756
    }
17757
 
17758
    @Override
17759
    public boolean equals(Object that) {
17760
      if (that == null)
17761
        return false;
17762
      if (that instanceof getInvoice_args)
17763
        return this.equals((getInvoice_args)that);
17764
      return false;
17765
    }
17766
 
17767
    public boolean equals(getInvoice_args that) {
17768
      if (that == null)
17769
        return false;
17770
 
17771
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
17772
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
17773
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
17774
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
17775
          return false;
17776
        if (!this.invoiceNumber.equals(that.invoiceNumber))
17777
          return false;
17778
      }
17779
 
17780
      boolean this_present_supplierId = true;
17781
      boolean that_present_supplierId = true;
17782
      if (this_present_supplierId || that_present_supplierId) {
17783
        if (!(this_present_supplierId && that_present_supplierId))
17784
          return false;
17785
        if (this.supplierId != that.supplierId)
17786
          return false;
17787
      }
17788
 
17789
      return true;
17790
    }
17791
 
17792
    @Override
17793
    public int hashCode() {
17794
      return 0;
17795
    }
17796
 
17797
    public int compareTo(getInvoice_args other) {
17798
      if (!getClass().equals(other.getClass())) {
17799
        return getClass().getName().compareTo(other.getClass().getName());
17800
      }
17801
 
17802
      int lastComparison = 0;
17803
      getInvoice_args typedOther = (getInvoice_args)other;
17804
 
17805
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
17806
      if (lastComparison != 0) {
17807
        return lastComparison;
17808
      }
17809
      if (isSetInvoiceNumber()) {
17810
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
17811
        if (lastComparison != 0) {
17812
          return lastComparison;
17813
        }
17814
      }
17815
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
17816
      if (lastComparison != 0) {
17817
        return lastComparison;
17818
      }
17819
      if (isSetSupplierId()) {
17820
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
17821
        if (lastComparison != 0) {
17822
          return lastComparison;
17823
        }
17824
      }
17825
      return 0;
17826
    }
17827
 
17828
    public _Fields fieldForId(int fieldId) {
17829
      return _Fields.findByThriftId(fieldId);
17830
    }
17831
 
17832
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17833
      org.apache.thrift.protocol.TField field;
17834
      iprot.readStructBegin();
17835
      while (true)
17836
      {
17837
        field = iprot.readFieldBegin();
17838
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17839
          break;
17840
        }
17841
        switch (field.id) {
17842
          case 1: // INVOICE_NUMBER
17843
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
17844
              this.invoiceNumber = iprot.readString();
17845
            } else { 
17846
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17847
            }
17848
            break;
17849
          case 2: // SUPPLIER_ID
17850
            if (field.type == org.apache.thrift.protocol.TType.I64) {
17851
              this.supplierId = iprot.readI64();
17852
              setSupplierIdIsSet(true);
17853
            } else { 
17854
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17855
            }
17856
            break;
17857
          default:
17858
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17859
        }
17860
        iprot.readFieldEnd();
17861
      }
17862
      iprot.readStructEnd();
17863
      validate();
17864
    }
17865
 
17866
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17867
      validate();
17868
 
17869
      oprot.writeStructBegin(STRUCT_DESC);
17870
      if (this.invoiceNumber != null) {
17871
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
17872
        oprot.writeString(this.invoiceNumber);
17873
        oprot.writeFieldEnd();
17874
      }
17875
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
17876
      oprot.writeI64(this.supplierId);
17877
      oprot.writeFieldEnd();
17878
      oprot.writeFieldStop();
17879
      oprot.writeStructEnd();
17880
    }
17881
 
17882
    @Override
17883
    public String toString() {
17884
      StringBuilder sb = new StringBuilder("getInvoice_args(");
17885
      boolean first = true;
17886
 
17887
      sb.append("invoiceNumber:");
17888
      if (this.invoiceNumber == null) {
17889
        sb.append("null");
17890
      } else {
17891
        sb.append(this.invoiceNumber);
17892
      }
17893
      first = false;
17894
      if (!first) sb.append(", ");
17895
      sb.append("supplierId:");
17896
      sb.append(this.supplierId);
17897
      first = false;
17898
      sb.append(")");
17899
      return sb.toString();
17900
    }
17901
 
17902
    public void validate() throws org.apache.thrift.TException {
17903
      // check for required fields
17904
    }
17905
 
17906
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17907
      try {
17908
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17909
      } catch (org.apache.thrift.TException te) {
17910
        throw new java.io.IOException(te);
17911
      }
17912
    }
17913
 
17914
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17915
      try {
20025 amit.gupta 17916
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
17917
        __isset_bit_vector = new BitSet(1);
6630 amar.kumar 17918
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17919
      } catch (org.apache.thrift.TException te) {
17920
        throw new java.io.IOException(te);
17921
      }
17922
    }
17923
 
17924
  }
17925
 
17926
  public static class getInvoice_result implements org.apache.thrift.TBase<getInvoice_result, getInvoice_result._Fields>, java.io.Serializable, Cloneable   {
17927
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoice_result");
17928
 
17929
    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);
17930
 
17931
    private List<PurchaseReturn> success; // required
17932
 
17933
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17934
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17935
      SUCCESS((short)0, "success");
17936
 
17937
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17938
 
17939
      static {
17940
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17941
          byName.put(field.getFieldName(), field);
17942
        }
17943
      }
17944
 
17945
      /**
17946
       * Find the _Fields constant that matches fieldId, or null if its not found.
17947
       */
17948
      public static _Fields findByThriftId(int fieldId) {
17949
        switch(fieldId) {
17950
          case 0: // SUCCESS
17951
            return SUCCESS;
17952
          default:
17953
            return null;
17954
        }
17955
      }
17956
 
17957
      /**
17958
       * Find the _Fields constant that matches fieldId, throwing an exception
17959
       * if it is not found.
17960
       */
17961
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17962
        _Fields fields = findByThriftId(fieldId);
17963
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17964
        return fields;
17965
      }
17966
 
17967
      /**
17968
       * Find the _Fields constant that matches name, or null if its not found.
17969
       */
17970
      public static _Fields findByName(String name) {
17971
        return byName.get(name);
17972
      }
17973
 
17974
      private final short _thriftId;
17975
      private final String _fieldName;
17976
 
17977
      _Fields(short thriftId, String fieldName) {
17978
        _thriftId = thriftId;
17979
        _fieldName = fieldName;
17980
      }
17981
 
17982
      public short getThriftFieldId() {
17983
        return _thriftId;
17984
      }
17985
 
17986
      public String getFieldName() {
17987
        return _fieldName;
17988
      }
17989
    }
17990
 
17991
    // isset id assignments
17992
 
17993
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17994
    static {
17995
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17996
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17997
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
17998
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class))));
17999
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18000
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoice_result.class, metaDataMap);
18001
    }
18002
 
18003
    public getInvoice_result() {
18004
    }
18005
 
18006
    public getInvoice_result(
18007
      List<PurchaseReturn> success)
18008
    {
18009
      this();
18010
      this.success = success;
18011
    }
18012
 
18013
    /**
18014
     * Performs a deep copy on <i>other</i>.
18015
     */
18016
    public getInvoice_result(getInvoice_result other) {
18017
      if (other.isSetSuccess()) {
18018
        List<PurchaseReturn> __this__success = new ArrayList<PurchaseReturn>();
18019
        for (PurchaseReturn other_element : other.success) {
18020
          __this__success.add(new PurchaseReturn(other_element));
18021
        }
18022
        this.success = __this__success;
18023
      }
18024
    }
18025
 
18026
    public getInvoice_result deepCopy() {
18027
      return new getInvoice_result(this);
18028
    }
18029
 
18030
    @Override
18031
    public void clear() {
18032
      this.success = null;
18033
    }
18034
 
18035
    public int getSuccessSize() {
18036
      return (this.success == null) ? 0 : this.success.size();
18037
    }
18038
 
18039
    public java.util.Iterator<PurchaseReturn> getSuccessIterator() {
18040
      return (this.success == null) ? null : this.success.iterator();
18041
    }
18042
 
18043
    public void addToSuccess(PurchaseReturn elem) {
18044
      if (this.success == null) {
18045
        this.success = new ArrayList<PurchaseReturn>();
18046
      }
18047
      this.success.add(elem);
18048
    }
18049
 
18050
    public List<PurchaseReturn> getSuccess() {
18051
      return this.success;
18052
    }
18053
 
18054
    public void setSuccess(List<PurchaseReturn> success) {
18055
      this.success = success;
18056
    }
18057
 
18058
    public void unsetSuccess() {
18059
      this.success = null;
18060
    }
18061
 
18062
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
18063
    public boolean isSetSuccess() {
18064
      return this.success != null;
18065
    }
18066
 
18067
    public void setSuccessIsSet(boolean value) {
18068
      if (!value) {
18069
        this.success = null;
18070
      }
18071
    }
18072
 
18073
    public void setFieldValue(_Fields field, Object value) {
18074
      switch (field) {
18075
      case SUCCESS:
18076
        if (value == null) {
18077
          unsetSuccess();
18078
        } else {
18079
          setSuccess((List<PurchaseReturn>)value);
18080
        }
18081
        break;
18082
 
18083
      }
18084
    }
18085
 
18086
    public Object getFieldValue(_Fields field) {
18087
      switch (field) {
18088
      case SUCCESS:
18089
        return getSuccess();
18090
 
18091
      }
18092
      throw new IllegalStateException();
18093
    }
18094
 
18095
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18096
    public boolean isSet(_Fields field) {
18097
      if (field == null) {
18098
        throw new IllegalArgumentException();
18099
      }
18100
 
18101
      switch (field) {
18102
      case SUCCESS:
18103
        return isSetSuccess();
18104
      }
18105
      throw new IllegalStateException();
18106
    }
18107
 
18108
    @Override
18109
    public boolean equals(Object that) {
18110
      if (that == null)
18111
        return false;
18112
      if (that instanceof getInvoice_result)
18113
        return this.equals((getInvoice_result)that);
18114
      return false;
18115
    }
18116
 
18117
    public boolean equals(getInvoice_result that) {
18118
      if (that == null)
18119
        return false;
18120
 
18121
      boolean this_present_success = true && this.isSetSuccess();
18122
      boolean that_present_success = true && that.isSetSuccess();
18123
      if (this_present_success || that_present_success) {
18124
        if (!(this_present_success && that_present_success))
18125
          return false;
18126
        if (!this.success.equals(that.success))
18127
          return false;
18128
      }
18129
 
18130
      return true;
18131
    }
18132
 
18133
    @Override
18134
    public int hashCode() {
18135
      return 0;
18136
    }
18137
 
18138
    public int compareTo(getInvoice_result other) {
18139
      if (!getClass().equals(other.getClass())) {
18140
        return getClass().getName().compareTo(other.getClass().getName());
18141
      }
18142
 
18143
      int lastComparison = 0;
18144
      getInvoice_result typedOther = (getInvoice_result)other;
18145
 
18146
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
18147
      if (lastComparison != 0) {
18148
        return lastComparison;
18149
      }
18150
      if (isSetSuccess()) {
18151
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
18152
        if (lastComparison != 0) {
18153
          return lastComparison;
18154
        }
18155
      }
18156
      return 0;
18157
    }
18158
 
18159
    public _Fields fieldForId(int fieldId) {
18160
      return _Fields.findByThriftId(fieldId);
18161
    }
18162
 
18163
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18164
      org.apache.thrift.protocol.TField field;
18165
      iprot.readStructBegin();
18166
      while (true)
18167
      {
18168
        field = iprot.readFieldBegin();
18169
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18170
          break;
18171
        }
18172
        switch (field.id) {
18173
          case 0: // SUCCESS
18174
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
18175
              {
7410 amar.kumar 18176
                org.apache.thrift.protocol.TList _list36 = iprot.readListBegin();
18177
                this.success = new ArrayList<PurchaseReturn>(_list36.size);
18178
                for (int _i37 = 0; _i37 < _list36.size; ++_i37)
6630 amar.kumar 18179
                {
7410 amar.kumar 18180
                  PurchaseReturn _elem38; // required
18181
                  _elem38 = new PurchaseReturn();
18182
                  _elem38.read(iprot);
18183
                  this.success.add(_elem38);
6630 amar.kumar 18184
                }
18185
                iprot.readListEnd();
18186
              }
18187
            } else { 
18188
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18189
            }
18190
            break;
18191
          default:
18192
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18193
        }
18194
        iprot.readFieldEnd();
18195
      }
18196
      iprot.readStructEnd();
18197
      validate();
18198
    }
18199
 
18200
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18201
      oprot.writeStructBegin(STRUCT_DESC);
18202
 
18203
      if (this.isSetSuccess()) {
18204
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18205
        {
18206
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7410 amar.kumar 18207
          for (PurchaseReturn _iter39 : this.success)
6630 amar.kumar 18208
          {
7410 amar.kumar 18209
            _iter39.write(oprot);
6630 amar.kumar 18210
          }
18211
          oprot.writeListEnd();
18212
        }
18213
        oprot.writeFieldEnd();
18214
      }
18215
      oprot.writeFieldStop();
18216
      oprot.writeStructEnd();
18217
    }
18218
 
18219
    @Override
18220
    public String toString() {
18221
      StringBuilder sb = new StringBuilder("getInvoice_result(");
18222
      boolean first = true;
18223
 
18224
      sb.append("success:");
18225
      if (this.success == null) {
18226
        sb.append("null");
18227
      } else {
18228
        sb.append(this.success);
18229
      }
18230
      first = false;
18231
      sb.append(")");
18232
      return sb.toString();
18233
    }
18234
 
18235
    public void validate() throws org.apache.thrift.TException {
18236
      // check for required fields
18237
    }
18238
 
18239
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18240
      try {
18241
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18242
      } catch (org.apache.thrift.TException te) {
18243
        throw new java.io.IOException(te);
18244
      }
18245
    }
18246
 
18247
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18248
      try {
18249
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18250
      } catch (org.apache.thrift.TException te) {
18251
        throw new java.io.IOException(te);
18252
      }
18253
    }
18254
 
18255
  }
18256
 
6762 amar.kumar 18257
  public static class createPurchaseForOurExtBilling_args implements org.apache.thrift.TBase<createPurchaseForOurExtBilling_args, createPurchaseForOurExtBilling_args._Fields>, java.io.Serializable, Cloneable   {
18258
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseForOurExtBilling_args");
18259
 
18260
    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);
18261
    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 18262
    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);
18263
    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 18264
 
18265
    private String invoiceNumber; // required
18266
    private double unitPrice; // required
7672 rajveer 18267
    private double nlc; // required
6762 amar.kumar 18268
    private long itemId; // required
18269
 
18270
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18271
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18272
      INVOICE_NUMBER((short)1, "invoiceNumber"),
18273
      UNIT_PRICE((short)2, "unitPrice"),
7672 rajveer 18274
      NLC((short)3, "nlc"),
18275
      ITEM_ID((short)4, "itemId");
6762 amar.kumar 18276
 
18277
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18278
 
18279
      static {
18280
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18281
          byName.put(field.getFieldName(), field);
18282
        }
18283
      }
18284
 
18285
      /**
18286
       * Find the _Fields constant that matches fieldId, or null if its not found.
18287
       */
18288
      public static _Fields findByThriftId(int fieldId) {
18289
        switch(fieldId) {
18290
          case 1: // INVOICE_NUMBER
18291
            return INVOICE_NUMBER;
18292
          case 2: // UNIT_PRICE
18293
            return UNIT_PRICE;
7672 rajveer 18294
          case 3: // NLC
18295
            return NLC;
18296
          case 4: // ITEM_ID
6762 amar.kumar 18297
            return ITEM_ID;
18298
          default:
18299
            return null;
18300
        }
18301
      }
18302
 
18303
      /**
18304
       * Find the _Fields constant that matches fieldId, throwing an exception
18305
       * if it is not found.
18306
       */
18307
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18308
        _Fields fields = findByThriftId(fieldId);
18309
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18310
        return fields;
18311
      }
18312
 
18313
      /**
18314
       * Find the _Fields constant that matches name, or null if its not found.
18315
       */
18316
      public static _Fields findByName(String name) {
18317
        return byName.get(name);
18318
      }
18319
 
18320
      private final short _thriftId;
18321
      private final String _fieldName;
18322
 
18323
      _Fields(short thriftId, String fieldName) {
18324
        _thriftId = thriftId;
18325
        _fieldName = fieldName;
18326
      }
18327
 
18328
      public short getThriftFieldId() {
18329
        return _thriftId;
18330
      }
18331
 
18332
      public String getFieldName() {
18333
        return _fieldName;
18334
      }
18335
    }
18336
 
18337
    // isset id assignments
18338
    private static final int __UNITPRICE_ISSET_ID = 0;
7672 rajveer 18339
    private static final int __NLC_ISSET_ID = 1;
18340
    private static final int __ITEMID_ISSET_ID = 2;
18341
    private BitSet __isset_bit_vector = new BitSet(3);
6762 amar.kumar 18342
 
18343
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18344
    static {
18345
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18346
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18347
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
18348
      tmpMap.put(_Fields.UNIT_PRICE, new org.apache.thrift.meta_data.FieldMetaData("unitPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18349
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
7672 rajveer 18350
      tmpMap.put(_Fields.NLC, new org.apache.thrift.meta_data.FieldMetaData("nlc", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18351
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
6762 amar.kumar 18352
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18353
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18354
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18355
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseForOurExtBilling_args.class, metaDataMap);
18356
    }
18357
 
18358
    public createPurchaseForOurExtBilling_args() {
18359
    }
18360
 
18361
    public createPurchaseForOurExtBilling_args(
18362
      String invoiceNumber,
18363
      double unitPrice,
7672 rajveer 18364
      double nlc,
6762 amar.kumar 18365
      long itemId)
18366
    {
18367
      this();
18368
      this.invoiceNumber = invoiceNumber;
18369
      this.unitPrice = unitPrice;
18370
      setUnitPriceIsSet(true);
7672 rajveer 18371
      this.nlc = nlc;
18372
      setNlcIsSet(true);
6762 amar.kumar 18373
      this.itemId = itemId;
18374
      setItemIdIsSet(true);
18375
    }
18376
 
18377
    /**
18378
     * Performs a deep copy on <i>other</i>.
18379
     */
18380
    public createPurchaseForOurExtBilling_args(createPurchaseForOurExtBilling_args other) {
18381
      __isset_bit_vector.clear();
18382
      __isset_bit_vector.or(other.__isset_bit_vector);
18383
      if (other.isSetInvoiceNumber()) {
18384
        this.invoiceNumber = other.invoiceNumber;
18385
      }
18386
      this.unitPrice = other.unitPrice;
7672 rajveer 18387
      this.nlc = other.nlc;
6762 amar.kumar 18388
      this.itemId = other.itemId;
18389
    }
18390
 
18391
    public createPurchaseForOurExtBilling_args deepCopy() {
18392
      return new createPurchaseForOurExtBilling_args(this);
18393
    }
18394
 
18395
    @Override
18396
    public void clear() {
18397
      this.invoiceNumber = null;
18398
      setUnitPriceIsSet(false);
18399
      this.unitPrice = 0.0;
7672 rajveer 18400
      setNlcIsSet(false);
18401
      this.nlc = 0.0;
6762 amar.kumar 18402
      setItemIdIsSet(false);
18403
      this.itemId = 0;
18404
    }
18405
 
18406
    public String getInvoiceNumber() {
18407
      return this.invoiceNumber;
18408
    }
18409
 
18410
    public void setInvoiceNumber(String invoiceNumber) {
18411
      this.invoiceNumber = invoiceNumber;
18412
    }
18413
 
18414
    public void unsetInvoiceNumber() {
18415
      this.invoiceNumber = null;
18416
    }
18417
 
18418
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
18419
    public boolean isSetInvoiceNumber() {
18420
      return this.invoiceNumber != null;
18421
    }
18422
 
18423
    public void setInvoiceNumberIsSet(boolean value) {
18424
      if (!value) {
18425
        this.invoiceNumber = null;
18426
      }
18427
    }
18428
 
18429
    public double getUnitPrice() {
18430
      return this.unitPrice;
18431
    }
18432
 
18433
    public void setUnitPrice(double unitPrice) {
18434
      this.unitPrice = unitPrice;
18435
      setUnitPriceIsSet(true);
18436
    }
18437
 
18438
    public void unsetUnitPrice() {
18439
      __isset_bit_vector.clear(__UNITPRICE_ISSET_ID);
18440
    }
18441
 
18442
    /** Returns true if field unitPrice is set (has been assigned a value) and false otherwise */
18443
    public boolean isSetUnitPrice() {
18444
      return __isset_bit_vector.get(__UNITPRICE_ISSET_ID);
18445
    }
18446
 
18447
    public void setUnitPriceIsSet(boolean value) {
18448
      __isset_bit_vector.set(__UNITPRICE_ISSET_ID, value);
18449
    }
18450
 
7672 rajveer 18451
    public double getNlc() {
18452
      return this.nlc;
18453
    }
18454
 
18455
    public void setNlc(double nlc) {
18456
      this.nlc = nlc;
18457
      setNlcIsSet(true);
18458
    }
18459
 
18460
    public void unsetNlc() {
18461
      __isset_bit_vector.clear(__NLC_ISSET_ID);
18462
    }
18463
 
18464
    /** Returns true if field nlc is set (has been assigned a value) and false otherwise */
18465
    public boolean isSetNlc() {
18466
      return __isset_bit_vector.get(__NLC_ISSET_ID);
18467
    }
18468
 
18469
    public void setNlcIsSet(boolean value) {
18470
      __isset_bit_vector.set(__NLC_ISSET_ID, value);
18471
    }
18472
 
6762 amar.kumar 18473
    public long getItemId() {
18474
      return this.itemId;
18475
    }
18476
 
18477
    public void setItemId(long itemId) {
18478
      this.itemId = itemId;
18479
      setItemIdIsSet(true);
18480
    }
18481
 
18482
    public void unsetItemId() {
18483
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
18484
    }
18485
 
18486
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
18487
    public boolean isSetItemId() {
18488
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
18489
    }
18490
 
18491
    public void setItemIdIsSet(boolean value) {
18492
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
18493
    }
18494
 
18495
    public void setFieldValue(_Fields field, Object value) {
18496
      switch (field) {
18497
      case INVOICE_NUMBER:
18498
        if (value == null) {
18499
          unsetInvoiceNumber();
18500
        } else {
18501
          setInvoiceNumber((String)value);
18502
        }
18503
        break;
18504
 
18505
      case UNIT_PRICE:
18506
        if (value == null) {
18507
          unsetUnitPrice();
18508
        } else {
18509
          setUnitPrice((Double)value);
18510
        }
18511
        break;
18512
 
7672 rajveer 18513
      case NLC:
18514
        if (value == null) {
18515
          unsetNlc();
18516
        } else {
18517
          setNlc((Double)value);
18518
        }
18519
        break;
18520
 
6762 amar.kumar 18521
      case ITEM_ID:
18522
        if (value == null) {
18523
          unsetItemId();
18524
        } else {
18525
          setItemId((Long)value);
18526
        }
18527
        break;
18528
 
18529
      }
18530
    }
18531
 
18532
    public Object getFieldValue(_Fields field) {
18533
      switch (field) {
18534
      case INVOICE_NUMBER:
18535
        return getInvoiceNumber();
18536
 
18537
      case UNIT_PRICE:
18538
        return Double.valueOf(getUnitPrice());
18539
 
7672 rajveer 18540
      case NLC:
18541
        return Double.valueOf(getNlc());
18542
 
6762 amar.kumar 18543
      case ITEM_ID:
18544
        return Long.valueOf(getItemId());
18545
 
18546
      }
18547
      throw new IllegalStateException();
18548
    }
18549
 
18550
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18551
    public boolean isSet(_Fields field) {
18552
      if (field == null) {
18553
        throw new IllegalArgumentException();
18554
      }
18555
 
18556
      switch (field) {
18557
      case INVOICE_NUMBER:
18558
        return isSetInvoiceNumber();
18559
      case UNIT_PRICE:
18560
        return isSetUnitPrice();
7672 rajveer 18561
      case NLC:
18562
        return isSetNlc();
6762 amar.kumar 18563
      case ITEM_ID:
18564
        return isSetItemId();
18565
      }
18566
      throw new IllegalStateException();
18567
    }
18568
 
18569
    @Override
18570
    public boolean equals(Object that) {
18571
      if (that == null)
18572
        return false;
18573
      if (that instanceof createPurchaseForOurExtBilling_args)
18574
        return this.equals((createPurchaseForOurExtBilling_args)that);
18575
      return false;
18576
    }
18577
 
18578
    public boolean equals(createPurchaseForOurExtBilling_args that) {
18579
      if (that == null)
18580
        return false;
18581
 
18582
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
18583
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
18584
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
18585
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
18586
          return false;
18587
        if (!this.invoiceNumber.equals(that.invoiceNumber))
18588
          return false;
18589
      }
18590
 
18591
      boolean this_present_unitPrice = true;
18592
      boolean that_present_unitPrice = true;
18593
      if (this_present_unitPrice || that_present_unitPrice) {
18594
        if (!(this_present_unitPrice && that_present_unitPrice))
18595
          return false;
18596
        if (this.unitPrice != that.unitPrice)
18597
          return false;
18598
      }
18599
 
7672 rajveer 18600
      boolean this_present_nlc = true;
18601
      boolean that_present_nlc = true;
18602
      if (this_present_nlc || that_present_nlc) {
18603
        if (!(this_present_nlc && that_present_nlc))
18604
          return false;
18605
        if (this.nlc != that.nlc)
18606
          return false;
18607
      }
18608
 
6762 amar.kumar 18609
      boolean this_present_itemId = true;
18610
      boolean that_present_itemId = true;
18611
      if (this_present_itemId || that_present_itemId) {
18612
        if (!(this_present_itemId && that_present_itemId))
18613
          return false;
18614
        if (this.itemId != that.itemId)
18615
          return false;
18616
      }
18617
 
18618
      return true;
18619
    }
18620
 
18621
    @Override
18622
    public int hashCode() {
18623
      return 0;
18624
    }
18625
 
18626
    public int compareTo(createPurchaseForOurExtBilling_args other) {
18627
      if (!getClass().equals(other.getClass())) {
18628
        return getClass().getName().compareTo(other.getClass().getName());
18629
      }
18630
 
18631
      int lastComparison = 0;
18632
      createPurchaseForOurExtBilling_args typedOther = (createPurchaseForOurExtBilling_args)other;
18633
 
18634
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
18635
      if (lastComparison != 0) {
18636
        return lastComparison;
18637
      }
18638
      if (isSetInvoiceNumber()) {
18639
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
18640
        if (lastComparison != 0) {
18641
          return lastComparison;
18642
        }
18643
      }
18644
      lastComparison = Boolean.valueOf(isSetUnitPrice()).compareTo(typedOther.isSetUnitPrice());
18645
      if (lastComparison != 0) {
18646
        return lastComparison;
18647
      }
18648
      if (isSetUnitPrice()) {
18649
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unitPrice, typedOther.unitPrice);
18650
        if (lastComparison != 0) {
18651
          return lastComparison;
18652
        }
18653
      }
7672 rajveer 18654
      lastComparison = Boolean.valueOf(isSetNlc()).compareTo(typedOther.isSetNlc());
18655
      if (lastComparison != 0) {
18656
        return lastComparison;
18657
      }
18658
      if (isSetNlc()) {
18659
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nlc, typedOther.nlc);
18660
        if (lastComparison != 0) {
18661
          return lastComparison;
18662
        }
18663
      }
6762 amar.kumar 18664
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
18665
      if (lastComparison != 0) {
18666
        return lastComparison;
18667
      }
18668
      if (isSetItemId()) {
18669
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
18670
        if (lastComparison != 0) {
18671
          return lastComparison;
18672
        }
18673
      }
18674
      return 0;
18675
    }
18676
 
18677
    public _Fields fieldForId(int fieldId) {
18678
      return _Fields.findByThriftId(fieldId);
18679
    }
18680
 
18681
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18682
      org.apache.thrift.protocol.TField field;
18683
      iprot.readStructBegin();
18684
      while (true)
18685
      {
18686
        field = iprot.readFieldBegin();
18687
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18688
          break;
18689
        }
18690
        switch (field.id) {
18691
          case 1: // INVOICE_NUMBER
18692
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
18693
              this.invoiceNumber = iprot.readString();
18694
            } else { 
18695
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18696
            }
18697
            break;
18698
          case 2: // UNIT_PRICE
18699
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
18700
              this.unitPrice = iprot.readDouble();
18701
              setUnitPriceIsSet(true);
18702
            } else { 
18703
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18704
            }
18705
            break;
7672 rajveer 18706
          case 3: // NLC
18707
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
18708
              this.nlc = iprot.readDouble();
18709
              setNlcIsSet(true);
18710
            } else { 
18711
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18712
            }
18713
            break;
18714
          case 4: // ITEM_ID
6762 amar.kumar 18715
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18716
              this.itemId = iprot.readI64();
18717
              setItemIdIsSet(true);
18718
            } else { 
18719
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18720
            }
18721
            break;
18722
          default:
18723
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18724
        }
18725
        iprot.readFieldEnd();
18726
      }
18727
      iprot.readStructEnd();
18728
      validate();
18729
    }
18730
 
18731
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18732
      validate();
18733
 
18734
      oprot.writeStructBegin(STRUCT_DESC);
18735
      if (this.invoiceNumber != null) {
18736
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
18737
        oprot.writeString(this.invoiceNumber);
18738
        oprot.writeFieldEnd();
18739
      }
18740
      oprot.writeFieldBegin(UNIT_PRICE_FIELD_DESC);
18741
      oprot.writeDouble(this.unitPrice);
18742
      oprot.writeFieldEnd();
7672 rajveer 18743
      oprot.writeFieldBegin(NLC_FIELD_DESC);
18744
      oprot.writeDouble(this.nlc);
18745
      oprot.writeFieldEnd();
6762 amar.kumar 18746
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
18747
      oprot.writeI64(this.itemId);
18748
      oprot.writeFieldEnd();
18749
      oprot.writeFieldStop();
18750
      oprot.writeStructEnd();
18751
    }
18752
 
18753
    @Override
18754
    public String toString() {
18755
      StringBuilder sb = new StringBuilder("createPurchaseForOurExtBilling_args(");
18756
      boolean first = true;
18757
 
18758
      sb.append("invoiceNumber:");
18759
      if (this.invoiceNumber == null) {
18760
        sb.append("null");
18761
      } else {
18762
        sb.append(this.invoiceNumber);
18763
      }
18764
      first = false;
18765
      if (!first) sb.append(", ");
18766
      sb.append("unitPrice:");
18767
      sb.append(this.unitPrice);
18768
      first = false;
18769
      if (!first) sb.append(", ");
7672 rajveer 18770
      sb.append("nlc:");
18771
      sb.append(this.nlc);
18772
      first = false;
18773
      if (!first) sb.append(", ");
6762 amar.kumar 18774
      sb.append("itemId:");
18775
      sb.append(this.itemId);
18776
      first = false;
18777
      sb.append(")");
18778
      return sb.toString();
18779
    }
18780
 
18781
    public void validate() throws org.apache.thrift.TException {
18782
      // check for required fields
18783
    }
18784
 
18785
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18786
      try {
18787
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18788
      } catch (org.apache.thrift.TException te) {
18789
        throw new java.io.IOException(te);
18790
      }
18791
    }
18792
 
18793
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18794
      try {
18795
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
18796
        __isset_bit_vector = new BitSet(1);
18797
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18798
      } catch (org.apache.thrift.TException te) {
18799
        throw new java.io.IOException(te);
18800
      }
18801
    }
18802
 
18803
  }
18804
 
18805
  public static class createPurchaseForOurExtBilling_result implements org.apache.thrift.TBase<createPurchaseForOurExtBilling_result, createPurchaseForOurExtBilling_result._Fields>, java.io.Serializable, Cloneable   {
18806
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseForOurExtBilling_result");
18807
 
18808
    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);
18809
 
18810
    private long success; // required
18811
 
18812
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18813
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18814
      SUCCESS((short)0, "success");
18815
 
18816
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18817
 
18818
      static {
18819
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18820
          byName.put(field.getFieldName(), field);
18821
        }
18822
      }
18823
 
18824
      /**
18825
       * Find the _Fields constant that matches fieldId, or null if its not found.
18826
       */
18827
      public static _Fields findByThriftId(int fieldId) {
18828
        switch(fieldId) {
18829
          case 0: // SUCCESS
18830
            return SUCCESS;
18831
          default:
18832
            return null;
18833
        }
18834
      }
18835
 
18836
      /**
18837
       * Find the _Fields constant that matches fieldId, throwing an exception
18838
       * if it is not found.
18839
       */
18840
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18841
        _Fields fields = findByThriftId(fieldId);
18842
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18843
        return fields;
18844
      }
18845
 
18846
      /**
18847
       * Find the _Fields constant that matches name, or null if its not found.
18848
       */
18849
      public static _Fields findByName(String name) {
18850
        return byName.get(name);
18851
      }
18852
 
18853
      private final short _thriftId;
18854
      private final String _fieldName;
18855
 
18856
      _Fields(short thriftId, String fieldName) {
18857
        _thriftId = thriftId;
18858
        _fieldName = fieldName;
18859
      }
18860
 
18861
      public short getThriftFieldId() {
18862
        return _thriftId;
18863
      }
18864
 
18865
      public String getFieldName() {
18866
        return _fieldName;
18867
      }
18868
    }
18869
 
18870
    // isset id assignments
18871
    private static final int __SUCCESS_ISSET_ID = 0;
18872
    private BitSet __isset_bit_vector = new BitSet(1);
18873
 
18874
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18875
    static {
18876
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18877
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18878
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18879
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18880
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseForOurExtBilling_result.class, metaDataMap);
18881
    }
18882
 
18883
    public createPurchaseForOurExtBilling_result() {
18884
    }
18885
 
18886
    public createPurchaseForOurExtBilling_result(
18887
      long success)
18888
    {
18889
      this();
18890
      this.success = success;
18891
      setSuccessIsSet(true);
18892
    }
18893
 
18894
    /**
18895
     * Performs a deep copy on <i>other</i>.
18896
     */
18897
    public createPurchaseForOurExtBilling_result(createPurchaseForOurExtBilling_result other) {
18898
      __isset_bit_vector.clear();
18899
      __isset_bit_vector.or(other.__isset_bit_vector);
18900
      this.success = other.success;
18901
    }
18902
 
18903
    public createPurchaseForOurExtBilling_result deepCopy() {
18904
      return new createPurchaseForOurExtBilling_result(this);
18905
    }
18906
 
18907
    @Override
18908
    public void clear() {
18909
      setSuccessIsSet(false);
18910
      this.success = 0;
18911
    }
18912
 
18913
    public long getSuccess() {
18914
      return this.success;
18915
    }
18916
 
18917
    public void setSuccess(long success) {
18918
      this.success = success;
18919
      setSuccessIsSet(true);
18920
    }
18921
 
18922
    public void unsetSuccess() {
18923
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
18924
    }
18925
 
18926
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
18927
    public boolean isSetSuccess() {
18928
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
18929
    }
18930
 
18931
    public void setSuccessIsSet(boolean value) {
18932
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
18933
    }
18934
 
18935
    public void setFieldValue(_Fields field, Object value) {
18936
      switch (field) {
18937
      case SUCCESS:
18938
        if (value == null) {
18939
          unsetSuccess();
18940
        } else {
18941
          setSuccess((Long)value);
18942
        }
18943
        break;
18944
 
18945
      }
18946
    }
18947
 
18948
    public Object getFieldValue(_Fields field) {
18949
      switch (field) {
18950
      case SUCCESS:
18951
        return Long.valueOf(getSuccess());
18952
 
18953
      }
18954
      throw new IllegalStateException();
18955
    }
18956
 
18957
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18958
    public boolean isSet(_Fields field) {
18959
      if (field == null) {
18960
        throw new IllegalArgumentException();
18961
      }
18962
 
18963
      switch (field) {
18964
      case SUCCESS:
18965
        return isSetSuccess();
18966
      }
18967
      throw new IllegalStateException();
18968
    }
18969
 
18970
    @Override
18971
    public boolean equals(Object that) {
18972
      if (that == null)
18973
        return false;
18974
      if (that instanceof createPurchaseForOurExtBilling_result)
18975
        return this.equals((createPurchaseForOurExtBilling_result)that);
18976
      return false;
18977
    }
18978
 
18979
    public boolean equals(createPurchaseForOurExtBilling_result that) {
18980
      if (that == null)
18981
        return false;
18982
 
18983
      boolean this_present_success = true;
18984
      boolean that_present_success = true;
18985
      if (this_present_success || that_present_success) {
18986
        if (!(this_present_success && that_present_success))
18987
          return false;
18988
        if (this.success != that.success)
18989
          return false;
18990
      }
18991
 
18992
      return true;
18993
    }
18994
 
18995
    @Override
18996
    public int hashCode() {
18997
      return 0;
18998
    }
18999
 
19000
    public int compareTo(createPurchaseForOurExtBilling_result other) {
19001
      if (!getClass().equals(other.getClass())) {
19002
        return getClass().getName().compareTo(other.getClass().getName());
19003
      }
19004
 
19005
      int lastComparison = 0;
19006
      createPurchaseForOurExtBilling_result typedOther = (createPurchaseForOurExtBilling_result)other;
19007
 
19008
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
19009
      if (lastComparison != 0) {
19010
        return lastComparison;
19011
      }
19012
      if (isSetSuccess()) {
19013
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
19014
        if (lastComparison != 0) {
19015
          return lastComparison;
19016
        }
19017
      }
19018
      return 0;
19019
    }
19020
 
19021
    public _Fields fieldForId(int fieldId) {
19022
      return _Fields.findByThriftId(fieldId);
19023
    }
19024
 
19025
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19026
      org.apache.thrift.protocol.TField field;
19027
      iprot.readStructBegin();
19028
      while (true)
19029
      {
19030
        field = iprot.readFieldBegin();
19031
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19032
          break;
19033
        }
19034
        switch (field.id) {
19035
          case 0: // SUCCESS
19036
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19037
              this.success = iprot.readI64();
19038
              setSuccessIsSet(true);
19039
            } else { 
19040
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19041
            }
19042
            break;
19043
          default:
19044
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19045
        }
19046
        iprot.readFieldEnd();
19047
      }
19048
      iprot.readStructEnd();
19049
      validate();
19050
    }
19051
 
19052
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19053
      oprot.writeStructBegin(STRUCT_DESC);
19054
 
19055
      if (this.isSetSuccess()) {
19056
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
19057
        oprot.writeI64(this.success);
19058
        oprot.writeFieldEnd();
19059
      }
19060
      oprot.writeFieldStop();
19061
      oprot.writeStructEnd();
19062
    }
19063
 
19064
    @Override
19065
    public String toString() {
19066
      StringBuilder sb = new StringBuilder("createPurchaseForOurExtBilling_result(");
19067
      boolean first = true;
19068
 
19069
      sb.append("success:");
19070
      sb.append(this.success);
19071
      first = false;
19072
      sb.append(")");
19073
      return sb.toString();
19074
    }
19075
 
19076
    public void validate() throws org.apache.thrift.TException {
19077
      // check for required fields
19078
    }
19079
 
19080
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19081
      try {
19082
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19083
      } catch (org.apache.thrift.TException te) {
19084
        throw new java.io.IOException(te);
19085
      }
19086
    }
19087
 
19088
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19089
      try {
19090
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19091
      } catch (org.apache.thrift.TException te) {
19092
        throw new java.io.IOException(te);
19093
      }
19094
    }
19095
 
19096
  }
19097
 
19098
  public static class fulfillPOForExtBilling_args implements org.apache.thrift.TBase<fulfillPOForExtBilling_args, fulfillPOForExtBilling_args._Fields>, java.io.Serializable, Cloneable   {
19099
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPOForExtBilling_args");
19100
 
19101
    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);
19102
    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);
19103
 
19104
    private long itemId; // required
19105
    private long quantity; // required
19106
 
19107
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19108
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19109
      ITEM_ID((short)1, "itemId"),
19110
      QUANTITY((short)2, "quantity");
19111
 
19112
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19113
 
19114
      static {
19115
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19116
          byName.put(field.getFieldName(), field);
19117
        }
19118
      }
19119
 
19120
      /**
19121
       * Find the _Fields constant that matches fieldId, or null if its not found.
19122
       */
19123
      public static _Fields findByThriftId(int fieldId) {
19124
        switch(fieldId) {
19125
          case 1: // ITEM_ID
19126
            return ITEM_ID;
19127
          case 2: // QUANTITY
19128
            return QUANTITY;
19129
          default:
19130
            return null;
19131
        }
19132
      }
19133
 
19134
      /**
19135
       * Find the _Fields constant that matches fieldId, throwing an exception
19136
       * if it is not found.
19137
       */
19138
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19139
        _Fields fields = findByThriftId(fieldId);
19140
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19141
        return fields;
19142
      }
19143
 
19144
      /**
19145
       * Find the _Fields constant that matches name, or null if its not found.
19146
       */
19147
      public static _Fields findByName(String name) {
19148
        return byName.get(name);
19149
      }
19150
 
19151
      private final short _thriftId;
19152
      private final String _fieldName;
19153
 
19154
      _Fields(short thriftId, String fieldName) {
19155
        _thriftId = thriftId;
19156
        _fieldName = fieldName;
19157
      }
19158
 
19159
      public short getThriftFieldId() {
19160
        return _thriftId;
19161
      }
19162
 
19163
      public String getFieldName() {
19164
        return _fieldName;
19165
      }
19166
    }
19167
 
19168
    // isset id assignments
19169
    private static final int __ITEMID_ISSET_ID = 0;
19170
    private static final int __QUANTITY_ISSET_ID = 1;
19171
    private BitSet __isset_bit_vector = new BitSet(2);
19172
 
19173
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19174
    static {
19175
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19176
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19177
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19178
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19179
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19180
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19181
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPOForExtBilling_args.class, metaDataMap);
19182
    }
19183
 
19184
    public fulfillPOForExtBilling_args() {
19185
    }
19186
 
19187
    public fulfillPOForExtBilling_args(
19188
      long itemId,
19189
      long quantity)
19190
    {
19191
      this();
19192
      this.itemId = itemId;
19193
      setItemIdIsSet(true);
19194
      this.quantity = quantity;
19195
      setQuantityIsSet(true);
19196
    }
19197
 
19198
    /**
19199
     * Performs a deep copy on <i>other</i>.
19200
     */
19201
    public fulfillPOForExtBilling_args(fulfillPOForExtBilling_args other) {
19202
      __isset_bit_vector.clear();
19203
      __isset_bit_vector.or(other.__isset_bit_vector);
19204
      this.itemId = other.itemId;
19205
      this.quantity = other.quantity;
19206
    }
19207
 
19208
    public fulfillPOForExtBilling_args deepCopy() {
19209
      return new fulfillPOForExtBilling_args(this);
19210
    }
19211
 
19212
    @Override
19213
    public void clear() {
19214
      setItemIdIsSet(false);
19215
      this.itemId = 0;
19216
      setQuantityIsSet(false);
19217
      this.quantity = 0;
19218
    }
19219
 
19220
    public long getItemId() {
19221
      return this.itemId;
19222
    }
19223
 
19224
    public void setItemId(long itemId) {
19225
      this.itemId = itemId;
19226
      setItemIdIsSet(true);
19227
    }
19228
 
19229
    public void unsetItemId() {
19230
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
19231
    }
19232
 
19233
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
19234
    public boolean isSetItemId() {
19235
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
19236
    }
19237
 
19238
    public void setItemIdIsSet(boolean value) {
19239
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
19240
    }
19241
 
19242
    public long getQuantity() {
19243
      return this.quantity;
19244
    }
19245
 
19246
    public void setQuantity(long quantity) {
19247
      this.quantity = quantity;
19248
      setQuantityIsSet(true);
19249
    }
19250
 
19251
    public void unsetQuantity() {
19252
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
19253
    }
19254
 
19255
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
19256
    public boolean isSetQuantity() {
19257
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
19258
    }
19259
 
19260
    public void setQuantityIsSet(boolean value) {
19261
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
19262
    }
19263
 
19264
    public void setFieldValue(_Fields field, Object value) {
19265
      switch (field) {
19266
      case ITEM_ID:
19267
        if (value == null) {
19268
          unsetItemId();
19269
        } else {
19270
          setItemId((Long)value);
19271
        }
19272
        break;
19273
 
19274
      case QUANTITY:
19275
        if (value == null) {
19276
          unsetQuantity();
19277
        } else {
19278
          setQuantity((Long)value);
19279
        }
19280
        break;
19281
 
19282
      }
19283
    }
19284
 
19285
    public Object getFieldValue(_Fields field) {
19286
      switch (field) {
19287
      case ITEM_ID:
19288
        return Long.valueOf(getItemId());
19289
 
19290
      case QUANTITY:
19291
        return Long.valueOf(getQuantity());
19292
 
19293
      }
19294
      throw new IllegalStateException();
19295
    }
19296
 
19297
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19298
    public boolean isSet(_Fields field) {
19299
      if (field == null) {
19300
        throw new IllegalArgumentException();
19301
      }
19302
 
19303
      switch (field) {
19304
      case ITEM_ID:
19305
        return isSetItemId();
19306
      case QUANTITY:
19307
        return isSetQuantity();
19308
      }
19309
      throw new IllegalStateException();
19310
    }
19311
 
19312
    @Override
19313
    public boolean equals(Object that) {
19314
      if (that == null)
19315
        return false;
19316
      if (that instanceof fulfillPOForExtBilling_args)
19317
        return this.equals((fulfillPOForExtBilling_args)that);
19318
      return false;
19319
    }
19320
 
19321
    public boolean equals(fulfillPOForExtBilling_args that) {
19322
      if (that == null)
19323
        return false;
19324
 
19325
      boolean this_present_itemId = true;
19326
      boolean that_present_itemId = true;
19327
      if (this_present_itemId || that_present_itemId) {
19328
        if (!(this_present_itemId && that_present_itemId))
19329
          return false;
19330
        if (this.itemId != that.itemId)
19331
          return false;
19332
      }
19333
 
19334
      boolean this_present_quantity = true;
19335
      boolean that_present_quantity = true;
19336
      if (this_present_quantity || that_present_quantity) {
19337
        if (!(this_present_quantity && that_present_quantity))
19338
          return false;
19339
        if (this.quantity != that.quantity)
19340
          return false;
19341
      }
19342
 
19343
      return true;
19344
    }
19345
 
19346
    @Override
19347
    public int hashCode() {
19348
      return 0;
19349
    }
19350
 
19351
    public int compareTo(fulfillPOForExtBilling_args other) {
19352
      if (!getClass().equals(other.getClass())) {
19353
        return getClass().getName().compareTo(other.getClass().getName());
19354
      }
19355
 
19356
      int lastComparison = 0;
19357
      fulfillPOForExtBilling_args typedOther = (fulfillPOForExtBilling_args)other;
19358
 
19359
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
19360
      if (lastComparison != 0) {
19361
        return lastComparison;
19362
      }
19363
      if (isSetItemId()) {
19364
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
19365
        if (lastComparison != 0) {
19366
          return lastComparison;
19367
        }
19368
      }
19369
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
19370
      if (lastComparison != 0) {
19371
        return lastComparison;
19372
      }
19373
      if (isSetQuantity()) {
19374
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
19375
        if (lastComparison != 0) {
19376
          return lastComparison;
19377
        }
19378
      }
19379
      return 0;
19380
    }
19381
 
19382
    public _Fields fieldForId(int fieldId) {
19383
      return _Fields.findByThriftId(fieldId);
19384
    }
19385
 
19386
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19387
      org.apache.thrift.protocol.TField field;
19388
      iprot.readStructBegin();
19389
      while (true)
19390
      {
19391
        field = iprot.readFieldBegin();
19392
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19393
          break;
19394
        }
19395
        switch (field.id) {
19396
          case 1: // ITEM_ID
19397
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19398
              this.itemId = iprot.readI64();
19399
              setItemIdIsSet(true);
19400
            } else { 
19401
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19402
            }
19403
            break;
19404
          case 2: // QUANTITY
19405
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19406
              this.quantity = iprot.readI64();
19407
              setQuantityIsSet(true);
19408
            } else { 
19409
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19410
            }
19411
            break;
19412
          default:
19413
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19414
        }
19415
        iprot.readFieldEnd();
19416
      }
19417
      iprot.readStructEnd();
19418
      validate();
19419
    }
19420
 
19421
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19422
      validate();
19423
 
19424
      oprot.writeStructBegin(STRUCT_DESC);
19425
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
19426
      oprot.writeI64(this.itemId);
19427
      oprot.writeFieldEnd();
19428
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
19429
      oprot.writeI64(this.quantity);
19430
      oprot.writeFieldEnd();
19431
      oprot.writeFieldStop();
19432
      oprot.writeStructEnd();
19433
    }
19434
 
19435
    @Override
19436
    public String toString() {
19437
      StringBuilder sb = new StringBuilder("fulfillPOForExtBilling_args(");
19438
      boolean first = true;
19439
 
19440
      sb.append("itemId:");
19441
      sb.append(this.itemId);
19442
      first = false;
19443
      if (!first) sb.append(", ");
19444
      sb.append("quantity:");
19445
      sb.append(this.quantity);
19446
      first = false;
19447
      sb.append(")");
19448
      return sb.toString();
19449
    }
19450
 
19451
    public void validate() throws org.apache.thrift.TException {
19452
      // check for required fields
19453
    }
19454
 
19455
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19456
      try {
19457
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19458
      } catch (org.apache.thrift.TException te) {
19459
        throw new java.io.IOException(te);
19460
      }
19461
    }
19462
 
19463
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19464
      try {
19465
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
19466
        __isset_bit_vector = new BitSet(1);
19467
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19468
      } catch (org.apache.thrift.TException te) {
19469
        throw new java.io.IOException(te);
19470
      }
19471
    }
19472
 
19473
  }
19474
 
19475
  public static class fulfillPOForExtBilling_result implements org.apache.thrift.TBase<fulfillPOForExtBilling_result, fulfillPOForExtBilling_result._Fields>, java.io.Serializable, Cloneable   {
19476
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPOForExtBilling_result");
19477
 
19478
 
19479
 
19480
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19481
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19482
;
19483
 
19484
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19485
 
19486
      static {
19487
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19488
          byName.put(field.getFieldName(), field);
19489
        }
19490
      }
19491
 
19492
      /**
19493
       * Find the _Fields constant that matches fieldId, or null if its not found.
19494
       */
19495
      public static _Fields findByThriftId(int fieldId) {
19496
        switch(fieldId) {
19497
          default:
19498
            return null;
19499
        }
19500
      }
19501
 
19502
      /**
19503
       * Find the _Fields constant that matches fieldId, throwing an exception
19504
       * if it is not found.
19505
       */
19506
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19507
        _Fields fields = findByThriftId(fieldId);
19508
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19509
        return fields;
19510
      }
19511
 
19512
      /**
19513
       * Find the _Fields constant that matches name, or null if its not found.
19514
       */
19515
      public static _Fields findByName(String name) {
19516
        return byName.get(name);
19517
      }
19518
 
19519
      private final short _thriftId;
19520
      private final String _fieldName;
19521
 
19522
      _Fields(short thriftId, String fieldName) {
19523
        _thriftId = thriftId;
19524
        _fieldName = fieldName;
19525
      }
19526
 
19527
      public short getThriftFieldId() {
19528
        return _thriftId;
19529
      }
19530
 
19531
      public String getFieldName() {
19532
        return _fieldName;
19533
      }
19534
    }
19535
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19536
    static {
19537
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19538
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19539
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPOForExtBilling_result.class, metaDataMap);
19540
    }
19541
 
19542
    public fulfillPOForExtBilling_result() {
19543
    }
19544
 
19545
    /**
19546
     * Performs a deep copy on <i>other</i>.
19547
     */
19548
    public fulfillPOForExtBilling_result(fulfillPOForExtBilling_result other) {
19549
    }
19550
 
19551
    public fulfillPOForExtBilling_result deepCopy() {
19552
      return new fulfillPOForExtBilling_result(this);
19553
    }
19554
 
19555
    @Override
19556
    public void clear() {
19557
    }
19558
 
19559
    public void setFieldValue(_Fields field, Object value) {
19560
      switch (field) {
19561
      }
19562
    }
19563
 
19564
    public Object getFieldValue(_Fields field) {
19565
      switch (field) {
19566
      }
19567
      throw new IllegalStateException();
19568
    }
19569
 
19570
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19571
    public boolean isSet(_Fields field) {
19572
      if (field == null) {
19573
        throw new IllegalArgumentException();
19574
      }
19575
 
19576
      switch (field) {
19577
      }
19578
      throw new IllegalStateException();
19579
    }
19580
 
19581
    @Override
19582
    public boolean equals(Object that) {
19583
      if (that == null)
19584
        return false;
19585
      if (that instanceof fulfillPOForExtBilling_result)
19586
        return this.equals((fulfillPOForExtBilling_result)that);
19587
      return false;
19588
    }
19589
 
19590
    public boolean equals(fulfillPOForExtBilling_result that) {
19591
      if (that == null)
19592
        return false;
19593
 
19594
      return true;
19595
    }
19596
 
19597
    @Override
19598
    public int hashCode() {
19599
      return 0;
19600
    }
19601
 
19602
    public int compareTo(fulfillPOForExtBilling_result other) {
19603
      if (!getClass().equals(other.getClass())) {
19604
        return getClass().getName().compareTo(other.getClass().getName());
19605
      }
19606
 
19607
      int lastComparison = 0;
19608
      fulfillPOForExtBilling_result typedOther = (fulfillPOForExtBilling_result)other;
19609
 
19610
      return 0;
19611
    }
19612
 
19613
    public _Fields fieldForId(int fieldId) {
19614
      return _Fields.findByThriftId(fieldId);
19615
    }
19616
 
19617
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19618
      org.apache.thrift.protocol.TField field;
19619
      iprot.readStructBegin();
19620
      while (true)
19621
      {
19622
        field = iprot.readFieldBegin();
19623
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19624
          break;
19625
        }
19626
        switch (field.id) {
19627
          default:
19628
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19629
        }
19630
        iprot.readFieldEnd();
19631
      }
19632
      iprot.readStructEnd();
19633
      validate();
19634
    }
19635
 
19636
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19637
      oprot.writeStructBegin(STRUCT_DESC);
19638
 
19639
      oprot.writeFieldStop();
19640
      oprot.writeStructEnd();
19641
    }
19642
 
19643
    @Override
19644
    public String toString() {
19645
      StringBuilder sb = new StringBuilder("fulfillPOForExtBilling_result(");
19646
      boolean first = true;
19647
 
19648
      sb.append(")");
19649
      return sb.toString();
19650
    }
19651
 
19652
    public void validate() throws org.apache.thrift.TException {
19653
      // check for required fields
19654
    }
19655
 
19656
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19657
      try {
19658
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19659
      } catch (org.apache.thrift.TException te) {
19660
        throw new java.io.IOException(te);
19661
      }
19662
    }
19663
 
19664
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19665
      try {
19666
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19667
      } catch (org.apache.thrift.TException te) {
19668
        throw new java.io.IOException(te);
19669
      }
19670
    }
19671
 
19672
  }
19673
 
7410 amar.kumar 19674
  public static class closePO_args implements org.apache.thrift.TBase<closePO_args, closePO_args._Fields>, java.io.Serializable, Cloneable   {
19675
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePO_args");
19676
 
19677
    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);
19678
 
19679
    private long poId; // required
19680
 
19681
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19682
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19683
      PO_ID((short)1, "poId");
19684
 
19685
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19686
 
19687
      static {
19688
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19689
          byName.put(field.getFieldName(), field);
19690
        }
19691
      }
19692
 
19693
      /**
19694
       * Find the _Fields constant that matches fieldId, or null if its not found.
19695
       */
19696
      public static _Fields findByThriftId(int fieldId) {
19697
        switch(fieldId) {
19698
          case 1: // PO_ID
19699
            return PO_ID;
19700
          default:
19701
            return null;
19702
        }
19703
      }
19704
 
19705
      /**
19706
       * Find the _Fields constant that matches fieldId, throwing an exception
19707
       * if it is not found.
19708
       */
19709
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19710
        _Fields fields = findByThriftId(fieldId);
19711
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19712
        return fields;
19713
      }
19714
 
19715
      /**
19716
       * Find the _Fields constant that matches name, or null if its not found.
19717
       */
19718
      public static _Fields findByName(String name) {
19719
        return byName.get(name);
19720
      }
19721
 
19722
      private final short _thriftId;
19723
      private final String _fieldName;
19724
 
19725
      _Fields(short thriftId, String fieldName) {
19726
        _thriftId = thriftId;
19727
        _fieldName = fieldName;
19728
      }
19729
 
19730
      public short getThriftFieldId() {
19731
        return _thriftId;
19732
      }
19733
 
19734
      public String getFieldName() {
19735
        return _fieldName;
19736
      }
19737
    }
19738
 
19739
    // isset id assignments
19740
    private static final int __POID_ISSET_ID = 0;
19741
    private BitSet __isset_bit_vector = new BitSet(1);
19742
 
19743
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19744
    static {
19745
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19746
      tmpMap.put(_Fields.PO_ID, new org.apache.thrift.meta_data.FieldMetaData("poId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19747
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19748
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19749
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePO_args.class, metaDataMap);
19750
    }
19751
 
19752
    public closePO_args() {
19753
    }
19754
 
19755
    public closePO_args(
19756
      long poId)
19757
    {
19758
      this();
19759
      this.poId = poId;
19760
      setPoIdIsSet(true);
19761
    }
19762
 
19763
    /**
19764
     * Performs a deep copy on <i>other</i>.
19765
     */
19766
    public closePO_args(closePO_args other) {
19767
      __isset_bit_vector.clear();
19768
      __isset_bit_vector.or(other.__isset_bit_vector);
19769
      this.poId = other.poId;
19770
    }
19771
 
19772
    public closePO_args deepCopy() {
19773
      return new closePO_args(this);
19774
    }
19775
 
19776
    @Override
19777
    public void clear() {
19778
      setPoIdIsSet(false);
19779
      this.poId = 0;
19780
    }
19781
 
19782
    public long getPoId() {
19783
      return this.poId;
19784
    }
19785
 
19786
    public void setPoId(long poId) {
19787
      this.poId = poId;
19788
      setPoIdIsSet(true);
19789
    }
19790
 
19791
    public void unsetPoId() {
19792
      __isset_bit_vector.clear(__POID_ISSET_ID);
19793
    }
19794
 
19795
    /** Returns true if field poId is set (has been assigned a value) and false otherwise */
19796
    public boolean isSetPoId() {
19797
      return __isset_bit_vector.get(__POID_ISSET_ID);
19798
    }
19799
 
19800
    public void setPoIdIsSet(boolean value) {
19801
      __isset_bit_vector.set(__POID_ISSET_ID, value);
19802
    }
19803
 
19804
    public void setFieldValue(_Fields field, Object value) {
19805
      switch (field) {
19806
      case PO_ID:
19807
        if (value == null) {
19808
          unsetPoId();
19809
        } else {
19810
          setPoId((Long)value);
19811
        }
19812
        break;
19813
 
19814
      }
19815
    }
19816
 
19817
    public Object getFieldValue(_Fields field) {
19818
      switch (field) {
19819
      case PO_ID:
19820
        return Long.valueOf(getPoId());
19821
 
19822
      }
19823
      throw new IllegalStateException();
19824
    }
19825
 
19826
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19827
    public boolean isSet(_Fields field) {
19828
      if (field == null) {
19829
        throw new IllegalArgumentException();
19830
      }
19831
 
19832
      switch (field) {
19833
      case PO_ID:
19834
        return isSetPoId();
19835
      }
19836
      throw new IllegalStateException();
19837
    }
19838
 
19839
    @Override
19840
    public boolean equals(Object that) {
19841
      if (that == null)
19842
        return false;
19843
      if (that instanceof closePO_args)
19844
        return this.equals((closePO_args)that);
19845
      return false;
19846
    }
19847
 
19848
    public boolean equals(closePO_args that) {
19849
      if (that == null)
19850
        return false;
19851
 
19852
      boolean this_present_poId = true;
19853
      boolean that_present_poId = true;
19854
      if (this_present_poId || that_present_poId) {
19855
        if (!(this_present_poId && that_present_poId))
19856
          return false;
19857
        if (this.poId != that.poId)
19858
          return false;
19859
      }
19860
 
19861
      return true;
19862
    }
19863
 
19864
    @Override
19865
    public int hashCode() {
19866
      return 0;
19867
    }
19868
 
19869
    public int compareTo(closePO_args other) {
19870
      if (!getClass().equals(other.getClass())) {
19871
        return getClass().getName().compareTo(other.getClass().getName());
19872
      }
19873
 
19874
      int lastComparison = 0;
19875
      closePO_args typedOther = (closePO_args)other;
19876
 
19877
      lastComparison = Boolean.valueOf(isSetPoId()).compareTo(typedOther.isSetPoId());
19878
      if (lastComparison != 0) {
19879
        return lastComparison;
19880
      }
19881
      if (isSetPoId()) {
19882
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.poId, typedOther.poId);
19883
        if (lastComparison != 0) {
19884
          return lastComparison;
19885
        }
19886
      }
19887
      return 0;
19888
    }
19889
 
19890
    public _Fields fieldForId(int fieldId) {
19891
      return _Fields.findByThriftId(fieldId);
19892
    }
19893
 
19894
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19895
      org.apache.thrift.protocol.TField field;
19896
      iprot.readStructBegin();
19897
      while (true)
19898
      {
19899
        field = iprot.readFieldBegin();
19900
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19901
          break;
19902
        }
19903
        switch (field.id) {
19904
          case 1: // PO_ID
19905
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19906
              this.poId = iprot.readI64();
19907
              setPoIdIsSet(true);
19908
            } else { 
19909
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19910
            }
19911
            break;
19912
          default:
19913
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19914
        }
19915
        iprot.readFieldEnd();
19916
      }
19917
      iprot.readStructEnd();
19918
      validate();
19919
    }
19920
 
19921
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19922
      validate();
19923
 
19924
      oprot.writeStructBegin(STRUCT_DESC);
19925
      oprot.writeFieldBegin(PO_ID_FIELD_DESC);
19926
      oprot.writeI64(this.poId);
19927
      oprot.writeFieldEnd();
19928
      oprot.writeFieldStop();
19929
      oprot.writeStructEnd();
19930
    }
19931
 
19932
    @Override
19933
    public String toString() {
19934
      StringBuilder sb = new StringBuilder("closePO_args(");
19935
      boolean first = true;
19936
 
19937
      sb.append("poId:");
19938
      sb.append(this.poId);
19939
      first = false;
19940
      sb.append(")");
19941
      return sb.toString();
19942
    }
19943
 
19944
    public void validate() throws org.apache.thrift.TException {
19945
      // check for required fields
19946
    }
19947
 
19948
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19949
      try {
19950
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19951
      } catch (org.apache.thrift.TException te) {
19952
        throw new java.io.IOException(te);
19953
      }
19954
    }
19955
 
19956
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19957
      try {
20025 amit.gupta 19958
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
19959
        __isset_bit_vector = new BitSet(1);
7410 amar.kumar 19960
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19961
      } catch (org.apache.thrift.TException te) {
19962
        throw new java.io.IOException(te);
19963
      }
19964
    }
19965
 
19966
  }
19967
 
19968
  public static class closePO_result implements org.apache.thrift.TBase<closePO_result, closePO_result._Fields>, java.io.Serializable, Cloneable   {
19969
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePO_result");
19970
 
19971
    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);
19972
 
19973
    private PurchaseServiceException e; // required
19974
 
19975
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19976
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19977
      E((short)1, "e");
19978
 
19979
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19980
 
19981
      static {
19982
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19983
          byName.put(field.getFieldName(), field);
19984
        }
19985
      }
19986
 
19987
      /**
19988
       * Find the _Fields constant that matches fieldId, or null if its not found.
19989
       */
19990
      public static _Fields findByThriftId(int fieldId) {
19991
        switch(fieldId) {
19992
          case 1: // E
19993
            return E;
19994
          default:
19995
            return null;
19996
        }
19997
      }
19998
 
19999
      /**
20000
       * Find the _Fields constant that matches fieldId, throwing an exception
20001
       * if it is not found.
20002
       */
20003
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20004
        _Fields fields = findByThriftId(fieldId);
20005
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20006
        return fields;
20007
      }
20008
 
20009
      /**
20010
       * Find the _Fields constant that matches name, or null if its not found.
20011
       */
20012
      public static _Fields findByName(String name) {
20013
        return byName.get(name);
20014
      }
20015
 
20016
      private final short _thriftId;
20017
      private final String _fieldName;
20018
 
20019
      _Fields(short thriftId, String fieldName) {
20020
        _thriftId = thriftId;
20021
        _fieldName = fieldName;
20022
      }
20023
 
20024
      public short getThriftFieldId() {
20025
        return _thriftId;
20026
      }
20027
 
20028
      public String getFieldName() {
20029
        return _fieldName;
20030
      }
20031
    }
20032
 
20033
    // isset id assignments
20034
 
20035
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20036
    static {
20037
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20038
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20039
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
20040
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20041
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePO_result.class, metaDataMap);
20042
    }
20043
 
20044
    public closePO_result() {
20045
    }
20046
 
20047
    public closePO_result(
20048
      PurchaseServiceException e)
20049
    {
20050
      this();
20051
      this.e = e;
20052
    }
20053
 
20054
    /**
20055
     * Performs a deep copy on <i>other</i>.
20056
     */
20057
    public closePO_result(closePO_result other) {
20058
      if (other.isSetE()) {
20059
        this.e = new PurchaseServiceException(other.e);
20060
      }
20061
    }
20062
 
20063
    public closePO_result deepCopy() {
20064
      return new closePO_result(this);
20065
    }
20066
 
20067
    @Override
20068
    public void clear() {
20069
      this.e = null;
20070
    }
20071
 
20072
    public PurchaseServiceException getE() {
20073
      return this.e;
20074
    }
20075
 
20076
    public void setE(PurchaseServiceException e) {
20077
      this.e = e;
20078
    }
20079
 
20080
    public void unsetE() {
20081
      this.e = null;
20082
    }
20083
 
20084
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
20085
    public boolean isSetE() {
20086
      return this.e != null;
20087
    }
20088
 
20089
    public void setEIsSet(boolean value) {
20090
      if (!value) {
20091
        this.e = null;
20092
      }
20093
    }
20094
 
20095
    public void setFieldValue(_Fields field, Object value) {
20096
      switch (field) {
20097
      case E:
20098
        if (value == null) {
20099
          unsetE();
20100
        } else {
20101
          setE((PurchaseServiceException)value);
20102
        }
20103
        break;
20104
 
20105
      }
20106
    }
20107
 
20108
    public Object getFieldValue(_Fields field) {
20109
      switch (field) {
20110
      case E:
20111
        return getE();
20112
 
20113
      }
20114
      throw new IllegalStateException();
20115
    }
20116
 
20117
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20118
    public boolean isSet(_Fields field) {
20119
      if (field == null) {
20120
        throw new IllegalArgumentException();
20121
      }
20122
 
20123
      switch (field) {
20124
      case E:
20125
        return isSetE();
20126
      }
20127
      throw new IllegalStateException();
20128
    }
20129
 
20130
    @Override
20131
    public boolean equals(Object that) {
20132
      if (that == null)
20133
        return false;
20134
      if (that instanceof closePO_result)
20135
        return this.equals((closePO_result)that);
20136
      return false;
20137
    }
20138
 
20139
    public boolean equals(closePO_result that) {
20140
      if (that == null)
20141
        return false;
20142
 
20143
      boolean this_present_e = true && this.isSetE();
20144
      boolean that_present_e = true && that.isSetE();
20145
      if (this_present_e || that_present_e) {
20146
        if (!(this_present_e && that_present_e))
20147
          return false;
20148
        if (!this.e.equals(that.e))
20149
          return false;
20150
      }
20151
 
20152
      return true;
20153
    }
20154
 
20155
    @Override
20156
    public int hashCode() {
20157
      return 0;
20158
    }
20159
 
20160
    public int compareTo(closePO_result other) {
20161
      if (!getClass().equals(other.getClass())) {
20162
        return getClass().getName().compareTo(other.getClass().getName());
20163
      }
20164
 
20165
      int lastComparison = 0;
20166
      closePO_result typedOther = (closePO_result)other;
20167
 
20168
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
20169
      if (lastComparison != 0) {
20170
        return lastComparison;
20171
      }
20172
      if (isSetE()) {
20173
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
20174
        if (lastComparison != 0) {
20175
          return lastComparison;
20176
        }
20177
      }
20178
      return 0;
20179
    }
20180
 
20181
    public _Fields fieldForId(int fieldId) {
20182
      return _Fields.findByThriftId(fieldId);
20183
    }
20184
 
20185
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20186
      org.apache.thrift.protocol.TField field;
20187
      iprot.readStructBegin();
20188
      while (true)
20189
      {
20190
        field = iprot.readFieldBegin();
20191
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20192
          break;
20193
        }
20194
        switch (field.id) {
20195
          case 1: // E
20196
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
20197
              this.e = new PurchaseServiceException();
20198
              this.e.read(iprot);
20199
            } else { 
20200
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20201
            }
20202
            break;
20203
          default:
20204
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20205
        }
20206
        iprot.readFieldEnd();
20207
      }
20208
      iprot.readStructEnd();
20209
      validate();
20210
    }
20211
 
20212
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20213
      oprot.writeStructBegin(STRUCT_DESC);
20214
 
20215
      if (this.isSetE()) {
20216
        oprot.writeFieldBegin(E_FIELD_DESC);
20217
        this.e.write(oprot);
20218
        oprot.writeFieldEnd();
20219
      }
20220
      oprot.writeFieldStop();
20221
      oprot.writeStructEnd();
20222
    }
20223
 
20224
    @Override
20225
    public String toString() {
20226
      StringBuilder sb = new StringBuilder("closePO_result(");
20227
      boolean first = true;
20228
 
20229
      sb.append("e:");
20230
      if (this.e == null) {
20231
        sb.append("null");
20232
      } else {
20233
        sb.append(this.e);
20234
      }
20235
      first = false;
20236
      sb.append(")");
20237
      return sb.toString();
20238
    }
20239
 
20240
    public void validate() throws org.apache.thrift.TException {
20241
      // check for required fields
20242
    }
20243
 
20244
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20245
      try {
20246
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20247
      } catch (org.apache.thrift.TException te) {
20248
        throw new java.io.IOException(te);
20249
      }
20250
    }
20251
 
20252
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20253
      try {
20254
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20255
      } catch (org.apache.thrift.TException te) {
20256
        throw new java.io.IOException(te);
20257
      }
20258
    }
20259
 
20260
  }
20261
 
20262
  public static class isInvoiceReceived_args implements org.apache.thrift.TBase<isInvoiceReceived_args, isInvoiceReceived_args._Fields>, java.io.Serializable, Cloneable   {
20263
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isInvoiceReceived_args");
20264
 
20265
    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);
20266
    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);
20267
 
20268
    private String invoiceNumber; // required
20269
    private long supplierId; // required
20270
 
20271
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20272
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20273
      INVOICE_NUMBER((short)1, "invoiceNumber"),
20274
      SUPPLIER_ID((short)2, "supplierId");
20275
 
20276
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20277
 
20278
      static {
20279
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20280
          byName.put(field.getFieldName(), field);
20281
        }
20282
      }
20283
 
20284
      /**
20285
       * Find the _Fields constant that matches fieldId, or null if its not found.
20286
       */
20287
      public static _Fields findByThriftId(int fieldId) {
20288
        switch(fieldId) {
20289
          case 1: // INVOICE_NUMBER
20290
            return INVOICE_NUMBER;
20291
          case 2: // SUPPLIER_ID
20292
            return SUPPLIER_ID;
20293
          default:
20294
            return null;
20295
        }
20296
      }
20297
 
20298
      /**
20299
       * Find the _Fields constant that matches fieldId, throwing an exception
20300
       * if it is not found.
20301
       */
20302
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20303
        _Fields fields = findByThriftId(fieldId);
20304
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20305
        return fields;
20306
      }
20307
 
20308
      /**
20309
       * Find the _Fields constant that matches name, or null if its not found.
20310
       */
20311
      public static _Fields findByName(String name) {
20312
        return byName.get(name);
20313
      }
20314
 
20315
      private final short _thriftId;
20316
      private final String _fieldName;
20317
 
20318
      _Fields(short thriftId, String fieldName) {
20319
        _thriftId = thriftId;
20320
        _fieldName = fieldName;
20321
      }
20322
 
20323
      public short getThriftFieldId() {
20324
        return _thriftId;
20325
      }
20326
 
20327
      public String getFieldName() {
20328
        return _fieldName;
20329
      }
20330
    }
20331
 
20332
    // isset id assignments
20333
    private static final int __SUPPLIERID_ISSET_ID = 0;
20334
    private BitSet __isset_bit_vector = new BitSet(1);
20335
 
20336
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20337
    static {
20338
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20339
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20340
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
20341
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20342
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
20343
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20344
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isInvoiceReceived_args.class, metaDataMap);
20345
    }
20346
 
20347
    public isInvoiceReceived_args() {
20348
    }
20349
 
20350
    public isInvoiceReceived_args(
20351
      String invoiceNumber,
20352
      long supplierId)
20353
    {
20354
      this();
20355
      this.invoiceNumber = invoiceNumber;
20356
      this.supplierId = supplierId;
20357
      setSupplierIdIsSet(true);
20358
    }
20359
 
20360
    /**
20361
     * Performs a deep copy on <i>other</i>.
20362
     */
20363
    public isInvoiceReceived_args(isInvoiceReceived_args other) {
20364
      __isset_bit_vector.clear();
20365
      __isset_bit_vector.or(other.__isset_bit_vector);
20366
      if (other.isSetInvoiceNumber()) {
20367
        this.invoiceNumber = other.invoiceNumber;
20368
      }
20369
      this.supplierId = other.supplierId;
20370
    }
20371
 
20372
    public isInvoiceReceived_args deepCopy() {
20373
      return new isInvoiceReceived_args(this);
20374
    }
20375
 
20376
    @Override
20377
    public void clear() {
20378
      this.invoiceNumber = null;
20379
      setSupplierIdIsSet(false);
20380
      this.supplierId = 0;
20381
    }
20382
 
20383
    public String getInvoiceNumber() {
20384
      return this.invoiceNumber;
20385
    }
20386
 
20387
    public void setInvoiceNumber(String invoiceNumber) {
20388
      this.invoiceNumber = invoiceNumber;
20389
    }
20390
 
20391
    public void unsetInvoiceNumber() {
20392
      this.invoiceNumber = null;
20393
    }
20394
 
20395
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
20396
    public boolean isSetInvoiceNumber() {
20397
      return this.invoiceNumber != null;
20398
    }
20399
 
20400
    public void setInvoiceNumberIsSet(boolean value) {
20401
      if (!value) {
20402
        this.invoiceNumber = null;
20403
      }
20404
    }
20405
 
20406
    public long getSupplierId() {
20407
      return this.supplierId;
20408
    }
20409
 
20410
    public void setSupplierId(long supplierId) {
20411
      this.supplierId = supplierId;
20412
      setSupplierIdIsSet(true);
20413
    }
20414
 
20415
    public void unsetSupplierId() {
20416
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
20417
    }
20418
 
20419
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
20420
    public boolean isSetSupplierId() {
20421
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
20422
    }
20423
 
20424
    public void setSupplierIdIsSet(boolean value) {
20425
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
20426
    }
20427
 
20428
    public void setFieldValue(_Fields field, Object value) {
20429
      switch (field) {
20430
      case INVOICE_NUMBER:
20431
        if (value == null) {
20432
          unsetInvoiceNumber();
20433
        } else {
20434
          setInvoiceNumber((String)value);
20435
        }
20436
        break;
20437
 
20438
      case SUPPLIER_ID:
20439
        if (value == null) {
20440
          unsetSupplierId();
20441
        } else {
20442
          setSupplierId((Long)value);
20443
        }
20444
        break;
20445
 
20446
      }
20447
    }
20448
 
20449
    public Object getFieldValue(_Fields field) {
20450
      switch (field) {
20451
      case INVOICE_NUMBER:
20452
        return getInvoiceNumber();
20453
 
20454
      case SUPPLIER_ID:
20455
        return Long.valueOf(getSupplierId());
20456
 
20457
      }
20458
      throw new IllegalStateException();
20459
    }
20460
 
20461
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20462
    public boolean isSet(_Fields field) {
20463
      if (field == null) {
20464
        throw new IllegalArgumentException();
20465
      }
20466
 
20467
      switch (field) {
20468
      case INVOICE_NUMBER:
20469
        return isSetInvoiceNumber();
20470
      case SUPPLIER_ID:
20471
        return isSetSupplierId();
20472
      }
20473
      throw new IllegalStateException();
20474
    }
20475
 
20476
    @Override
20477
    public boolean equals(Object that) {
20478
      if (that == null)
20479
        return false;
20480
      if (that instanceof isInvoiceReceived_args)
20481
        return this.equals((isInvoiceReceived_args)that);
20482
      return false;
20483
    }
20484
 
20485
    public boolean equals(isInvoiceReceived_args that) {
20486
      if (that == null)
20487
        return false;
20488
 
20489
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
20490
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
20491
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
20492
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
20493
          return false;
20494
        if (!this.invoiceNumber.equals(that.invoiceNumber))
20495
          return false;
20496
      }
20497
 
20498
      boolean this_present_supplierId = true;
20499
      boolean that_present_supplierId = true;
20500
      if (this_present_supplierId || that_present_supplierId) {
20501
        if (!(this_present_supplierId && that_present_supplierId))
20502
          return false;
20503
        if (this.supplierId != that.supplierId)
20504
          return false;
20505
      }
20506
 
20507
      return true;
20508
    }
20509
 
20510
    @Override
20511
    public int hashCode() {
20512
      return 0;
20513
    }
20514
 
20515
    public int compareTo(isInvoiceReceived_args other) {
20516
      if (!getClass().equals(other.getClass())) {
20517
        return getClass().getName().compareTo(other.getClass().getName());
20518
      }
20519
 
20520
      int lastComparison = 0;
20521
      isInvoiceReceived_args typedOther = (isInvoiceReceived_args)other;
20522
 
20523
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
20524
      if (lastComparison != 0) {
20525
        return lastComparison;
20526
      }
20527
      if (isSetInvoiceNumber()) {
20528
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
20529
        if (lastComparison != 0) {
20530
          return lastComparison;
20531
        }
20532
      }
20533
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
20534
      if (lastComparison != 0) {
20535
        return lastComparison;
20536
      }
20537
      if (isSetSupplierId()) {
20538
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
20539
        if (lastComparison != 0) {
20540
          return lastComparison;
20541
        }
20542
      }
20543
      return 0;
20544
    }
20545
 
20546
    public _Fields fieldForId(int fieldId) {
20547
      return _Fields.findByThriftId(fieldId);
20548
    }
20549
 
20550
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20551
      org.apache.thrift.protocol.TField field;
20552
      iprot.readStructBegin();
20553
      while (true)
20554
      {
20555
        field = iprot.readFieldBegin();
20556
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20557
          break;
20558
        }
20559
        switch (field.id) {
20560
          case 1: // INVOICE_NUMBER
20561
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
20562
              this.invoiceNumber = iprot.readString();
20563
            } else { 
20564
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20565
            }
20566
            break;
20567
          case 2: // SUPPLIER_ID
20568
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20569
              this.supplierId = iprot.readI64();
20570
              setSupplierIdIsSet(true);
20571
            } else { 
20572
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20573
            }
20574
            break;
20575
          default:
20576
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20577
        }
20578
        iprot.readFieldEnd();
20579
      }
20580
      iprot.readStructEnd();
20581
      validate();
20582
    }
20583
 
20584
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20585
      validate();
20586
 
20587
      oprot.writeStructBegin(STRUCT_DESC);
20588
      if (this.invoiceNumber != null) {
20589
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
20590
        oprot.writeString(this.invoiceNumber);
20591
        oprot.writeFieldEnd();
20592
      }
20593
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
20594
      oprot.writeI64(this.supplierId);
20595
      oprot.writeFieldEnd();
20596
      oprot.writeFieldStop();
20597
      oprot.writeStructEnd();
20598
    }
20599
 
20600
    @Override
20601
    public String toString() {
20602
      StringBuilder sb = new StringBuilder("isInvoiceReceived_args(");
20603
      boolean first = true;
20604
 
20605
      sb.append("invoiceNumber:");
20606
      if (this.invoiceNumber == null) {
20607
        sb.append("null");
20608
      } else {
20609
        sb.append(this.invoiceNumber);
20610
      }
20611
      first = false;
20612
      if (!first) sb.append(", ");
20613
      sb.append("supplierId:");
20614
      sb.append(this.supplierId);
20615
      first = false;
20616
      sb.append(")");
20617
      return sb.toString();
20618
    }
20619
 
20620
    public void validate() throws org.apache.thrift.TException {
20621
      // check for required fields
20622
    }
20623
 
20624
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20625
      try {
20626
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20627
      } catch (org.apache.thrift.TException te) {
20628
        throw new java.io.IOException(te);
20629
      }
20630
    }
20631
 
20632
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20633
      try {
20025 amit.gupta 20634
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
20635
        __isset_bit_vector = new BitSet(1);
7410 amar.kumar 20636
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20637
      } catch (org.apache.thrift.TException te) {
20638
        throw new java.io.IOException(te);
20639
      }
20640
    }
20641
 
20642
  }
20643
 
20644
  public static class isInvoiceReceived_result implements org.apache.thrift.TBase<isInvoiceReceived_result, isInvoiceReceived_result._Fields>, java.io.Serializable, Cloneable   {
20645
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isInvoiceReceived_result");
20646
 
20647
    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);
20648
 
20649
    private boolean success; // required
20650
 
20651
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20652
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20653
      SUCCESS((short)0, "success");
20654
 
20655
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20656
 
20657
      static {
20658
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20659
          byName.put(field.getFieldName(), field);
20660
        }
20661
      }
20662
 
20663
      /**
20664
       * Find the _Fields constant that matches fieldId, or null if its not found.
20665
       */
20666
      public static _Fields findByThriftId(int fieldId) {
20667
        switch(fieldId) {
20668
          case 0: // SUCCESS
20669
            return SUCCESS;
20670
          default:
20671
            return null;
20672
        }
20673
      }
20674
 
20675
      /**
20676
       * Find the _Fields constant that matches fieldId, throwing an exception
20677
       * if it is not found.
20678
       */
20679
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20680
        _Fields fields = findByThriftId(fieldId);
20681
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20682
        return fields;
20683
      }
20684
 
20685
      /**
20686
       * Find the _Fields constant that matches name, or null if its not found.
20687
       */
20688
      public static _Fields findByName(String name) {
20689
        return byName.get(name);
20690
      }
20691
 
20692
      private final short _thriftId;
20693
      private final String _fieldName;
20694
 
20695
      _Fields(short thriftId, String fieldName) {
20696
        _thriftId = thriftId;
20697
        _fieldName = fieldName;
20698
      }
20699
 
20700
      public short getThriftFieldId() {
20701
        return _thriftId;
20702
      }
20703
 
20704
      public String getFieldName() {
20705
        return _fieldName;
20706
      }
20707
    }
20708
 
20709
    // isset id assignments
20710
    private static final int __SUCCESS_ISSET_ID = 0;
20711
    private BitSet __isset_bit_vector = new BitSet(1);
20712
 
20713
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20714
    static {
20715
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20716
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20717
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
20718
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20719
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isInvoiceReceived_result.class, metaDataMap);
20720
    }
20721
 
20722
    public isInvoiceReceived_result() {
20723
    }
20724
 
20725
    public isInvoiceReceived_result(
20726
      boolean success)
20727
    {
20728
      this();
20729
      this.success = success;
20730
      setSuccessIsSet(true);
20731
    }
20732
 
20733
    /**
20734
     * Performs a deep copy on <i>other</i>.
20735
     */
20736
    public isInvoiceReceived_result(isInvoiceReceived_result other) {
20737
      __isset_bit_vector.clear();
20738
      __isset_bit_vector.or(other.__isset_bit_vector);
20739
      this.success = other.success;
20740
    }
20741
 
20742
    public isInvoiceReceived_result deepCopy() {
20743
      return new isInvoiceReceived_result(this);
20744
    }
20745
 
20746
    @Override
20747
    public void clear() {
20748
      setSuccessIsSet(false);
20749
      this.success = false;
20750
    }
20751
 
20752
    public boolean isSuccess() {
20753
      return this.success;
20754
    }
20755
 
20756
    public void setSuccess(boolean success) {
20757
      this.success = success;
20758
      setSuccessIsSet(true);
20759
    }
20760
 
20761
    public void unsetSuccess() {
20762
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
20763
    }
20764
 
20765
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
20766
    public boolean isSetSuccess() {
20767
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
20768
    }
20769
 
20770
    public void setSuccessIsSet(boolean value) {
20771
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
20772
    }
20773
 
20774
    public void setFieldValue(_Fields field, Object value) {
20775
      switch (field) {
20776
      case SUCCESS:
20777
        if (value == null) {
20778
          unsetSuccess();
20779
        } else {
20780
          setSuccess((Boolean)value);
20781
        }
20782
        break;
20783
 
20784
      }
20785
    }
20786
 
20787
    public Object getFieldValue(_Fields field) {
20788
      switch (field) {
20789
      case SUCCESS:
20790
        return Boolean.valueOf(isSuccess());
20791
 
20792
      }
20793
      throw new IllegalStateException();
20794
    }
20795
 
20796
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20797
    public boolean isSet(_Fields field) {
20798
      if (field == null) {
20799
        throw new IllegalArgumentException();
20800
      }
20801
 
20802
      switch (field) {
20803
      case SUCCESS:
20804
        return isSetSuccess();
20805
      }
20806
      throw new IllegalStateException();
20807
    }
20808
 
20809
    @Override
20810
    public boolean equals(Object that) {
20811
      if (that == null)
20812
        return false;
20813
      if (that instanceof isInvoiceReceived_result)
20814
        return this.equals((isInvoiceReceived_result)that);
20815
      return false;
20816
    }
20817
 
20818
    public boolean equals(isInvoiceReceived_result that) {
20819
      if (that == null)
20820
        return false;
20821
 
20822
      boolean this_present_success = true;
20823
      boolean that_present_success = true;
20824
      if (this_present_success || that_present_success) {
20825
        if (!(this_present_success && that_present_success))
20826
          return false;
20827
        if (this.success != that.success)
20828
          return false;
20829
      }
20830
 
20831
      return true;
20832
    }
20833
 
20834
    @Override
20835
    public int hashCode() {
20836
      return 0;
20837
    }
20838
 
20839
    public int compareTo(isInvoiceReceived_result other) {
20840
      if (!getClass().equals(other.getClass())) {
20841
        return getClass().getName().compareTo(other.getClass().getName());
20842
      }
20843
 
20844
      int lastComparison = 0;
20845
      isInvoiceReceived_result typedOther = (isInvoiceReceived_result)other;
20846
 
20847
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
20848
      if (lastComparison != 0) {
20849
        return lastComparison;
20850
      }
20851
      if (isSetSuccess()) {
20852
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
20853
        if (lastComparison != 0) {
20854
          return lastComparison;
20855
        }
20856
      }
20857
      return 0;
20858
    }
20859
 
20860
    public _Fields fieldForId(int fieldId) {
20861
      return _Fields.findByThriftId(fieldId);
20862
    }
20863
 
20864
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20865
      org.apache.thrift.protocol.TField field;
20866
      iprot.readStructBegin();
20867
      while (true)
20868
      {
20869
        field = iprot.readFieldBegin();
20870
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20871
          break;
20872
        }
20873
        switch (field.id) {
20874
          case 0: // SUCCESS
20875
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
20876
              this.success = iprot.readBool();
20877
              setSuccessIsSet(true);
20878
            } else { 
20879
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20880
            }
20881
            break;
20882
          default:
20883
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20884
        }
20885
        iprot.readFieldEnd();
20886
      }
20887
      iprot.readStructEnd();
20888
      validate();
20889
    }
20890
 
20891
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20892
      oprot.writeStructBegin(STRUCT_DESC);
20893
 
20894
      if (this.isSetSuccess()) {
20895
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20896
        oprot.writeBool(this.success);
20897
        oprot.writeFieldEnd();
20898
      }
20899
      oprot.writeFieldStop();
20900
      oprot.writeStructEnd();
20901
    }
20902
 
20903
    @Override
20904
    public String toString() {
20905
      StringBuilder sb = new StringBuilder("isInvoiceReceived_result(");
20906
      boolean first = true;
20907
 
20908
      sb.append("success:");
20909
      sb.append(this.success);
20910
      first = false;
20911
      sb.append(")");
20912
      return sb.toString();
20913
    }
20914
 
20915
    public void validate() throws org.apache.thrift.TException {
20916
      // check for required fields
20917
    }
20918
 
20919
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20920
      try {
20921
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20922
      } catch (org.apache.thrift.TException te) {
20923
        throw new java.io.IOException(te);
20924
      }
20925
    }
20926
 
20927
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20928
      try {
20929
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20930
      } catch (org.apache.thrift.TException te) {
20931
        throw new java.io.IOException(te);
20932
      }
20933
    }
20934
 
20935
  }
20936
 
9829 amar.kumar 20937
  public static class changeWarehouseForPO_args implements org.apache.thrift.TBase<changeWarehouseForPO_args, changeWarehouseForPO_args._Fields>, java.io.Serializable, Cloneable   {
20938
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changeWarehouseForPO_args");
20939
 
20940
    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);
20941
    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);
20942
 
20943
    private long id; // required
20944
    private long warehouseId; // required
20945
 
20946
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20947
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20948
      ID((short)1, "id"),
20949
      WAREHOUSE_ID((short)2, "warehouseId");
20950
 
20951
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20952
 
20953
      static {
20954
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20955
          byName.put(field.getFieldName(), field);
20956
        }
20957
      }
20958
 
20959
      /**
20960
       * Find the _Fields constant that matches fieldId, or null if its not found.
20961
       */
20962
      public static _Fields findByThriftId(int fieldId) {
20963
        switch(fieldId) {
20964
          case 1: // ID
20965
            return ID;
20966
          case 2: // WAREHOUSE_ID
20967
            return WAREHOUSE_ID;
20968
          default:
20969
            return null;
20970
        }
20971
      }
20972
 
20973
      /**
20974
       * Find the _Fields constant that matches fieldId, throwing an exception
20975
       * if it is not found.
20976
       */
20977
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20978
        _Fields fields = findByThriftId(fieldId);
20979
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20980
        return fields;
20981
      }
20982
 
20983
      /**
20984
       * Find the _Fields constant that matches name, or null if its not found.
20985
       */
20986
      public static _Fields findByName(String name) {
20987
        return byName.get(name);
20988
      }
20989
 
20990
      private final short _thriftId;
20991
      private final String _fieldName;
20992
 
20993
      _Fields(short thriftId, String fieldName) {
20994
        _thriftId = thriftId;
20995
        _fieldName = fieldName;
20996
      }
20997
 
20998
      public short getThriftFieldId() {
20999
        return _thriftId;
21000
      }
21001
 
21002
      public String getFieldName() {
21003
        return _fieldName;
21004
      }
21005
    }
21006
 
21007
    // isset id assignments
21008
    private static final int __ID_ISSET_ID = 0;
21009
    private static final int __WAREHOUSEID_ISSET_ID = 1;
21010
    private BitSet __isset_bit_vector = new BitSet(2);
21011
 
21012
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21013
    static {
21014
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
21015
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21016
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
21017
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21018
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
21019
      metaDataMap = Collections.unmodifiableMap(tmpMap);
21020
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changeWarehouseForPO_args.class, metaDataMap);
21021
    }
21022
 
21023
    public changeWarehouseForPO_args() {
21024
    }
21025
 
21026
    public changeWarehouseForPO_args(
21027
      long id,
21028
      long warehouseId)
21029
    {
21030
      this();
21031
      this.id = id;
21032
      setIdIsSet(true);
21033
      this.warehouseId = warehouseId;
21034
      setWarehouseIdIsSet(true);
21035
    }
21036
 
21037
    /**
21038
     * Performs a deep copy on <i>other</i>.
21039
     */
21040
    public changeWarehouseForPO_args(changeWarehouseForPO_args other) {
21041
      __isset_bit_vector.clear();
21042
      __isset_bit_vector.or(other.__isset_bit_vector);
21043
      this.id = other.id;
21044
      this.warehouseId = other.warehouseId;
21045
    }
21046
 
21047
    public changeWarehouseForPO_args deepCopy() {
21048
      return new changeWarehouseForPO_args(this);
21049
    }
21050
 
21051
    @Override
21052
    public void clear() {
21053
      setIdIsSet(false);
21054
      this.id = 0;
21055
      setWarehouseIdIsSet(false);
21056
      this.warehouseId = 0;
21057
    }
21058
 
21059
    public long getId() {
21060
      return this.id;
21061
    }
21062
 
21063
    public void setId(long id) {
21064
      this.id = id;
21065
      setIdIsSet(true);
21066
    }
21067
 
21068
    public void unsetId() {
21069
      __isset_bit_vector.clear(__ID_ISSET_ID);
21070
    }
21071
 
21072
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
21073
    public boolean isSetId() {
21074
      return __isset_bit_vector.get(__ID_ISSET_ID);
21075
    }
21076
 
21077
    public void setIdIsSet(boolean value) {
21078
      __isset_bit_vector.set(__ID_ISSET_ID, value);
21079
    }
21080
 
21081
    public long getWarehouseId() {
21082
      return this.warehouseId;
21083
    }
21084
 
21085
    public void setWarehouseId(long warehouseId) {
21086
      this.warehouseId = warehouseId;
21087
      setWarehouseIdIsSet(true);
21088
    }
21089
 
21090
    public void unsetWarehouseId() {
21091
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
21092
    }
21093
 
21094
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
21095
    public boolean isSetWarehouseId() {
21096
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
21097
    }
21098
 
21099
    public void setWarehouseIdIsSet(boolean value) {
21100
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
21101
    }
21102
 
21103
    public void setFieldValue(_Fields field, Object value) {
21104
      switch (field) {
21105
      case ID:
21106
        if (value == null) {
21107
          unsetId();
21108
        } else {
21109
          setId((Long)value);
21110
        }
21111
        break;
21112
 
21113
      case WAREHOUSE_ID:
21114
        if (value == null) {
21115
          unsetWarehouseId();
21116
        } else {
21117
          setWarehouseId((Long)value);
21118
        }
21119
        break;
21120
 
21121
      }
21122
    }
21123
 
21124
    public Object getFieldValue(_Fields field) {
21125
      switch (field) {
21126
      case ID:
21127
        return Long.valueOf(getId());
21128
 
21129
      case WAREHOUSE_ID:
21130
        return Long.valueOf(getWarehouseId());
21131
 
21132
      }
21133
      throw new IllegalStateException();
21134
    }
21135
 
21136
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21137
    public boolean isSet(_Fields field) {
21138
      if (field == null) {
21139
        throw new IllegalArgumentException();
21140
      }
21141
 
21142
      switch (field) {
21143
      case ID:
21144
        return isSetId();
21145
      case WAREHOUSE_ID:
21146
        return isSetWarehouseId();
21147
      }
21148
      throw new IllegalStateException();
21149
    }
21150
 
21151
    @Override
21152
    public boolean equals(Object that) {
21153
      if (that == null)
21154
        return false;
21155
      if (that instanceof changeWarehouseForPO_args)
21156
        return this.equals((changeWarehouseForPO_args)that);
21157
      return false;
21158
    }
21159
 
21160
    public boolean equals(changeWarehouseForPO_args that) {
21161
      if (that == null)
21162
        return false;
21163
 
21164
      boolean this_present_id = true;
21165
      boolean that_present_id = true;
21166
      if (this_present_id || that_present_id) {
21167
        if (!(this_present_id && that_present_id))
21168
          return false;
21169
        if (this.id != that.id)
21170
          return false;
21171
      }
21172
 
21173
      boolean this_present_warehouseId = true;
21174
      boolean that_present_warehouseId = true;
21175
      if (this_present_warehouseId || that_present_warehouseId) {
21176
        if (!(this_present_warehouseId && that_present_warehouseId))
21177
          return false;
21178
        if (this.warehouseId != that.warehouseId)
21179
          return false;
21180
      }
21181
 
21182
      return true;
21183
    }
21184
 
21185
    @Override
21186
    public int hashCode() {
21187
      return 0;
21188
    }
21189
 
21190
    public int compareTo(changeWarehouseForPO_args other) {
21191
      if (!getClass().equals(other.getClass())) {
21192
        return getClass().getName().compareTo(other.getClass().getName());
21193
      }
21194
 
21195
      int lastComparison = 0;
21196
      changeWarehouseForPO_args typedOther = (changeWarehouseForPO_args)other;
21197
 
21198
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
21199
      if (lastComparison != 0) {
21200
        return lastComparison;
21201
      }
21202
      if (isSetId()) {
21203
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
21204
        if (lastComparison != 0) {
21205
          return lastComparison;
21206
        }
21207
      }
21208
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
21209
      if (lastComparison != 0) {
21210
        return lastComparison;
21211
      }
21212
      if (isSetWarehouseId()) {
21213
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
21214
        if (lastComparison != 0) {
21215
          return lastComparison;
21216
        }
21217
      }
21218
      return 0;
21219
    }
21220
 
21221
    public _Fields fieldForId(int fieldId) {
21222
      return _Fields.findByThriftId(fieldId);
21223
    }
21224
 
21225
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
21226
      org.apache.thrift.protocol.TField field;
21227
      iprot.readStructBegin();
21228
      while (true)
21229
      {
21230
        field = iprot.readFieldBegin();
21231
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
21232
          break;
21233
        }
21234
        switch (field.id) {
21235
          case 1: // ID
21236
            if (field.type == org.apache.thrift.protocol.TType.I64) {
21237
              this.id = iprot.readI64();
21238
              setIdIsSet(true);
21239
            } else { 
21240
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21241
            }
21242
            break;
21243
          case 2: // WAREHOUSE_ID
21244
            if (field.type == org.apache.thrift.protocol.TType.I64) {
21245
              this.warehouseId = iprot.readI64();
21246
              setWarehouseIdIsSet(true);
21247
            } else { 
21248
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21249
            }
21250
            break;
21251
          default:
21252
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21253
        }
21254
        iprot.readFieldEnd();
21255
      }
21256
      iprot.readStructEnd();
21257
      validate();
21258
    }
21259
 
21260
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
21261
      validate();
21262
 
21263
      oprot.writeStructBegin(STRUCT_DESC);
21264
      oprot.writeFieldBegin(ID_FIELD_DESC);
21265
      oprot.writeI64(this.id);
21266
      oprot.writeFieldEnd();
21267
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
21268
      oprot.writeI64(this.warehouseId);
21269
      oprot.writeFieldEnd();
21270
      oprot.writeFieldStop();
21271
      oprot.writeStructEnd();
21272
    }
21273
 
21274
    @Override
21275
    public String toString() {
21276
      StringBuilder sb = new StringBuilder("changeWarehouseForPO_args(");
21277
      boolean first = true;
21278
 
21279
      sb.append("id:");
21280
      sb.append(this.id);
21281
      first = false;
21282
      if (!first) sb.append(", ");
21283
      sb.append("warehouseId:");
21284
      sb.append(this.warehouseId);
21285
      first = false;
21286
      sb.append(")");
21287
      return sb.toString();
21288
    }
21289
 
21290
    public void validate() throws org.apache.thrift.TException {
21291
      // check for required fields
21292
    }
21293
 
21294
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21295
      try {
21296
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21297
      } catch (org.apache.thrift.TException te) {
21298
        throw new java.io.IOException(te);
21299
      }
21300
    }
21301
 
21302
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
21303
      try {
20025 amit.gupta 21304
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
21305
        __isset_bit_vector = new BitSet(1);
9829 amar.kumar 21306
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
21307
      } catch (org.apache.thrift.TException te) {
21308
        throw new java.io.IOException(te);
21309
      }
21310
    }
21311
 
21312
  }
21313
 
21314
  public static class changeWarehouseForPO_result implements org.apache.thrift.TBase<changeWarehouseForPO_result, changeWarehouseForPO_result._Fields>, java.io.Serializable, Cloneable   {
21315
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changeWarehouseForPO_result");
21316
 
21317
    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);
21318
 
21319
    private PurchaseServiceException e; // required
21320
 
21321
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21322
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
21323
      E((short)1, "e");
21324
 
21325
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21326
 
21327
      static {
21328
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21329
          byName.put(field.getFieldName(), field);
21330
        }
21331
      }
21332
 
21333
      /**
21334
       * Find the _Fields constant that matches fieldId, or null if its not found.
21335
       */
21336
      public static _Fields findByThriftId(int fieldId) {
21337
        switch(fieldId) {
21338
          case 1: // E
21339
            return E;
21340
          default:
21341
            return null;
21342
        }
21343
      }
21344
 
21345
      /**
21346
       * Find the _Fields constant that matches fieldId, throwing an exception
21347
       * if it is not found.
21348
       */
21349
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21350
        _Fields fields = findByThriftId(fieldId);
21351
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21352
        return fields;
21353
      }
21354
 
21355
      /**
21356
       * Find the _Fields constant that matches name, or null if its not found.
21357
       */
21358
      public static _Fields findByName(String name) {
21359
        return byName.get(name);
21360
      }
21361
 
21362
      private final short _thriftId;
21363
      private final String _fieldName;
21364
 
21365
      _Fields(short thriftId, String fieldName) {
21366
        _thriftId = thriftId;
21367
        _fieldName = fieldName;
21368
      }
21369
 
21370
      public short getThriftFieldId() {
21371
        return _thriftId;
21372
      }
21373
 
21374
      public String getFieldName() {
21375
        return _fieldName;
21376
      }
21377
    }
21378
 
21379
    // isset id assignments
21380
 
21381
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21382
    static {
21383
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
21384
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21385
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
21386
      metaDataMap = Collections.unmodifiableMap(tmpMap);
21387
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changeWarehouseForPO_result.class, metaDataMap);
21388
    }
21389
 
21390
    public changeWarehouseForPO_result() {
21391
    }
21392
 
21393
    public changeWarehouseForPO_result(
21394
      PurchaseServiceException e)
21395
    {
21396
      this();
21397
      this.e = e;
21398
    }
21399
 
21400
    /**
21401
     * Performs a deep copy on <i>other</i>.
21402
     */
21403
    public changeWarehouseForPO_result(changeWarehouseForPO_result other) {
21404
      if (other.isSetE()) {
21405
        this.e = new PurchaseServiceException(other.e);
21406
      }
21407
    }
21408
 
21409
    public changeWarehouseForPO_result deepCopy() {
21410
      return new changeWarehouseForPO_result(this);
21411
    }
21412
 
21413
    @Override
21414
    public void clear() {
21415
      this.e = null;
21416
    }
21417
 
21418
    public PurchaseServiceException getE() {
21419
      return this.e;
21420
    }
21421
 
21422
    public void setE(PurchaseServiceException e) {
21423
      this.e = e;
21424
    }
21425
 
21426
    public void unsetE() {
21427
      this.e = null;
21428
    }
21429
 
21430
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
21431
    public boolean isSetE() {
21432
      return this.e != null;
21433
    }
21434
 
21435
    public void setEIsSet(boolean value) {
21436
      if (!value) {
21437
        this.e = null;
21438
      }
21439
    }
21440
 
21441
    public void setFieldValue(_Fields field, Object value) {
21442
      switch (field) {
21443
      case E:
21444
        if (value == null) {
21445
          unsetE();
21446
        } else {
21447
          setE((PurchaseServiceException)value);
21448
        }
21449
        break;
21450
 
21451
      }
21452
    }
21453
 
21454
    public Object getFieldValue(_Fields field) {
21455
      switch (field) {
21456
      case E:
21457
        return getE();
21458
 
21459
      }
21460
      throw new IllegalStateException();
21461
    }
21462
 
21463
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21464
    public boolean isSet(_Fields field) {
21465
      if (field == null) {
21466
        throw new IllegalArgumentException();
21467
      }
21468
 
21469
      switch (field) {
21470
      case E:
21471
        return isSetE();
21472
      }
21473
      throw new IllegalStateException();
21474
    }
21475
 
21476
    @Override
21477
    public boolean equals(Object that) {
21478
      if (that == null)
21479
        return false;
21480
      if (that instanceof changeWarehouseForPO_result)
21481
        return this.equals((changeWarehouseForPO_result)that);
21482
      return false;
21483
    }
21484
 
21485
    public boolean equals(changeWarehouseForPO_result that) {
21486
      if (that == null)
21487
        return false;
21488
 
21489
      boolean this_present_e = true && this.isSetE();
21490
      boolean that_present_e = true && that.isSetE();
21491
      if (this_present_e || that_present_e) {
21492
        if (!(this_present_e && that_present_e))
21493
          return false;
21494
        if (!this.e.equals(that.e))
21495
          return false;
21496
      }
21497
 
21498
      return true;
21499
    }
21500
 
21501
    @Override
21502
    public int hashCode() {
21503
      return 0;
21504
    }
21505
 
21506
    public int compareTo(changeWarehouseForPO_result other) {
21507
      if (!getClass().equals(other.getClass())) {
21508
        return getClass().getName().compareTo(other.getClass().getName());
21509
      }
21510
 
21511
      int lastComparison = 0;
21512
      changeWarehouseForPO_result typedOther = (changeWarehouseForPO_result)other;
21513
 
21514
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
21515
      if (lastComparison != 0) {
21516
        return lastComparison;
21517
      }
21518
      if (isSetE()) {
21519
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
21520
        if (lastComparison != 0) {
21521
          return lastComparison;
21522
        }
21523
      }
21524
      return 0;
21525
    }
21526
 
21527
    public _Fields fieldForId(int fieldId) {
21528
      return _Fields.findByThriftId(fieldId);
21529
    }
21530
 
21531
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
21532
      org.apache.thrift.protocol.TField field;
21533
      iprot.readStructBegin();
21534
      while (true)
21535
      {
21536
        field = iprot.readFieldBegin();
21537
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
21538
          break;
21539
        }
21540
        switch (field.id) {
21541
          case 1: // E
21542
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
21543
              this.e = new PurchaseServiceException();
21544
              this.e.read(iprot);
21545
            } else { 
21546
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21547
            }
21548
            break;
21549
          default:
21550
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21551
        }
21552
        iprot.readFieldEnd();
21553
      }
21554
      iprot.readStructEnd();
21555
      validate();
21556
    }
21557
 
21558
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
21559
      oprot.writeStructBegin(STRUCT_DESC);
21560
 
21561
      if (this.isSetE()) {
21562
        oprot.writeFieldBegin(E_FIELD_DESC);
21563
        this.e.write(oprot);
21564
        oprot.writeFieldEnd();
21565
      }
21566
      oprot.writeFieldStop();
21567
      oprot.writeStructEnd();
21568
    }
21569
 
21570
    @Override
21571
    public String toString() {
21572
      StringBuilder sb = new StringBuilder("changeWarehouseForPO_result(");
21573
      boolean first = true;
21574
 
21575
      sb.append("e:");
21576
      if (this.e == null) {
21577
        sb.append("null");
21578
      } else {
21579
        sb.append(this.e);
21580
      }
21581
      first = false;
21582
      sb.append(")");
21583
      return sb.toString();
21584
    }
21585
 
21586
    public void validate() throws org.apache.thrift.TException {
21587
      // check for required fields
21588
    }
21589
 
21590
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21591
      try {
21592
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21593
      } catch (org.apache.thrift.TException te) {
21594
        throw new java.io.IOException(te);
21595
      }
21596
    }
21597
 
21598
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
21599
      try {
21600
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
21601
      } catch (org.apache.thrift.TException te) {
21602
        throw new java.io.IOException(te);
21603
      }
21604
    }
21605
 
21606
  }
21607
 
9925 amar.kumar 21608
  public static class changePOStatus_args implements org.apache.thrift.TBase<changePOStatus_args, changePOStatus_args._Fields>, java.io.Serializable, Cloneable   {
21609
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changePOStatus_args");
21610
 
21611
    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);
21612
    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);
21613
 
21614
    private long id; // required
21615
    private POStatus poStatus; // required
21616
 
21617
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21618
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
21619
      ID((short)1, "id"),
21620
      /**
21621
       * 
21622
       * @see POStatus
21623
       */
21624
      PO_STATUS((short)2, "poStatus");
21625
 
21626
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21627
 
21628
      static {
21629
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21630
          byName.put(field.getFieldName(), field);
21631
        }
21632
      }
21633
 
21634
      /**
21635
       * Find the _Fields constant that matches fieldId, or null if its not found.
21636
       */
21637
      public static _Fields findByThriftId(int fieldId) {
21638
        switch(fieldId) {
21639
          case 1: // ID
21640
            return ID;
21641
          case 2: // PO_STATUS
21642
            return PO_STATUS;
21643
          default:
21644
            return null;
21645
        }
21646
      }
21647
 
21648
      /**
21649
       * Find the _Fields constant that matches fieldId, throwing an exception
21650
       * if it is not found.
21651
       */
21652
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21653
        _Fields fields = findByThriftId(fieldId);
21654
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21655
        return fields;
21656
      }
21657
 
21658
      /**
21659
       * Find the _Fields constant that matches name, or null if its not found.
21660
       */
21661
      public static _Fields findByName(String name) {
21662
        return byName.get(name);
21663
      }
21664
 
21665
      private final short _thriftId;
21666
      private final String _fieldName;
21667
 
21668
      _Fields(short thriftId, String fieldName) {
21669
        _thriftId = thriftId;
21670
        _fieldName = fieldName;
21671
      }
21672
 
21673
      public short getThriftFieldId() {
21674
        return _thriftId;
21675
      }
21676
 
21677
      public String getFieldName() {
21678
        return _fieldName;
21679
      }
21680
    }
21681
 
21682
    // isset id assignments
21683
    private static final int __ID_ISSET_ID = 0;
21684
    private BitSet __isset_bit_vector = new BitSet(1);
21685
 
21686
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21687
    static {
21688
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
21689
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21690
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
21691
      tmpMap.put(_Fields.PO_STATUS, new org.apache.thrift.meta_data.FieldMetaData("poStatus", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21692
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, POStatus.class)));
21693
      metaDataMap = Collections.unmodifiableMap(tmpMap);
21694
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changePOStatus_args.class, metaDataMap);
21695
    }
21696
 
21697
    public changePOStatus_args() {
21698
    }
21699
 
21700
    public changePOStatus_args(
21701
      long id,
21702
      POStatus poStatus)
21703
    {
21704
      this();
21705
      this.id = id;
21706
      setIdIsSet(true);
21707
      this.poStatus = poStatus;
21708
    }
21709
 
21710
    /**
21711
     * Performs a deep copy on <i>other</i>.
21712
     */
21713
    public changePOStatus_args(changePOStatus_args other) {
21714
      __isset_bit_vector.clear();
21715
      __isset_bit_vector.or(other.__isset_bit_vector);
21716
      this.id = other.id;
21717
      if (other.isSetPoStatus()) {
21718
        this.poStatus = other.poStatus;
21719
      }
21720
    }
21721
 
21722
    public changePOStatus_args deepCopy() {
21723
      return new changePOStatus_args(this);
21724
    }
21725
 
21726
    @Override
21727
    public void clear() {
21728
      setIdIsSet(false);
21729
      this.id = 0;
21730
      this.poStatus = null;
21731
    }
21732
 
21733
    public long getId() {
21734
      return this.id;
21735
    }
21736
 
21737
    public void setId(long id) {
21738
      this.id = id;
21739
      setIdIsSet(true);
21740
    }
21741
 
21742
    public void unsetId() {
21743
      __isset_bit_vector.clear(__ID_ISSET_ID);
21744
    }
21745
 
21746
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
21747
    public boolean isSetId() {
21748
      return __isset_bit_vector.get(__ID_ISSET_ID);
21749
    }
21750
 
21751
    public void setIdIsSet(boolean value) {
21752
      __isset_bit_vector.set(__ID_ISSET_ID, value);
21753
    }
21754
 
21755
    /**
21756
     * 
21757
     * @see POStatus
21758
     */
21759
    public POStatus getPoStatus() {
21760
      return this.poStatus;
21761
    }
21762
 
21763
    /**
21764
     * 
21765
     * @see POStatus
21766
     */
21767
    public void setPoStatus(POStatus poStatus) {
21768
      this.poStatus = poStatus;
21769
    }
21770
 
21771
    public void unsetPoStatus() {
21772
      this.poStatus = null;
21773
    }
21774
 
21775
    /** Returns true if field poStatus is set (has been assigned a value) and false otherwise */
21776
    public boolean isSetPoStatus() {
21777
      return this.poStatus != null;
21778
    }
21779
 
21780
    public void setPoStatusIsSet(boolean value) {
21781
      if (!value) {
21782
        this.poStatus = null;
21783
      }
21784
    }
21785
 
21786
    public void setFieldValue(_Fields field, Object value) {
21787
      switch (field) {
21788
      case ID:
21789
        if (value == null) {
21790
          unsetId();
21791
        } else {
21792
          setId((Long)value);
21793
        }
21794
        break;
21795
 
21796
      case PO_STATUS:
21797
        if (value == null) {
21798
          unsetPoStatus();
21799
        } else {
21800
          setPoStatus((POStatus)value);
21801
        }
21802
        break;
21803
 
21804
      }
21805
    }
21806
 
21807
    public Object getFieldValue(_Fields field) {
21808
      switch (field) {
21809
      case ID:
21810
        return Long.valueOf(getId());
21811
 
21812
      case PO_STATUS:
21813
        return getPoStatus();
21814
 
21815
      }
21816
      throw new IllegalStateException();
21817
    }
21818
 
21819
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21820
    public boolean isSet(_Fields field) {
21821
      if (field == null) {
21822
        throw new IllegalArgumentException();
21823
      }
21824
 
21825
      switch (field) {
21826
      case ID:
21827
        return isSetId();
21828
      case PO_STATUS:
21829
        return isSetPoStatus();
21830
      }
21831
      throw new IllegalStateException();
21832
    }
21833
 
21834
    @Override
21835
    public boolean equals(Object that) {
21836
      if (that == null)
21837
        return false;
21838
      if (that instanceof changePOStatus_args)
21839
        return this.equals((changePOStatus_args)that);
21840
      return false;
21841
    }
21842
 
21843
    public boolean equals(changePOStatus_args that) {
21844
      if (that == null)
21845
        return false;
21846
 
21847
      boolean this_present_id = true;
21848
      boolean that_present_id = true;
21849
      if (this_present_id || that_present_id) {
21850
        if (!(this_present_id && that_present_id))
21851
          return false;
21852
        if (this.id != that.id)
21853
          return false;
21854
      }
21855
 
21856
      boolean this_present_poStatus = true && this.isSetPoStatus();
21857
      boolean that_present_poStatus = true && that.isSetPoStatus();
21858
      if (this_present_poStatus || that_present_poStatus) {
21859
        if (!(this_present_poStatus && that_present_poStatus))
21860
          return false;
21861
        if (!this.poStatus.equals(that.poStatus))
21862
          return false;
21863
      }
21864
 
21865
      return true;
21866
    }
21867
 
21868
    @Override
21869
    public int hashCode() {
21870
      return 0;
21871
    }
21872
 
21873
    public int compareTo(changePOStatus_args other) {
21874
      if (!getClass().equals(other.getClass())) {
21875
        return getClass().getName().compareTo(other.getClass().getName());
21876
      }
21877
 
21878
      int lastComparison = 0;
21879
      changePOStatus_args typedOther = (changePOStatus_args)other;
21880
 
21881
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
21882
      if (lastComparison != 0) {
21883
        return lastComparison;
21884
      }
21885
      if (isSetId()) {
21886
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
21887
        if (lastComparison != 0) {
21888
          return lastComparison;
21889
        }
21890
      }
21891
      lastComparison = Boolean.valueOf(isSetPoStatus()).compareTo(typedOther.isSetPoStatus());
21892
      if (lastComparison != 0) {
21893
        return lastComparison;
21894
      }
21895
      if (isSetPoStatus()) {
21896
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.poStatus, typedOther.poStatus);
21897
        if (lastComparison != 0) {
21898
          return lastComparison;
21899
        }
21900
      }
21901
      return 0;
21902
    }
21903
 
21904
    public _Fields fieldForId(int fieldId) {
21905
      return _Fields.findByThriftId(fieldId);
21906
    }
21907
 
21908
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
21909
      org.apache.thrift.protocol.TField field;
21910
      iprot.readStructBegin();
21911
      while (true)
21912
      {
21913
        field = iprot.readFieldBegin();
21914
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
21915
          break;
21916
        }
21917
        switch (field.id) {
21918
          case 1: // ID
21919
            if (field.type == org.apache.thrift.protocol.TType.I64) {
21920
              this.id = iprot.readI64();
21921
              setIdIsSet(true);
21922
            } else { 
21923
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21924
            }
21925
            break;
21926
          case 2: // PO_STATUS
21927
            if (field.type == org.apache.thrift.protocol.TType.I32) {
21928
              this.poStatus = POStatus.findByValue(iprot.readI32());
21929
            } else { 
21930
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21931
            }
21932
            break;
21933
          default:
21934
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21935
        }
21936
        iprot.readFieldEnd();
21937
      }
21938
      iprot.readStructEnd();
21939
      validate();
21940
    }
21941
 
21942
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
21943
      validate();
21944
 
21945
      oprot.writeStructBegin(STRUCT_DESC);
21946
      oprot.writeFieldBegin(ID_FIELD_DESC);
21947
      oprot.writeI64(this.id);
21948
      oprot.writeFieldEnd();
21949
      if (this.poStatus != null) {
21950
        oprot.writeFieldBegin(PO_STATUS_FIELD_DESC);
21951
        oprot.writeI32(this.poStatus.getValue());
21952
        oprot.writeFieldEnd();
21953
      }
21954
      oprot.writeFieldStop();
21955
      oprot.writeStructEnd();
21956
    }
21957
 
21958
    @Override
21959
    public String toString() {
21960
      StringBuilder sb = new StringBuilder("changePOStatus_args(");
21961
      boolean first = true;
21962
 
21963
      sb.append("id:");
21964
      sb.append(this.id);
21965
      first = false;
21966
      if (!first) sb.append(", ");
21967
      sb.append("poStatus:");
21968
      if (this.poStatus == null) {
21969
        sb.append("null");
21970
      } else {
21971
        sb.append(this.poStatus);
21972
      }
21973
      first = false;
21974
      sb.append(")");
21975
      return sb.toString();
21976
    }
21977
 
21978
    public void validate() throws org.apache.thrift.TException {
21979
      // check for required fields
21980
    }
21981
 
21982
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21983
      try {
21984
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21985
      } catch (org.apache.thrift.TException te) {
21986
        throw new java.io.IOException(te);
21987
      }
21988
    }
21989
 
21990
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
21991
      try {
21992
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
21993
        __isset_bit_vector = new BitSet(1);
21994
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
21995
      } catch (org.apache.thrift.TException te) {
21996
        throw new java.io.IOException(te);
21997
      }
21998
    }
21999
 
22000
  }
22001
 
22002
  public static class changePOStatus_result implements org.apache.thrift.TBase<changePOStatus_result, changePOStatus_result._Fields>, java.io.Serializable, Cloneable   {
22003
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changePOStatus_result");
22004
 
22005
    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);
22006
 
22007
    private PurchaseServiceException e; // required
22008
 
22009
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22010
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
22011
      E((short)1, "e");
22012
 
22013
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22014
 
22015
      static {
22016
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22017
          byName.put(field.getFieldName(), field);
22018
        }
22019
      }
22020
 
22021
      /**
22022
       * Find the _Fields constant that matches fieldId, or null if its not found.
22023
       */
22024
      public static _Fields findByThriftId(int fieldId) {
22025
        switch(fieldId) {
22026
          case 1: // E
22027
            return E;
22028
          default:
22029
            return null;
22030
        }
22031
      }
22032
 
22033
      /**
22034
       * Find the _Fields constant that matches fieldId, throwing an exception
22035
       * if it is not found.
22036
       */
22037
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22038
        _Fields fields = findByThriftId(fieldId);
22039
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22040
        return fields;
22041
      }
22042
 
22043
      /**
22044
       * Find the _Fields constant that matches name, or null if its not found.
22045
       */
22046
      public static _Fields findByName(String name) {
22047
        return byName.get(name);
22048
      }
22049
 
22050
      private final short _thriftId;
22051
      private final String _fieldName;
22052
 
22053
      _Fields(short thriftId, String fieldName) {
22054
        _thriftId = thriftId;
22055
        _fieldName = fieldName;
22056
      }
22057
 
22058
      public short getThriftFieldId() {
22059
        return _thriftId;
22060
      }
22061
 
22062
      public String getFieldName() {
22063
        return _fieldName;
22064
      }
22065
    }
22066
 
22067
    // isset id assignments
22068
 
22069
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
22070
    static {
22071
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
22072
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22073
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
22074
      metaDataMap = Collections.unmodifiableMap(tmpMap);
22075
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changePOStatus_result.class, metaDataMap);
22076
    }
22077
 
22078
    public changePOStatus_result() {
22079
    }
22080
 
22081
    public changePOStatus_result(
22082
      PurchaseServiceException e)
22083
    {
22084
      this();
22085
      this.e = e;
22086
    }
22087
 
22088
    /**
22089
     * Performs a deep copy on <i>other</i>.
22090
     */
22091
    public changePOStatus_result(changePOStatus_result other) {
22092
      if (other.isSetE()) {
22093
        this.e = new PurchaseServiceException(other.e);
22094
      }
22095
    }
22096
 
22097
    public changePOStatus_result deepCopy() {
22098
      return new changePOStatus_result(this);
22099
    }
22100
 
22101
    @Override
22102
    public void clear() {
22103
      this.e = null;
22104
    }
22105
 
22106
    public PurchaseServiceException getE() {
22107
      return this.e;
22108
    }
22109
 
22110
    public void setE(PurchaseServiceException e) {
22111
      this.e = e;
22112
    }
22113
 
22114
    public void unsetE() {
22115
      this.e = null;
22116
    }
22117
 
22118
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
22119
    public boolean isSetE() {
22120
      return this.e != null;
22121
    }
22122
 
22123
    public void setEIsSet(boolean value) {
22124
      if (!value) {
22125
        this.e = null;
22126
      }
22127
    }
22128
 
22129
    public void setFieldValue(_Fields field, Object value) {
22130
      switch (field) {
22131
      case E:
22132
        if (value == null) {
22133
          unsetE();
22134
        } else {
22135
          setE((PurchaseServiceException)value);
22136
        }
22137
        break;
22138
 
22139
      }
22140
    }
22141
 
22142
    public Object getFieldValue(_Fields field) {
22143
      switch (field) {
22144
      case E:
22145
        return getE();
22146
 
22147
      }
22148
      throw new IllegalStateException();
22149
    }
22150
 
22151
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
22152
    public boolean isSet(_Fields field) {
22153
      if (field == null) {
22154
        throw new IllegalArgumentException();
22155
      }
22156
 
22157
      switch (field) {
22158
      case E:
22159
        return isSetE();
22160
      }
22161
      throw new IllegalStateException();
22162
    }
22163
 
22164
    @Override
22165
    public boolean equals(Object that) {
22166
      if (that == null)
22167
        return false;
22168
      if (that instanceof changePOStatus_result)
22169
        return this.equals((changePOStatus_result)that);
22170
      return false;
22171
    }
22172
 
22173
    public boolean equals(changePOStatus_result that) {
22174
      if (that == null)
22175
        return false;
22176
 
22177
      boolean this_present_e = true && this.isSetE();
22178
      boolean that_present_e = true && that.isSetE();
22179
      if (this_present_e || that_present_e) {
22180
        if (!(this_present_e && that_present_e))
22181
          return false;
22182
        if (!this.e.equals(that.e))
22183
          return false;
22184
      }
22185
 
22186
      return true;
22187
    }
22188
 
22189
    @Override
22190
    public int hashCode() {
22191
      return 0;
22192
    }
22193
 
22194
    public int compareTo(changePOStatus_result other) {
22195
      if (!getClass().equals(other.getClass())) {
22196
        return getClass().getName().compareTo(other.getClass().getName());
22197
      }
22198
 
22199
      int lastComparison = 0;
22200
      changePOStatus_result typedOther = (changePOStatus_result)other;
22201
 
22202
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
22203
      if (lastComparison != 0) {
22204
        return lastComparison;
22205
      }
22206
      if (isSetE()) {
22207
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
22208
        if (lastComparison != 0) {
22209
          return lastComparison;
22210
        }
22211
      }
22212
      return 0;
22213
    }
22214
 
22215
    public _Fields fieldForId(int fieldId) {
22216
      return _Fields.findByThriftId(fieldId);
22217
    }
22218
 
22219
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
22220
      org.apache.thrift.protocol.TField field;
22221
      iprot.readStructBegin();
22222
      while (true)
22223
      {
22224
        field = iprot.readFieldBegin();
22225
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
22226
          break;
22227
        }
22228
        switch (field.id) {
22229
          case 1: // E
22230
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
22231
              this.e = new PurchaseServiceException();
22232
              this.e.read(iprot);
22233
            } else { 
22234
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22235
            }
22236
            break;
22237
          default:
22238
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22239
        }
22240
        iprot.readFieldEnd();
22241
      }
22242
      iprot.readStructEnd();
22243
      validate();
22244
    }
22245
 
22246
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
22247
      oprot.writeStructBegin(STRUCT_DESC);
22248
 
22249
      if (this.isSetE()) {
22250
        oprot.writeFieldBegin(E_FIELD_DESC);
22251
        this.e.write(oprot);
22252
        oprot.writeFieldEnd();
22253
      }
22254
      oprot.writeFieldStop();
22255
      oprot.writeStructEnd();
22256
    }
22257
 
22258
    @Override
22259
    public String toString() {
22260
      StringBuilder sb = new StringBuilder("changePOStatus_result(");
22261
      boolean first = true;
22262
 
22263
      sb.append("e:");
22264
      if (this.e == null) {
22265
        sb.append("null");
22266
      } else {
22267
        sb.append(this.e);
22268
      }
22269
      first = false;
22270
      sb.append(")");
22271
      return sb.toString();
22272
    }
22273
 
22274
    public void validate() throws org.apache.thrift.TException {
22275
      // check for required fields
22276
    }
22277
 
22278
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
22279
      try {
22280
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
22281
      } catch (org.apache.thrift.TException te) {
22282
        throw new java.io.IOException(te);
22283
      }
22284
    }
22285
 
22286
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
22287
      try {
22288
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
22289
      } catch (org.apache.thrift.TException te) {
22290
        throw new java.io.IOException(te);
22291
      }
22292
    }
22293
 
22294
  }
22295
 
11751 manish.sha 22296
  public static class getPurchaseReturn_args implements org.apache.thrift.TBase<getPurchaseReturn_args, getPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
22297
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseReturn_args");
22298
 
22299
    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);
22300
 
22301
    private long id; // required
22302
 
22303
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22304
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
22305
      ID((short)1, "id");
22306
 
22307
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22308
 
22309
      static {
22310
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22311
          byName.put(field.getFieldName(), field);
22312
        }
22313
      }
22314
 
22315
      /**
22316
       * Find the _Fields constant that matches fieldId, or null if its not found.
22317
       */
22318
      public static _Fields findByThriftId(int fieldId) {
22319
        switch(fieldId) {
22320
          case 1: // ID
22321
            return ID;
22322
          default:
22323
            return null;
22324
        }
22325
      }
22326
 
22327
      /**
22328
       * Find the _Fields constant that matches fieldId, throwing an exception
22329
       * if it is not found.
22330
       */
22331
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22332
        _Fields fields = findByThriftId(fieldId);
22333
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22334
        return fields;
22335
      }
22336
 
22337
      /**
22338
       * Find the _Fields constant that matches name, or null if its not found.
22339
       */
22340
      public static _Fields findByName(String name) {
22341
        return byName.get(name);
22342
      }
22343
 
22344
      private final short _thriftId;
22345
      private final String _fieldName;
22346
 
22347
      _Fields(short thriftId, String fieldName) {
22348
        _thriftId = thriftId;
22349
        _fieldName = fieldName;
22350
      }
22351
 
22352
      public short getThriftFieldId() {
22353
        return _thriftId;
22354
      }
22355
 
22356
      public String getFieldName() {
22357
        return _fieldName;
22358
      }
22359
    }
22360
 
22361
    // isset id assignments
22362
    private static final int __ID_ISSET_ID = 0;
22363
    private BitSet __isset_bit_vector = new BitSet(1);
22364
 
22365
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
22366
    static {
22367
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
22368
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22369
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
22370
      metaDataMap = Collections.unmodifiableMap(tmpMap);
22371
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseReturn_args.class, metaDataMap);
22372
    }
22373
 
22374
    public getPurchaseReturn_args() {
22375
    }
22376
 
22377
    public getPurchaseReturn_args(
22378
      long id)
22379
    {
22380
      this();
22381
      this.id = id;
22382
      setIdIsSet(true);
22383
    }
22384
 
22385
    /**
22386
     * Performs a deep copy on <i>other</i>.
22387
     */
22388
    public getPurchaseReturn_args(getPurchaseReturn_args other) {
22389
      __isset_bit_vector.clear();
22390
      __isset_bit_vector.or(other.__isset_bit_vector);
22391
      this.id = other.id;
22392
    }
22393
 
22394
    public getPurchaseReturn_args deepCopy() {
22395
      return new getPurchaseReturn_args(this);
22396
    }
22397
 
22398
    @Override
22399
    public void clear() {
22400
      setIdIsSet(false);
22401
      this.id = 0;
22402
    }
22403
 
22404
    public long getId() {
22405
      return this.id;
22406
    }
22407
 
22408
    public void setId(long id) {
22409
      this.id = id;
22410
      setIdIsSet(true);
22411
    }
22412
 
22413
    public void unsetId() {
22414
      __isset_bit_vector.clear(__ID_ISSET_ID);
22415
    }
22416
 
22417
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
22418
    public boolean isSetId() {
22419
      return __isset_bit_vector.get(__ID_ISSET_ID);
22420
    }
22421
 
22422
    public void setIdIsSet(boolean value) {
22423
      __isset_bit_vector.set(__ID_ISSET_ID, value);
22424
    }
22425
 
22426
    public void setFieldValue(_Fields field, Object value) {
22427
      switch (field) {
22428
      case ID:
22429
        if (value == null) {
22430
          unsetId();
22431
        } else {
22432
          setId((Long)value);
22433
        }
22434
        break;
22435
 
22436
      }
22437
    }
22438
 
22439
    public Object getFieldValue(_Fields field) {
22440
      switch (field) {
22441
      case ID:
22442
        return Long.valueOf(getId());
22443
 
22444
      }
22445
      throw new IllegalStateException();
22446
    }
22447
 
22448
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
22449
    public boolean isSet(_Fields field) {
22450
      if (field == null) {
22451
        throw new IllegalArgumentException();
22452
      }
22453
 
22454
      switch (field) {
22455
      case ID:
22456
        return isSetId();
22457
      }
22458
      throw new IllegalStateException();
22459
    }
22460
 
22461
    @Override
22462
    public boolean equals(Object that) {
22463
      if (that == null)
22464
        return false;
22465
      if (that instanceof getPurchaseReturn_args)
22466
        return this.equals((getPurchaseReturn_args)that);
22467
      return false;
22468
    }
22469
 
22470
    public boolean equals(getPurchaseReturn_args that) {
22471
      if (that == null)
22472
        return false;
22473
 
22474
      boolean this_present_id = true;
22475
      boolean that_present_id = true;
22476
      if (this_present_id || that_present_id) {
22477
        if (!(this_present_id && that_present_id))
22478
          return false;
22479
        if (this.id != that.id)
22480
          return false;
22481
      }
22482
 
22483
      return true;
22484
    }
22485
 
22486
    @Override
22487
    public int hashCode() {
22488
      return 0;
22489
    }
22490
 
22491
    public int compareTo(getPurchaseReturn_args other) {
22492
      if (!getClass().equals(other.getClass())) {
22493
        return getClass().getName().compareTo(other.getClass().getName());
22494
      }
22495
 
22496
      int lastComparison = 0;
22497
      getPurchaseReturn_args typedOther = (getPurchaseReturn_args)other;
22498
 
22499
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
22500
      if (lastComparison != 0) {
22501
        return lastComparison;
22502
      }
22503
      if (isSetId()) {
22504
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
22505
        if (lastComparison != 0) {
22506
          return lastComparison;
22507
        }
22508
      }
22509
      return 0;
22510
    }
22511
 
22512
    public _Fields fieldForId(int fieldId) {
22513
      return _Fields.findByThriftId(fieldId);
22514
    }
22515
 
22516
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
22517
      org.apache.thrift.protocol.TField field;
22518
      iprot.readStructBegin();
22519
      while (true)
22520
      {
22521
        field = iprot.readFieldBegin();
22522
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
22523
          break;
22524
        }
22525
        switch (field.id) {
22526
          case 1: // ID
22527
            if (field.type == org.apache.thrift.protocol.TType.I64) {
22528
              this.id = iprot.readI64();
22529
              setIdIsSet(true);
22530
            } else { 
22531
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22532
            }
22533
            break;
22534
          default:
22535
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22536
        }
22537
        iprot.readFieldEnd();
22538
      }
22539
      iprot.readStructEnd();
22540
      validate();
22541
    }
22542
 
22543
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
22544
      validate();
22545
 
22546
      oprot.writeStructBegin(STRUCT_DESC);
22547
      oprot.writeFieldBegin(ID_FIELD_DESC);
22548
      oprot.writeI64(this.id);
22549
      oprot.writeFieldEnd();
22550
      oprot.writeFieldStop();
22551
      oprot.writeStructEnd();
22552
    }
22553
 
22554
    @Override
22555
    public String toString() {
22556
      StringBuilder sb = new StringBuilder("getPurchaseReturn_args(");
22557
      boolean first = true;
22558
 
22559
      sb.append("id:");
22560
      sb.append(this.id);
22561
      first = false;
22562
      sb.append(")");
22563
      return sb.toString();
22564
    }
22565
 
22566
    public void validate() throws org.apache.thrift.TException {
22567
      // check for required fields
22568
    }
22569
 
22570
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
22571
      try {
22572
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
22573
      } catch (org.apache.thrift.TException te) {
22574
        throw new java.io.IOException(te);
22575
      }
22576
    }
22577
 
22578
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
22579
      try {
22580
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
22581
        __isset_bit_vector = new BitSet(1);
22582
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
22583
      } catch (org.apache.thrift.TException te) {
22584
        throw new java.io.IOException(te);
22585
      }
22586
    }
22587
 
22588
  }
22589
 
22590
  public static class getPurchaseReturn_result implements org.apache.thrift.TBase<getPurchaseReturn_result, getPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
22591
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseReturn_result");
22592
 
22593
    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);
22594
    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);
22595
 
22596
    private PurchaseReturn success; // required
22597
    private PurchaseServiceException e; // required
22598
 
22599
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22600
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
22601
      SUCCESS((short)0, "success"),
22602
      E((short)1, "e");
22603
 
22604
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22605
 
22606
      static {
22607
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22608
          byName.put(field.getFieldName(), field);
22609
        }
22610
      }
22611
 
22612
      /**
22613
       * Find the _Fields constant that matches fieldId, or null if its not found.
22614
       */
22615
      public static _Fields findByThriftId(int fieldId) {
22616
        switch(fieldId) {
22617
          case 0: // SUCCESS
22618
            return SUCCESS;
22619
          case 1: // E
22620
            return E;
22621
          default:
22622
            return null;
22623
        }
22624
      }
22625
 
22626
      /**
22627
       * Find the _Fields constant that matches fieldId, throwing an exception
22628
       * if it is not found.
22629
       */
22630
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22631
        _Fields fields = findByThriftId(fieldId);
22632
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22633
        return fields;
22634
      }
22635
 
22636
      /**
22637
       * Find the _Fields constant that matches name, or null if its not found.
22638
       */
22639
      public static _Fields findByName(String name) {
22640
        return byName.get(name);
22641
      }
22642
 
22643
      private final short _thriftId;
22644
      private final String _fieldName;
22645
 
22646
      _Fields(short thriftId, String fieldName) {
22647
        _thriftId = thriftId;
22648
        _fieldName = fieldName;
22649
      }
22650
 
22651
      public short getThriftFieldId() {
22652
        return _thriftId;
22653
      }
22654
 
22655
      public String getFieldName() {
22656
        return _fieldName;
22657
      }
22658
    }
22659
 
22660
    // isset id assignments
22661
 
22662
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
22663
    static {
22664
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
22665
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22666
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class)));
22667
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
22668
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
22669
      metaDataMap = Collections.unmodifiableMap(tmpMap);
22670
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseReturn_result.class, metaDataMap);
22671
    }
22672
 
22673
    public getPurchaseReturn_result() {
22674
    }
22675
 
22676
    public getPurchaseReturn_result(
22677
      PurchaseReturn success,
22678
      PurchaseServiceException e)
22679
    {
22680
      this();
22681
      this.success = success;
22682
      this.e = e;
22683
    }
22684
 
22685
    /**
22686
     * Performs a deep copy on <i>other</i>.
22687
     */
22688
    public getPurchaseReturn_result(getPurchaseReturn_result other) {
22689
      if (other.isSetSuccess()) {
22690
        this.success = new PurchaseReturn(other.success);
22691
      }
22692
      if (other.isSetE()) {
22693
        this.e = new PurchaseServiceException(other.e);
22694
      }
22695
    }
22696
 
22697
    public getPurchaseReturn_result deepCopy() {
22698
      return new getPurchaseReturn_result(this);
22699
    }
22700
 
22701
    @Override
22702
    public void clear() {
22703
      this.success = null;
22704
      this.e = null;
22705
    }
22706
 
22707
    public PurchaseReturn getSuccess() {
22708
      return this.success;
22709
    }
22710
 
22711
    public void setSuccess(PurchaseReturn success) {
22712
      this.success = success;
22713
    }
22714
 
22715
    public void unsetSuccess() {
22716
      this.success = null;
22717
    }
22718
 
22719
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
22720
    public boolean isSetSuccess() {
22721
      return this.success != null;
22722
    }
22723
 
22724
    public void setSuccessIsSet(boolean value) {
22725
      if (!value) {
22726
        this.success = null;
22727
      }
22728
    }
22729
 
22730
    public PurchaseServiceException getE() {
22731
      return this.e;
22732
    }
22733
 
22734
    public void setE(PurchaseServiceException e) {
22735
      this.e = e;
22736
    }
22737
 
22738
    public void unsetE() {
22739
      this.e = null;
22740
    }
22741
 
22742
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
22743
    public boolean isSetE() {
22744
      return this.e != null;
22745
    }
22746
 
22747
    public void setEIsSet(boolean value) {
22748
      if (!value) {
22749
        this.e = null;
22750
      }
22751
    }
22752
 
22753
    public void setFieldValue(_Fields field, Object value) {
22754
      switch (field) {
22755
      case SUCCESS:
22756
        if (value == null) {
22757
          unsetSuccess();
22758
        } else {
22759
          setSuccess((PurchaseReturn)value);
22760
        }
22761
        break;
22762
 
22763
      case E:
22764
        if (value == null) {
22765
          unsetE();
22766
        } else {
22767
          setE((PurchaseServiceException)value);
22768
        }
22769
        break;
22770
 
22771
      }
22772
    }
22773
 
22774
    public Object getFieldValue(_Fields field) {
22775
      switch (field) {
22776
      case SUCCESS:
22777
        return getSuccess();
22778
 
22779
      case E:
22780
        return getE();
22781
 
22782
      }
22783
      throw new IllegalStateException();
22784
    }
22785
 
22786
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
22787
    public boolean isSet(_Fields field) {
22788
      if (field == null) {
22789
        throw new IllegalArgumentException();
22790
      }
22791
 
22792
      switch (field) {
22793
      case SUCCESS:
22794
        return isSetSuccess();
22795
      case E:
22796
        return isSetE();
22797
      }
22798
      throw new IllegalStateException();
22799
    }
22800
 
22801
    @Override
22802
    public boolean equals(Object that) {
22803
      if (that == null)
22804
        return false;
22805
      if (that instanceof getPurchaseReturn_result)
22806
        return this.equals((getPurchaseReturn_result)that);
22807
      return false;
22808
    }
22809
 
22810
    public boolean equals(getPurchaseReturn_result that) {
22811
      if (that == null)
22812
        return false;
22813
 
22814
      boolean this_present_success = true && this.isSetSuccess();
22815
      boolean that_present_success = true && that.isSetSuccess();
22816
      if (this_present_success || that_present_success) {
22817
        if (!(this_present_success && that_present_success))
22818
          return false;
22819
        if (!this.success.equals(that.success))
22820
          return false;
22821
      }
22822
 
22823
      boolean this_present_e = true && this.isSetE();
22824
      boolean that_present_e = true && that.isSetE();
22825
      if (this_present_e || that_present_e) {
22826
        if (!(this_present_e && that_present_e))
22827
          return false;
22828
        if (!this.e.equals(that.e))
22829
          return false;
22830
      }
22831
 
22832
      return true;
22833
    }
22834
 
22835
    @Override
22836
    public int hashCode() {
22837
      return 0;
22838
    }
22839
 
22840
    public int compareTo(getPurchaseReturn_result other) {
22841
      if (!getClass().equals(other.getClass())) {
22842
        return getClass().getName().compareTo(other.getClass().getName());
22843
      }
22844
 
22845
      int lastComparison = 0;
22846
      getPurchaseReturn_result typedOther = (getPurchaseReturn_result)other;
22847
 
22848
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
22849
      if (lastComparison != 0) {
22850
        return lastComparison;
22851
      }
22852
      if (isSetSuccess()) {
22853
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
22854
        if (lastComparison != 0) {
22855
          return lastComparison;
22856
        }
22857
      }
22858
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
22859
      if (lastComparison != 0) {
22860
        return lastComparison;
22861
      }
22862
      if (isSetE()) {
22863
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
22864
        if (lastComparison != 0) {
22865
          return lastComparison;
22866
        }
22867
      }
22868
      return 0;
22869
    }
22870
 
22871
    public _Fields fieldForId(int fieldId) {
22872
      return _Fields.findByThriftId(fieldId);
22873
    }
22874
 
22875
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
22876
      org.apache.thrift.protocol.TField field;
22877
      iprot.readStructBegin();
22878
      while (true)
22879
      {
22880
        field = iprot.readFieldBegin();
22881
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
22882
          break;
22883
        }
22884
        switch (field.id) {
22885
          case 0: // SUCCESS
22886
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
22887
              this.success = new PurchaseReturn();
22888
              this.success.read(iprot);
22889
            } else { 
22890
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22891
            }
22892
            break;
22893
          case 1: // E
22894
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
22895
              this.e = new PurchaseServiceException();
22896
              this.e.read(iprot);
22897
            } else { 
22898
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22899
            }
22900
            break;
22901
          default:
22902
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22903
        }
22904
        iprot.readFieldEnd();
22905
      }
22906
      iprot.readStructEnd();
22907
      validate();
22908
    }
22909
 
22910
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
22911
      oprot.writeStructBegin(STRUCT_DESC);
22912
 
22913
      if (this.isSetSuccess()) {
22914
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
22915
        this.success.write(oprot);
22916
        oprot.writeFieldEnd();
22917
      } else if (this.isSetE()) {
22918
        oprot.writeFieldBegin(E_FIELD_DESC);
22919
        this.e.write(oprot);
22920
        oprot.writeFieldEnd();
22921
      }
22922
      oprot.writeFieldStop();
22923
      oprot.writeStructEnd();
22924
    }
22925
 
22926
    @Override
22927
    public String toString() {
22928
      StringBuilder sb = new StringBuilder("getPurchaseReturn_result(");
22929
      boolean first = true;
22930
 
22931
      sb.append("success:");
22932
      if (this.success == null) {
22933
        sb.append("null");
22934
      } else {
22935
        sb.append(this.success);
22936
      }
22937
      first = false;
22938
      if (!first) sb.append(", ");
22939
      sb.append("e:");
22940
      if (this.e == null) {
22941
        sb.append("null");
22942
      } else {
22943
        sb.append(this.e);
22944
      }
22945
      first = false;
22946
      sb.append(")");
22947
      return sb.toString();
22948
    }
22949
 
22950
    public void validate() throws org.apache.thrift.TException {
22951
      // check for required fields
22952
    }
22953
 
22954
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
22955
      try {
22956
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
22957
      } catch (org.apache.thrift.TException te) {
22958
        throw new java.io.IOException(te);
22959
      }
22960
    }
22961
 
22962
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
22963
      try {
22964
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
22965
      } catch (org.apache.thrift.TException te) {
22966
        throw new java.io.IOException(te);
22967
      }
22968
    }
22969
 
22970
  }
22971
 
13600 manish.sha 22972
  public static class markPurchasereturnSettled_args implements org.apache.thrift.TBase<markPurchasereturnSettled_args, markPurchasereturnSettled_args._Fields>, java.io.Serializable, Cloneable   {
22973
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markPurchasereturnSettled_args");
22974
 
22975
    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);
22976
    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);
22977
    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);
22978
    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);
22979
    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);
22980
 
22981
    private long id; // required
22982
    private SettlementType settlementType; // required
22983
    private String documentNumber; // required
22984
    private String settlementBy; // required
22985
    private long settledAmount; // required
22986
 
22987
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22988
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
22989
      ID((short)1, "id"),
22990
      /**
22991
       * 
22992
       * @see SettlementType
22993
       */
22994
      SETTLEMENT_TYPE((short)2, "settlementType"),
22995
      DOCUMENT_NUMBER((short)3, "documentNumber"),
22996
      SETTLEMENT_BY((short)4, "settlementBy"),
22997
      SETTLED_AMOUNT((short)5, "settledAmount");
22998
 
22999
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23000
 
23001
      static {
23002
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23003
          byName.put(field.getFieldName(), field);
23004
        }
23005
      }
23006
 
23007
      /**
23008
       * Find the _Fields constant that matches fieldId, or null if its not found.
23009
       */
23010
      public static _Fields findByThriftId(int fieldId) {
23011
        switch(fieldId) {
23012
          case 1: // ID
23013
            return ID;
23014
          case 2: // SETTLEMENT_TYPE
23015
            return SETTLEMENT_TYPE;
23016
          case 3: // DOCUMENT_NUMBER
23017
            return DOCUMENT_NUMBER;
23018
          case 4: // SETTLEMENT_BY
23019
            return SETTLEMENT_BY;
23020
          case 5: // SETTLED_AMOUNT
23021
            return SETTLED_AMOUNT;
23022
          default:
23023
            return null;
23024
        }
23025
      }
23026
 
23027
      /**
23028
       * Find the _Fields constant that matches fieldId, throwing an exception
23029
       * if it is not found.
23030
       */
23031
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23032
        _Fields fields = findByThriftId(fieldId);
23033
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23034
        return fields;
23035
      }
23036
 
23037
      /**
23038
       * Find the _Fields constant that matches name, or null if its not found.
23039
       */
23040
      public static _Fields findByName(String name) {
23041
        return byName.get(name);
23042
      }
23043
 
23044
      private final short _thriftId;
23045
      private final String _fieldName;
23046
 
23047
      _Fields(short thriftId, String fieldName) {
23048
        _thriftId = thriftId;
23049
        _fieldName = fieldName;
23050
      }
23051
 
23052
      public short getThriftFieldId() {
23053
        return _thriftId;
23054
      }
23055
 
23056
      public String getFieldName() {
23057
        return _fieldName;
23058
      }
23059
    }
23060
 
23061
    // isset id assignments
23062
    private static final int __ID_ISSET_ID = 0;
23063
    private static final int __SETTLEDAMOUNT_ISSET_ID = 1;
23064
    private BitSet __isset_bit_vector = new BitSet(2);
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
      tmpMap.put(_Fields.SETTLEMENT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("settlementType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23072
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SettlementType.class)));
23073
      tmpMap.put(_Fields.DOCUMENT_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("documentNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23074
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
23075
      tmpMap.put(_Fields.SETTLEMENT_BY, new org.apache.thrift.meta_data.FieldMetaData("settlementBy", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23076
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
23077
      tmpMap.put(_Fields.SETTLED_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("settledAmount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23078
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
23079
      metaDataMap = Collections.unmodifiableMap(tmpMap);
23080
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markPurchasereturnSettled_args.class, metaDataMap);
23081
    }
23082
 
23083
    public markPurchasereturnSettled_args() {
23084
    }
23085
 
23086
    public markPurchasereturnSettled_args(
23087
      long id,
23088
      SettlementType settlementType,
23089
      String documentNumber,
23090
      String settlementBy,
23091
      long settledAmount)
23092
    {
23093
      this();
23094
      this.id = id;
23095
      setIdIsSet(true);
23096
      this.settlementType = settlementType;
23097
      this.documentNumber = documentNumber;
23098
      this.settlementBy = settlementBy;
23099
      this.settledAmount = settledAmount;
23100
      setSettledAmountIsSet(true);
23101
    }
23102
 
23103
    /**
23104
     * Performs a deep copy on <i>other</i>.
23105
     */
23106
    public markPurchasereturnSettled_args(markPurchasereturnSettled_args other) {
23107
      __isset_bit_vector.clear();
23108
      __isset_bit_vector.or(other.__isset_bit_vector);
23109
      this.id = other.id;
23110
      if (other.isSetSettlementType()) {
23111
        this.settlementType = other.settlementType;
23112
      }
23113
      if (other.isSetDocumentNumber()) {
23114
        this.documentNumber = other.documentNumber;
23115
      }
23116
      if (other.isSetSettlementBy()) {
23117
        this.settlementBy = other.settlementBy;
23118
      }
23119
      this.settledAmount = other.settledAmount;
23120
    }
23121
 
23122
    public markPurchasereturnSettled_args deepCopy() {
23123
      return new markPurchasereturnSettled_args(this);
23124
    }
23125
 
23126
    @Override
23127
    public void clear() {
23128
      setIdIsSet(false);
23129
      this.id = 0;
23130
      this.settlementType = null;
23131
      this.documentNumber = null;
23132
      this.settlementBy = null;
23133
      setSettledAmountIsSet(false);
23134
      this.settledAmount = 0;
23135
    }
23136
 
23137
    public long getId() {
23138
      return this.id;
23139
    }
23140
 
23141
    public void setId(long id) {
23142
      this.id = id;
23143
      setIdIsSet(true);
23144
    }
23145
 
23146
    public void unsetId() {
23147
      __isset_bit_vector.clear(__ID_ISSET_ID);
23148
    }
23149
 
23150
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
23151
    public boolean isSetId() {
23152
      return __isset_bit_vector.get(__ID_ISSET_ID);
23153
    }
23154
 
23155
    public void setIdIsSet(boolean value) {
23156
      __isset_bit_vector.set(__ID_ISSET_ID, value);
23157
    }
23158
 
23159
    /**
23160
     * 
23161
     * @see SettlementType
23162
     */
23163
    public SettlementType getSettlementType() {
23164
      return this.settlementType;
23165
    }
23166
 
23167
    /**
23168
     * 
23169
     * @see SettlementType
23170
     */
23171
    public void setSettlementType(SettlementType settlementType) {
23172
      this.settlementType = settlementType;
23173
    }
23174
 
23175
    public void unsetSettlementType() {
23176
      this.settlementType = null;
23177
    }
23178
 
23179
    /** Returns true if field settlementType is set (has been assigned a value) and false otherwise */
23180
    public boolean isSetSettlementType() {
23181
      return this.settlementType != null;
23182
    }
23183
 
23184
    public void setSettlementTypeIsSet(boolean value) {
23185
      if (!value) {
23186
        this.settlementType = null;
23187
      }
23188
    }
23189
 
23190
    public String getDocumentNumber() {
23191
      return this.documentNumber;
23192
    }
23193
 
23194
    public void setDocumentNumber(String documentNumber) {
23195
      this.documentNumber = documentNumber;
23196
    }
23197
 
23198
    public void unsetDocumentNumber() {
23199
      this.documentNumber = null;
23200
    }
23201
 
23202
    /** Returns true if field documentNumber is set (has been assigned a value) and false otherwise */
23203
    public boolean isSetDocumentNumber() {
23204
      return this.documentNumber != null;
23205
    }
23206
 
23207
    public void setDocumentNumberIsSet(boolean value) {
23208
      if (!value) {
23209
        this.documentNumber = null;
23210
      }
23211
    }
23212
 
23213
    public String getSettlementBy() {
23214
      return this.settlementBy;
23215
    }
23216
 
23217
    public void setSettlementBy(String settlementBy) {
23218
      this.settlementBy = settlementBy;
23219
    }
23220
 
23221
    public void unsetSettlementBy() {
23222
      this.settlementBy = null;
23223
    }
23224
 
23225
    /** Returns true if field settlementBy is set (has been assigned a value) and false otherwise */
23226
    public boolean isSetSettlementBy() {
23227
      return this.settlementBy != null;
23228
    }
23229
 
23230
    public void setSettlementByIsSet(boolean value) {
23231
      if (!value) {
23232
        this.settlementBy = null;
23233
      }
23234
    }
23235
 
23236
    public long getSettledAmount() {
23237
      return this.settledAmount;
23238
    }
23239
 
23240
    public void setSettledAmount(long settledAmount) {
23241
      this.settledAmount = settledAmount;
23242
      setSettledAmountIsSet(true);
23243
    }
23244
 
23245
    public void unsetSettledAmount() {
23246
      __isset_bit_vector.clear(__SETTLEDAMOUNT_ISSET_ID);
23247
    }
23248
 
23249
    /** Returns true if field settledAmount is set (has been assigned a value) and false otherwise */
23250
    public boolean isSetSettledAmount() {
23251
      return __isset_bit_vector.get(__SETTLEDAMOUNT_ISSET_ID);
23252
    }
23253
 
23254
    public void setSettledAmountIsSet(boolean value) {
23255
      __isset_bit_vector.set(__SETTLEDAMOUNT_ISSET_ID, value);
23256
    }
23257
 
23258
    public void setFieldValue(_Fields field, Object value) {
23259
      switch (field) {
23260
      case ID:
23261
        if (value == null) {
23262
          unsetId();
23263
        } else {
23264
          setId((Long)value);
23265
        }
23266
        break;
23267
 
23268
      case SETTLEMENT_TYPE:
23269
        if (value == null) {
23270
          unsetSettlementType();
23271
        } else {
23272
          setSettlementType((SettlementType)value);
23273
        }
23274
        break;
23275
 
23276
      case DOCUMENT_NUMBER:
23277
        if (value == null) {
23278
          unsetDocumentNumber();
23279
        } else {
23280
          setDocumentNumber((String)value);
23281
        }
23282
        break;
23283
 
23284
      case SETTLEMENT_BY:
23285
        if (value == null) {
23286
          unsetSettlementBy();
23287
        } else {
23288
          setSettlementBy((String)value);
23289
        }
23290
        break;
23291
 
23292
      case SETTLED_AMOUNT:
23293
        if (value == null) {
23294
          unsetSettledAmount();
23295
        } else {
23296
          setSettledAmount((Long)value);
23297
        }
23298
        break;
23299
 
23300
      }
23301
    }
23302
 
23303
    public Object getFieldValue(_Fields field) {
23304
      switch (field) {
23305
      case ID:
23306
        return Long.valueOf(getId());
23307
 
23308
      case SETTLEMENT_TYPE:
23309
        return getSettlementType();
23310
 
23311
      case DOCUMENT_NUMBER:
23312
        return getDocumentNumber();
23313
 
23314
      case SETTLEMENT_BY:
23315
        return getSettlementBy();
23316
 
23317
      case SETTLED_AMOUNT:
23318
        return Long.valueOf(getSettledAmount());
23319
 
23320
      }
23321
      throw new IllegalStateException();
23322
    }
23323
 
23324
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
23325
    public boolean isSet(_Fields field) {
23326
      if (field == null) {
23327
        throw new IllegalArgumentException();
23328
      }
23329
 
23330
      switch (field) {
23331
      case ID:
23332
        return isSetId();
23333
      case SETTLEMENT_TYPE:
23334
        return isSetSettlementType();
23335
      case DOCUMENT_NUMBER:
23336
        return isSetDocumentNumber();
23337
      case SETTLEMENT_BY:
23338
        return isSetSettlementBy();
23339
      case SETTLED_AMOUNT:
23340
        return isSetSettledAmount();
23341
      }
23342
      throw new IllegalStateException();
23343
    }
23344
 
23345
    @Override
23346
    public boolean equals(Object that) {
23347
      if (that == null)
23348
        return false;
23349
      if (that instanceof markPurchasereturnSettled_args)
23350
        return this.equals((markPurchasereturnSettled_args)that);
23351
      return false;
23352
    }
23353
 
23354
    public boolean equals(markPurchasereturnSettled_args that) {
23355
      if (that == null)
23356
        return false;
23357
 
23358
      boolean this_present_id = true;
23359
      boolean that_present_id = true;
23360
      if (this_present_id || that_present_id) {
23361
        if (!(this_present_id && that_present_id))
23362
          return false;
23363
        if (this.id != that.id)
23364
          return false;
23365
      }
23366
 
23367
      boolean this_present_settlementType = true && this.isSetSettlementType();
23368
      boolean that_present_settlementType = true && that.isSetSettlementType();
23369
      if (this_present_settlementType || that_present_settlementType) {
23370
        if (!(this_present_settlementType && that_present_settlementType))
23371
          return false;
23372
        if (!this.settlementType.equals(that.settlementType))
23373
          return false;
23374
      }
23375
 
23376
      boolean this_present_documentNumber = true && this.isSetDocumentNumber();
23377
      boolean that_present_documentNumber = true && that.isSetDocumentNumber();
23378
      if (this_present_documentNumber || that_present_documentNumber) {
23379
        if (!(this_present_documentNumber && that_present_documentNumber))
23380
          return false;
23381
        if (!this.documentNumber.equals(that.documentNumber))
23382
          return false;
23383
      }
23384
 
23385
      boolean this_present_settlementBy = true && this.isSetSettlementBy();
23386
      boolean that_present_settlementBy = true && that.isSetSettlementBy();
23387
      if (this_present_settlementBy || that_present_settlementBy) {
23388
        if (!(this_present_settlementBy && that_present_settlementBy))
23389
          return false;
23390
        if (!this.settlementBy.equals(that.settlementBy))
23391
          return false;
23392
      }
23393
 
23394
      boolean this_present_settledAmount = true;
23395
      boolean that_present_settledAmount = true;
23396
      if (this_present_settledAmount || that_present_settledAmount) {
23397
        if (!(this_present_settledAmount && that_present_settledAmount))
23398
          return false;
23399
        if (this.settledAmount != that.settledAmount)
23400
          return false;
23401
      }
23402
 
23403
      return true;
23404
    }
23405
 
23406
    @Override
23407
    public int hashCode() {
23408
      return 0;
23409
    }
23410
 
23411
    public int compareTo(markPurchasereturnSettled_args other) {
23412
      if (!getClass().equals(other.getClass())) {
23413
        return getClass().getName().compareTo(other.getClass().getName());
23414
      }
23415
 
23416
      int lastComparison = 0;
23417
      markPurchasereturnSettled_args typedOther = (markPurchasereturnSettled_args)other;
23418
 
23419
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
23420
      if (lastComparison != 0) {
23421
        return lastComparison;
23422
      }
23423
      if (isSetId()) {
23424
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
23425
        if (lastComparison != 0) {
23426
          return lastComparison;
23427
        }
23428
      }
23429
      lastComparison = Boolean.valueOf(isSetSettlementType()).compareTo(typedOther.isSetSettlementType());
23430
      if (lastComparison != 0) {
23431
        return lastComparison;
23432
      }
23433
      if (isSetSettlementType()) {
23434
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.settlementType, typedOther.settlementType);
23435
        if (lastComparison != 0) {
23436
          return lastComparison;
23437
        }
23438
      }
23439
      lastComparison = Boolean.valueOf(isSetDocumentNumber()).compareTo(typedOther.isSetDocumentNumber());
23440
      if (lastComparison != 0) {
23441
        return lastComparison;
23442
      }
23443
      if (isSetDocumentNumber()) {
23444
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.documentNumber, typedOther.documentNumber);
23445
        if (lastComparison != 0) {
23446
          return lastComparison;
23447
        }
23448
      }
23449
      lastComparison = Boolean.valueOf(isSetSettlementBy()).compareTo(typedOther.isSetSettlementBy());
23450
      if (lastComparison != 0) {
23451
        return lastComparison;
23452
      }
23453
      if (isSetSettlementBy()) {
23454
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.settlementBy, typedOther.settlementBy);
23455
        if (lastComparison != 0) {
23456
          return lastComparison;
23457
        }
23458
      }
23459
      lastComparison = Boolean.valueOf(isSetSettledAmount()).compareTo(typedOther.isSetSettledAmount());
23460
      if (lastComparison != 0) {
23461
        return lastComparison;
23462
      }
23463
      if (isSetSettledAmount()) {
23464
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.settledAmount, typedOther.settledAmount);
23465
        if (lastComparison != 0) {
23466
          return lastComparison;
23467
        }
23468
      }
23469
      return 0;
23470
    }
23471
 
23472
    public _Fields fieldForId(int fieldId) {
23473
      return _Fields.findByThriftId(fieldId);
23474
    }
23475
 
23476
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
23477
      org.apache.thrift.protocol.TField field;
23478
      iprot.readStructBegin();
23479
      while (true)
23480
      {
23481
        field = iprot.readFieldBegin();
23482
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
23483
          break;
23484
        }
23485
        switch (field.id) {
23486
          case 1: // ID
23487
            if (field.type == org.apache.thrift.protocol.TType.I64) {
23488
              this.id = iprot.readI64();
23489
              setIdIsSet(true);
23490
            } else { 
23491
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23492
            }
23493
            break;
23494
          case 2: // SETTLEMENT_TYPE
23495
            if (field.type == org.apache.thrift.protocol.TType.I32) {
23496
              this.settlementType = SettlementType.findByValue(iprot.readI32());
23497
            } else { 
23498
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23499
            }
23500
            break;
23501
          case 3: // DOCUMENT_NUMBER
23502
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
23503
              this.documentNumber = iprot.readString();
23504
            } else { 
23505
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23506
            }
23507
            break;
23508
          case 4: // SETTLEMENT_BY
23509
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
23510
              this.settlementBy = iprot.readString();
23511
            } else { 
23512
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23513
            }
23514
            break;
23515
          case 5: // SETTLED_AMOUNT
23516
            if (field.type == org.apache.thrift.protocol.TType.I64) {
23517
              this.settledAmount = iprot.readI64();
23518
              setSettledAmountIsSet(true);
23519
            } else { 
23520
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23521
            }
23522
            break;
23523
          default:
23524
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23525
        }
23526
        iprot.readFieldEnd();
23527
      }
23528
      iprot.readStructEnd();
23529
      validate();
23530
    }
23531
 
23532
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
23533
      validate();
23534
 
23535
      oprot.writeStructBegin(STRUCT_DESC);
23536
      oprot.writeFieldBegin(ID_FIELD_DESC);
23537
      oprot.writeI64(this.id);
23538
      oprot.writeFieldEnd();
23539
      if (this.settlementType != null) {
23540
        oprot.writeFieldBegin(SETTLEMENT_TYPE_FIELD_DESC);
23541
        oprot.writeI32(this.settlementType.getValue());
23542
        oprot.writeFieldEnd();
23543
      }
23544
      if (this.documentNumber != null) {
23545
        oprot.writeFieldBegin(DOCUMENT_NUMBER_FIELD_DESC);
23546
        oprot.writeString(this.documentNumber);
23547
        oprot.writeFieldEnd();
23548
      }
23549
      if (this.settlementBy != null) {
23550
        oprot.writeFieldBegin(SETTLEMENT_BY_FIELD_DESC);
23551
        oprot.writeString(this.settlementBy);
23552
        oprot.writeFieldEnd();
23553
      }
23554
      oprot.writeFieldBegin(SETTLED_AMOUNT_FIELD_DESC);
23555
      oprot.writeI64(this.settledAmount);
23556
      oprot.writeFieldEnd();
23557
      oprot.writeFieldStop();
23558
      oprot.writeStructEnd();
23559
    }
23560
 
23561
    @Override
23562
    public String toString() {
23563
      StringBuilder sb = new StringBuilder("markPurchasereturnSettled_args(");
23564
      boolean first = true;
23565
 
23566
      sb.append("id:");
23567
      sb.append(this.id);
23568
      first = false;
23569
      if (!first) sb.append(", ");
23570
      sb.append("settlementType:");
23571
      if (this.settlementType == null) {
23572
        sb.append("null");
23573
      } else {
23574
        sb.append(this.settlementType);
23575
      }
23576
      first = false;
23577
      if (!first) sb.append(", ");
23578
      sb.append("documentNumber:");
23579
      if (this.documentNumber == null) {
23580
        sb.append("null");
23581
      } else {
23582
        sb.append(this.documentNumber);
23583
      }
23584
      first = false;
23585
      if (!first) sb.append(", ");
23586
      sb.append("settlementBy:");
23587
      if (this.settlementBy == null) {
23588
        sb.append("null");
23589
      } else {
23590
        sb.append(this.settlementBy);
23591
      }
23592
      first = false;
23593
      if (!first) sb.append(", ");
23594
      sb.append("settledAmount:");
23595
      sb.append(this.settledAmount);
23596
      first = false;
23597
      sb.append(")");
23598
      return sb.toString();
23599
    }
23600
 
23601
    public void validate() throws org.apache.thrift.TException {
23602
      // check for required fields
23603
    }
23604
 
23605
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
23606
      try {
23607
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
23608
      } catch (org.apache.thrift.TException te) {
23609
        throw new java.io.IOException(te);
23610
      }
23611
    }
23612
 
23613
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
23614
      try {
23615
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
23616
        __isset_bit_vector = new BitSet(1);
23617
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
23618
      } catch (org.apache.thrift.TException te) {
23619
        throw new java.io.IOException(te);
23620
      }
23621
    }
23622
 
23623
  }
23624
 
23625
  public static class markPurchasereturnSettled_result implements org.apache.thrift.TBase<markPurchasereturnSettled_result, markPurchasereturnSettled_result._Fields>, java.io.Serializable, Cloneable   {
23626
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markPurchasereturnSettled_result");
23627
 
23628
    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);
23629
    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);
23630
 
23631
    private boolean success; // required
23632
    private PurchaseServiceException e; // required
23633
 
23634
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23635
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
23636
      SUCCESS((short)0, "success"),
23637
      E((short)1, "e");
23638
 
23639
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23640
 
23641
      static {
23642
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23643
          byName.put(field.getFieldName(), field);
23644
        }
23645
      }
23646
 
23647
      /**
23648
       * Find the _Fields constant that matches fieldId, or null if its not found.
23649
       */
23650
      public static _Fields findByThriftId(int fieldId) {
23651
        switch(fieldId) {
23652
          case 0: // SUCCESS
23653
            return SUCCESS;
23654
          case 1: // E
23655
            return E;
23656
          default:
23657
            return null;
23658
        }
23659
      }
23660
 
23661
      /**
23662
       * Find the _Fields constant that matches fieldId, throwing an exception
23663
       * if it is not found.
23664
       */
23665
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23666
        _Fields fields = findByThriftId(fieldId);
23667
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23668
        return fields;
23669
      }
23670
 
23671
      /**
23672
       * Find the _Fields constant that matches name, or null if its not found.
23673
       */
23674
      public static _Fields findByName(String name) {
23675
        return byName.get(name);
23676
      }
23677
 
23678
      private final short _thriftId;
23679
      private final String _fieldName;
23680
 
23681
      _Fields(short thriftId, String fieldName) {
23682
        _thriftId = thriftId;
23683
        _fieldName = fieldName;
23684
      }
23685
 
23686
      public short getThriftFieldId() {
23687
        return _thriftId;
23688
      }
23689
 
23690
      public String getFieldName() {
23691
        return _fieldName;
23692
      }
23693
    }
23694
 
23695
    // isset id assignments
23696
    private static final int __SUCCESS_ISSET_ID = 0;
23697
    private BitSet __isset_bit_vector = new BitSet(1);
23698
 
23699
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
23700
    static {
23701
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
23702
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23703
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
23704
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
23705
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
23706
      metaDataMap = Collections.unmodifiableMap(tmpMap);
23707
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markPurchasereturnSettled_result.class, metaDataMap);
23708
    }
23709
 
23710
    public markPurchasereturnSettled_result() {
23711
    }
23712
 
23713
    public markPurchasereturnSettled_result(
23714
      boolean success,
23715
      PurchaseServiceException e)
23716
    {
23717
      this();
23718
      this.success = success;
23719
      setSuccessIsSet(true);
23720
      this.e = e;
23721
    }
23722
 
23723
    /**
23724
     * Performs a deep copy on <i>other</i>.
23725
     */
23726
    public markPurchasereturnSettled_result(markPurchasereturnSettled_result other) {
23727
      __isset_bit_vector.clear();
23728
      __isset_bit_vector.or(other.__isset_bit_vector);
23729
      this.success = other.success;
23730
      if (other.isSetE()) {
23731
        this.e = new PurchaseServiceException(other.e);
23732
      }
23733
    }
23734
 
23735
    public markPurchasereturnSettled_result deepCopy() {
23736
      return new markPurchasereturnSettled_result(this);
23737
    }
23738
 
23739
    @Override
23740
    public void clear() {
23741
      setSuccessIsSet(false);
23742
      this.success = false;
23743
      this.e = null;
23744
    }
23745
 
23746
    public boolean isSuccess() {
23747
      return this.success;
23748
    }
23749
 
23750
    public void setSuccess(boolean success) {
23751
      this.success = success;
23752
      setSuccessIsSet(true);
23753
    }
23754
 
23755
    public void unsetSuccess() {
23756
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
23757
    }
23758
 
23759
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
23760
    public boolean isSetSuccess() {
23761
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
23762
    }
23763
 
23764
    public void setSuccessIsSet(boolean value) {
23765
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
23766
    }
23767
 
23768
    public PurchaseServiceException getE() {
23769
      return this.e;
23770
    }
23771
 
23772
    public void setE(PurchaseServiceException e) {
23773
      this.e = e;
23774
    }
23775
 
23776
    public void unsetE() {
23777
      this.e = null;
23778
    }
23779
 
23780
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
23781
    public boolean isSetE() {
23782
      return this.e != null;
23783
    }
23784
 
23785
    public void setEIsSet(boolean value) {
23786
      if (!value) {
23787
        this.e = null;
23788
      }
23789
    }
23790
 
23791
    public void setFieldValue(_Fields field, Object value) {
23792
      switch (field) {
23793
      case SUCCESS:
23794
        if (value == null) {
23795
          unsetSuccess();
23796
        } else {
23797
          setSuccess((Boolean)value);
23798
        }
23799
        break;
23800
 
23801
      case E:
23802
        if (value == null) {
23803
          unsetE();
23804
        } else {
23805
          setE((PurchaseServiceException)value);
23806
        }
23807
        break;
23808
 
23809
      }
23810
    }
23811
 
23812
    public Object getFieldValue(_Fields field) {
23813
      switch (field) {
23814
      case SUCCESS:
23815
        return Boolean.valueOf(isSuccess());
23816
 
23817
      case E:
23818
        return getE();
23819
 
23820
      }
23821
      throw new IllegalStateException();
23822
    }
23823
 
23824
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
23825
    public boolean isSet(_Fields field) {
23826
      if (field == null) {
23827
        throw new IllegalArgumentException();
23828
      }
23829
 
23830
      switch (field) {
23831
      case SUCCESS:
23832
        return isSetSuccess();
23833
      case E:
23834
        return isSetE();
23835
      }
23836
      throw new IllegalStateException();
23837
    }
23838
 
23839
    @Override
23840
    public boolean equals(Object that) {
23841
      if (that == null)
23842
        return false;
23843
      if (that instanceof markPurchasereturnSettled_result)
23844
        return this.equals((markPurchasereturnSettled_result)that);
23845
      return false;
23846
    }
23847
 
23848
    public boolean equals(markPurchasereturnSettled_result that) {
23849
      if (that == null)
23850
        return false;
23851
 
23852
      boolean this_present_success = true;
23853
      boolean that_present_success = true;
23854
      if (this_present_success || that_present_success) {
23855
        if (!(this_present_success && that_present_success))
23856
          return false;
23857
        if (this.success != that.success)
23858
          return false;
23859
      }
23860
 
23861
      boolean this_present_e = true && this.isSetE();
23862
      boolean that_present_e = true && that.isSetE();
23863
      if (this_present_e || that_present_e) {
23864
        if (!(this_present_e && that_present_e))
23865
          return false;
23866
        if (!this.e.equals(that.e))
23867
          return false;
23868
      }
23869
 
23870
      return true;
23871
    }
23872
 
23873
    @Override
23874
    public int hashCode() {
23875
      return 0;
23876
    }
23877
 
23878
    public int compareTo(markPurchasereturnSettled_result other) {
23879
      if (!getClass().equals(other.getClass())) {
23880
        return getClass().getName().compareTo(other.getClass().getName());
23881
      }
23882
 
23883
      int lastComparison = 0;
23884
      markPurchasereturnSettled_result typedOther = (markPurchasereturnSettled_result)other;
23885
 
23886
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
23887
      if (lastComparison != 0) {
23888
        return lastComparison;
23889
      }
23890
      if (isSetSuccess()) {
23891
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
23892
        if (lastComparison != 0) {
23893
          return lastComparison;
23894
        }
23895
      }
23896
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
23897
      if (lastComparison != 0) {
23898
        return lastComparison;
23899
      }
23900
      if (isSetE()) {
23901
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
23902
        if (lastComparison != 0) {
23903
          return lastComparison;
23904
        }
23905
      }
23906
      return 0;
23907
    }
23908
 
23909
    public _Fields fieldForId(int fieldId) {
23910
      return _Fields.findByThriftId(fieldId);
23911
    }
23912
 
23913
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
23914
      org.apache.thrift.protocol.TField field;
23915
      iprot.readStructBegin();
23916
      while (true)
23917
      {
23918
        field = iprot.readFieldBegin();
23919
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
23920
          break;
23921
        }
23922
        switch (field.id) {
23923
          case 0: // SUCCESS
23924
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
23925
              this.success = iprot.readBool();
23926
              setSuccessIsSet(true);
23927
            } else { 
23928
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23929
            }
23930
            break;
23931
          case 1: // E
23932
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
23933
              this.e = new PurchaseServiceException();
23934
              this.e.read(iprot);
23935
            } else { 
23936
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23937
            }
23938
            break;
23939
          default:
23940
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
23941
        }
23942
        iprot.readFieldEnd();
23943
      }
23944
      iprot.readStructEnd();
23945
      validate();
23946
    }
23947
 
23948
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
23949
      oprot.writeStructBegin(STRUCT_DESC);
23950
 
23951
      if (this.isSetSuccess()) {
23952
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
23953
        oprot.writeBool(this.success);
23954
        oprot.writeFieldEnd();
23955
      } else if (this.isSetE()) {
23956
        oprot.writeFieldBegin(E_FIELD_DESC);
23957
        this.e.write(oprot);
23958
        oprot.writeFieldEnd();
23959
      }
23960
      oprot.writeFieldStop();
23961
      oprot.writeStructEnd();
23962
    }
23963
 
23964
    @Override
23965
    public String toString() {
23966
      StringBuilder sb = new StringBuilder("markPurchasereturnSettled_result(");
23967
      boolean first = true;
23968
 
23969
      sb.append("success:");
23970
      sb.append(this.success);
23971
      first = false;
23972
      if (!first) sb.append(", ");
23973
      sb.append("e:");
23974
      if (this.e == null) {
23975
        sb.append("null");
23976
      } else {
23977
        sb.append(this.e);
23978
      }
23979
      first = false;
23980
      sb.append(")");
23981
      return sb.toString();
23982
    }
23983
 
23984
    public void validate() throws org.apache.thrift.TException {
23985
      // check for required fields
23986
    }
23987
 
23988
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
23989
      try {
23990
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
23991
      } catch (org.apache.thrift.TException te) {
23992
        throw new java.io.IOException(te);
23993
      }
23994
    }
23995
 
23996
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
23997
      try {
23998
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
23999
      } catch (org.apache.thrift.TException te) {
24000
        throw new java.io.IOException(te);
24001
      }
24002
    }
24003
 
24004
  }
24005
 
24006
  public static class getPrSettlementsForPurchaseReturn_args implements org.apache.thrift.TBase<getPrSettlementsForPurchaseReturn_args, getPrSettlementsForPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
24007
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPrSettlementsForPurchaseReturn_args");
24008
 
24009
    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);
24010
 
24011
    private long purchaseReturnId; // required
24012
 
24013
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24014
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
24015
      PURCHASE_RETURN_ID((short)1, "purchaseReturnId");
24016
 
24017
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24018
 
24019
      static {
24020
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24021
          byName.put(field.getFieldName(), field);
24022
        }
24023
      }
24024
 
24025
      /**
24026
       * Find the _Fields constant that matches fieldId, or null if its not found.
24027
       */
24028
      public static _Fields findByThriftId(int fieldId) {
24029
        switch(fieldId) {
24030
          case 1: // PURCHASE_RETURN_ID
24031
            return PURCHASE_RETURN_ID;
24032
          default:
24033
            return null;
24034
        }
24035
      }
24036
 
24037
      /**
24038
       * Find the _Fields constant that matches fieldId, throwing an exception
24039
       * if it is not found.
24040
       */
24041
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24042
        _Fields fields = findByThriftId(fieldId);
24043
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24044
        return fields;
24045
      }
24046
 
24047
      /**
24048
       * Find the _Fields constant that matches name, or null if its not found.
24049
       */
24050
      public static _Fields findByName(String name) {
24051
        return byName.get(name);
24052
      }
24053
 
24054
      private final short _thriftId;
24055
      private final String _fieldName;
24056
 
24057
      _Fields(short thriftId, String fieldName) {
24058
        _thriftId = thriftId;
24059
        _fieldName = fieldName;
24060
      }
24061
 
24062
      public short getThriftFieldId() {
24063
        return _thriftId;
24064
      }
24065
 
24066
      public String getFieldName() {
24067
        return _fieldName;
24068
      }
24069
    }
24070
 
24071
    // isset id assignments
24072
    private static final int __PURCHASERETURNID_ISSET_ID = 0;
24073
    private BitSet __isset_bit_vector = new BitSet(1);
24074
 
24075
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
24076
    static {
24077
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
24078
      tmpMap.put(_Fields.PURCHASE_RETURN_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseReturnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
24079
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
24080
      metaDataMap = Collections.unmodifiableMap(tmpMap);
24081
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPrSettlementsForPurchaseReturn_args.class, metaDataMap);
24082
    }
24083
 
24084
    public getPrSettlementsForPurchaseReturn_args() {
24085
    }
24086
 
24087
    public getPrSettlementsForPurchaseReturn_args(
24088
      long purchaseReturnId)
24089
    {
24090
      this();
24091
      this.purchaseReturnId = purchaseReturnId;
24092
      setPurchaseReturnIdIsSet(true);
24093
    }
24094
 
24095
    /**
24096
     * Performs a deep copy on <i>other</i>.
24097
     */
24098
    public getPrSettlementsForPurchaseReturn_args(getPrSettlementsForPurchaseReturn_args other) {
24099
      __isset_bit_vector.clear();
24100
      __isset_bit_vector.or(other.__isset_bit_vector);
24101
      this.purchaseReturnId = other.purchaseReturnId;
24102
    }
24103
 
24104
    public getPrSettlementsForPurchaseReturn_args deepCopy() {
24105
      return new getPrSettlementsForPurchaseReturn_args(this);
24106
    }
24107
 
24108
    @Override
24109
    public void clear() {
24110
      setPurchaseReturnIdIsSet(false);
24111
      this.purchaseReturnId = 0;
24112
    }
24113
 
24114
    public long getPurchaseReturnId() {
24115
      return this.purchaseReturnId;
24116
    }
24117
 
24118
    public void setPurchaseReturnId(long purchaseReturnId) {
24119
      this.purchaseReturnId = purchaseReturnId;
24120
      setPurchaseReturnIdIsSet(true);
24121
    }
24122
 
24123
    public void unsetPurchaseReturnId() {
24124
      __isset_bit_vector.clear(__PURCHASERETURNID_ISSET_ID);
24125
    }
24126
 
24127
    /** Returns true if field purchaseReturnId is set (has been assigned a value) and false otherwise */
24128
    public boolean isSetPurchaseReturnId() {
24129
      return __isset_bit_vector.get(__PURCHASERETURNID_ISSET_ID);
24130
    }
24131
 
24132
    public void setPurchaseReturnIdIsSet(boolean value) {
24133
      __isset_bit_vector.set(__PURCHASERETURNID_ISSET_ID, value);
24134
    }
24135
 
24136
    public void setFieldValue(_Fields field, Object value) {
24137
      switch (field) {
24138
      case PURCHASE_RETURN_ID:
24139
        if (value == null) {
24140
          unsetPurchaseReturnId();
24141
        } else {
24142
          setPurchaseReturnId((Long)value);
24143
        }
24144
        break;
24145
 
24146
      }
24147
    }
24148
 
24149
    public Object getFieldValue(_Fields field) {
24150
      switch (field) {
24151
      case PURCHASE_RETURN_ID:
24152
        return Long.valueOf(getPurchaseReturnId());
24153
 
24154
      }
24155
      throw new IllegalStateException();
24156
    }
24157
 
24158
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
24159
    public boolean isSet(_Fields field) {
24160
      if (field == null) {
24161
        throw new IllegalArgumentException();
24162
      }
24163
 
24164
      switch (field) {
24165
      case PURCHASE_RETURN_ID:
24166
        return isSetPurchaseReturnId();
24167
      }
24168
      throw new IllegalStateException();
24169
    }
24170
 
24171
    @Override
24172
    public boolean equals(Object that) {
24173
      if (that == null)
24174
        return false;
24175
      if (that instanceof getPrSettlementsForPurchaseReturn_args)
24176
        return this.equals((getPrSettlementsForPurchaseReturn_args)that);
24177
      return false;
24178
    }
24179
 
24180
    public boolean equals(getPrSettlementsForPurchaseReturn_args that) {
24181
      if (that == null)
24182
        return false;
24183
 
24184
      boolean this_present_purchaseReturnId = true;
24185
      boolean that_present_purchaseReturnId = true;
24186
      if (this_present_purchaseReturnId || that_present_purchaseReturnId) {
24187
        if (!(this_present_purchaseReturnId && that_present_purchaseReturnId))
24188
          return false;
24189
        if (this.purchaseReturnId != that.purchaseReturnId)
24190
          return false;
24191
      }
24192
 
24193
      return true;
24194
    }
24195
 
24196
    @Override
24197
    public int hashCode() {
24198
      return 0;
24199
    }
24200
 
24201
    public int compareTo(getPrSettlementsForPurchaseReturn_args other) {
24202
      if (!getClass().equals(other.getClass())) {
24203
        return getClass().getName().compareTo(other.getClass().getName());
24204
      }
24205
 
24206
      int lastComparison = 0;
24207
      getPrSettlementsForPurchaseReturn_args typedOther = (getPrSettlementsForPurchaseReturn_args)other;
24208
 
24209
      lastComparison = Boolean.valueOf(isSetPurchaseReturnId()).compareTo(typedOther.isSetPurchaseReturnId());
24210
      if (lastComparison != 0) {
24211
        return lastComparison;
24212
      }
24213
      if (isSetPurchaseReturnId()) {
24214
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseReturnId, typedOther.purchaseReturnId);
24215
        if (lastComparison != 0) {
24216
          return lastComparison;
24217
        }
24218
      }
24219
      return 0;
24220
    }
24221
 
24222
    public _Fields fieldForId(int fieldId) {
24223
      return _Fields.findByThriftId(fieldId);
24224
    }
24225
 
24226
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
24227
      org.apache.thrift.protocol.TField field;
24228
      iprot.readStructBegin();
24229
      while (true)
24230
      {
24231
        field = iprot.readFieldBegin();
24232
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
24233
          break;
24234
        }
24235
        switch (field.id) {
24236
          case 1: // PURCHASE_RETURN_ID
24237
            if (field.type == org.apache.thrift.protocol.TType.I64) {
24238
              this.purchaseReturnId = iprot.readI64();
24239
              setPurchaseReturnIdIsSet(true);
24240
            } else { 
24241
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24242
            }
24243
            break;
24244
          default:
24245
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24246
        }
24247
        iprot.readFieldEnd();
24248
      }
24249
      iprot.readStructEnd();
24250
      validate();
24251
    }
24252
 
24253
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
24254
      validate();
24255
 
24256
      oprot.writeStructBegin(STRUCT_DESC);
24257
      oprot.writeFieldBegin(PURCHASE_RETURN_ID_FIELD_DESC);
24258
      oprot.writeI64(this.purchaseReturnId);
24259
      oprot.writeFieldEnd();
24260
      oprot.writeFieldStop();
24261
      oprot.writeStructEnd();
24262
    }
24263
 
24264
    @Override
24265
    public String toString() {
24266
      StringBuilder sb = new StringBuilder("getPrSettlementsForPurchaseReturn_args(");
24267
      boolean first = true;
24268
 
24269
      sb.append("purchaseReturnId:");
24270
      sb.append(this.purchaseReturnId);
24271
      first = false;
24272
      sb.append(")");
24273
      return sb.toString();
24274
    }
24275
 
24276
    public void validate() throws org.apache.thrift.TException {
24277
      // check for required fields
24278
    }
24279
 
24280
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
24281
      try {
24282
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
24283
      } catch (org.apache.thrift.TException te) {
24284
        throw new java.io.IOException(te);
24285
      }
24286
    }
24287
 
24288
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
24289
      try {
24290
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
24291
        __isset_bit_vector = new BitSet(1);
24292
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
24293
      } catch (org.apache.thrift.TException te) {
24294
        throw new java.io.IOException(te);
24295
      }
24296
    }
24297
 
24298
  }
24299
 
24300
  public static class getPrSettlementsForPurchaseReturn_result implements org.apache.thrift.TBase<getPrSettlementsForPurchaseReturn_result, getPrSettlementsForPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
24301
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPrSettlementsForPurchaseReturn_result");
24302
 
24303
    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);
24304
    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);
24305
 
24306
    private List<PurchaseReturnSettlement> success; // required
24307
    private PurchaseServiceException e; // required
24308
 
24309
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24310
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
24311
      SUCCESS((short)0, "success"),
24312
      E((short)1, "e");
24313
 
24314
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24315
 
24316
      static {
24317
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24318
          byName.put(field.getFieldName(), field);
24319
        }
24320
      }
24321
 
24322
      /**
24323
       * Find the _Fields constant that matches fieldId, or null if its not found.
24324
       */
24325
      public static _Fields findByThriftId(int fieldId) {
24326
        switch(fieldId) {
24327
          case 0: // SUCCESS
24328
            return SUCCESS;
24329
          case 1: // E
24330
            return E;
24331
          default:
24332
            return null;
24333
        }
24334
      }
24335
 
24336
      /**
24337
       * Find the _Fields constant that matches fieldId, throwing an exception
24338
       * if it is not found.
24339
       */
24340
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24341
        _Fields fields = findByThriftId(fieldId);
24342
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24343
        return fields;
24344
      }
24345
 
24346
      /**
24347
       * Find the _Fields constant that matches name, or null if its not found.
24348
       */
24349
      public static _Fields findByName(String name) {
24350
        return byName.get(name);
24351
      }
24352
 
24353
      private final short _thriftId;
24354
      private final String _fieldName;
24355
 
24356
      _Fields(short thriftId, String fieldName) {
24357
        _thriftId = thriftId;
24358
        _fieldName = fieldName;
24359
      }
24360
 
24361
      public short getThriftFieldId() {
24362
        return _thriftId;
24363
      }
24364
 
24365
      public String getFieldName() {
24366
        return _fieldName;
24367
      }
24368
    }
24369
 
24370
    // isset id assignments
24371
 
24372
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
24373
    static {
24374
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
24375
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
24376
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
24377
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturnSettlement.class))));
24378
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
24379
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
24380
      metaDataMap = Collections.unmodifiableMap(tmpMap);
24381
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPrSettlementsForPurchaseReturn_result.class, metaDataMap);
24382
    }
24383
 
24384
    public getPrSettlementsForPurchaseReturn_result() {
24385
    }
24386
 
24387
    public getPrSettlementsForPurchaseReturn_result(
24388
      List<PurchaseReturnSettlement> success,
24389
      PurchaseServiceException e)
24390
    {
24391
      this();
24392
      this.success = success;
24393
      this.e = e;
24394
    }
24395
 
24396
    /**
24397
     * Performs a deep copy on <i>other</i>.
24398
     */
24399
    public getPrSettlementsForPurchaseReturn_result(getPrSettlementsForPurchaseReturn_result other) {
24400
      if (other.isSetSuccess()) {
24401
        List<PurchaseReturnSettlement> __this__success = new ArrayList<PurchaseReturnSettlement>();
24402
        for (PurchaseReturnSettlement other_element : other.success) {
24403
          __this__success.add(new PurchaseReturnSettlement(other_element));
24404
        }
24405
        this.success = __this__success;
24406
      }
24407
      if (other.isSetE()) {
24408
        this.e = new PurchaseServiceException(other.e);
24409
      }
24410
    }
24411
 
24412
    public getPrSettlementsForPurchaseReturn_result deepCopy() {
24413
      return new getPrSettlementsForPurchaseReturn_result(this);
24414
    }
24415
 
24416
    @Override
24417
    public void clear() {
24418
      this.success = null;
24419
      this.e = null;
24420
    }
24421
 
24422
    public int getSuccessSize() {
24423
      return (this.success == null) ? 0 : this.success.size();
24424
    }
24425
 
24426
    public java.util.Iterator<PurchaseReturnSettlement> getSuccessIterator() {
24427
      return (this.success == null) ? null : this.success.iterator();
24428
    }
24429
 
24430
    public void addToSuccess(PurchaseReturnSettlement elem) {
24431
      if (this.success == null) {
24432
        this.success = new ArrayList<PurchaseReturnSettlement>();
24433
      }
24434
      this.success.add(elem);
24435
    }
24436
 
24437
    public List<PurchaseReturnSettlement> getSuccess() {
24438
      return this.success;
24439
    }
24440
 
24441
    public void setSuccess(List<PurchaseReturnSettlement> success) {
24442
      this.success = success;
24443
    }
24444
 
24445
    public void unsetSuccess() {
24446
      this.success = null;
24447
    }
24448
 
24449
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
24450
    public boolean isSetSuccess() {
24451
      return this.success != null;
24452
    }
24453
 
24454
    public void setSuccessIsSet(boolean value) {
24455
      if (!value) {
24456
        this.success = null;
24457
      }
24458
    }
24459
 
24460
    public PurchaseServiceException getE() {
24461
      return this.e;
24462
    }
24463
 
24464
    public void setE(PurchaseServiceException e) {
24465
      this.e = e;
24466
    }
24467
 
24468
    public void unsetE() {
24469
      this.e = null;
24470
    }
24471
 
24472
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
24473
    public boolean isSetE() {
24474
      return this.e != null;
24475
    }
24476
 
24477
    public void setEIsSet(boolean value) {
24478
      if (!value) {
24479
        this.e = null;
24480
      }
24481
    }
24482
 
24483
    public void setFieldValue(_Fields field, Object value) {
24484
      switch (field) {
24485
      case SUCCESS:
24486
        if (value == null) {
24487
          unsetSuccess();
24488
        } else {
24489
          setSuccess((List<PurchaseReturnSettlement>)value);
24490
        }
24491
        break;
24492
 
24493
      case E:
24494
        if (value == null) {
24495
          unsetE();
24496
        } else {
24497
          setE((PurchaseServiceException)value);
24498
        }
24499
        break;
24500
 
24501
      }
24502
    }
24503
 
24504
    public Object getFieldValue(_Fields field) {
24505
      switch (field) {
24506
      case SUCCESS:
24507
        return getSuccess();
24508
 
24509
      case E:
24510
        return getE();
24511
 
24512
      }
24513
      throw new IllegalStateException();
24514
    }
24515
 
24516
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
24517
    public boolean isSet(_Fields field) {
24518
      if (field == null) {
24519
        throw new IllegalArgumentException();
24520
      }
24521
 
24522
      switch (field) {
24523
      case SUCCESS:
24524
        return isSetSuccess();
24525
      case E:
24526
        return isSetE();
24527
      }
24528
      throw new IllegalStateException();
24529
    }
24530
 
24531
    @Override
24532
    public boolean equals(Object that) {
24533
      if (that == null)
24534
        return false;
24535
      if (that instanceof getPrSettlementsForPurchaseReturn_result)
24536
        return this.equals((getPrSettlementsForPurchaseReturn_result)that);
24537
      return false;
24538
    }
24539
 
24540
    public boolean equals(getPrSettlementsForPurchaseReturn_result that) {
24541
      if (that == null)
24542
        return false;
24543
 
24544
      boolean this_present_success = true && this.isSetSuccess();
24545
      boolean that_present_success = true && that.isSetSuccess();
24546
      if (this_present_success || that_present_success) {
24547
        if (!(this_present_success && that_present_success))
24548
          return false;
24549
        if (!this.success.equals(that.success))
24550
          return false;
24551
      }
24552
 
24553
      boolean this_present_e = true && this.isSetE();
24554
      boolean that_present_e = true && that.isSetE();
24555
      if (this_present_e || that_present_e) {
24556
        if (!(this_present_e && that_present_e))
24557
          return false;
24558
        if (!this.e.equals(that.e))
24559
          return false;
24560
      }
24561
 
24562
      return true;
24563
    }
24564
 
24565
    @Override
24566
    public int hashCode() {
24567
      return 0;
24568
    }
24569
 
24570
    public int compareTo(getPrSettlementsForPurchaseReturn_result other) {
24571
      if (!getClass().equals(other.getClass())) {
24572
        return getClass().getName().compareTo(other.getClass().getName());
24573
      }
24574
 
24575
      int lastComparison = 0;
24576
      getPrSettlementsForPurchaseReturn_result typedOther = (getPrSettlementsForPurchaseReturn_result)other;
24577
 
24578
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
24579
      if (lastComparison != 0) {
24580
        return lastComparison;
24581
      }
24582
      if (isSetSuccess()) {
24583
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
24584
        if (lastComparison != 0) {
24585
          return lastComparison;
24586
        }
24587
      }
24588
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
24589
      if (lastComparison != 0) {
24590
        return lastComparison;
24591
      }
24592
      if (isSetE()) {
24593
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
24594
        if (lastComparison != 0) {
24595
          return lastComparison;
24596
        }
24597
      }
24598
      return 0;
24599
    }
24600
 
24601
    public _Fields fieldForId(int fieldId) {
24602
      return _Fields.findByThriftId(fieldId);
24603
    }
24604
 
24605
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
24606
      org.apache.thrift.protocol.TField field;
24607
      iprot.readStructBegin();
24608
      while (true)
24609
      {
24610
        field = iprot.readFieldBegin();
24611
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
24612
          break;
24613
        }
24614
        switch (field.id) {
24615
          case 0: // SUCCESS
24616
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
24617
              {
24618
                org.apache.thrift.protocol.TList _list40 = iprot.readListBegin();
24619
                this.success = new ArrayList<PurchaseReturnSettlement>(_list40.size);
24620
                for (int _i41 = 0; _i41 < _list40.size; ++_i41)
24621
                {
24622
                  PurchaseReturnSettlement _elem42; // required
24623
                  _elem42 = new PurchaseReturnSettlement();
24624
                  _elem42.read(iprot);
24625
                  this.success.add(_elem42);
24626
                }
24627
                iprot.readListEnd();
24628
              }
24629
            } else { 
24630
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24631
            }
24632
            break;
24633
          case 1: // E
24634
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
24635
              this.e = new PurchaseServiceException();
24636
              this.e.read(iprot);
24637
            } else { 
24638
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24639
            }
24640
            break;
24641
          default:
24642
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24643
        }
24644
        iprot.readFieldEnd();
24645
      }
24646
      iprot.readStructEnd();
24647
      validate();
24648
    }
24649
 
24650
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
24651
      oprot.writeStructBegin(STRUCT_DESC);
24652
 
24653
      if (this.isSetSuccess()) {
24654
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
24655
        {
24656
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
24657
          for (PurchaseReturnSettlement _iter43 : this.success)
24658
          {
24659
            _iter43.write(oprot);
24660
          }
24661
          oprot.writeListEnd();
24662
        }
24663
        oprot.writeFieldEnd();
24664
      } else if (this.isSetE()) {
24665
        oprot.writeFieldBegin(E_FIELD_DESC);
24666
        this.e.write(oprot);
24667
        oprot.writeFieldEnd();
24668
      }
24669
      oprot.writeFieldStop();
24670
      oprot.writeStructEnd();
24671
    }
24672
 
24673
    @Override
24674
    public String toString() {
24675
      StringBuilder sb = new StringBuilder("getPrSettlementsForPurchaseReturn_result(");
24676
      boolean first = true;
24677
 
24678
      sb.append("success:");
24679
      if (this.success == null) {
24680
        sb.append("null");
24681
      } else {
24682
        sb.append(this.success);
24683
      }
24684
      first = false;
24685
      if (!first) sb.append(", ");
24686
      sb.append("e:");
24687
      if (this.e == null) {
24688
        sb.append("null");
24689
      } else {
24690
        sb.append(this.e);
24691
      }
24692
      first = false;
24693
      sb.append(")");
24694
      return sb.toString();
24695
    }
24696
 
24697
    public void validate() throws org.apache.thrift.TException {
24698
      // check for required fields
24699
    }
24700
 
24701
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
24702
      try {
24703
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
24704
      } catch (org.apache.thrift.TException te) {
24705
        throw new java.io.IOException(te);
24706
      }
24707
    }
24708
 
24709
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
24710
      try {
24711
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
24712
      } catch (org.apache.thrift.TException te) {
24713
        throw new java.io.IOException(te);
24714
      }
24715
    }
24716
 
24717
  }
24718
 
24719
  public static class updatePurchaseReturn_args implements org.apache.thrift.TBase<updatePurchaseReturn_args, updatePurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
24720
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseReturn_args");
24721
 
24722
    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);
24723
 
24724
    private PurchaseReturn purchaseReturn; // required
24725
 
24726
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24727
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
24728
      PURCHASE_RETURN((short)1, "purchaseReturn");
24729
 
24730
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24731
 
24732
      static {
24733
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24734
          byName.put(field.getFieldName(), field);
24735
        }
24736
      }
24737
 
24738
      /**
24739
       * Find the _Fields constant that matches fieldId, or null if its not found.
24740
       */
24741
      public static _Fields findByThriftId(int fieldId) {
24742
        switch(fieldId) {
24743
          case 1: // PURCHASE_RETURN
24744
            return PURCHASE_RETURN;
24745
          default:
24746
            return null;
24747
        }
24748
      }
24749
 
24750
      /**
24751
       * Find the _Fields constant that matches fieldId, throwing an exception
24752
       * if it is not found.
24753
       */
24754
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24755
        _Fields fields = findByThriftId(fieldId);
24756
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24757
        return fields;
24758
      }
24759
 
24760
      /**
24761
       * Find the _Fields constant that matches name, or null if its not found.
24762
       */
24763
      public static _Fields findByName(String name) {
24764
        return byName.get(name);
24765
      }
24766
 
24767
      private final short _thriftId;
24768
      private final String _fieldName;
24769
 
24770
      _Fields(short thriftId, String fieldName) {
24771
        _thriftId = thriftId;
24772
        _fieldName = fieldName;
24773
      }
24774
 
24775
      public short getThriftFieldId() {
24776
        return _thriftId;
24777
      }
24778
 
24779
      public String getFieldName() {
24780
        return _fieldName;
24781
      }
24782
    }
24783
 
24784
    // isset id assignments
24785
 
24786
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
24787
    static {
24788
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
24789
      tmpMap.put(_Fields.PURCHASE_RETURN, new org.apache.thrift.meta_data.FieldMetaData("purchaseReturn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
24790
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class)));
24791
      metaDataMap = Collections.unmodifiableMap(tmpMap);
24792
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseReturn_args.class, metaDataMap);
24793
    }
24794
 
24795
    public updatePurchaseReturn_args() {
24796
    }
24797
 
24798
    public updatePurchaseReturn_args(
24799
      PurchaseReturn purchaseReturn)
24800
    {
24801
      this();
24802
      this.purchaseReturn = purchaseReturn;
24803
    }
24804
 
24805
    /**
24806
     * Performs a deep copy on <i>other</i>.
24807
     */
24808
    public updatePurchaseReturn_args(updatePurchaseReturn_args other) {
24809
      if (other.isSetPurchaseReturn()) {
24810
        this.purchaseReturn = new PurchaseReturn(other.purchaseReturn);
24811
      }
24812
    }
24813
 
24814
    public updatePurchaseReturn_args deepCopy() {
24815
      return new updatePurchaseReturn_args(this);
24816
    }
24817
 
24818
    @Override
24819
    public void clear() {
24820
      this.purchaseReturn = null;
24821
    }
24822
 
24823
    public PurchaseReturn getPurchaseReturn() {
24824
      return this.purchaseReturn;
24825
    }
24826
 
24827
    public void setPurchaseReturn(PurchaseReturn purchaseReturn) {
24828
      this.purchaseReturn = purchaseReturn;
24829
    }
24830
 
24831
    public void unsetPurchaseReturn() {
24832
      this.purchaseReturn = null;
24833
    }
24834
 
24835
    /** Returns true if field purchaseReturn is set (has been assigned a value) and false otherwise */
24836
    public boolean isSetPurchaseReturn() {
24837
      return this.purchaseReturn != null;
24838
    }
24839
 
24840
    public void setPurchaseReturnIsSet(boolean value) {
24841
      if (!value) {
24842
        this.purchaseReturn = null;
24843
      }
24844
    }
24845
 
24846
    public void setFieldValue(_Fields field, Object value) {
24847
      switch (field) {
24848
      case PURCHASE_RETURN:
24849
        if (value == null) {
24850
          unsetPurchaseReturn();
24851
        } else {
24852
          setPurchaseReturn((PurchaseReturn)value);
24853
        }
24854
        break;
24855
 
24856
      }
24857
    }
24858
 
24859
    public Object getFieldValue(_Fields field) {
24860
      switch (field) {
24861
      case PURCHASE_RETURN:
24862
        return getPurchaseReturn();
24863
 
24864
      }
24865
      throw new IllegalStateException();
24866
    }
24867
 
24868
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
24869
    public boolean isSet(_Fields field) {
24870
      if (field == null) {
24871
        throw new IllegalArgumentException();
24872
      }
24873
 
24874
      switch (field) {
24875
      case PURCHASE_RETURN:
24876
        return isSetPurchaseReturn();
24877
      }
24878
      throw new IllegalStateException();
24879
    }
24880
 
24881
    @Override
24882
    public boolean equals(Object that) {
24883
      if (that == null)
24884
        return false;
24885
      if (that instanceof updatePurchaseReturn_args)
24886
        return this.equals((updatePurchaseReturn_args)that);
24887
      return false;
24888
    }
24889
 
24890
    public boolean equals(updatePurchaseReturn_args that) {
24891
      if (that == null)
24892
        return false;
24893
 
24894
      boolean this_present_purchaseReturn = true && this.isSetPurchaseReturn();
24895
      boolean that_present_purchaseReturn = true && that.isSetPurchaseReturn();
24896
      if (this_present_purchaseReturn || that_present_purchaseReturn) {
24897
        if (!(this_present_purchaseReturn && that_present_purchaseReturn))
24898
          return false;
24899
        if (!this.purchaseReturn.equals(that.purchaseReturn))
24900
          return false;
24901
      }
24902
 
24903
      return true;
24904
    }
24905
 
24906
    @Override
24907
    public int hashCode() {
24908
      return 0;
24909
    }
24910
 
24911
    public int compareTo(updatePurchaseReturn_args other) {
24912
      if (!getClass().equals(other.getClass())) {
24913
        return getClass().getName().compareTo(other.getClass().getName());
24914
      }
24915
 
24916
      int lastComparison = 0;
24917
      updatePurchaseReturn_args typedOther = (updatePurchaseReturn_args)other;
24918
 
24919
      lastComparison = Boolean.valueOf(isSetPurchaseReturn()).compareTo(typedOther.isSetPurchaseReturn());
24920
      if (lastComparison != 0) {
24921
        return lastComparison;
24922
      }
24923
      if (isSetPurchaseReturn()) {
24924
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseReturn, typedOther.purchaseReturn);
24925
        if (lastComparison != 0) {
24926
          return lastComparison;
24927
        }
24928
      }
24929
      return 0;
24930
    }
24931
 
24932
    public _Fields fieldForId(int fieldId) {
24933
      return _Fields.findByThriftId(fieldId);
24934
    }
24935
 
24936
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
24937
      org.apache.thrift.protocol.TField field;
24938
      iprot.readStructBegin();
24939
      while (true)
24940
      {
24941
        field = iprot.readFieldBegin();
24942
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
24943
          break;
24944
        }
24945
        switch (field.id) {
24946
          case 1: // PURCHASE_RETURN
24947
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
24948
              this.purchaseReturn = new PurchaseReturn();
24949
              this.purchaseReturn.read(iprot);
24950
            } else { 
24951
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24952
            }
24953
            break;
24954
          default:
24955
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
24956
        }
24957
        iprot.readFieldEnd();
24958
      }
24959
      iprot.readStructEnd();
24960
      validate();
24961
    }
24962
 
24963
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
24964
      validate();
24965
 
24966
      oprot.writeStructBegin(STRUCT_DESC);
24967
      if (this.purchaseReturn != null) {
24968
        oprot.writeFieldBegin(PURCHASE_RETURN_FIELD_DESC);
24969
        this.purchaseReturn.write(oprot);
24970
        oprot.writeFieldEnd();
24971
      }
24972
      oprot.writeFieldStop();
24973
      oprot.writeStructEnd();
24974
    }
24975
 
24976
    @Override
24977
    public String toString() {
24978
      StringBuilder sb = new StringBuilder("updatePurchaseReturn_args(");
24979
      boolean first = true;
24980
 
24981
      sb.append("purchaseReturn:");
24982
      if (this.purchaseReturn == null) {
24983
        sb.append("null");
24984
      } else {
24985
        sb.append(this.purchaseReturn);
24986
      }
24987
      first = false;
24988
      sb.append(")");
24989
      return sb.toString();
24990
    }
24991
 
24992
    public void validate() throws org.apache.thrift.TException {
24993
      // check for required fields
24994
    }
24995
 
24996
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
24997
      try {
24998
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
24999
      } catch (org.apache.thrift.TException te) {
25000
        throw new java.io.IOException(te);
25001
      }
25002
    }
25003
 
25004
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
25005
      try {
25006
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
25007
      } catch (org.apache.thrift.TException te) {
25008
        throw new java.io.IOException(te);
25009
      }
25010
    }
25011
 
25012
  }
25013
 
25014
  public static class updatePurchaseReturn_result implements org.apache.thrift.TBase<updatePurchaseReturn_result, updatePurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
25015
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseReturn_result");
25016
 
25017
    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);
25018
 
25019
    private PurchaseServiceException e; // required
25020
 
25021
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25022
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
25023
      E((short)1, "e");
25024
 
25025
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25026
 
25027
      static {
25028
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25029
          byName.put(field.getFieldName(), field);
25030
        }
25031
      }
25032
 
25033
      /**
25034
       * Find the _Fields constant that matches fieldId, or null if its not found.
25035
       */
25036
      public static _Fields findByThriftId(int fieldId) {
25037
        switch(fieldId) {
25038
          case 1: // E
25039
            return E;
25040
          default:
25041
            return null;
25042
        }
25043
      }
25044
 
25045
      /**
25046
       * Find the _Fields constant that matches fieldId, throwing an exception
25047
       * if it is not found.
25048
       */
25049
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25050
        _Fields fields = findByThriftId(fieldId);
25051
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25052
        return fields;
25053
      }
25054
 
25055
      /**
25056
       * Find the _Fields constant that matches name, or null if its not found.
25057
       */
25058
      public static _Fields findByName(String name) {
25059
        return byName.get(name);
25060
      }
25061
 
25062
      private final short _thriftId;
25063
      private final String _fieldName;
25064
 
25065
      _Fields(short thriftId, String fieldName) {
25066
        _thriftId = thriftId;
25067
        _fieldName = fieldName;
25068
      }
25069
 
25070
      public short getThriftFieldId() {
25071
        return _thriftId;
25072
      }
25073
 
25074
      public String getFieldName() {
25075
        return _fieldName;
25076
      }
25077
    }
25078
 
25079
    // isset id assignments
25080
 
25081
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
25082
    static {
25083
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
25084
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
25085
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
25086
      metaDataMap = Collections.unmodifiableMap(tmpMap);
25087
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseReturn_result.class, metaDataMap);
25088
    }
25089
 
25090
    public updatePurchaseReturn_result() {
25091
    }
25092
 
25093
    public updatePurchaseReturn_result(
25094
      PurchaseServiceException e)
25095
    {
25096
      this();
25097
      this.e = e;
25098
    }
25099
 
25100
    /**
25101
     * Performs a deep copy on <i>other</i>.
25102
     */
25103
    public updatePurchaseReturn_result(updatePurchaseReturn_result other) {
25104
      if (other.isSetE()) {
25105
        this.e = new PurchaseServiceException(other.e);
25106
      }
25107
    }
25108
 
25109
    public updatePurchaseReturn_result deepCopy() {
25110
      return new updatePurchaseReturn_result(this);
25111
    }
25112
 
25113
    @Override
25114
    public void clear() {
25115
      this.e = null;
25116
    }
25117
 
25118
    public PurchaseServiceException getE() {
25119
      return this.e;
25120
    }
25121
 
25122
    public void setE(PurchaseServiceException e) {
25123
      this.e = e;
25124
    }
25125
 
25126
    public void unsetE() {
25127
      this.e = null;
25128
    }
25129
 
25130
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
25131
    public boolean isSetE() {
25132
      return this.e != null;
25133
    }
25134
 
25135
    public void setEIsSet(boolean value) {
25136
      if (!value) {
25137
        this.e = null;
25138
      }
25139
    }
25140
 
25141
    public void setFieldValue(_Fields field, Object value) {
25142
      switch (field) {
25143
      case E:
25144
        if (value == null) {
25145
          unsetE();
25146
        } else {
25147
          setE((PurchaseServiceException)value);
25148
        }
25149
        break;
25150
 
25151
      }
25152
    }
25153
 
25154
    public Object getFieldValue(_Fields field) {
25155
      switch (field) {
25156
      case E:
25157
        return getE();
25158
 
25159
      }
25160
      throw new IllegalStateException();
25161
    }
25162
 
25163
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
25164
    public boolean isSet(_Fields field) {
25165
      if (field == null) {
25166
        throw new IllegalArgumentException();
25167
      }
25168
 
25169
      switch (field) {
25170
      case E:
25171
        return isSetE();
25172
      }
25173
      throw new IllegalStateException();
25174
    }
25175
 
25176
    @Override
25177
    public boolean equals(Object that) {
25178
      if (that == null)
25179
        return false;
25180
      if (that instanceof updatePurchaseReturn_result)
25181
        return this.equals((updatePurchaseReturn_result)that);
25182
      return false;
25183
    }
25184
 
25185
    public boolean equals(updatePurchaseReturn_result that) {
25186
      if (that == null)
25187
        return false;
25188
 
25189
      boolean this_present_e = true && this.isSetE();
25190
      boolean that_present_e = true && that.isSetE();
25191
      if (this_present_e || that_present_e) {
25192
        if (!(this_present_e && that_present_e))
25193
          return false;
25194
        if (!this.e.equals(that.e))
25195
          return false;
25196
      }
25197
 
25198
      return true;
25199
    }
25200
 
25201
    @Override
25202
    public int hashCode() {
25203
      return 0;
25204
    }
25205
 
25206
    public int compareTo(updatePurchaseReturn_result other) {
25207
      if (!getClass().equals(other.getClass())) {
25208
        return getClass().getName().compareTo(other.getClass().getName());
25209
      }
25210
 
25211
      int lastComparison = 0;
25212
      updatePurchaseReturn_result typedOther = (updatePurchaseReturn_result)other;
25213
 
25214
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
25215
      if (lastComparison != 0) {
25216
        return lastComparison;
25217
      }
25218
      if (isSetE()) {
25219
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
25220
        if (lastComparison != 0) {
25221
          return lastComparison;
25222
        }
25223
      }
25224
      return 0;
25225
    }
25226
 
25227
    public _Fields fieldForId(int fieldId) {
25228
      return _Fields.findByThriftId(fieldId);
25229
    }
25230
 
25231
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
25232
      org.apache.thrift.protocol.TField field;
25233
      iprot.readStructBegin();
25234
      while (true)
25235
      {
25236
        field = iprot.readFieldBegin();
25237
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
25238
          break;
25239
        }
25240
        switch (field.id) {
25241
          case 1: // E
25242
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
25243
              this.e = new PurchaseServiceException();
25244
              this.e.read(iprot);
25245
            } else { 
25246
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
25247
            }
25248
            break;
25249
          default:
25250
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
25251
        }
25252
        iprot.readFieldEnd();
25253
      }
25254
      iprot.readStructEnd();
25255
      validate();
25256
    }
25257
 
25258
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
25259
      oprot.writeStructBegin(STRUCT_DESC);
25260
 
25261
      if (this.isSetE()) {
25262
        oprot.writeFieldBegin(E_FIELD_DESC);
25263
        this.e.write(oprot);
25264
        oprot.writeFieldEnd();
25265
      }
25266
      oprot.writeFieldStop();
25267
      oprot.writeStructEnd();
25268
    }
25269
 
25270
    @Override
25271
    public String toString() {
25272
      StringBuilder sb = new StringBuilder("updatePurchaseReturn_result(");
25273
      boolean first = true;
25274
 
25275
      sb.append("e:");
25276
      if (this.e == null) {
25277
        sb.append("null");
25278
      } else {
25279
        sb.append(this.e);
25280
      }
25281
      first = false;
25282
      sb.append(")");
25283
      return sb.toString();
25284
    }
25285
 
25286
    public void validate() throws org.apache.thrift.TException {
25287
      // check for required fields
25288
    }
25289
 
25290
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
25291
      try {
25292
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
25293
      } catch (org.apache.thrift.TException te) {
25294
        throw new java.io.IOException(te);
25295
      }
25296
    }
25297
 
25298
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
25299
      try {
25300
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
25301
      } catch (org.apache.thrift.TException te) {
25302
        throw new java.io.IOException(te);
25303
      }
25304
    }
25305
 
25306
  }
25307
 
4496 mandeep.dh 25308
}