Subversion Repositories SmartDukaan

Rev

Rev 6762 | Rev 7672 | 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
63
     */
64
    public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws PurchaseServiceException, org.apache.thrift.TException;
65
 
66
    /**
67
     * Marks a purchase as complete and updates the receivedOn time.
68
     * Throws an exception if no such purchase exists.
69
     * 
70
     * @param purchaseId
71
     */
72
    public long closePurchase(long purchaseId) throws PurchaseServiceException, org.apache.thrift.TException;
73
 
74
    /**
75
     * Returns all open or closed purchases for the given purchase order. Throws an exception if no such purchase order exists
76
     * 
77
     * @param purchaseOrderId
78
     * @param open
79
     */
80
    public List<Purchase> getAllPurchases(long purchaseOrderId, boolean open) throws PurchaseServiceException, org.apache.thrift.TException;
81
 
82
    /**
6385 amar.kumar 83
     * Returns all purchases for the given purchase order. Throws an exception if no such purchase order exists
84
     * 
85
     * @param purchaseOrderId
86
     */
87
    public List<Purchase> getPurchasesForPO(long purchaseOrderId) throws PurchaseServiceException, org.apache.thrift.TException;
88
 
89
    /**
4555 mandeep.dh 90
     * Returns the purchase order object for a given purchase
4496 mandeep.dh 91
     * 
92
     * @param purchaseId
93
     */
4555 mandeep.dh 94
    public PurchaseOrder getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException;
4496 mandeep.dh 95
 
4754 mandeep.dh 96
    /**
97
     * Creates purchase order objects from pending orders
98
     * 
99
     * @param warehouseId
100
     */
101
    public List<PurchaseOrder> getPendingPurchaseOrders(long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException;
102
 
103
    /**
104
     * Returns all the valid suppliers
105
     */
106
    public List<Supplier> getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException;
107
 
108
    /**
109
     * Fulfills a given purchase order with an item.
110
     * 
111
     * @param purchaseOrderId
112
     * @param itemId
113
     * @param quantity
114
     */
115
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException;
116
 
117
    /**
118
     * Amends a PO as per the new lineitems passed
119
     * 
120
     * @param purchaseOrder
121
     */
122
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException;
123
 
5185 mandeep.dh 124
    /**
125
     * Fulfills a given purchase id with an item and its quantity.
126
     * 
127
     * @param purchaseId
128
     * @param itemId
129
     * @param quantity
130
     */
131
    public void unFulfillPO(long purchaseId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException;
132
 
5443 mandeep.dh 133
    /**
5530 mandeep.dh 134
     * Fetches all invoices after a given date
5443 mandeep.dh 135
     * 
136
     * @param date
137
     */
138
    public List<Invoice> getInvoices(long date) throws org.apache.thrift.TException;
139
 
140
    /**
7410 amar.kumar 141
     * Fetches all invoices after a given date
142
     * 
143
     * @param warehouseId
144
     * @param supplierId
145
     * @param date
146
     */
147
    public List<Invoice> getInvoicesForWarehouse(long warehouseId, long supplierId, long date) throws org.apache.thrift.TException;
148
 
149
    /**
5443 mandeep.dh 150
     * Creates an invoice object
151
     * 
152
     * @param invoice
153
     */
154
    public void createInvoice(Invoice invoice) throws PurchaseServiceException, org.apache.thrift.TException;
155
 
5591 mandeep.dh 156
    /**
157
     * Creates a supplier
158
     * 
159
     * @param supplier
160
     */
161
    public Supplier addSupplier(Supplier supplier) throws org.apache.thrift.TException;
162
 
163
    /**
164
     * Updates a supplier
165
     * 
166
     * @param supplier
167
     */
168
    public void updateSupplier(Supplier supplier) throws org.apache.thrift.TException;
169
 
6467 amar.kumar 170
    /**
171
     * Create a new Purchase Return
172
     * 
173
     * @param purchaseReturn
174
     */
175
    public long createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException;
176
 
177
    /**
178
     * Create a new Purchase Return
179
     * 
180
     * @param id
181
     */
182
    public void settlePurchaseReturn(long id) throws org.apache.thrift.TException;
183
 
184
    /**
185
     * Create a new Purchase Return
186
     */
187
    public List<PurchaseReturn> getUnsettledPurchaseReturns() throws org.apache.thrift.TException;
188
 
6630 amar.kumar 189
    /**
190
     * Get invoice with given supplierId and invoiceNumber
191
     * 
192
     * @param invoiceNumber
193
     * @param supplierId
194
     */
195
    public List<PurchaseReturn> getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException;
196
 
6762 amar.kumar 197
    /**
198
     *  * Inserts new Invoice/LineItem/Purchase Entries for Billed Product done through Our External Billing
199
     * *
200
     * 
201
     * @param invoiceNumber
202
     * @param unitPrice
203
     * @param itemId
204
     */
205
    public long createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, long itemId) throws org.apache.thrift.TException;
206
 
207
    public void fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException;
208
 
7410 amar.kumar 209
    /**
210
     * Marks a purchase order as closedcomplete and updates the receivedOn time.
211
     * 
212
     * @param poId
213
     */
214
    public void closePO(long poId) throws PurchaseServiceException, org.apache.thrift.TException;
215
 
216
    /**
217
     * Check if invoice is already received with given supplierId and invoiceNumber
218
     * 
219
     * @param invoiceNumber
220
     * @param supplierId
221
     */
222
    public boolean isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException;
223
 
4496 mandeep.dh 224
  }
225
 
226
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
227
 
228
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
229
 
230
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
231
 
232
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
233
 
234
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSupplier_call> resultHandler) throws org.apache.thrift.TException;
235
 
236
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.startPurchase_call> resultHandler) throws org.apache.thrift.TException;
237
 
238
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePurchase_call> resultHandler) throws org.apache.thrift.TException;
239
 
240
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchases_call> resultHandler) throws org.apache.thrift.TException;
241
 
6385 amar.kumar 242
    public void getPurchasesForPO(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchasesForPO_call> resultHandler) throws org.apache.thrift.TException;
243
 
4555 mandeep.dh 244
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException;
4496 mandeep.dh 245
 
4754 mandeep.dh 246
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
247
 
248
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuppliers_call> resultHandler) throws org.apache.thrift.TException;
249
 
250
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fulfillPO_call> resultHandler) throws org.apache.thrift.TException;
251
 
252
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
253
 
5185 mandeep.dh 254
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.unFulfillPO_call> resultHandler) throws org.apache.thrift.TException;
255
 
5443 mandeep.dh 256
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoices_call> resultHandler) throws org.apache.thrift.TException;
257
 
7410 amar.kumar 258
    public void getInvoicesForWarehouse(long warehouseId, long supplierId, long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoicesForWarehouse_call> resultHandler) throws org.apache.thrift.TException;
259
 
5443 mandeep.dh 260
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createInvoice_call> resultHandler) throws org.apache.thrift.TException;
261
 
5591 mandeep.dh 262
    public void addSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addSupplier_call> resultHandler) throws org.apache.thrift.TException;
263
 
264
    public void updateSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateSupplier_call> resultHandler) throws org.apache.thrift.TException;
265
 
6467 amar.kumar 266
    public void createPurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
267
 
268
    public void settlePurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.settlePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
269
 
270
    public void getUnsettledPurchaseReturns(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUnsettledPurchaseReturns_call> resultHandler) throws org.apache.thrift.TException;
271
 
6630 amar.kumar 272
    public void getInvoice(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoice_call> resultHandler) throws org.apache.thrift.TException;
273
 
6762 amar.kumar 274
    public void createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseForOurExtBilling_call> resultHandler) throws org.apache.thrift.TException;
275
 
276
    public void fulfillPOForExtBilling(long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fulfillPOForExtBilling_call> resultHandler) throws org.apache.thrift.TException;
277
 
7410 amar.kumar 278
    public void closePO(long poId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePO_call> resultHandler) throws org.apache.thrift.TException;
279
 
280
    public void isInvoiceReceived(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.isInvoiceReceived_call> resultHandler) throws org.apache.thrift.TException;
281
 
4496 mandeep.dh 282
  }
283
 
284
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
285
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
286
      public Factory() {}
287
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
288
        return new Client(prot);
289
      }
290
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
291
        return new Client(iprot, oprot);
292
      }
293
    }
294
 
295
    public Client(org.apache.thrift.protocol.TProtocol prot)
296
    {
297
      super(prot, prot);
298
    }
299
 
300
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
301
      super(iprot, oprot);
302
    }
303
 
304
    public long createPurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
305
    {
306
      send_createPurchaseOrder(purchaseOrder);
307
      return recv_createPurchaseOrder();
308
    }
309
 
310
    public void send_createPurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
311
    {
312
      createPurchaseOrder_args args = new createPurchaseOrder_args();
313
      args.setPurchaseOrder(purchaseOrder);
314
      sendBase("createPurchaseOrder", args);
315
    }
316
 
317
    public long recv_createPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
318
    {
319
      createPurchaseOrder_result result = new createPurchaseOrder_result();
320
      receiveBase(result, "createPurchaseOrder");
321
      if (result.isSetSuccess()) {
322
        return result.success;
323
      }
324
      if (result.e != null) {
325
        throw result.e;
326
      }
327
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseOrder failed: unknown result");
328
    }
329
 
330
    public PurchaseOrder getPurchaseOrder(long id) throws PurchaseServiceException, org.apache.thrift.TException
331
    {
332
      send_getPurchaseOrder(id);
333
      return recv_getPurchaseOrder();
334
    }
335
 
336
    public void send_getPurchaseOrder(long id) throws org.apache.thrift.TException
337
    {
338
      getPurchaseOrder_args args = new getPurchaseOrder_args();
339
      args.setId(id);
340
      sendBase("getPurchaseOrder", args);
341
    }
342
 
343
    public PurchaseOrder recv_getPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
344
    {
345
      getPurchaseOrder_result result = new getPurchaseOrder_result();
346
      receiveBase(result, "getPurchaseOrder");
347
      if (result.isSetSuccess()) {
348
        return result.success;
349
      }
350
      if (result.e != null) {
351
        throw result.e;
352
      }
353
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrder failed: unknown result");
354
    }
355
 
356
    public List<PurchaseOrder> getAllPurchaseOrders(POStatus status) throws PurchaseServiceException, org.apache.thrift.TException
357
    {
358
      send_getAllPurchaseOrders(status);
359
      return recv_getAllPurchaseOrders();
360
    }
361
 
362
    public void send_getAllPurchaseOrders(POStatus status) throws org.apache.thrift.TException
363
    {
364
      getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
365
      args.setStatus(status);
366
      sendBase("getAllPurchaseOrders", args);
367
    }
368
 
369
    public List<PurchaseOrder> recv_getAllPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
370
    {
371
      getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
372
      receiveBase(result, "getAllPurchaseOrders");
373
      if (result.isSetSuccess()) {
374
        return result.success;
375
      }
376
      if (result.e != null) {
377
        throw result.e;
378
      }
379
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchaseOrders failed: unknown result");
380
    }
381
 
382
    public Supplier getSupplier(long id) throws PurchaseServiceException, org.apache.thrift.TException
383
    {
384
      send_getSupplier(id);
385
      return recv_getSupplier();
386
    }
387
 
388
    public void send_getSupplier(long id) throws org.apache.thrift.TException
389
    {
390
      getSupplier_args args = new getSupplier_args();
391
      args.setId(id);
392
      sendBase("getSupplier", args);
393
    }
394
 
395
    public Supplier recv_getSupplier() throws PurchaseServiceException, org.apache.thrift.TException
396
    {
397
      getSupplier_result result = new getSupplier_result();
398
      receiveBase(result, "getSupplier");
399
      if (result.isSetSuccess()) {
400
        return result.success;
401
      }
402
      if (result.e != null) {
403
        throw result.e;
404
      }
405
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSupplier failed: unknown result");
406
    }
407
 
408
    public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws PurchaseServiceException, org.apache.thrift.TException
409
    {
410
      send_startPurchase(purchaseOrderId, invoiceNumber, freightCharges);
411
      return recv_startPurchase();
412
    }
413
 
414
    public void send_startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws org.apache.thrift.TException
415
    {
416
      startPurchase_args args = new startPurchase_args();
417
      args.setPurchaseOrderId(purchaseOrderId);
418
      args.setInvoiceNumber(invoiceNumber);
419
      args.setFreightCharges(freightCharges);
420
      sendBase("startPurchase", args);
421
    }
422
 
423
    public long recv_startPurchase() throws PurchaseServiceException, org.apache.thrift.TException
424
    {
425
      startPurchase_result result = new startPurchase_result();
426
      receiveBase(result, "startPurchase");
427
      if (result.isSetSuccess()) {
428
        return result.success;
429
      }
430
      if (result.e != null) {
431
        throw result.e;
432
      }
433
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startPurchase failed: unknown result");
434
    }
435
 
436
    public long closePurchase(long purchaseId) throws PurchaseServiceException, org.apache.thrift.TException
437
    {
438
      send_closePurchase(purchaseId);
439
      return recv_closePurchase();
440
    }
441
 
442
    public void send_closePurchase(long purchaseId) throws org.apache.thrift.TException
443
    {
444
      closePurchase_args args = new closePurchase_args();
445
      args.setPurchaseId(purchaseId);
446
      sendBase("closePurchase", args);
447
    }
448
 
449
    public long recv_closePurchase() throws PurchaseServiceException, org.apache.thrift.TException
450
    {
451
      closePurchase_result result = new closePurchase_result();
452
      receiveBase(result, "closePurchase");
453
      if (result.isSetSuccess()) {
454
        return result.success;
455
      }
456
      if (result.e != null) {
457
        throw result.e;
458
      }
459
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "closePurchase failed: unknown result");
460
    }
461
 
462
    public List<Purchase> getAllPurchases(long purchaseOrderId, boolean open) throws PurchaseServiceException, org.apache.thrift.TException
463
    {
464
      send_getAllPurchases(purchaseOrderId, open);
465
      return recv_getAllPurchases();
466
    }
467
 
468
    public void send_getAllPurchases(long purchaseOrderId, boolean open) throws org.apache.thrift.TException
469
    {
470
      getAllPurchases_args args = new getAllPurchases_args();
471
      args.setPurchaseOrderId(purchaseOrderId);
472
      args.setOpen(open);
473
      sendBase("getAllPurchases", args);
474
    }
475
 
476
    public List<Purchase> recv_getAllPurchases() throws PurchaseServiceException, org.apache.thrift.TException
477
    {
478
      getAllPurchases_result result = new getAllPurchases_result();
479
      receiveBase(result, "getAllPurchases");
480
      if (result.isSetSuccess()) {
481
        return result.success;
482
      }
483
      if (result.e != null) {
484
        throw result.e;
485
      }
486
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchases failed: unknown result");
487
    }
488
 
6385 amar.kumar 489
    public List<Purchase> getPurchasesForPO(long purchaseOrderId) throws PurchaseServiceException, org.apache.thrift.TException
490
    {
491
      send_getPurchasesForPO(purchaseOrderId);
492
      return recv_getPurchasesForPO();
493
    }
494
 
495
    public void send_getPurchasesForPO(long purchaseOrderId) throws org.apache.thrift.TException
496
    {
497
      getPurchasesForPO_args args = new getPurchasesForPO_args();
498
      args.setPurchaseOrderId(purchaseOrderId);
499
      sendBase("getPurchasesForPO", args);
500
    }
501
 
502
    public List<Purchase> recv_getPurchasesForPO() throws PurchaseServiceException, org.apache.thrift.TException
503
    {
504
      getPurchasesForPO_result result = new getPurchasesForPO_result();
505
      receiveBase(result, "getPurchasesForPO");
506
      if (result.isSetSuccess()) {
507
        return result.success;
508
      }
509
      if (result.e != null) {
510
        throw result.e;
511
      }
512
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchasesForPO failed: unknown result");
513
    }
514
 
4555 mandeep.dh 515
    public PurchaseOrder getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 516
    {
4555 mandeep.dh 517
      send_getPurchaseOrderForPurchase(purchaseId);
518
      return recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 519
    }
520
 
4555 mandeep.dh 521
    public void send_getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 522
    {
4555 mandeep.dh 523
      getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 524
      args.setPurchaseId(purchaseId);
4555 mandeep.dh 525
      sendBase("getPurchaseOrderForPurchase", args);
4496 mandeep.dh 526
    }
527
 
4555 mandeep.dh 528
    public PurchaseOrder recv_getPurchaseOrderForPurchase() throws org.apache.thrift.TException
4496 mandeep.dh 529
    {
4555 mandeep.dh 530
      getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
531
      receiveBase(result, "getPurchaseOrderForPurchase");
4496 mandeep.dh 532
      if (result.isSetSuccess()) {
533
        return result.success;
534
      }
4555 mandeep.dh 535
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrderForPurchase failed: unknown result");
4496 mandeep.dh 536
    }
537
 
4754 mandeep.dh 538
    public List<PurchaseOrder> getPendingPurchaseOrders(long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException
539
    {
540
      send_getPendingPurchaseOrders(warehouseId);
541
      return recv_getPendingPurchaseOrders();
542
    }
543
 
544
    public void send_getPendingPurchaseOrders(long warehouseId) throws org.apache.thrift.TException
545
    {
546
      getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
547
      args.setWarehouseId(warehouseId);
548
      sendBase("getPendingPurchaseOrders", args);
549
    }
550
 
551
    public List<PurchaseOrder> recv_getPendingPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
552
    {
553
      getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
554
      receiveBase(result, "getPendingPurchaseOrders");
555
      if (result.isSetSuccess()) {
556
        return result.success;
557
      }
558
      if (result.e != null) {
559
        throw result.e;
560
      }
561
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPendingPurchaseOrders failed: unknown result");
562
    }
563
 
564
    public List<Supplier> getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
565
    {
566
      send_getSuppliers();
567
      return recv_getSuppliers();
568
    }
569
 
570
    public void send_getSuppliers() throws org.apache.thrift.TException
571
    {
572
      getSuppliers_args args = new getSuppliers_args();
573
      sendBase("getSuppliers", args);
574
    }
575
 
576
    public List<Supplier> recv_getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
577
    {
578
      getSuppliers_result result = new getSuppliers_result();
579
      receiveBase(result, "getSuppliers");
580
      if (result.isSetSuccess()) {
581
        return result.success;
582
      }
583
      if (result.e != null) {
584
        throw result.e;
585
      }
586
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSuppliers failed: unknown result");
587
    }
588
 
589
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
590
    {
591
      send_fulfillPO(purchaseOrderId, itemId, quantity);
592
      recv_fulfillPO();
593
    }
594
 
595
    public void send_fulfillPO(long purchaseOrderId, long itemId, long quantity) throws org.apache.thrift.TException
596
    {
597
      fulfillPO_args args = new fulfillPO_args();
598
      args.setPurchaseOrderId(purchaseOrderId);
599
      args.setItemId(itemId);
600
      args.setQuantity(quantity);
601
      sendBase("fulfillPO", args);
602
    }
603
 
604
    public void recv_fulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
605
    {
606
      fulfillPO_result result = new fulfillPO_result();
607
      receiveBase(result, "fulfillPO");
608
      if (result.e != null) {
609
        throw result.e;
610
      }
611
      return;
612
    }
613
 
614
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
615
    {
616
      send_updatePurchaseOrder(purchaseOrder);
617
      recv_updatePurchaseOrder();
618
    }
619
 
620
    public void send_updatePurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
621
    {
622
      updatePurchaseOrder_args args = new updatePurchaseOrder_args();
623
      args.setPurchaseOrder(purchaseOrder);
624
      sendBase("updatePurchaseOrder", args);
625
    }
626
 
627
    public void recv_updatePurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
628
    {
629
      updatePurchaseOrder_result result = new updatePurchaseOrder_result();
630
      receiveBase(result, "updatePurchaseOrder");
631
      if (result.e != null) {
632
        throw result.e;
633
      }
634
      return;
635
    }
636
 
5185 mandeep.dh 637
    public void unFulfillPO(long purchaseId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
638
    {
639
      send_unFulfillPO(purchaseId, itemId, quantity);
640
      recv_unFulfillPO();
641
    }
642
 
643
    public void send_unFulfillPO(long purchaseId, long itemId, long quantity) throws org.apache.thrift.TException
644
    {
645
      unFulfillPO_args args = new unFulfillPO_args();
646
      args.setPurchaseId(purchaseId);
647
      args.setItemId(itemId);
648
      args.setQuantity(quantity);
649
      sendBase("unFulfillPO", args);
650
    }
651
 
652
    public void recv_unFulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
653
    {
654
      unFulfillPO_result result = new unFulfillPO_result();
655
      receiveBase(result, "unFulfillPO");
656
      if (result.e != null) {
657
        throw result.e;
658
      }
659
      return;
660
    }
661
 
5443 mandeep.dh 662
    public List<Invoice> getInvoices(long date) throws org.apache.thrift.TException
663
    {
664
      send_getInvoices(date);
665
      return recv_getInvoices();
666
    }
667
 
668
    public void send_getInvoices(long date) throws org.apache.thrift.TException
669
    {
670
      getInvoices_args args = new getInvoices_args();
671
      args.setDate(date);
672
      sendBase("getInvoices", args);
673
    }
674
 
675
    public List<Invoice> recv_getInvoices() throws org.apache.thrift.TException
676
    {
677
      getInvoices_result result = new getInvoices_result();
678
      receiveBase(result, "getInvoices");
679
      if (result.isSetSuccess()) {
680
        return result.success;
681
      }
682
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoices failed: unknown result");
683
    }
684
 
7410 amar.kumar 685
    public List<Invoice> getInvoicesForWarehouse(long warehouseId, long supplierId, long date) throws org.apache.thrift.TException
686
    {
687
      send_getInvoicesForWarehouse(warehouseId, supplierId, date);
688
      return recv_getInvoicesForWarehouse();
689
    }
690
 
691
    public void send_getInvoicesForWarehouse(long warehouseId, long supplierId, long date) throws org.apache.thrift.TException
692
    {
693
      getInvoicesForWarehouse_args args = new getInvoicesForWarehouse_args();
694
      args.setWarehouseId(warehouseId);
695
      args.setSupplierId(supplierId);
696
      args.setDate(date);
697
      sendBase("getInvoicesForWarehouse", args);
698
    }
699
 
700
    public List<Invoice> recv_getInvoicesForWarehouse() throws org.apache.thrift.TException
701
    {
702
      getInvoicesForWarehouse_result result = new getInvoicesForWarehouse_result();
703
      receiveBase(result, "getInvoicesForWarehouse");
704
      if (result.isSetSuccess()) {
705
        return result.success;
706
      }
707
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoicesForWarehouse failed: unknown result");
708
    }
709
 
5443 mandeep.dh 710
    public void createInvoice(Invoice invoice) throws PurchaseServiceException, org.apache.thrift.TException
711
    {
712
      send_createInvoice(invoice);
713
      recv_createInvoice();
714
    }
715
 
716
    public void send_createInvoice(Invoice invoice) throws org.apache.thrift.TException
717
    {
718
      createInvoice_args args = new createInvoice_args();
719
      args.setInvoice(invoice);
720
      sendBase("createInvoice", args);
721
    }
722
 
723
    public void recv_createInvoice() throws PurchaseServiceException, org.apache.thrift.TException
724
    {
725
      createInvoice_result result = new createInvoice_result();
726
      receiveBase(result, "createInvoice");
727
      if (result.e != null) {
728
        throw result.e;
729
      }
730
      return;
731
    }
732
 
5591 mandeep.dh 733
    public Supplier addSupplier(Supplier supplier) throws org.apache.thrift.TException
734
    {
735
      send_addSupplier(supplier);
736
      return recv_addSupplier();
737
    }
738
 
739
    public void send_addSupplier(Supplier supplier) throws org.apache.thrift.TException
740
    {
741
      addSupplier_args args = new addSupplier_args();
742
      args.setSupplier(supplier);
743
      sendBase("addSupplier", args);
744
    }
745
 
746
    public Supplier recv_addSupplier() throws org.apache.thrift.TException
747
    {
748
      addSupplier_result result = new addSupplier_result();
749
      receiveBase(result, "addSupplier");
750
      if (result.isSetSuccess()) {
751
        return result.success;
752
      }
753
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addSupplier failed: unknown result");
754
    }
755
 
756
    public void updateSupplier(Supplier supplier) throws org.apache.thrift.TException
757
    {
758
      send_updateSupplier(supplier);
759
      recv_updateSupplier();
760
    }
761
 
762
    public void send_updateSupplier(Supplier supplier) throws org.apache.thrift.TException
763
    {
764
      updateSupplier_args args = new updateSupplier_args();
765
      args.setSupplier(supplier);
766
      sendBase("updateSupplier", args);
767
    }
768
 
769
    public void recv_updateSupplier() throws org.apache.thrift.TException
770
    {
771
      updateSupplier_result result = new updateSupplier_result();
772
      receiveBase(result, "updateSupplier");
773
      return;
774
    }
775
 
6467 amar.kumar 776
    public long createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
777
    {
778
      send_createPurchaseReturn(purchaseReturn);
779
      return recv_createPurchaseReturn();
780
    }
781
 
782
    public void send_createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
783
    {
784
      createPurchaseReturn_args args = new createPurchaseReturn_args();
785
      args.setPurchaseReturn(purchaseReturn);
786
      sendBase("createPurchaseReturn", args);
787
    }
788
 
789
    public long recv_createPurchaseReturn() throws org.apache.thrift.TException
790
    {
791
      createPurchaseReturn_result result = new createPurchaseReturn_result();
792
      receiveBase(result, "createPurchaseReturn");
793
      if (result.isSetSuccess()) {
794
        return result.success;
795
      }
796
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseReturn failed: unknown result");
797
    }
798
 
799
    public void settlePurchaseReturn(long id) throws org.apache.thrift.TException
800
    {
801
      send_settlePurchaseReturn(id);
802
      recv_settlePurchaseReturn();
803
    }
804
 
805
    public void send_settlePurchaseReturn(long id) throws org.apache.thrift.TException
806
    {
807
      settlePurchaseReturn_args args = new settlePurchaseReturn_args();
808
      args.setId(id);
809
      sendBase("settlePurchaseReturn", args);
810
    }
811
 
812
    public void recv_settlePurchaseReturn() throws org.apache.thrift.TException
813
    {
814
      settlePurchaseReturn_result result = new settlePurchaseReturn_result();
815
      receiveBase(result, "settlePurchaseReturn");
816
      return;
817
    }
818
 
819
    public List<PurchaseReturn> getUnsettledPurchaseReturns() throws org.apache.thrift.TException
820
    {
821
      send_getUnsettledPurchaseReturns();
822
      return recv_getUnsettledPurchaseReturns();
823
    }
824
 
825
    public void send_getUnsettledPurchaseReturns() throws org.apache.thrift.TException
826
    {
827
      getUnsettledPurchaseReturns_args args = new getUnsettledPurchaseReturns_args();
828
      sendBase("getUnsettledPurchaseReturns", args);
829
    }
830
 
831
    public List<PurchaseReturn> recv_getUnsettledPurchaseReturns() throws org.apache.thrift.TException
832
    {
833
      getUnsettledPurchaseReturns_result result = new getUnsettledPurchaseReturns_result();
834
      receiveBase(result, "getUnsettledPurchaseReturns");
835
      if (result.isSetSuccess()) {
836
        return result.success;
837
      }
838
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUnsettledPurchaseReturns failed: unknown result");
839
    }
840
 
6630 amar.kumar 841
    public List<PurchaseReturn> getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
842
    {
843
      send_getInvoice(invoiceNumber, supplierId);
844
      return recv_getInvoice();
845
    }
846
 
847
    public void send_getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
848
    {
849
      getInvoice_args args = new getInvoice_args();
850
      args.setInvoiceNumber(invoiceNumber);
851
      args.setSupplierId(supplierId);
852
      sendBase("getInvoice", args);
853
    }
854
 
855
    public List<PurchaseReturn> recv_getInvoice() throws org.apache.thrift.TException
856
    {
857
      getInvoice_result result = new getInvoice_result();
858
      receiveBase(result, "getInvoice");
859
      if (result.isSetSuccess()) {
860
        return result.success;
861
      }
862
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoice failed: unknown result");
863
    }
864
 
6762 amar.kumar 865
    public long createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, long itemId) throws org.apache.thrift.TException
866
    {
867
      send_createPurchaseForOurExtBilling(invoiceNumber, unitPrice, itemId);
868
      return recv_createPurchaseForOurExtBilling();
869
    }
870
 
871
    public void send_createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, long itemId) throws org.apache.thrift.TException
872
    {
873
      createPurchaseForOurExtBilling_args args = new createPurchaseForOurExtBilling_args();
874
      args.setInvoiceNumber(invoiceNumber);
875
      args.setUnitPrice(unitPrice);
876
      args.setItemId(itemId);
877
      sendBase("createPurchaseForOurExtBilling", args);
878
    }
879
 
880
    public long recv_createPurchaseForOurExtBilling() throws org.apache.thrift.TException
881
    {
882
      createPurchaseForOurExtBilling_result result = new createPurchaseForOurExtBilling_result();
883
      receiveBase(result, "createPurchaseForOurExtBilling");
884
      if (result.isSetSuccess()) {
885
        return result.success;
886
      }
887
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseForOurExtBilling failed: unknown result");
888
    }
889
 
890
    public void fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException
891
    {
892
      send_fulfillPOForExtBilling(itemId, quantity);
893
      recv_fulfillPOForExtBilling();
894
    }
895
 
896
    public void send_fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException
897
    {
898
      fulfillPOForExtBilling_args args = new fulfillPOForExtBilling_args();
899
      args.setItemId(itemId);
900
      args.setQuantity(quantity);
901
      sendBase("fulfillPOForExtBilling", args);
902
    }
903
 
904
    public void recv_fulfillPOForExtBilling() throws org.apache.thrift.TException
905
    {
906
      fulfillPOForExtBilling_result result = new fulfillPOForExtBilling_result();
907
      receiveBase(result, "fulfillPOForExtBilling");
908
      return;
909
    }
910
 
7410 amar.kumar 911
    public void closePO(long poId) throws PurchaseServiceException, org.apache.thrift.TException
912
    {
913
      send_closePO(poId);
914
      recv_closePO();
915
    }
916
 
917
    public void send_closePO(long poId) throws org.apache.thrift.TException
918
    {
919
      closePO_args args = new closePO_args();
920
      args.setPoId(poId);
921
      sendBase("closePO", args);
922
    }
923
 
924
    public void recv_closePO() throws PurchaseServiceException, org.apache.thrift.TException
925
    {
926
      closePO_result result = new closePO_result();
927
      receiveBase(result, "closePO");
928
      if (result.e != null) {
929
        throw result.e;
930
      }
931
      return;
932
    }
933
 
934
    public boolean isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
935
    {
936
      send_isInvoiceReceived(invoiceNumber, supplierId);
937
      return recv_isInvoiceReceived();
938
    }
939
 
940
    public void send_isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
941
    {
942
      isInvoiceReceived_args args = new isInvoiceReceived_args();
943
      args.setInvoiceNumber(invoiceNumber);
944
      args.setSupplierId(supplierId);
945
      sendBase("isInvoiceReceived", args);
946
    }
947
 
948
    public boolean recv_isInvoiceReceived() throws org.apache.thrift.TException
949
    {
950
      isInvoiceReceived_result result = new isInvoiceReceived_result();
951
      receiveBase(result, "isInvoiceReceived");
952
      if (result.isSetSuccess()) {
953
        return result.success;
954
      }
955
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isInvoiceReceived failed: unknown result");
956
    }
957
 
4496 mandeep.dh 958
  }
959
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
960
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
961
      private org.apache.thrift.async.TAsyncClientManager clientManager;
962
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
963
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
964
        this.clientManager = clientManager;
965
        this.protocolFactory = protocolFactory;
966
      }
967
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
968
        return new AsyncClient(protocolFactory, clientManager, transport);
969
      }
970
    }
971
 
972
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
973
      super(protocolFactory, clientManager, transport);
974
    }
975
 
976
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
977
      checkReady();
978
      createPurchaseOrder_call method_call = new createPurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
979
      this.___currentMethod = method_call;
980
      ___manager.call(method_call);
981
    }
982
 
983
    public static class createPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
984
      private PurchaseOrder purchaseOrder;
985
      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 {
986
        super(client, protocolFactory, transport, resultHandler, false);
987
        this.purchaseOrder = purchaseOrder;
988
      }
989
 
990
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
991
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
992
        createPurchaseOrder_args args = new createPurchaseOrder_args();
993
        args.setPurchaseOrder(purchaseOrder);
994
        args.write(prot);
995
        prot.writeMessageEnd();
996
      }
997
 
998
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
999
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1000
          throw new IllegalStateException("Method call not finished!");
1001
        }
1002
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1003
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1004
        return (new Client(prot)).recv_createPurchaseOrder();
1005
      }
1006
    }
1007
 
1008
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1009
      checkReady();
1010
      getPurchaseOrder_call method_call = new getPurchaseOrder_call(id, resultHandler, this, ___protocolFactory, ___transport);
1011
      this.___currentMethod = method_call;
1012
      ___manager.call(method_call);
1013
    }
1014
 
1015
    public static class getPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1016
      private long id;
1017
      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 {
1018
        super(client, protocolFactory, transport, resultHandler, false);
1019
        this.id = id;
1020
      }
1021
 
1022
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1023
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1024
        getPurchaseOrder_args args = new getPurchaseOrder_args();
1025
        args.setId(id);
1026
        args.write(prot);
1027
        prot.writeMessageEnd();
1028
      }
1029
 
1030
      public PurchaseOrder getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1031
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1032
          throw new IllegalStateException("Method call not finished!");
1033
        }
1034
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1035
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1036
        return (new Client(prot)).recv_getPurchaseOrder();
1037
      }
1038
    }
1039
 
1040
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
1041
      checkReady();
1042
      getAllPurchaseOrders_call method_call = new getAllPurchaseOrders_call(status, resultHandler, this, ___protocolFactory, ___transport);
1043
      this.___currentMethod = method_call;
1044
      ___manager.call(method_call);
1045
    }
1046
 
1047
    public static class getAllPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
1048
      private POStatus status;
1049
      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 {
1050
        super(client, protocolFactory, transport, resultHandler, false);
1051
        this.status = status;
1052
      }
1053
 
1054
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1055
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
1056
        getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
1057
        args.setStatus(status);
1058
        args.write(prot);
1059
        prot.writeMessageEnd();
1060
      }
1061
 
1062
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1063
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1064
          throw new IllegalStateException("Method call not finished!");
1065
        }
1066
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1067
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1068
        return (new Client(prot)).recv_getAllPurchaseOrders();
1069
      }
1070
    }
1071
 
1072
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<getSupplier_call> resultHandler) throws org.apache.thrift.TException {
1073
      checkReady();
1074
      getSupplier_call method_call = new getSupplier_call(id, resultHandler, this, ___protocolFactory, ___transport);
1075
      this.___currentMethod = method_call;
1076
      ___manager.call(method_call);
1077
    }
1078
 
1079
    public static class getSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1080
      private long id;
1081
      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 {
1082
        super(client, protocolFactory, transport, resultHandler, false);
1083
        this.id = id;
1084
      }
1085
 
1086
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1087
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1088
        getSupplier_args args = new getSupplier_args();
1089
        args.setId(id);
1090
        args.write(prot);
1091
        prot.writeMessageEnd();
1092
      }
1093
 
1094
      public Supplier getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1095
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1096
          throw new IllegalStateException("Method call not finished!");
1097
        }
1098
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1099
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1100
        return (new Client(prot)).recv_getSupplier();
1101
      }
1102
    }
1103
 
1104
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, org.apache.thrift.async.AsyncMethodCallback<startPurchase_call> resultHandler) throws org.apache.thrift.TException {
1105
      checkReady();
1106
      startPurchase_call method_call = new startPurchase_call(purchaseOrderId, invoiceNumber, freightCharges, resultHandler, this, ___protocolFactory, ___transport);
1107
      this.___currentMethod = method_call;
1108
      ___manager.call(method_call);
1109
    }
1110
 
1111
    public static class startPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
1112
      private long purchaseOrderId;
1113
      private String invoiceNumber;
1114
      private double freightCharges;
1115
      public startPurchase_call(long purchaseOrderId, String invoiceNumber, double freightCharges, 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 {
1116
        super(client, protocolFactory, transport, resultHandler, false);
1117
        this.purchaseOrderId = purchaseOrderId;
1118
        this.invoiceNumber = invoiceNumber;
1119
        this.freightCharges = freightCharges;
1120
      }
1121
 
1122
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1123
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1124
        startPurchase_args args = new startPurchase_args();
1125
        args.setPurchaseOrderId(purchaseOrderId);
1126
        args.setInvoiceNumber(invoiceNumber);
1127
        args.setFreightCharges(freightCharges);
1128
        args.write(prot);
1129
        prot.writeMessageEnd();
1130
      }
1131
 
1132
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1133
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1134
          throw new IllegalStateException("Method call not finished!");
1135
        }
1136
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1137
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1138
        return (new Client(prot)).recv_startPurchase();
1139
      }
1140
    }
1141
 
1142
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<closePurchase_call> resultHandler) throws org.apache.thrift.TException {
1143
      checkReady();
1144
      closePurchase_call method_call = new closePurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
1145
      this.___currentMethod = method_call;
1146
      ___manager.call(method_call);
1147
    }
1148
 
1149
    public static class closePurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
1150
      private long purchaseId;
1151
      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 {
1152
        super(client, protocolFactory, transport, resultHandler, false);
1153
        this.purchaseId = purchaseId;
1154
      }
1155
 
1156
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1157
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closePurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1158
        closePurchase_args args = new closePurchase_args();
1159
        args.setPurchaseId(purchaseId);
1160
        args.write(prot);
1161
        prot.writeMessageEnd();
1162
      }
1163
 
1164
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1165
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1166
          throw new IllegalStateException("Method call not finished!");
1167
        }
1168
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1169
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1170
        return (new Client(prot)).recv_closePurchase();
1171
      }
1172
    }
1173
 
1174
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<getAllPurchases_call> resultHandler) throws org.apache.thrift.TException {
1175
      checkReady();
1176
      getAllPurchases_call method_call = new getAllPurchases_call(purchaseOrderId, open, resultHandler, this, ___protocolFactory, ___transport);
1177
      this.___currentMethod = method_call;
1178
      ___manager.call(method_call);
1179
    }
1180
 
1181
    public static class getAllPurchases_call extends org.apache.thrift.async.TAsyncMethodCall {
1182
      private long purchaseOrderId;
1183
      private boolean open;
1184
      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 {
1185
        super(client, protocolFactory, transport, resultHandler, false);
1186
        this.purchaseOrderId = purchaseOrderId;
1187
        this.open = open;
1188
      }
1189
 
1190
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1191
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPurchases", org.apache.thrift.protocol.TMessageType.CALL, 0));
1192
        getAllPurchases_args args = new getAllPurchases_args();
1193
        args.setPurchaseOrderId(purchaseOrderId);
1194
        args.setOpen(open);
1195
        args.write(prot);
1196
        prot.writeMessageEnd();
1197
      }
1198
 
1199
      public List<Purchase> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1200
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1201
          throw new IllegalStateException("Method call not finished!");
1202
        }
1203
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1204
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1205
        return (new Client(prot)).recv_getAllPurchases();
1206
      }
1207
    }
1208
 
6385 amar.kumar 1209
    public void getPurchasesForPO(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<getPurchasesForPO_call> resultHandler) throws org.apache.thrift.TException {
1210
      checkReady();
1211
      getPurchasesForPO_call method_call = new getPurchasesForPO_call(purchaseOrderId, resultHandler, this, ___protocolFactory, ___transport);
1212
      this.___currentMethod = method_call;
1213
      ___manager.call(method_call);
1214
    }
1215
 
1216
    public static class getPurchasesForPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1217
      private long purchaseOrderId;
1218
      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 {
1219
        super(client, protocolFactory, transport, resultHandler, false);
1220
        this.purchaseOrderId = purchaseOrderId;
1221
      }
1222
 
1223
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1224
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchasesForPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1225
        getPurchasesForPO_args args = new getPurchasesForPO_args();
1226
        args.setPurchaseOrderId(purchaseOrderId);
1227
        args.write(prot);
1228
        prot.writeMessageEnd();
1229
      }
1230
 
1231
      public List<Purchase> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1232
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1233
          throw new IllegalStateException("Method call not finished!");
1234
        }
1235
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1236
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1237
        return (new Client(prot)).recv_getPurchasesForPO();
1238
      }
1239
    }
1240
 
4555 mandeep.dh 1241
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException {
4496 mandeep.dh 1242
      checkReady();
4555 mandeep.dh 1243
      getPurchaseOrderForPurchase_call method_call = new getPurchaseOrderForPurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 1244
      this.___currentMethod = method_call;
1245
      ___manager.call(method_call);
1246
    }
1247
 
4555 mandeep.dh 1248
    public static class getPurchaseOrderForPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
4496 mandeep.dh 1249
      private long purchaseId;
4555 mandeep.dh 1250
      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 1251
        super(client, protocolFactory, transport, resultHandler, false);
1252
        this.purchaseId = purchaseId;
1253
      }
1254
 
1255
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4555 mandeep.dh 1256
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrderForPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1257
        getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 1258
        args.setPurchaseId(purchaseId);
1259
        args.write(prot);
1260
        prot.writeMessageEnd();
1261
      }
1262
 
4555 mandeep.dh 1263
      public PurchaseOrder getResult() throws org.apache.thrift.TException {
4496 mandeep.dh 1264
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1265
          throw new IllegalStateException("Method call not finished!");
1266
        }
1267
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1268
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4555 mandeep.dh 1269
        return (new Client(prot)).recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 1270
      }
1271
    }
1272
 
4754 mandeep.dh 1273
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
1274
      checkReady();
1275
      getPendingPurchaseOrders_call method_call = new getPendingPurchaseOrders_call(warehouseId, resultHandler, this, ___protocolFactory, ___transport);
1276
      this.___currentMethod = method_call;
1277
      ___manager.call(method_call);
1278
    }
1279
 
1280
    public static class getPendingPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
1281
      private long warehouseId;
1282
      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 {
1283
        super(client, protocolFactory, transport, resultHandler, false);
1284
        this.warehouseId = warehouseId;
1285
      }
1286
 
1287
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1288
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPendingPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
1289
        getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
1290
        args.setWarehouseId(warehouseId);
1291
        args.write(prot);
1292
        prot.writeMessageEnd();
1293
      }
1294
 
1295
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1296
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1297
          throw new IllegalStateException("Method call not finished!");
1298
        }
1299
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1300
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1301
        return (new Client(prot)).recv_getPendingPurchaseOrders();
1302
      }
1303
    }
1304
 
1305
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<getSuppliers_call> resultHandler) throws org.apache.thrift.TException {
1306
      checkReady();
1307
      getSuppliers_call method_call = new getSuppliers_call(resultHandler, this, ___protocolFactory, ___transport);
1308
      this.___currentMethod = method_call;
1309
      ___manager.call(method_call);
1310
    }
1311
 
1312
    public static class getSuppliers_call extends org.apache.thrift.async.TAsyncMethodCall {
1313
      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 {
1314
        super(client, protocolFactory, transport, resultHandler, false);
1315
      }
1316
 
1317
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1318
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSuppliers", org.apache.thrift.protocol.TMessageType.CALL, 0));
1319
        getSuppliers_args args = new getSuppliers_args();
1320
        args.write(prot);
1321
        prot.writeMessageEnd();
1322
      }
1323
 
1324
      public List<Supplier> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1325
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1326
          throw new IllegalStateException("Method call not finished!");
1327
        }
1328
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1329
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1330
        return (new Client(prot)).recv_getSuppliers();
1331
      }
1332
    }
1333
 
1334
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPO_call> resultHandler) throws org.apache.thrift.TException {
1335
      checkReady();
1336
      fulfillPO_call method_call = new fulfillPO_call(purchaseOrderId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1337
      this.___currentMethod = method_call;
1338
      ___manager.call(method_call);
1339
    }
1340
 
1341
    public static class fulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1342
      private long purchaseOrderId;
1343
      private long itemId;
1344
      private long quantity;
1345
      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 {
1346
        super(client, protocolFactory, transport, resultHandler, false);
1347
        this.purchaseOrderId = purchaseOrderId;
1348
        this.itemId = itemId;
1349
        this.quantity = quantity;
1350
      }
1351
 
1352
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1353
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1354
        fulfillPO_args args = new fulfillPO_args();
1355
        args.setPurchaseOrderId(purchaseOrderId);
1356
        args.setItemId(itemId);
1357
        args.setQuantity(quantity);
1358
        args.write(prot);
1359
        prot.writeMessageEnd();
1360
      }
1361
 
1362
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1363
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1364
          throw new IllegalStateException("Method call not finished!");
1365
        }
1366
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1367
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1368
        (new Client(prot)).recv_fulfillPO();
1369
      }
1370
    }
1371
 
1372
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1373
      checkReady();
1374
      updatePurchaseOrder_call method_call = new updatePurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
1375
      this.___currentMethod = method_call;
1376
      ___manager.call(method_call);
1377
    }
1378
 
1379
    public static class updatePurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1380
      private PurchaseOrder purchaseOrder;
1381
      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 {
1382
        super(client, protocolFactory, transport, resultHandler, false);
1383
        this.purchaseOrder = purchaseOrder;
1384
      }
1385
 
1386
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1387
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updatePurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1388
        updatePurchaseOrder_args args = new updatePurchaseOrder_args();
1389
        args.setPurchaseOrder(purchaseOrder);
1390
        args.write(prot);
1391
        prot.writeMessageEnd();
1392
      }
1393
 
1394
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1395
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1396
          throw new IllegalStateException("Method call not finished!");
1397
        }
1398
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1399
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1400
        (new Client(prot)).recv_updatePurchaseOrder();
1401
      }
1402
    }
1403
 
5185 mandeep.dh 1404
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<unFulfillPO_call> resultHandler) throws org.apache.thrift.TException {
1405
      checkReady();
1406
      unFulfillPO_call method_call = new unFulfillPO_call(purchaseId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1407
      this.___currentMethod = method_call;
1408
      ___manager.call(method_call);
1409
    }
1410
 
1411
    public static class unFulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1412
      private long purchaseId;
1413
      private long itemId;
1414
      private long quantity;
1415
      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 {
1416
        super(client, protocolFactory, transport, resultHandler, false);
1417
        this.purchaseId = purchaseId;
1418
        this.itemId = itemId;
1419
        this.quantity = quantity;
1420
      }
1421
 
1422
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1423
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unFulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1424
        unFulfillPO_args args = new unFulfillPO_args();
1425
        args.setPurchaseId(purchaseId);
1426
        args.setItemId(itemId);
1427
        args.setQuantity(quantity);
1428
        args.write(prot);
1429
        prot.writeMessageEnd();
1430
      }
1431
 
1432
      public void 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
        (new Client(prot)).recv_unFulfillPO();
1439
      }
1440
    }
1441
 
5443 mandeep.dh 1442
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<getInvoices_call> resultHandler) throws org.apache.thrift.TException {
1443
      checkReady();
1444
      getInvoices_call method_call = new getInvoices_call(date, resultHandler, this, ___protocolFactory, ___transport);
1445
      this.___currentMethod = method_call;
1446
      ___manager.call(method_call);
1447
    }
1448
 
1449
    public static class getInvoices_call extends org.apache.thrift.async.TAsyncMethodCall {
1450
      private long date;
1451
      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 {
1452
        super(client, protocolFactory, transport, resultHandler, false);
1453
        this.date = date;
1454
      }
1455
 
1456
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1457
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoices", org.apache.thrift.protocol.TMessageType.CALL, 0));
1458
        getInvoices_args args = new getInvoices_args();
1459
        args.setDate(date);
1460
        args.write(prot);
1461
        prot.writeMessageEnd();
1462
      }
1463
 
1464
      public List<Invoice> getResult() throws org.apache.thrift.TException {
1465
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1466
          throw new IllegalStateException("Method call not finished!");
1467
        }
1468
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1469
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1470
        return (new Client(prot)).recv_getInvoices();
1471
      }
1472
    }
1473
 
7410 amar.kumar 1474
    public void getInvoicesForWarehouse(long warehouseId, long supplierId, long date, org.apache.thrift.async.AsyncMethodCallback<getInvoicesForWarehouse_call> resultHandler) throws org.apache.thrift.TException {
1475
      checkReady();
1476
      getInvoicesForWarehouse_call method_call = new getInvoicesForWarehouse_call(warehouseId, supplierId, date, resultHandler, this, ___protocolFactory, ___transport);
1477
      this.___currentMethod = method_call;
1478
      ___manager.call(method_call);
1479
    }
1480
 
1481
    public static class getInvoicesForWarehouse_call extends org.apache.thrift.async.TAsyncMethodCall {
1482
      private long warehouseId;
1483
      private long supplierId;
1484
      private long date;
1485
      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 {
1486
        super(client, protocolFactory, transport, resultHandler, false);
1487
        this.warehouseId = warehouseId;
1488
        this.supplierId = supplierId;
1489
        this.date = date;
1490
      }
1491
 
1492
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1493
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoicesForWarehouse", org.apache.thrift.protocol.TMessageType.CALL, 0));
1494
        getInvoicesForWarehouse_args args = new getInvoicesForWarehouse_args();
1495
        args.setWarehouseId(warehouseId);
1496
        args.setSupplierId(supplierId);
1497
        args.setDate(date);
1498
        args.write(prot);
1499
        prot.writeMessageEnd();
1500
      }
1501
 
1502
      public List<Invoice> getResult() throws org.apache.thrift.TException {
1503
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1504
          throw new IllegalStateException("Method call not finished!");
1505
        }
1506
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1507
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1508
        return (new Client(prot)).recv_getInvoicesForWarehouse();
1509
      }
1510
    }
1511
 
5443 mandeep.dh 1512
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<createInvoice_call> resultHandler) throws org.apache.thrift.TException {
1513
      checkReady();
1514
      createInvoice_call method_call = new createInvoice_call(invoice, resultHandler, this, ___protocolFactory, ___transport);
1515
      this.___currentMethod = method_call;
1516
      ___manager.call(method_call);
1517
    }
1518
 
1519
    public static class createInvoice_call extends org.apache.thrift.async.TAsyncMethodCall {
1520
      private Invoice invoice;
1521
      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 {
1522
        super(client, protocolFactory, transport, resultHandler, false);
1523
        this.invoice = invoice;
1524
      }
1525
 
1526
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1527
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createInvoice", org.apache.thrift.protocol.TMessageType.CALL, 0));
1528
        createInvoice_args args = new createInvoice_args();
1529
        args.setInvoice(invoice);
1530
        args.write(prot);
1531
        prot.writeMessageEnd();
1532
      }
1533
 
1534
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1535
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1536
          throw new IllegalStateException("Method call not finished!");
1537
        }
1538
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1539
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1540
        (new Client(prot)).recv_createInvoice();
1541
      }
1542
    }
1543
 
5591 mandeep.dh 1544
    public void addSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<addSupplier_call> resultHandler) throws org.apache.thrift.TException {
1545
      checkReady();
1546
      addSupplier_call method_call = new addSupplier_call(supplier, resultHandler, this, ___protocolFactory, ___transport);
1547
      this.___currentMethod = method_call;
1548
      ___manager.call(method_call);
1549
    }
1550
 
1551
    public static class addSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1552
      private Supplier supplier;
1553
      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 {
1554
        super(client, protocolFactory, transport, resultHandler, false);
1555
        this.supplier = supplier;
1556
      }
1557
 
1558
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1559
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1560
        addSupplier_args args = new addSupplier_args();
1561
        args.setSupplier(supplier);
1562
        args.write(prot);
1563
        prot.writeMessageEnd();
1564
      }
1565
 
1566
      public Supplier getResult() throws org.apache.thrift.TException {
1567
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1568
          throw new IllegalStateException("Method call not finished!");
1569
        }
1570
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1571
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1572
        return (new Client(prot)).recv_addSupplier();
1573
      }
1574
    }
1575
 
1576
    public void updateSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<updateSupplier_call> resultHandler) throws org.apache.thrift.TException {
1577
      checkReady();
1578
      updateSupplier_call method_call = new updateSupplier_call(supplier, resultHandler, this, ___protocolFactory, ___transport);
1579
      this.___currentMethod = method_call;
1580
      ___manager.call(method_call);
1581
    }
1582
 
1583
    public static class updateSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1584
      private Supplier supplier;
1585
      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 {
1586
        super(client, protocolFactory, transport, resultHandler, false);
1587
        this.supplier = supplier;
1588
      }
1589
 
1590
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1591
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1592
        updateSupplier_args args = new updateSupplier_args();
1593
        args.setSupplier(supplier);
1594
        args.write(prot);
1595
        prot.writeMessageEnd();
1596
      }
1597
 
1598
      public void getResult() throws org.apache.thrift.TException {
1599
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1600
          throw new IllegalStateException("Method call not finished!");
1601
        }
1602
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1603
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1604
        (new Client(prot)).recv_updateSupplier();
1605
      }
1606
    }
1607
 
6467 amar.kumar 1608
    public void createPurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<createPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1609
      checkReady();
1610
      createPurchaseReturn_call method_call = new createPurchaseReturn_call(purchaseReturn, resultHandler, this, ___protocolFactory, ___transport);
1611
      this.___currentMethod = method_call;
1612
      ___manager.call(method_call);
1613
    }
1614
 
1615
    public static class createPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1616
      private PurchaseReturn purchaseReturn;
1617
      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 {
1618
        super(client, protocolFactory, transport, resultHandler, false);
1619
        this.purchaseReturn = purchaseReturn;
1620
      }
1621
 
1622
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1623
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1624
        createPurchaseReturn_args args = new createPurchaseReturn_args();
1625
        args.setPurchaseReturn(purchaseReturn);
1626
        args.write(prot);
1627
        prot.writeMessageEnd();
1628
      }
1629
 
1630
      public long getResult() throws org.apache.thrift.TException {
1631
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1632
          throw new IllegalStateException("Method call not finished!");
1633
        }
1634
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1635
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1636
        return (new Client(prot)).recv_createPurchaseReturn();
1637
      }
1638
    }
1639
 
1640
    public void settlePurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<settlePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1641
      checkReady();
1642
      settlePurchaseReturn_call method_call = new settlePurchaseReturn_call(id, resultHandler, this, ___protocolFactory, ___transport);
1643
      this.___currentMethod = method_call;
1644
      ___manager.call(method_call);
1645
    }
1646
 
1647
    public static class settlePurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1648
      private long id;
1649
      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 {
1650
        super(client, protocolFactory, transport, resultHandler, false);
1651
        this.id = id;
1652
      }
1653
 
1654
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1655
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("settlePurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1656
        settlePurchaseReturn_args args = new settlePurchaseReturn_args();
1657
        args.setId(id);
1658
        args.write(prot);
1659
        prot.writeMessageEnd();
1660
      }
1661
 
1662
      public void getResult() throws org.apache.thrift.TException {
1663
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1664
          throw new IllegalStateException("Method call not finished!");
1665
        }
1666
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1667
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1668
        (new Client(prot)).recv_settlePurchaseReturn();
1669
      }
1670
    }
1671
 
1672
    public void getUnsettledPurchaseReturns(org.apache.thrift.async.AsyncMethodCallback<getUnsettledPurchaseReturns_call> resultHandler) throws org.apache.thrift.TException {
1673
      checkReady();
1674
      getUnsettledPurchaseReturns_call method_call = new getUnsettledPurchaseReturns_call(resultHandler, this, ___protocolFactory, ___transport);
1675
      this.___currentMethod = method_call;
1676
      ___manager.call(method_call);
1677
    }
1678
 
1679
    public static class getUnsettledPurchaseReturns_call extends org.apache.thrift.async.TAsyncMethodCall {
1680
      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 {
1681
        super(client, protocolFactory, transport, resultHandler, false);
1682
      }
1683
 
1684
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1685
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUnsettledPurchaseReturns", org.apache.thrift.protocol.TMessageType.CALL, 0));
1686
        getUnsettledPurchaseReturns_args args = new getUnsettledPurchaseReturns_args();
1687
        args.write(prot);
1688
        prot.writeMessageEnd();
1689
      }
1690
 
1691
      public List<PurchaseReturn> getResult() throws org.apache.thrift.TException {
1692
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1693
          throw new IllegalStateException("Method call not finished!");
1694
        }
1695
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1696
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1697
        return (new Client(prot)).recv_getUnsettledPurchaseReturns();
1698
      }
1699
    }
1700
 
6630 amar.kumar 1701
    public void getInvoice(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<getInvoice_call> resultHandler) throws org.apache.thrift.TException {
1702
      checkReady();
1703
      getInvoice_call method_call = new getInvoice_call(invoiceNumber, supplierId, resultHandler, this, ___protocolFactory, ___transport);
1704
      this.___currentMethod = method_call;
1705
      ___manager.call(method_call);
1706
    }
1707
 
1708
    public static class getInvoice_call extends org.apache.thrift.async.TAsyncMethodCall {
1709
      private String invoiceNumber;
1710
      private long supplierId;
1711
      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 {
1712
        super(client, protocolFactory, transport, resultHandler, false);
1713
        this.invoiceNumber = invoiceNumber;
1714
        this.supplierId = supplierId;
1715
      }
1716
 
1717
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1718
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoice", org.apache.thrift.protocol.TMessageType.CALL, 0));
1719
        getInvoice_args args = new getInvoice_args();
1720
        args.setInvoiceNumber(invoiceNumber);
1721
        args.setSupplierId(supplierId);
1722
        args.write(prot);
1723
        prot.writeMessageEnd();
1724
      }
1725
 
1726
      public List<PurchaseReturn> getResult() throws org.apache.thrift.TException {
1727
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1728
          throw new IllegalStateException("Method call not finished!");
1729
        }
1730
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1731
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1732
        return (new Client(prot)).recv_getInvoice();
1733
      }
1734
    }
1735
 
6762 amar.kumar 1736
    public void createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, long itemId, org.apache.thrift.async.AsyncMethodCallback<createPurchaseForOurExtBilling_call> resultHandler) throws org.apache.thrift.TException {
1737
      checkReady();
1738
      createPurchaseForOurExtBilling_call method_call = new createPurchaseForOurExtBilling_call(invoiceNumber, unitPrice, itemId, resultHandler, this, ___protocolFactory, ___transport);
1739
      this.___currentMethod = method_call;
1740
      ___manager.call(method_call);
1741
    }
1742
 
1743
    public static class createPurchaseForOurExtBilling_call extends org.apache.thrift.async.TAsyncMethodCall {
1744
      private String invoiceNumber;
1745
      private double unitPrice;
1746
      private long itemId;
1747
      public createPurchaseForOurExtBilling_call(String invoiceNumber, double unitPrice, 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 {
1748
        super(client, protocolFactory, transport, resultHandler, false);
1749
        this.invoiceNumber = invoiceNumber;
1750
        this.unitPrice = unitPrice;
1751
        this.itemId = itemId;
1752
      }
1753
 
1754
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1755
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseForOurExtBilling", org.apache.thrift.protocol.TMessageType.CALL, 0));
1756
        createPurchaseForOurExtBilling_args args = new createPurchaseForOurExtBilling_args();
1757
        args.setInvoiceNumber(invoiceNumber);
1758
        args.setUnitPrice(unitPrice);
1759
        args.setItemId(itemId);
1760
        args.write(prot);
1761
        prot.writeMessageEnd();
1762
      }
1763
 
1764
      public long getResult() throws org.apache.thrift.TException {
1765
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1766
          throw new IllegalStateException("Method call not finished!");
1767
        }
1768
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1769
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1770
        return (new Client(prot)).recv_createPurchaseForOurExtBilling();
1771
      }
1772
    }
1773
 
1774
    public void fulfillPOForExtBilling(long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPOForExtBilling_call> resultHandler) throws org.apache.thrift.TException {
1775
      checkReady();
1776
      fulfillPOForExtBilling_call method_call = new fulfillPOForExtBilling_call(itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1777
      this.___currentMethod = method_call;
1778
      ___manager.call(method_call);
1779
    }
1780
 
1781
    public static class fulfillPOForExtBilling_call extends org.apache.thrift.async.TAsyncMethodCall {
1782
      private long itemId;
1783
      private long quantity;
1784
      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 {
1785
        super(client, protocolFactory, transport, resultHandler, false);
1786
        this.itemId = itemId;
1787
        this.quantity = quantity;
1788
      }
1789
 
1790
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1791
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fulfillPOForExtBilling", org.apache.thrift.protocol.TMessageType.CALL, 0));
1792
        fulfillPOForExtBilling_args args = new fulfillPOForExtBilling_args();
1793
        args.setItemId(itemId);
1794
        args.setQuantity(quantity);
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_fulfillPOForExtBilling();
1806
      }
1807
    }
1808
 
7410 amar.kumar 1809
    public void closePO(long poId, org.apache.thrift.async.AsyncMethodCallback<closePO_call> resultHandler) throws org.apache.thrift.TException {
1810
      checkReady();
1811
      closePO_call method_call = new closePO_call(poId, resultHandler, this, ___protocolFactory, ___transport);
1812
      this.___currentMethod = method_call;
1813
      ___manager.call(method_call);
1814
    }
1815
 
1816
    public static class closePO_call extends org.apache.thrift.async.TAsyncMethodCall {
1817
      private long poId;
1818
      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 {
1819
        super(client, protocolFactory, transport, resultHandler, false);
1820
        this.poId = poId;
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("closePO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1825
        closePO_args args = new closePO_args();
1826
        args.setPoId(poId);
1827
        args.write(prot);
1828
        prot.writeMessageEnd();
1829
      }
1830
 
1831
      public void getResult() throws PurchaseServiceException, 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
        (new Client(prot)).recv_closePO();
1838
      }
1839
    }
1840
 
1841
    public void isInvoiceReceived(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<isInvoiceReceived_call> resultHandler) throws org.apache.thrift.TException {
1842
      checkReady();
1843
      isInvoiceReceived_call method_call = new isInvoiceReceived_call(invoiceNumber, supplierId, resultHandler, this, ___protocolFactory, ___transport);
1844
      this.___currentMethod = method_call;
1845
      ___manager.call(method_call);
1846
    }
1847
 
1848
    public static class isInvoiceReceived_call extends org.apache.thrift.async.TAsyncMethodCall {
1849
      private String invoiceNumber;
1850
      private long supplierId;
1851
      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 {
1852
        super(client, protocolFactory, transport, resultHandler, false);
1853
        this.invoiceNumber = invoiceNumber;
1854
        this.supplierId = supplierId;
1855
      }
1856
 
1857
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1858
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isInvoiceReceived", org.apache.thrift.protocol.TMessageType.CALL, 0));
1859
        isInvoiceReceived_args args = new isInvoiceReceived_args();
1860
        args.setInvoiceNumber(invoiceNumber);
1861
        args.setSupplierId(supplierId);
1862
        args.write(prot);
1863
        prot.writeMessageEnd();
1864
      }
1865
 
1866
      public boolean getResult() throws org.apache.thrift.TException {
1867
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1868
          throw new IllegalStateException("Method call not finished!");
1869
        }
1870
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1871
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1872
        return (new Client(prot)).recv_isInvoiceReceived();
1873
      }
1874
    }
1875
 
4496 mandeep.dh 1876
  }
1877
 
1878
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1879
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1880
    public Processor(I iface) {
1881
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
1882
    }
1883
 
1884
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
1885
      super(iface, getProcessMap(processMap));
1886
    }
1887
 
1888
    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) {
1889
      processMap.put("createPurchaseOrder", new createPurchaseOrder());
1890
      processMap.put("getPurchaseOrder", new getPurchaseOrder());
1891
      processMap.put("getAllPurchaseOrders", new getAllPurchaseOrders());
1892
      processMap.put("getSupplier", new getSupplier());
1893
      processMap.put("startPurchase", new startPurchase());
1894
      processMap.put("closePurchase", new closePurchase());
1895
      processMap.put("getAllPurchases", new getAllPurchases());
6385 amar.kumar 1896
      processMap.put("getPurchasesForPO", new getPurchasesForPO());
4555 mandeep.dh 1897
      processMap.put("getPurchaseOrderForPurchase", new getPurchaseOrderForPurchase());
4754 mandeep.dh 1898
      processMap.put("getPendingPurchaseOrders", new getPendingPurchaseOrders());
1899
      processMap.put("getSuppliers", new getSuppliers());
1900
      processMap.put("fulfillPO", new fulfillPO());
1901
      processMap.put("updatePurchaseOrder", new updatePurchaseOrder());
5185 mandeep.dh 1902
      processMap.put("unFulfillPO", new unFulfillPO());
5443 mandeep.dh 1903
      processMap.put("getInvoices", new getInvoices());
7410 amar.kumar 1904
      processMap.put("getInvoicesForWarehouse", new getInvoicesForWarehouse());
5443 mandeep.dh 1905
      processMap.put("createInvoice", new createInvoice());
5591 mandeep.dh 1906
      processMap.put("addSupplier", new addSupplier());
1907
      processMap.put("updateSupplier", new updateSupplier());
6467 amar.kumar 1908
      processMap.put("createPurchaseReturn", new createPurchaseReturn());
1909
      processMap.put("settlePurchaseReturn", new settlePurchaseReturn());
1910
      processMap.put("getUnsettledPurchaseReturns", new getUnsettledPurchaseReturns());
6630 amar.kumar 1911
      processMap.put("getInvoice", new getInvoice());
6762 amar.kumar 1912
      processMap.put("createPurchaseForOurExtBilling", new createPurchaseForOurExtBilling());
1913
      processMap.put("fulfillPOForExtBilling", new fulfillPOForExtBilling());
7410 amar.kumar 1914
      processMap.put("closePO", new closePO());
1915
      processMap.put("isInvoiceReceived", new isInvoiceReceived());
4496 mandeep.dh 1916
      return processMap;
1917
    }
1918
 
1919
    private static class createPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseOrder_args> {
1920
      public createPurchaseOrder() {
1921
        super("createPurchaseOrder");
1922
      }
1923
 
1924
      protected createPurchaseOrder_args getEmptyArgsInstance() {
1925
        return new createPurchaseOrder_args();
1926
      }
1927
 
1928
      protected createPurchaseOrder_result getResult(I iface, createPurchaseOrder_args args) throws org.apache.thrift.TException {
1929
        createPurchaseOrder_result result = new createPurchaseOrder_result();
1930
        try {
1931
          result.success = iface.createPurchaseOrder(args.purchaseOrder);
1932
          result.setSuccessIsSet(true);
1933
        } catch (PurchaseServiceException e) {
1934
          result.e = e;
1935
        }
1936
        return result;
1937
      }
1938
    }
1939
 
1940
    private static class getPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrder_args> {
1941
      public getPurchaseOrder() {
1942
        super("getPurchaseOrder");
1943
      }
1944
 
1945
      protected getPurchaseOrder_args getEmptyArgsInstance() {
1946
        return new getPurchaseOrder_args();
1947
      }
1948
 
1949
      protected getPurchaseOrder_result getResult(I iface, getPurchaseOrder_args args) throws org.apache.thrift.TException {
1950
        getPurchaseOrder_result result = new getPurchaseOrder_result();
1951
        try {
1952
          result.success = iface.getPurchaseOrder(args.id);
1953
        } catch (PurchaseServiceException e) {
1954
          result.e = e;
1955
        }
1956
        return result;
1957
      }
1958
    }
1959
 
1960
    private static class getAllPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchaseOrders_args> {
1961
      public getAllPurchaseOrders() {
1962
        super("getAllPurchaseOrders");
1963
      }
1964
 
1965
      protected getAllPurchaseOrders_args getEmptyArgsInstance() {
1966
        return new getAllPurchaseOrders_args();
1967
      }
1968
 
1969
      protected getAllPurchaseOrders_result getResult(I iface, getAllPurchaseOrders_args args) throws org.apache.thrift.TException {
1970
        getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
1971
        try {
1972
          result.success = iface.getAllPurchaseOrders(args.status);
1973
        } catch (PurchaseServiceException e) {
1974
          result.e = e;
1975
        }
1976
        return result;
1977
      }
1978
    }
1979
 
1980
    private static class getSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSupplier_args> {
1981
      public getSupplier() {
1982
        super("getSupplier");
1983
      }
1984
 
1985
      protected getSupplier_args getEmptyArgsInstance() {
1986
        return new getSupplier_args();
1987
      }
1988
 
1989
      protected getSupplier_result getResult(I iface, getSupplier_args args) throws org.apache.thrift.TException {
1990
        getSupplier_result result = new getSupplier_result();
1991
        try {
1992
          result.success = iface.getSupplier(args.id);
1993
        } catch (PurchaseServiceException e) {
1994
          result.e = e;
1995
        }
1996
        return result;
1997
      }
1998
    }
1999
 
2000
    private static class startPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startPurchase_args> {
2001
      public startPurchase() {
2002
        super("startPurchase");
2003
      }
2004
 
2005
      protected startPurchase_args getEmptyArgsInstance() {
2006
        return new startPurchase_args();
2007
      }
2008
 
2009
      protected startPurchase_result getResult(I iface, startPurchase_args args) throws org.apache.thrift.TException {
2010
        startPurchase_result result = new startPurchase_result();
2011
        try {
2012
          result.success = iface.startPurchase(args.purchaseOrderId, args.invoiceNumber, args.freightCharges);
2013
          result.setSuccessIsSet(true);
2014
        } catch (PurchaseServiceException e) {
2015
          result.e = e;
2016
        }
2017
        return result;
2018
      }
2019
    }
2020
 
2021
    private static class closePurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closePurchase_args> {
2022
      public closePurchase() {
2023
        super("closePurchase");
2024
      }
2025
 
2026
      protected closePurchase_args getEmptyArgsInstance() {
2027
        return new closePurchase_args();
2028
      }
2029
 
2030
      protected closePurchase_result getResult(I iface, closePurchase_args args) throws org.apache.thrift.TException {
2031
        closePurchase_result result = new closePurchase_result();
2032
        try {
2033
          result.success = iface.closePurchase(args.purchaseId);
2034
          result.setSuccessIsSet(true);
2035
        } catch (PurchaseServiceException e) {
2036
          result.e = e;
2037
        }
2038
        return result;
2039
      }
2040
    }
2041
 
2042
    private static class getAllPurchases<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchases_args> {
2043
      public getAllPurchases() {
2044
        super("getAllPurchases");
2045
      }
2046
 
2047
      protected getAllPurchases_args getEmptyArgsInstance() {
2048
        return new getAllPurchases_args();
2049
      }
2050
 
2051
      protected getAllPurchases_result getResult(I iface, getAllPurchases_args args) throws org.apache.thrift.TException {
2052
        getAllPurchases_result result = new getAllPurchases_result();
2053
        try {
2054
          result.success = iface.getAllPurchases(args.purchaseOrderId, args.open);
2055
        } catch (PurchaseServiceException e) {
2056
          result.e = e;
2057
        }
2058
        return result;
2059
      }
2060
    }
2061
 
6385 amar.kumar 2062
    private static class getPurchasesForPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchasesForPO_args> {
2063
      public getPurchasesForPO() {
2064
        super("getPurchasesForPO");
2065
      }
2066
 
2067
      protected getPurchasesForPO_args getEmptyArgsInstance() {
2068
        return new getPurchasesForPO_args();
2069
      }
2070
 
2071
      protected getPurchasesForPO_result getResult(I iface, getPurchasesForPO_args args) throws org.apache.thrift.TException {
2072
        getPurchasesForPO_result result = new getPurchasesForPO_result();
2073
        try {
2074
          result.success = iface.getPurchasesForPO(args.purchaseOrderId);
2075
        } catch (PurchaseServiceException e) {
2076
          result.e = e;
2077
        }
2078
        return result;
2079
      }
2080
    }
2081
 
4555 mandeep.dh 2082
    private static class getPurchaseOrderForPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrderForPurchase_args> {
2083
      public getPurchaseOrderForPurchase() {
2084
        super("getPurchaseOrderForPurchase");
4496 mandeep.dh 2085
      }
2086
 
4555 mandeep.dh 2087
      protected getPurchaseOrderForPurchase_args getEmptyArgsInstance() {
2088
        return new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 2089
      }
2090
 
4555 mandeep.dh 2091
      protected getPurchaseOrderForPurchase_result getResult(I iface, getPurchaseOrderForPurchase_args args) throws org.apache.thrift.TException {
2092
        getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
2093
        result.success = iface.getPurchaseOrderForPurchase(args.purchaseId);
4496 mandeep.dh 2094
        return result;
2095
      }
2096
    }
2097
 
4754 mandeep.dh 2098
    private static class getPendingPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPendingPurchaseOrders_args> {
2099
      public getPendingPurchaseOrders() {
2100
        super("getPendingPurchaseOrders");
2101
      }
2102
 
2103
      protected getPendingPurchaseOrders_args getEmptyArgsInstance() {
2104
        return new getPendingPurchaseOrders_args();
2105
      }
2106
 
2107
      protected getPendingPurchaseOrders_result getResult(I iface, getPendingPurchaseOrders_args args) throws org.apache.thrift.TException {
2108
        getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
2109
        try {
2110
          result.success = iface.getPendingPurchaseOrders(args.warehouseId);
2111
        } catch (PurchaseServiceException e) {
2112
          result.e = e;
2113
        }
2114
        return result;
2115
      }
2116
    }
2117
 
2118
    private static class getSuppliers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSuppliers_args> {
2119
      public getSuppliers() {
2120
        super("getSuppliers");
2121
      }
2122
 
2123
      protected getSuppliers_args getEmptyArgsInstance() {
2124
        return new getSuppliers_args();
2125
      }
2126
 
2127
      protected getSuppliers_result getResult(I iface, getSuppliers_args args) throws org.apache.thrift.TException {
2128
        getSuppliers_result result = new getSuppliers_result();
2129
        try {
2130
          result.success = iface.getSuppliers();
2131
        } catch (PurchaseServiceException e) {
2132
          result.e = e;
2133
        }
2134
        return result;
2135
      }
2136
    }
2137
 
2138
    private static class fulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fulfillPO_args> {
2139
      public fulfillPO() {
2140
        super("fulfillPO");
2141
      }
2142
 
2143
      protected fulfillPO_args getEmptyArgsInstance() {
2144
        return new fulfillPO_args();
2145
      }
2146
 
2147
      protected fulfillPO_result getResult(I iface, fulfillPO_args args) throws org.apache.thrift.TException {
2148
        fulfillPO_result result = new fulfillPO_result();
2149
        try {
2150
          iface.fulfillPO(args.purchaseOrderId, args.itemId, args.quantity);
2151
        } catch (PurchaseServiceException e) {
2152
          result.e = e;
2153
        }
2154
        return result;
2155
      }
2156
    }
2157
 
2158
    private static class updatePurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updatePurchaseOrder_args> {
2159
      public updatePurchaseOrder() {
2160
        super("updatePurchaseOrder");
2161
      }
2162
 
2163
      protected updatePurchaseOrder_args getEmptyArgsInstance() {
2164
        return new updatePurchaseOrder_args();
2165
      }
2166
 
2167
      protected updatePurchaseOrder_result getResult(I iface, updatePurchaseOrder_args args) throws org.apache.thrift.TException {
2168
        updatePurchaseOrder_result result = new updatePurchaseOrder_result();
2169
        try {
2170
          iface.updatePurchaseOrder(args.purchaseOrder);
2171
        } catch (PurchaseServiceException e) {
2172
          result.e = e;
2173
        }
2174
        return result;
2175
      }
2176
    }
2177
 
5185 mandeep.dh 2178
    private static class unFulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, unFulfillPO_args> {
2179
      public unFulfillPO() {
2180
        super("unFulfillPO");
2181
      }
2182
 
2183
      protected unFulfillPO_args getEmptyArgsInstance() {
2184
        return new unFulfillPO_args();
2185
      }
2186
 
2187
      protected unFulfillPO_result getResult(I iface, unFulfillPO_args args) throws org.apache.thrift.TException {
2188
        unFulfillPO_result result = new unFulfillPO_result();
2189
        try {
2190
          iface.unFulfillPO(args.purchaseId, args.itemId, args.quantity);
2191
        } catch (PurchaseServiceException e) {
2192
          result.e = e;
2193
        }
2194
        return result;
2195
      }
2196
    }
2197
 
5443 mandeep.dh 2198
    private static class getInvoices<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoices_args> {
2199
      public getInvoices() {
2200
        super("getInvoices");
2201
      }
2202
 
2203
      protected getInvoices_args getEmptyArgsInstance() {
2204
        return new getInvoices_args();
2205
      }
2206
 
2207
      protected getInvoices_result getResult(I iface, getInvoices_args args) throws org.apache.thrift.TException {
2208
        getInvoices_result result = new getInvoices_result();
2209
        result.success = iface.getInvoices(args.date);
2210
        return result;
2211
      }
2212
    }
2213
 
7410 amar.kumar 2214
    private static class getInvoicesForWarehouse<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoicesForWarehouse_args> {
2215
      public getInvoicesForWarehouse() {
2216
        super("getInvoicesForWarehouse");
2217
      }
2218
 
2219
      protected getInvoicesForWarehouse_args getEmptyArgsInstance() {
2220
        return new getInvoicesForWarehouse_args();
2221
      }
2222
 
2223
      protected getInvoicesForWarehouse_result getResult(I iface, getInvoicesForWarehouse_args args) throws org.apache.thrift.TException {
2224
        getInvoicesForWarehouse_result result = new getInvoicesForWarehouse_result();
2225
        result.success = iface.getInvoicesForWarehouse(args.warehouseId, args.supplierId, args.date);
2226
        return result;
2227
      }
2228
    }
2229
 
5443 mandeep.dh 2230
    private static class createInvoice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createInvoice_args> {
2231
      public createInvoice() {
2232
        super("createInvoice");
2233
      }
2234
 
2235
      protected createInvoice_args getEmptyArgsInstance() {
2236
        return new createInvoice_args();
2237
      }
2238
 
2239
      protected createInvoice_result getResult(I iface, createInvoice_args args) throws org.apache.thrift.TException {
2240
        createInvoice_result result = new createInvoice_result();
2241
        try {
2242
          iface.createInvoice(args.invoice);
2243
        } catch (PurchaseServiceException e) {
2244
          result.e = e;
2245
        }
2246
        return result;
2247
      }
2248
    }
2249
 
5591 mandeep.dh 2250
    private static class addSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addSupplier_args> {
2251
      public addSupplier() {
2252
        super("addSupplier");
2253
      }
2254
 
2255
      protected addSupplier_args getEmptyArgsInstance() {
2256
        return new addSupplier_args();
2257
      }
2258
 
2259
      protected addSupplier_result getResult(I iface, addSupplier_args args) throws org.apache.thrift.TException {
2260
        addSupplier_result result = new addSupplier_result();
2261
        result.success = iface.addSupplier(args.supplier);
2262
        return result;
2263
      }
2264
    }
2265
 
2266
    private static class updateSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateSupplier_args> {
2267
      public updateSupplier() {
2268
        super("updateSupplier");
2269
      }
2270
 
2271
      protected updateSupplier_args getEmptyArgsInstance() {
2272
        return new updateSupplier_args();
2273
      }
2274
 
2275
      protected updateSupplier_result getResult(I iface, updateSupplier_args args) throws org.apache.thrift.TException {
2276
        updateSupplier_result result = new updateSupplier_result();
2277
        iface.updateSupplier(args.supplier);
2278
        return result;
2279
      }
2280
    }
2281
 
6467 amar.kumar 2282
    private static class createPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseReturn_args> {
2283
      public createPurchaseReturn() {
2284
        super("createPurchaseReturn");
2285
      }
2286
 
2287
      protected createPurchaseReturn_args getEmptyArgsInstance() {
2288
        return new createPurchaseReturn_args();
2289
      }
2290
 
2291
      protected createPurchaseReturn_result getResult(I iface, createPurchaseReturn_args args) throws org.apache.thrift.TException {
2292
        createPurchaseReturn_result result = new createPurchaseReturn_result();
2293
        result.success = iface.createPurchaseReturn(args.purchaseReturn);
2294
        result.setSuccessIsSet(true);
2295
        return result;
2296
      }
2297
    }
2298
 
2299
    private static class settlePurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, settlePurchaseReturn_args> {
2300
      public settlePurchaseReturn() {
2301
        super("settlePurchaseReturn");
2302
      }
2303
 
2304
      protected settlePurchaseReturn_args getEmptyArgsInstance() {
2305
        return new settlePurchaseReturn_args();
2306
      }
2307
 
2308
      protected settlePurchaseReturn_result getResult(I iface, settlePurchaseReturn_args args) throws org.apache.thrift.TException {
2309
        settlePurchaseReturn_result result = new settlePurchaseReturn_result();
2310
        iface.settlePurchaseReturn(args.id);
2311
        return result;
2312
      }
2313
    }
2314
 
2315
    private static class getUnsettledPurchaseReturns<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUnsettledPurchaseReturns_args> {
2316
      public getUnsettledPurchaseReturns() {
2317
        super("getUnsettledPurchaseReturns");
2318
      }
2319
 
2320
      protected getUnsettledPurchaseReturns_args getEmptyArgsInstance() {
2321
        return new getUnsettledPurchaseReturns_args();
2322
      }
2323
 
2324
      protected getUnsettledPurchaseReturns_result getResult(I iface, getUnsettledPurchaseReturns_args args) throws org.apache.thrift.TException {
2325
        getUnsettledPurchaseReturns_result result = new getUnsettledPurchaseReturns_result();
2326
        result.success = iface.getUnsettledPurchaseReturns();
2327
        return result;
2328
      }
2329
    }
2330
 
6630 amar.kumar 2331
    private static class getInvoice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoice_args> {
2332
      public getInvoice() {
2333
        super("getInvoice");
2334
      }
2335
 
2336
      protected getInvoice_args getEmptyArgsInstance() {
2337
        return new getInvoice_args();
2338
      }
2339
 
2340
      protected getInvoice_result getResult(I iface, getInvoice_args args) throws org.apache.thrift.TException {
2341
        getInvoice_result result = new getInvoice_result();
2342
        result.success = iface.getInvoice(args.invoiceNumber, args.supplierId);
2343
        return result;
2344
      }
2345
    }
2346
 
6762 amar.kumar 2347
    private static class createPurchaseForOurExtBilling<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseForOurExtBilling_args> {
2348
      public createPurchaseForOurExtBilling() {
2349
        super("createPurchaseForOurExtBilling");
2350
      }
2351
 
2352
      protected createPurchaseForOurExtBilling_args getEmptyArgsInstance() {
2353
        return new createPurchaseForOurExtBilling_args();
2354
      }
2355
 
2356
      protected createPurchaseForOurExtBilling_result getResult(I iface, createPurchaseForOurExtBilling_args args) throws org.apache.thrift.TException {
2357
        createPurchaseForOurExtBilling_result result = new createPurchaseForOurExtBilling_result();
2358
        result.success = iface.createPurchaseForOurExtBilling(args.invoiceNumber, args.unitPrice, args.itemId);
2359
        result.setSuccessIsSet(true);
2360
        return result;
2361
      }
2362
    }
2363
 
2364
    private static class fulfillPOForExtBilling<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fulfillPOForExtBilling_args> {
2365
      public fulfillPOForExtBilling() {
2366
        super("fulfillPOForExtBilling");
2367
      }
2368
 
2369
      protected fulfillPOForExtBilling_args getEmptyArgsInstance() {
2370
        return new fulfillPOForExtBilling_args();
2371
      }
2372
 
2373
      protected fulfillPOForExtBilling_result getResult(I iface, fulfillPOForExtBilling_args args) throws org.apache.thrift.TException {
2374
        fulfillPOForExtBilling_result result = new fulfillPOForExtBilling_result();
2375
        iface.fulfillPOForExtBilling(args.itemId, args.quantity);
2376
        return result;
2377
      }
2378
    }
2379
 
7410 amar.kumar 2380
    private static class closePO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closePO_args> {
2381
      public closePO() {
2382
        super("closePO");
2383
      }
2384
 
2385
      protected closePO_args getEmptyArgsInstance() {
2386
        return new closePO_args();
2387
      }
2388
 
2389
      protected closePO_result getResult(I iface, closePO_args args) throws org.apache.thrift.TException {
2390
        closePO_result result = new closePO_result();
2391
        try {
2392
          iface.closePO(args.poId);
2393
        } catch (PurchaseServiceException e) {
2394
          result.e = e;
2395
        }
2396
        return result;
2397
      }
2398
    }
2399
 
2400
    private static class isInvoiceReceived<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isInvoiceReceived_args> {
2401
      public isInvoiceReceived() {
2402
        super("isInvoiceReceived");
2403
      }
2404
 
2405
      protected isInvoiceReceived_args getEmptyArgsInstance() {
2406
        return new isInvoiceReceived_args();
2407
      }
2408
 
2409
      protected isInvoiceReceived_result getResult(I iface, isInvoiceReceived_args args) throws org.apache.thrift.TException {
2410
        isInvoiceReceived_result result = new isInvoiceReceived_result();
2411
        result.success = iface.isInvoiceReceived(args.invoiceNumber, args.supplierId);
2412
        result.setSuccessIsSet(true);
2413
        return result;
2414
      }
2415
    }
2416
 
4496 mandeep.dh 2417
  }
2418
 
2419
  public static class createPurchaseOrder_args implements org.apache.thrift.TBase<createPurchaseOrder_args, createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
2420
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_args");
2421
 
2422
    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);
2423
 
2424
    private PurchaseOrder purchaseOrder; // required
2425
 
2426
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2427
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2428
      PURCHASE_ORDER((short)1, "purchaseOrder");
2429
 
2430
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2431
 
2432
      static {
2433
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2434
          byName.put(field.getFieldName(), field);
2435
        }
2436
      }
2437
 
2438
      /**
2439
       * Find the _Fields constant that matches fieldId, or null if its not found.
2440
       */
2441
      public static _Fields findByThriftId(int fieldId) {
2442
        switch(fieldId) {
2443
          case 1: // PURCHASE_ORDER
2444
            return PURCHASE_ORDER;
2445
          default:
2446
            return null;
2447
        }
2448
      }
2449
 
2450
      /**
2451
       * Find the _Fields constant that matches fieldId, throwing an exception
2452
       * if it is not found.
2453
       */
2454
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2455
        _Fields fields = findByThriftId(fieldId);
2456
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2457
        return fields;
2458
      }
2459
 
2460
      /**
2461
       * Find the _Fields constant that matches name, or null if its not found.
2462
       */
2463
      public static _Fields findByName(String name) {
2464
        return byName.get(name);
2465
      }
2466
 
2467
      private final short _thriftId;
2468
      private final String _fieldName;
2469
 
2470
      _Fields(short thriftId, String fieldName) {
2471
        _thriftId = thriftId;
2472
        _fieldName = fieldName;
2473
      }
2474
 
2475
      public short getThriftFieldId() {
2476
        return _thriftId;
2477
      }
2478
 
2479
      public String getFieldName() {
2480
        return _fieldName;
2481
      }
2482
    }
2483
 
2484
    // isset id assignments
2485
 
2486
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2487
    static {
2488
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2489
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2490
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
2491
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2492
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_args.class, metaDataMap);
2493
    }
2494
 
2495
    public createPurchaseOrder_args() {
2496
    }
2497
 
2498
    public createPurchaseOrder_args(
2499
      PurchaseOrder purchaseOrder)
2500
    {
2501
      this();
2502
      this.purchaseOrder = purchaseOrder;
2503
    }
2504
 
2505
    /**
2506
     * Performs a deep copy on <i>other</i>.
2507
     */
2508
    public createPurchaseOrder_args(createPurchaseOrder_args other) {
2509
      if (other.isSetPurchaseOrder()) {
2510
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
2511
      }
2512
    }
2513
 
2514
    public createPurchaseOrder_args deepCopy() {
2515
      return new createPurchaseOrder_args(this);
2516
    }
2517
 
2518
    @Override
2519
    public void clear() {
2520
      this.purchaseOrder = null;
2521
    }
2522
 
2523
    public PurchaseOrder getPurchaseOrder() {
2524
      return this.purchaseOrder;
2525
    }
2526
 
2527
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
2528
      this.purchaseOrder = purchaseOrder;
2529
    }
2530
 
2531
    public void unsetPurchaseOrder() {
2532
      this.purchaseOrder = null;
2533
    }
2534
 
2535
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
2536
    public boolean isSetPurchaseOrder() {
2537
      return this.purchaseOrder != null;
2538
    }
2539
 
2540
    public void setPurchaseOrderIsSet(boolean value) {
2541
      if (!value) {
2542
        this.purchaseOrder = null;
2543
      }
2544
    }
2545
 
2546
    public void setFieldValue(_Fields field, Object value) {
2547
      switch (field) {
2548
      case PURCHASE_ORDER:
2549
        if (value == null) {
2550
          unsetPurchaseOrder();
2551
        } else {
2552
          setPurchaseOrder((PurchaseOrder)value);
2553
        }
2554
        break;
2555
 
2556
      }
2557
    }
2558
 
2559
    public Object getFieldValue(_Fields field) {
2560
      switch (field) {
2561
      case PURCHASE_ORDER:
2562
        return getPurchaseOrder();
2563
 
2564
      }
2565
      throw new IllegalStateException();
2566
    }
2567
 
2568
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2569
    public boolean isSet(_Fields field) {
2570
      if (field == null) {
2571
        throw new IllegalArgumentException();
2572
      }
2573
 
2574
      switch (field) {
2575
      case PURCHASE_ORDER:
2576
        return isSetPurchaseOrder();
2577
      }
2578
      throw new IllegalStateException();
2579
    }
2580
 
2581
    @Override
2582
    public boolean equals(Object that) {
2583
      if (that == null)
2584
        return false;
2585
      if (that instanceof createPurchaseOrder_args)
2586
        return this.equals((createPurchaseOrder_args)that);
2587
      return false;
2588
    }
2589
 
2590
    public boolean equals(createPurchaseOrder_args that) {
2591
      if (that == null)
2592
        return false;
2593
 
2594
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
2595
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
2596
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
2597
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
2598
          return false;
2599
        if (!this.purchaseOrder.equals(that.purchaseOrder))
2600
          return false;
2601
      }
2602
 
2603
      return true;
2604
    }
2605
 
2606
    @Override
2607
    public int hashCode() {
2608
      return 0;
2609
    }
2610
 
2611
    public int compareTo(createPurchaseOrder_args other) {
2612
      if (!getClass().equals(other.getClass())) {
2613
        return getClass().getName().compareTo(other.getClass().getName());
2614
      }
2615
 
2616
      int lastComparison = 0;
2617
      createPurchaseOrder_args typedOther = (createPurchaseOrder_args)other;
2618
 
2619
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
2620
      if (lastComparison != 0) {
2621
        return lastComparison;
2622
      }
2623
      if (isSetPurchaseOrder()) {
2624
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
2625
        if (lastComparison != 0) {
2626
          return lastComparison;
2627
        }
2628
      }
2629
      return 0;
2630
    }
2631
 
2632
    public _Fields fieldForId(int fieldId) {
2633
      return _Fields.findByThriftId(fieldId);
2634
    }
2635
 
2636
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2637
      org.apache.thrift.protocol.TField field;
2638
      iprot.readStructBegin();
2639
      while (true)
2640
      {
2641
        field = iprot.readFieldBegin();
2642
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2643
          break;
2644
        }
2645
        switch (field.id) {
2646
          case 1: // PURCHASE_ORDER
2647
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2648
              this.purchaseOrder = new PurchaseOrder();
2649
              this.purchaseOrder.read(iprot);
2650
            } else { 
2651
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2652
            }
2653
            break;
2654
          default:
2655
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2656
        }
2657
        iprot.readFieldEnd();
2658
      }
2659
      iprot.readStructEnd();
2660
      validate();
2661
    }
2662
 
2663
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2664
      validate();
2665
 
2666
      oprot.writeStructBegin(STRUCT_DESC);
2667
      if (this.purchaseOrder != null) {
2668
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
2669
        this.purchaseOrder.write(oprot);
2670
        oprot.writeFieldEnd();
2671
      }
2672
      oprot.writeFieldStop();
2673
      oprot.writeStructEnd();
2674
    }
2675
 
2676
    @Override
2677
    public String toString() {
2678
      StringBuilder sb = new StringBuilder("createPurchaseOrder_args(");
2679
      boolean first = true;
2680
 
2681
      sb.append("purchaseOrder:");
2682
      if (this.purchaseOrder == null) {
2683
        sb.append("null");
2684
      } else {
2685
        sb.append(this.purchaseOrder);
2686
      }
2687
      first = false;
2688
      sb.append(")");
2689
      return sb.toString();
2690
    }
2691
 
2692
    public void validate() throws org.apache.thrift.TException {
2693
      // check for required fields
2694
    }
2695
 
2696
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2697
      try {
2698
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2699
      } catch (org.apache.thrift.TException te) {
2700
        throw new java.io.IOException(te);
2701
      }
2702
    }
2703
 
2704
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2705
      try {
2706
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2707
      } catch (org.apache.thrift.TException te) {
2708
        throw new java.io.IOException(te);
2709
      }
2710
    }
2711
 
2712
  }
2713
 
2714
  public static class createPurchaseOrder_result implements org.apache.thrift.TBase<createPurchaseOrder_result, createPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
2715
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_result");
2716
 
2717
    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);
2718
    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);
2719
 
2720
    private long success; // required
2721
    private PurchaseServiceException e; // required
2722
 
2723
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2724
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2725
      SUCCESS((short)0, "success"),
2726
      E((short)1, "e");
2727
 
2728
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2729
 
2730
      static {
2731
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2732
          byName.put(field.getFieldName(), field);
2733
        }
2734
      }
2735
 
2736
      /**
2737
       * Find the _Fields constant that matches fieldId, or null if its not found.
2738
       */
2739
      public static _Fields findByThriftId(int fieldId) {
2740
        switch(fieldId) {
2741
          case 0: // SUCCESS
2742
            return SUCCESS;
2743
          case 1: // E
2744
            return E;
2745
          default:
2746
            return null;
2747
        }
2748
      }
2749
 
2750
      /**
2751
       * Find the _Fields constant that matches fieldId, throwing an exception
2752
       * if it is not found.
2753
       */
2754
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2755
        _Fields fields = findByThriftId(fieldId);
2756
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2757
        return fields;
2758
      }
2759
 
2760
      /**
2761
       * Find the _Fields constant that matches name, or null if its not found.
2762
       */
2763
      public static _Fields findByName(String name) {
2764
        return byName.get(name);
2765
      }
2766
 
2767
      private final short _thriftId;
2768
      private final String _fieldName;
2769
 
2770
      _Fields(short thriftId, String fieldName) {
2771
        _thriftId = thriftId;
2772
        _fieldName = fieldName;
2773
      }
2774
 
2775
      public short getThriftFieldId() {
2776
        return _thriftId;
2777
      }
2778
 
2779
      public String getFieldName() {
2780
        return _fieldName;
2781
      }
2782
    }
2783
 
2784
    // isset id assignments
2785
    private static final int __SUCCESS_ISSET_ID = 0;
2786
    private BitSet __isset_bit_vector = new BitSet(1);
2787
 
2788
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2789
    static {
2790
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2791
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2792
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2793
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2794
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
2795
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2796
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_result.class, metaDataMap);
2797
    }
2798
 
2799
    public createPurchaseOrder_result() {
2800
    }
2801
 
2802
    public createPurchaseOrder_result(
2803
      long success,
2804
      PurchaseServiceException e)
2805
    {
2806
      this();
2807
      this.success = success;
2808
      setSuccessIsSet(true);
2809
      this.e = e;
2810
    }
2811
 
2812
    /**
2813
     * Performs a deep copy on <i>other</i>.
2814
     */
2815
    public createPurchaseOrder_result(createPurchaseOrder_result other) {
2816
      __isset_bit_vector.clear();
2817
      __isset_bit_vector.or(other.__isset_bit_vector);
2818
      this.success = other.success;
2819
      if (other.isSetE()) {
2820
        this.e = new PurchaseServiceException(other.e);
2821
      }
2822
    }
2823
 
2824
    public createPurchaseOrder_result deepCopy() {
2825
      return new createPurchaseOrder_result(this);
2826
    }
2827
 
2828
    @Override
2829
    public void clear() {
2830
      setSuccessIsSet(false);
2831
      this.success = 0;
2832
      this.e = null;
2833
    }
2834
 
2835
    public long getSuccess() {
2836
      return this.success;
2837
    }
2838
 
2839
    public void setSuccess(long success) {
2840
      this.success = success;
2841
      setSuccessIsSet(true);
2842
    }
2843
 
2844
    public void unsetSuccess() {
2845
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
2846
    }
2847
 
2848
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2849
    public boolean isSetSuccess() {
2850
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
2851
    }
2852
 
2853
    public void setSuccessIsSet(boolean value) {
2854
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
2855
    }
2856
 
2857
    public PurchaseServiceException getE() {
2858
      return this.e;
2859
    }
2860
 
2861
    public void setE(PurchaseServiceException e) {
2862
      this.e = e;
2863
    }
2864
 
2865
    public void unsetE() {
2866
      this.e = null;
2867
    }
2868
 
2869
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
2870
    public boolean isSetE() {
2871
      return this.e != null;
2872
    }
2873
 
2874
    public void setEIsSet(boolean value) {
2875
      if (!value) {
2876
        this.e = null;
2877
      }
2878
    }
2879
 
2880
    public void setFieldValue(_Fields field, Object value) {
2881
      switch (field) {
2882
      case SUCCESS:
2883
        if (value == null) {
2884
          unsetSuccess();
2885
        } else {
2886
          setSuccess((Long)value);
2887
        }
2888
        break;
2889
 
2890
      case E:
2891
        if (value == null) {
2892
          unsetE();
2893
        } else {
2894
          setE((PurchaseServiceException)value);
2895
        }
2896
        break;
2897
 
2898
      }
2899
    }
2900
 
2901
    public Object getFieldValue(_Fields field) {
2902
      switch (field) {
2903
      case SUCCESS:
2904
        return Long.valueOf(getSuccess());
2905
 
2906
      case E:
2907
        return getE();
2908
 
2909
      }
2910
      throw new IllegalStateException();
2911
    }
2912
 
2913
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2914
    public boolean isSet(_Fields field) {
2915
      if (field == null) {
2916
        throw new IllegalArgumentException();
2917
      }
2918
 
2919
      switch (field) {
2920
      case SUCCESS:
2921
        return isSetSuccess();
2922
      case E:
2923
        return isSetE();
2924
      }
2925
      throw new IllegalStateException();
2926
    }
2927
 
2928
    @Override
2929
    public boolean equals(Object that) {
2930
      if (that == null)
2931
        return false;
2932
      if (that instanceof createPurchaseOrder_result)
2933
        return this.equals((createPurchaseOrder_result)that);
2934
      return false;
2935
    }
2936
 
2937
    public boolean equals(createPurchaseOrder_result that) {
2938
      if (that == null)
2939
        return false;
2940
 
2941
      boolean this_present_success = true;
2942
      boolean that_present_success = true;
2943
      if (this_present_success || that_present_success) {
2944
        if (!(this_present_success && that_present_success))
2945
          return false;
2946
        if (this.success != that.success)
2947
          return false;
2948
      }
2949
 
2950
      boolean this_present_e = true && this.isSetE();
2951
      boolean that_present_e = true && that.isSetE();
2952
      if (this_present_e || that_present_e) {
2953
        if (!(this_present_e && that_present_e))
2954
          return false;
2955
        if (!this.e.equals(that.e))
2956
          return false;
2957
      }
2958
 
2959
      return true;
2960
    }
2961
 
2962
    @Override
2963
    public int hashCode() {
2964
      return 0;
2965
    }
2966
 
2967
    public int compareTo(createPurchaseOrder_result other) {
2968
      if (!getClass().equals(other.getClass())) {
2969
        return getClass().getName().compareTo(other.getClass().getName());
2970
      }
2971
 
2972
      int lastComparison = 0;
2973
      createPurchaseOrder_result typedOther = (createPurchaseOrder_result)other;
2974
 
2975
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2976
      if (lastComparison != 0) {
2977
        return lastComparison;
2978
      }
2979
      if (isSetSuccess()) {
2980
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
2981
        if (lastComparison != 0) {
2982
          return lastComparison;
2983
        }
2984
      }
2985
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
2986
      if (lastComparison != 0) {
2987
        return lastComparison;
2988
      }
2989
      if (isSetE()) {
2990
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
2991
        if (lastComparison != 0) {
2992
          return lastComparison;
2993
        }
2994
      }
2995
      return 0;
2996
    }
2997
 
2998
    public _Fields fieldForId(int fieldId) {
2999
      return _Fields.findByThriftId(fieldId);
3000
    }
3001
 
3002
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3003
      org.apache.thrift.protocol.TField field;
3004
      iprot.readStructBegin();
3005
      while (true)
3006
      {
3007
        field = iprot.readFieldBegin();
3008
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3009
          break;
3010
        }
3011
        switch (field.id) {
3012
          case 0: // SUCCESS
3013
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3014
              this.success = iprot.readI64();
3015
              setSuccessIsSet(true);
3016
            } else { 
3017
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3018
            }
3019
            break;
3020
          case 1: // E
3021
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3022
              this.e = new PurchaseServiceException();
3023
              this.e.read(iprot);
3024
            } else { 
3025
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3026
            }
3027
            break;
3028
          default:
3029
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3030
        }
3031
        iprot.readFieldEnd();
3032
      }
3033
      iprot.readStructEnd();
3034
      validate();
3035
    }
3036
 
3037
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3038
      oprot.writeStructBegin(STRUCT_DESC);
3039
 
3040
      if (this.isSetSuccess()) {
3041
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3042
        oprot.writeI64(this.success);
3043
        oprot.writeFieldEnd();
3044
      } else if (this.isSetE()) {
3045
        oprot.writeFieldBegin(E_FIELD_DESC);
3046
        this.e.write(oprot);
3047
        oprot.writeFieldEnd();
3048
      }
3049
      oprot.writeFieldStop();
3050
      oprot.writeStructEnd();
3051
    }
3052
 
3053
    @Override
3054
    public String toString() {
3055
      StringBuilder sb = new StringBuilder("createPurchaseOrder_result(");
3056
      boolean first = true;
3057
 
3058
      sb.append("success:");
3059
      sb.append(this.success);
3060
      first = false;
3061
      if (!first) sb.append(", ");
3062
      sb.append("e:");
3063
      if (this.e == null) {
3064
        sb.append("null");
3065
      } else {
3066
        sb.append(this.e);
3067
      }
3068
      first = false;
3069
      sb.append(")");
3070
      return sb.toString();
3071
    }
3072
 
3073
    public void validate() throws org.apache.thrift.TException {
3074
      // check for required fields
3075
    }
3076
 
3077
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3078
      try {
3079
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3080
      } catch (org.apache.thrift.TException te) {
3081
        throw new java.io.IOException(te);
3082
      }
3083
    }
3084
 
3085
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3086
      try {
3087
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3088
      } catch (org.apache.thrift.TException te) {
3089
        throw new java.io.IOException(te);
3090
      }
3091
    }
3092
 
3093
  }
3094
 
3095
  public static class getPurchaseOrder_args implements org.apache.thrift.TBase<getPurchaseOrder_args, getPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
3096
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_args");
3097
 
3098
    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);
3099
 
3100
    private long id; // required
3101
 
3102
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3103
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3104
      ID((short)1, "id");
3105
 
3106
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3107
 
3108
      static {
3109
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3110
          byName.put(field.getFieldName(), field);
3111
        }
3112
      }
3113
 
3114
      /**
3115
       * Find the _Fields constant that matches fieldId, or null if its not found.
3116
       */
3117
      public static _Fields findByThriftId(int fieldId) {
3118
        switch(fieldId) {
3119
          case 1: // ID
3120
            return ID;
3121
          default:
3122
            return null;
3123
        }
3124
      }
3125
 
3126
      /**
3127
       * Find the _Fields constant that matches fieldId, throwing an exception
3128
       * if it is not found.
3129
       */
3130
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3131
        _Fields fields = findByThriftId(fieldId);
3132
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3133
        return fields;
3134
      }
3135
 
3136
      /**
3137
       * Find the _Fields constant that matches name, or null if its not found.
3138
       */
3139
      public static _Fields findByName(String name) {
3140
        return byName.get(name);
3141
      }
3142
 
3143
      private final short _thriftId;
3144
      private final String _fieldName;
3145
 
3146
      _Fields(short thriftId, String fieldName) {
3147
        _thriftId = thriftId;
3148
        _fieldName = fieldName;
3149
      }
3150
 
3151
      public short getThriftFieldId() {
3152
        return _thriftId;
3153
      }
3154
 
3155
      public String getFieldName() {
3156
        return _fieldName;
3157
      }
3158
    }
3159
 
3160
    // isset id assignments
3161
    private static final int __ID_ISSET_ID = 0;
3162
    private BitSet __isset_bit_vector = new BitSet(1);
3163
 
3164
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3165
    static {
3166
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3167
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3168
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3169
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3170
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_args.class, metaDataMap);
3171
    }
3172
 
3173
    public getPurchaseOrder_args() {
3174
    }
3175
 
3176
    public getPurchaseOrder_args(
3177
      long id)
3178
    {
3179
      this();
3180
      this.id = id;
3181
      setIdIsSet(true);
3182
    }
3183
 
3184
    /**
3185
     * Performs a deep copy on <i>other</i>.
3186
     */
3187
    public getPurchaseOrder_args(getPurchaseOrder_args other) {
3188
      __isset_bit_vector.clear();
3189
      __isset_bit_vector.or(other.__isset_bit_vector);
3190
      this.id = other.id;
3191
    }
3192
 
3193
    public getPurchaseOrder_args deepCopy() {
3194
      return new getPurchaseOrder_args(this);
3195
    }
3196
 
3197
    @Override
3198
    public void clear() {
3199
      setIdIsSet(false);
3200
      this.id = 0;
3201
    }
3202
 
3203
    public long getId() {
3204
      return this.id;
3205
    }
3206
 
3207
    public void setId(long id) {
3208
      this.id = id;
3209
      setIdIsSet(true);
3210
    }
3211
 
3212
    public void unsetId() {
3213
      __isset_bit_vector.clear(__ID_ISSET_ID);
3214
    }
3215
 
3216
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
3217
    public boolean isSetId() {
3218
      return __isset_bit_vector.get(__ID_ISSET_ID);
3219
    }
3220
 
3221
    public void setIdIsSet(boolean value) {
3222
      __isset_bit_vector.set(__ID_ISSET_ID, value);
3223
    }
3224
 
3225
    public void setFieldValue(_Fields field, Object value) {
3226
      switch (field) {
3227
      case ID:
3228
        if (value == null) {
3229
          unsetId();
3230
        } else {
3231
          setId((Long)value);
3232
        }
3233
        break;
3234
 
3235
      }
3236
    }
3237
 
3238
    public Object getFieldValue(_Fields field) {
3239
      switch (field) {
3240
      case ID:
3241
        return Long.valueOf(getId());
3242
 
3243
      }
3244
      throw new IllegalStateException();
3245
    }
3246
 
3247
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3248
    public boolean isSet(_Fields field) {
3249
      if (field == null) {
3250
        throw new IllegalArgumentException();
3251
      }
3252
 
3253
      switch (field) {
3254
      case ID:
3255
        return isSetId();
3256
      }
3257
      throw new IllegalStateException();
3258
    }
3259
 
3260
    @Override
3261
    public boolean equals(Object that) {
3262
      if (that == null)
3263
        return false;
3264
      if (that instanceof getPurchaseOrder_args)
3265
        return this.equals((getPurchaseOrder_args)that);
3266
      return false;
3267
    }
3268
 
3269
    public boolean equals(getPurchaseOrder_args that) {
3270
      if (that == null)
3271
        return false;
3272
 
3273
      boolean this_present_id = true;
3274
      boolean that_present_id = true;
3275
      if (this_present_id || that_present_id) {
3276
        if (!(this_present_id && that_present_id))
3277
          return false;
3278
        if (this.id != that.id)
3279
          return false;
3280
      }
3281
 
3282
      return true;
3283
    }
3284
 
3285
    @Override
3286
    public int hashCode() {
3287
      return 0;
3288
    }
3289
 
3290
    public int compareTo(getPurchaseOrder_args other) {
3291
      if (!getClass().equals(other.getClass())) {
3292
        return getClass().getName().compareTo(other.getClass().getName());
3293
      }
3294
 
3295
      int lastComparison = 0;
3296
      getPurchaseOrder_args typedOther = (getPurchaseOrder_args)other;
3297
 
3298
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
3299
      if (lastComparison != 0) {
3300
        return lastComparison;
3301
      }
3302
      if (isSetId()) {
3303
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
3304
        if (lastComparison != 0) {
3305
          return lastComparison;
3306
        }
3307
      }
3308
      return 0;
3309
    }
3310
 
3311
    public _Fields fieldForId(int fieldId) {
3312
      return _Fields.findByThriftId(fieldId);
3313
    }
3314
 
3315
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3316
      org.apache.thrift.protocol.TField field;
3317
      iprot.readStructBegin();
3318
      while (true)
3319
      {
3320
        field = iprot.readFieldBegin();
3321
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3322
          break;
3323
        }
3324
        switch (field.id) {
3325
          case 1: // ID
3326
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3327
              this.id = iprot.readI64();
3328
              setIdIsSet(true);
3329
            } else { 
3330
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3331
            }
3332
            break;
3333
          default:
3334
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3335
        }
3336
        iprot.readFieldEnd();
3337
      }
3338
      iprot.readStructEnd();
3339
      validate();
3340
    }
3341
 
3342
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3343
      validate();
3344
 
3345
      oprot.writeStructBegin(STRUCT_DESC);
3346
      oprot.writeFieldBegin(ID_FIELD_DESC);
3347
      oprot.writeI64(this.id);
3348
      oprot.writeFieldEnd();
3349
      oprot.writeFieldStop();
3350
      oprot.writeStructEnd();
3351
    }
3352
 
3353
    @Override
3354
    public String toString() {
3355
      StringBuilder sb = new StringBuilder("getPurchaseOrder_args(");
3356
      boolean first = true;
3357
 
3358
      sb.append("id:");
3359
      sb.append(this.id);
3360
      first = false;
3361
      sb.append(")");
3362
      return sb.toString();
3363
    }
3364
 
3365
    public void validate() throws org.apache.thrift.TException {
3366
      // check for required fields
3367
    }
3368
 
3369
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3370
      try {
3371
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3372
      } catch (org.apache.thrift.TException te) {
3373
        throw new java.io.IOException(te);
3374
      }
3375
    }
3376
 
3377
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3378
      try {
3379
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3380
      } catch (org.apache.thrift.TException te) {
3381
        throw new java.io.IOException(te);
3382
      }
3383
    }
3384
 
3385
  }
3386
 
3387
  public static class getPurchaseOrder_result implements org.apache.thrift.TBase<getPurchaseOrder_result, getPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
3388
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_result");
3389
 
3390
    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);
3391
    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);
3392
 
3393
    private PurchaseOrder success; // required
3394
    private PurchaseServiceException e; // required
3395
 
3396
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3397
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3398
      SUCCESS((short)0, "success"),
3399
      E((short)1, "e");
3400
 
3401
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3402
 
3403
      static {
3404
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3405
          byName.put(field.getFieldName(), field);
3406
        }
3407
      }
3408
 
3409
      /**
3410
       * Find the _Fields constant that matches fieldId, or null if its not found.
3411
       */
3412
      public static _Fields findByThriftId(int fieldId) {
3413
        switch(fieldId) {
3414
          case 0: // SUCCESS
3415
            return SUCCESS;
3416
          case 1: // E
3417
            return E;
3418
          default:
3419
            return null;
3420
        }
3421
      }
3422
 
3423
      /**
3424
       * Find the _Fields constant that matches fieldId, throwing an exception
3425
       * if it is not found.
3426
       */
3427
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3428
        _Fields fields = findByThriftId(fieldId);
3429
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3430
        return fields;
3431
      }
3432
 
3433
      /**
3434
       * Find the _Fields constant that matches name, or null if its not found.
3435
       */
3436
      public static _Fields findByName(String name) {
3437
        return byName.get(name);
3438
      }
3439
 
3440
      private final short _thriftId;
3441
      private final String _fieldName;
3442
 
3443
      _Fields(short thriftId, String fieldName) {
3444
        _thriftId = thriftId;
3445
        _fieldName = fieldName;
3446
      }
3447
 
3448
      public short getThriftFieldId() {
3449
        return _thriftId;
3450
      }
3451
 
3452
      public String getFieldName() {
3453
        return _fieldName;
3454
      }
3455
    }
3456
 
3457
    // isset id assignments
3458
 
3459
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3460
    static {
3461
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3462
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3463
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
3464
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3465
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3466
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3467
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_result.class, metaDataMap);
3468
    }
3469
 
3470
    public getPurchaseOrder_result() {
3471
    }
3472
 
3473
    public getPurchaseOrder_result(
3474
      PurchaseOrder success,
3475
      PurchaseServiceException e)
3476
    {
3477
      this();
3478
      this.success = success;
3479
      this.e = e;
3480
    }
3481
 
3482
    /**
3483
     * Performs a deep copy on <i>other</i>.
3484
     */
3485
    public getPurchaseOrder_result(getPurchaseOrder_result other) {
3486
      if (other.isSetSuccess()) {
3487
        this.success = new PurchaseOrder(other.success);
3488
      }
3489
      if (other.isSetE()) {
3490
        this.e = new PurchaseServiceException(other.e);
3491
      }
3492
    }
3493
 
3494
    public getPurchaseOrder_result deepCopy() {
3495
      return new getPurchaseOrder_result(this);
3496
    }
3497
 
3498
    @Override
3499
    public void clear() {
3500
      this.success = null;
3501
      this.e = null;
3502
    }
3503
 
3504
    public PurchaseOrder getSuccess() {
3505
      return this.success;
3506
    }
3507
 
3508
    public void setSuccess(PurchaseOrder success) {
3509
      this.success = success;
3510
    }
3511
 
3512
    public void unsetSuccess() {
3513
      this.success = null;
3514
    }
3515
 
3516
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
3517
    public boolean isSetSuccess() {
3518
      return this.success != null;
3519
    }
3520
 
3521
    public void setSuccessIsSet(boolean value) {
3522
      if (!value) {
3523
        this.success = null;
3524
      }
3525
    }
3526
 
3527
    public PurchaseServiceException getE() {
3528
      return this.e;
3529
    }
3530
 
3531
    public void setE(PurchaseServiceException e) {
3532
      this.e = e;
3533
    }
3534
 
3535
    public void unsetE() {
3536
      this.e = null;
3537
    }
3538
 
3539
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
3540
    public boolean isSetE() {
3541
      return this.e != null;
3542
    }
3543
 
3544
    public void setEIsSet(boolean value) {
3545
      if (!value) {
3546
        this.e = null;
3547
      }
3548
    }
3549
 
3550
    public void setFieldValue(_Fields field, Object value) {
3551
      switch (field) {
3552
      case SUCCESS:
3553
        if (value == null) {
3554
          unsetSuccess();
3555
        } else {
3556
          setSuccess((PurchaseOrder)value);
3557
        }
3558
        break;
3559
 
3560
      case E:
3561
        if (value == null) {
3562
          unsetE();
3563
        } else {
3564
          setE((PurchaseServiceException)value);
3565
        }
3566
        break;
3567
 
3568
      }
3569
    }
3570
 
3571
    public Object getFieldValue(_Fields field) {
3572
      switch (field) {
3573
      case SUCCESS:
3574
        return getSuccess();
3575
 
3576
      case E:
3577
        return getE();
3578
 
3579
      }
3580
      throw new IllegalStateException();
3581
    }
3582
 
3583
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3584
    public boolean isSet(_Fields field) {
3585
      if (field == null) {
3586
        throw new IllegalArgumentException();
3587
      }
3588
 
3589
      switch (field) {
3590
      case SUCCESS:
3591
        return isSetSuccess();
3592
      case E:
3593
        return isSetE();
3594
      }
3595
      throw new IllegalStateException();
3596
    }
3597
 
3598
    @Override
3599
    public boolean equals(Object that) {
3600
      if (that == null)
3601
        return false;
3602
      if (that instanceof getPurchaseOrder_result)
3603
        return this.equals((getPurchaseOrder_result)that);
3604
      return false;
3605
    }
3606
 
3607
    public boolean equals(getPurchaseOrder_result that) {
3608
      if (that == null)
3609
        return false;
3610
 
3611
      boolean this_present_success = true && this.isSetSuccess();
3612
      boolean that_present_success = true && that.isSetSuccess();
3613
      if (this_present_success || that_present_success) {
3614
        if (!(this_present_success && that_present_success))
3615
          return false;
3616
        if (!this.success.equals(that.success))
3617
          return false;
3618
      }
3619
 
3620
      boolean this_present_e = true && this.isSetE();
3621
      boolean that_present_e = true && that.isSetE();
3622
      if (this_present_e || that_present_e) {
3623
        if (!(this_present_e && that_present_e))
3624
          return false;
3625
        if (!this.e.equals(that.e))
3626
          return false;
3627
      }
3628
 
3629
      return true;
3630
    }
3631
 
3632
    @Override
3633
    public int hashCode() {
3634
      return 0;
3635
    }
3636
 
3637
    public int compareTo(getPurchaseOrder_result other) {
3638
      if (!getClass().equals(other.getClass())) {
3639
        return getClass().getName().compareTo(other.getClass().getName());
3640
      }
3641
 
3642
      int lastComparison = 0;
3643
      getPurchaseOrder_result typedOther = (getPurchaseOrder_result)other;
3644
 
3645
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3646
      if (lastComparison != 0) {
3647
        return lastComparison;
3648
      }
3649
      if (isSetSuccess()) {
3650
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3651
        if (lastComparison != 0) {
3652
          return lastComparison;
3653
        }
3654
      }
3655
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
3656
      if (lastComparison != 0) {
3657
        return lastComparison;
3658
      }
3659
      if (isSetE()) {
3660
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
3661
        if (lastComparison != 0) {
3662
          return lastComparison;
3663
        }
3664
      }
3665
      return 0;
3666
    }
3667
 
3668
    public _Fields fieldForId(int fieldId) {
3669
      return _Fields.findByThriftId(fieldId);
3670
    }
3671
 
3672
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3673
      org.apache.thrift.protocol.TField field;
3674
      iprot.readStructBegin();
3675
      while (true)
3676
      {
3677
        field = iprot.readFieldBegin();
3678
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3679
          break;
3680
        }
3681
        switch (field.id) {
3682
          case 0: // SUCCESS
3683
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3684
              this.success = new PurchaseOrder();
3685
              this.success.read(iprot);
3686
            } else { 
3687
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3688
            }
3689
            break;
3690
          case 1: // E
3691
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3692
              this.e = new PurchaseServiceException();
3693
              this.e.read(iprot);
3694
            } else { 
3695
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3696
            }
3697
            break;
3698
          default:
3699
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3700
        }
3701
        iprot.readFieldEnd();
3702
      }
3703
      iprot.readStructEnd();
3704
      validate();
3705
    }
3706
 
3707
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3708
      oprot.writeStructBegin(STRUCT_DESC);
3709
 
3710
      if (this.isSetSuccess()) {
3711
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3712
        this.success.write(oprot);
3713
        oprot.writeFieldEnd();
3714
      } else if (this.isSetE()) {
3715
        oprot.writeFieldBegin(E_FIELD_DESC);
3716
        this.e.write(oprot);
3717
        oprot.writeFieldEnd();
3718
      }
3719
      oprot.writeFieldStop();
3720
      oprot.writeStructEnd();
3721
    }
3722
 
3723
    @Override
3724
    public String toString() {
3725
      StringBuilder sb = new StringBuilder("getPurchaseOrder_result(");
3726
      boolean first = true;
3727
 
3728
      sb.append("success:");
3729
      if (this.success == null) {
3730
        sb.append("null");
3731
      } else {
3732
        sb.append(this.success);
3733
      }
3734
      first = false;
3735
      if (!first) sb.append(", ");
3736
      sb.append("e:");
3737
      if (this.e == null) {
3738
        sb.append("null");
3739
      } else {
3740
        sb.append(this.e);
3741
      }
3742
      first = false;
3743
      sb.append(")");
3744
      return sb.toString();
3745
    }
3746
 
3747
    public void validate() throws org.apache.thrift.TException {
3748
      // check for required fields
3749
    }
3750
 
3751
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3752
      try {
3753
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3754
      } catch (org.apache.thrift.TException te) {
3755
        throw new java.io.IOException(te);
3756
      }
3757
    }
3758
 
3759
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3760
      try {
3761
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3762
      } catch (org.apache.thrift.TException te) {
3763
        throw new java.io.IOException(te);
3764
      }
3765
    }
3766
 
3767
  }
3768
 
3769
  public static class getAllPurchaseOrders_args implements org.apache.thrift.TBase<getAllPurchaseOrders_args, getAllPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
3770
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_args");
3771
 
3772
    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);
3773
 
3774
    private POStatus status; // required
3775
 
3776
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3777
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3778
      /**
3779
       * 
3780
       * @see POStatus
3781
       */
3782
      STATUS((short)1, "status");
3783
 
3784
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3785
 
3786
      static {
3787
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3788
          byName.put(field.getFieldName(), field);
3789
        }
3790
      }
3791
 
3792
      /**
3793
       * Find the _Fields constant that matches fieldId, or null if its not found.
3794
       */
3795
      public static _Fields findByThriftId(int fieldId) {
3796
        switch(fieldId) {
3797
          case 1: // STATUS
3798
            return STATUS;
3799
          default:
3800
            return null;
3801
        }
3802
      }
3803
 
3804
      /**
3805
       * Find the _Fields constant that matches fieldId, throwing an exception
3806
       * if it is not found.
3807
       */
3808
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3809
        _Fields fields = findByThriftId(fieldId);
3810
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3811
        return fields;
3812
      }
3813
 
3814
      /**
3815
       * Find the _Fields constant that matches name, or null if its not found.
3816
       */
3817
      public static _Fields findByName(String name) {
3818
        return byName.get(name);
3819
      }
3820
 
3821
      private final short _thriftId;
3822
      private final String _fieldName;
3823
 
3824
      _Fields(short thriftId, String fieldName) {
3825
        _thriftId = thriftId;
3826
        _fieldName = fieldName;
3827
      }
3828
 
3829
      public short getThriftFieldId() {
3830
        return _thriftId;
3831
      }
3832
 
3833
      public String getFieldName() {
3834
        return _fieldName;
3835
      }
3836
    }
3837
 
3838
    // isset id assignments
3839
 
3840
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3841
    static {
3842
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3843
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3844
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, POStatus.class)));
3845
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3846
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_args.class, metaDataMap);
3847
    }
3848
 
3849
    public getAllPurchaseOrders_args() {
3850
    }
3851
 
3852
    public getAllPurchaseOrders_args(
3853
      POStatus status)
3854
    {
3855
      this();
3856
      this.status = status;
3857
    }
3858
 
3859
    /**
3860
     * Performs a deep copy on <i>other</i>.
3861
     */
3862
    public getAllPurchaseOrders_args(getAllPurchaseOrders_args other) {
3863
      if (other.isSetStatus()) {
3864
        this.status = other.status;
3865
      }
3866
    }
3867
 
3868
    public getAllPurchaseOrders_args deepCopy() {
3869
      return new getAllPurchaseOrders_args(this);
3870
    }
3871
 
3872
    @Override
3873
    public void clear() {
3874
      this.status = null;
3875
    }
3876
 
3877
    /**
3878
     * 
3879
     * @see POStatus
3880
     */
3881
    public POStatus getStatus() {
3882
      return this.status;
3883
    }
3884
 
3885
    /**
3886
     * 
3887
     * @see POStatus
3888
     */
3889
    public void setStatus(POStatus status) {
3890
      this.status = status;
3891
    }
3892
 
3893
    public void unsetStatus() {
3894
      this.status = null;
3895
    }
3896
 
3897
    /** Returns true if field status is set (has been assigned a value) and false otherwise */
3898
    public boolean isSetStatus() {
3899
      return this.status != null;
3900
    }
3901
 
3902
    public void setStatusIsSet(boolean value) {
3903
      if (!value) {
3904
        this.status = null;
3905
      }
3906
    }
3907
 
3908
    public void setFieldValue(_Fields field, Object value) {
3909
      switch (field) {
3910
      case STATUS:
3911
        if (value == null) {
3912
          unsetStatus();
3913
        } else {
3914
          setStatus((POStatus)value);
3915
        }
3916
        break;
3917
 
3918
      }
3919
    }
3920
 
3921
    public Object getFieldValue(_Fields field) {
3922
      switch (field) {
3923
      case STATUS:
3924
        return getStatus();
3925
 
3926
      }
3927
      throw new IllegalStateException();
3928
    }
3929
 
3930
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3931
    public boolean isSet(_Fields field) {
3932
      if (field == null) {
3933
        throw new IllegalArgumentException();
3934
      }
3935
 
3936
      switch (field) {
3937
      case STATUS:
3938
        return isSetStatus();
3939
      }
3940
      throw new IllegalStateException();
3941
    }
3942
 
3943
    @Override
3944
    public boolean equals(Object that) {
3945
      if (that == null)
3946
        return false;
3947
      if (that instanceof getAllPurchaseOrders_args)
3948
        return this.equals((getAllPurchaseOrders_args)that);
3949
      return false;
3950
    }
3951
 
3952
    public boolean equals(getAllPurchaseOrders_args that) {
3953
      if (that == null)
3954
        return false;
3955
 
3956
      boolean this_present_status = true && this.isSetStatus();
3957
      boolean that_present_status = true && that.isSetStatus();
3958
      if (this_present_status || that_present_status) {
3959
        if (!(this_present_status && that_present_status))
3960
          return false;
3961
        if (!this.status.equals(that.status))
3962
          return false;
3963
      }
3964
 
3965
      return true;
3966
    }
3967
 
3968
    @Override
3969
    public int hashCode() {
3970
      return 0;
3971
    }
3972
 
3973
    public int compareTo(getAllPurchaseOrders_args other) {
3974
      if (!getClass().equals(other.getClass())) {
3975
        return getClass().getName().compareTo(other.getClass().getName());
3976
      }
3977
 
3978
      int lastComparison = 0;
3979
      getAllPurchaseOrders_args typedOther = (getAllPurchaseOrders_args)other;
3980
 
3981
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
3982
      if (lastComparison != 0) {
3983
        return lastComparison;
3984
      }
3985
      if (isSetStatus()) {
3986
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
3987
        if (lastComparison != 0) {
3988
          return lastComparison;
3989
        }
3990
      }
3991
      return 0;
3992
    }
3993
 
3994
    public _Fields fieldForId(int fieldId) {
3995
      return _Fields.findByThriftId(fieldId);
3996
    }
3997
 
3998
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3999
      org.apache.thrift.protocol.TField field;
4000
      iprot.readStructBegin();
4001
      while (true)
4002
      {
4003
        field = iprot.readFieldBegin();
4004
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4005
          break;
4006
        }
4007
        switch (field.id) {
4008
          case 1: // STATUS
4009
            if (field.type == org.apache.thrift.protocol.TType.I32) {
4010
              this.status = POStatus.findByValue(iprot.readI32());
4011
            } else { 
4012
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4013
            }
4014
            break;
4015
          default:
4016
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4017
        }
4018
        iprot.readFieldEnd();
4019
      }
4020
      iprot.readStructEnd();
4021
      validate();
4022
    }
4023
 
4024
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4025
      validate();
4026
 
4027
      oprot.writeStructBegin(STRUCT_DESC);
4028
      if (this.status != null) {
4029
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4030
        oprot.writeI32(this.status.getValue());
4031
        oprot.writeFieldEnd();
4032
      }
4033
      oprot.writeFieldStop();
4034
      oprot.writeStructEnd();
4035
    }
4036
 
4037
    @Override
4038
    public String toString() {
4039
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_args(");
4040
      boolean first = true;
4041
 
4042
      sb.append("status:");
4043
      if (this.status == null) {
4044
        sb.append("null");
4045
      } else {
4046
        sb.append(this.status);
4047
      }
4048
      first = false;
4049
      sb.append(")");
4050
      return sb.toString();
4051
    }
4052
 
4053
    public void validate() throws org.apache.thrift.TException {
4054
      // check for required fields
4055
    }
4056
 
4057
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4058
      try {
4059
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4060
      } catch (org.apache.thrift.TException te) {
4061
        throw new java.io.IOException(te);
4062
      }
4063
    }
4064
 
4065
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4066
      try {
4067
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4068
      } catch (org.apache.thrift.TException te) {
4069
        throw new java.io.IOException(te);
4070
      }
4071
    }
4072
 
4073
  }
4074
 
4075
  public static class getAllPurchaseOrders_result implements org.apache.thrift.TBase<getAllPurchaseOrders_result, getAllPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
4076
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_result");
4077
 
4078
    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);
4079
    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);
4080
 
4081
    private List<PurchaseOrder> success; // required
4082
    private PurchaseServiceException e; // required
4083
 
4084
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4085
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4086
      SUCCESS((short)0, "success"),
4087
      E((short)1, "e");
4088
 
4089
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4090
 
4091
      static {
4092
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4093
          byName.put(field.getFieldName(), field);
4094
        }
4095
      }
4096
 
4097
      /**
4098
       * Find the _Fields constant that matches fieldId, or null if its not found.
4099
       */
4100
      public static _Fields findByThriftId(int fieldId) {
4101
        switch(fieldId) {
4102
          case 0: // SUCCESS
4103
            return SUCCESS;
4104
          case 1: // E
4105
            return E;
4106
          default:
4107
            return null;
4108
        }
4109
      }
4110
 
4111
      /**
4112
       * Find the _Fields constant that matches fieldId, throwing an exception
4113
       * if it is not found.
4114
       */
4115
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4116
        _Fields fields = findByThriftId(fieldId);
4117
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4118
        return fields;
4119
      }
4120
 
4121
      /**
4122
       * Find the _Fields constant that matches name, or null if its not found.
4123
       */
4124
      public static _Fields findByName(String name) {
4125
        return byName.get(name);
4126
      }
4127
 
4128
      private final short _thriftId;
4129
      private final String _fieldName;
4130
 
4131
      _Fields(short thriftId, String fieldName) {
4132
        _thriftId = thriftId;
4133
        _fieldName = fieldName;
4134
      }
4135
 
4136
      public short getThriftFieldId() {
4137
        return _thriftId;
4138
      }
4139
 
4140
      public String getFieldName() {
4141
        return _fieldName;
4142
      }
4143
    }
4144
 
4145
    // isset id assignments
4146
 
4147
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4148
    static {
4149
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4150
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4151
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
4152
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
4153
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4154
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4155
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4156
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_result.class, metaDataMap);
4157
    }
4158
 
4159
    public getAllPurchaseOrders_result() {
4160
    }
4161
 
4162
    public getAllPurchaseOrders_result(
4163
      List<PurchaseOrder> success,
4164
      PurchaseServiceException e)
4165
    {
4166
      this();
4167
      this.success = success;
4168
      this.e = e;
4169
    }
4170
 
4171
    /**
4172
     * Performs a deep copy on <i>other</i>.
4173
     */
4174
    public getAllPurchaseOrders_result(getAllPurchaseOrders_result other) {
4175
      if (other.isSetSuccess()) {
4176
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
4177
        for (PurchaseOrder other_element : other.success) {
4178
          __this__success.add(new PurchaseOrder(other_element));
4179
        }
4180
        this.success = __this__success;
4181
      }
4182
      if (other.isSetE()) {
4183
        this.e = new PurchaseServiceException(other.e);
4184
      }
4185
    }
4186
 
4187
    public getAllPurchaseOrders_result deepCopy() {
4188
      return new getAllPurchaseOrders_result(this);
4189
    }
4190
 
4191
    @Override
4192
    public void clear() {
4193
      this.success = null;
4194
      this.e = null;
4195
    }
4196
 
4197
    public int getSuccessSize() {
4198
      return (this.success == null) ? 0 : this.success.size();
4199
    }
4200
 
4201
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
4202
      return (this.success == null) ? null : this.success.iterator();
4203
    }
4204
 
4205
    public void addToSuccess(PurchaseOrder elem) {
4206
      if (this.success == null) {
4207
        this.success = new ArrayList<PurchaseOrder>();
4208
      }
4209
      this.success.add(elem);
4210
    }
4211
 
4212
    public List<PurchaseOrder> getSuccess() {
4213
      return this.success;
4214
    }
4215
 
4216
    public void setSuccess(List<PurchaseOrder> success) {
4217
      this.success = success;
4218
    }
4219
 
4220
    public void unsetSuccess() {
4221
      this.success = null;
4222
    }
4223
 
4224
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
4225
    public boolean isSetSuccess() {
4226
      return this.success != null;
4227
    }
4228
 
4229
    public void setSuccessIsSet(boolean value) {
4230
      if (!value) {
4231
        this.success = null;
4232
      }
4233
    }
4234
 
4235
    public PurchaseServiceException getE() {
4236
      return this.e;
4237
    }
4238
 
4239
    public void setE(PurchaseServiceException e) {
4240
      this.e = e;
4241
    }
4242
 
4243
    public void unsetE() {
4244
      this.e = null;
4245
    }
4246
 
4247
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
4248
    public boolean isSetE() {
4249
      return this.e != null;
4250
    }
4251
 
4252
    public void setEIsSet(boolean value) {
4253
      if (!value) {
4254
        this.e = null;
4255
      }
4256
    }
4257
 
4258
    public void setFieldValue(_Fields field, Object value) {
4259
      switch (field) {
4260
      case SUCCESS:
4261
        if (value == null) {
4262
          unsetSuccess();
4263
        } else {
4264
          setSuccess((List<PurchaseOrder>)value);
4265
        }
4266
        break;
4267
 
4268
      case E:
4269
        if (value == null) {
4270
          unsetE();
4271
        } else {
4272
          setE((PurchaseServiceException)value);
4273
        }
4274
        break;
4275
 
4276
      }
4277
    }
4278
 
4279
    public Object getFieldValue(_Fields field) {
4280
      switch (field) {
4281
      case SUCCESS:
4282
        return getSuccess();
4283
 
4284
      case E:
4285
        return getE();
4286
 
4287
      }
4288
      throw new IllegalStateException();
4289
    }
4290
 
4291
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4292
    public boolean isSet(_Fields field) {
4293
      if (field == null) {
4294
        throw new IllegalArgumentException();
4295
      }
4296
 
4297
      switch (field) {
4298
      case SUCCESS:
4299
        return isSetSuccess();
4300
      case E:
4301
        return isSetE();
4302
      }
4303
      throw new IllegalStateException();
4304
    }
4305
 
4306
    @Override
4307
    public boolean equals(Object that) {
4308
      if (that == null)
4309
        return false;
4310
      if (that instanceof getAllPurchaseOrders_result)
4311
        return this.equals((getAllPurchaseOrders_result)that);
4312
      return false;
4313
    }
4314
 
4315
    public boolean equals(getAllPurchaseOrders_result that) {
4316
      if (that == null)
4317
        return false;
4318
 
4319
      boolean this_present_success = true && this.isSetSuccess();
4320
      boolean that_present_success = true && that.isSetSuccess();
4321
      if (this_present_success || that_present_success) {
4322
        if (!(this_present_success && that_present_success))
4323
          return false;
4324
        if (!this.success.equals(that.success))
4325
          return false;
4326
      }
4327
 
4328
      boolean this_present_e = true && this.isSetE();
4329
      boolean that_present_e = true && that.isSetE();
4330
      if (this_present_e || that_present_e) {
4331
        if (!(this_present_e && that_present_e))
4332
          return false;
4333
        if (!this.e.equals(that.e))
4334
          return false;
4335
      }
4336
 
4337
      return true;
4338
    }
4339
 
4340
    @Override
4341
    public int hashCode() {
4342
      return 0;
4343
    }
4344
 
4345
    public int compareTo(getAllPurchaseOrders_result other) {
4346
      if (!getClass().equals(other.getClass())) {
4347
        return getClass().getName().compareTo(other.getClass().getName());
4348
      }
4349
 
4350
      int lastComparison = 0;
4351
      getAllPurchaseOrders_result typedOther = (getAllPurchaseOrders_result)other;
4352
 
4353
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
4354
      if (lastComparison != 0) {
4355
        return lastComparison;
4356
      }
4357
      if (isSetSuccess()) {
4358
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4359
        if (lastComparison != 0) {
4360
          return lastComparison;
4361
        }
4362
      }
4363
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
4364
      if (lastComparison != 0) {
4365
        return lastComparison;
4366
      }
4367
      if (isSetE()) {
4368
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
4369
        if (lastComparison != 0) {
4370
          return lastComparison;
4371
        }
4372
      }
4373
      return 0;
4374
    }
4375
 
4376
    public _Fields fieldForId(int fieldId) {
4377
      return _Fields.findByThriftId(fieldId);
4378
    }
4379
 
4380
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4381
      org.apache.thrift.protocol.TField field;
4382
      iprot.readStructBegin();
4383
      while (true)
4384
      {
4385
        field = iprot.readFieldBegin();
4386
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4387
          break;
4388
        }
4389
        switch (field.id) {
4390
          case 0: // SUCCESS
4391
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
4392
              {
4393
                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
4394
                this.success = new ArrayList<PurchaseOrder>(_list4.size);
4395
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
4396
                {
4397
                  PurchaseOrder _elem6; // required
4398
                  _elem6 = new PurchaseOrder();
4399
                  _elem6.read(iprot);
4400
                  this.success.add(_elem6);
4401
                }
4402
                iprot.readListEnd();
4403
              }
4404
            } else { 
4405
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4406
            }
4407
            break;
4408
          case 1: // E
4409
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4410
              this.e = new PurchaseServiceException();
4411
              this.e.read(iprot);
4412
            } else { 
4413
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4414
            }
4415
            break;
4416
          default:
4417
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4418
        }
4419
        iprot.readFieldEnd();
4420
      }
4421
      iprot.readStructEnd();
4422
      validate();
4423
    }
4424
 
4425
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4426
      oprot.writeStructBegin(STRUCT_DESC);
4427
 
4428
      if (this.isSetSuccess()) {
4429
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4430
        {
4431
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
4432
          for (PurchaseOrder _iter7 : this.success)
4433
          {
4434
            _iter7.write(oprot);
4435
          }
4436
          oprot.writeListEnd();
4437
        }
4438
        oprot.writeFieldEnd();
4439
      } else if (this.isSetE()) {
4440
        oprot.writeFieldBegin(E_FIELD_DESC);
4441
        this.e.write(oprot);
4442
        oprot.writeFieldEnd();
4443
      }
4444
      oprot.writeFieldStop();
4445
      oprot.writeStructEnd();
4446
    }
4447
 
4448
    @Override
4449
    public String toString() {
4450
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_result(");
4451
      boolean first = true;
4452
 
4453
      sb.append("success:");
4454
      if (this.success == null) {
4455
        sb.append("null");
4456
      } else {
4457
        sb.append(this.success);
4458
      }
4459
      first = false;
4460
      if (!first) sb.append(", ");
4461
      sb.append("e:");
4462
      if (this.e == null) {
4463
        sb.append("null");
4464
      } else {
4465
        sb.append(this.e);
4466
      }
4467
      first = false;
4468
      sb.append(")");
4469
      return sb.toString();
4470
    }
4471
 
4472
    public void validate() throws org.apache.thrift.TException {
4473
      // check for required fields
4474
    }
4475
 
4476
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4477
      try {
4478
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4479
      } catch (org.apache.thrift.TException te) {
4480
        throw new java.io.IOException(te);
4481
      }
4482
    }
4483
 
4484
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4485
      try {
4486
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4487
      } catch (org.apache.thrift.TException te) {
4488
        throw new java.io.IOException(te);
4489
      }
4490
    }
4491
 
4492
  }
4493
 
4494
  public static class getSupplier_args implements org.apache.thrift.TBase<getSupplier_args, getSupplier_args._Fields>, java.io.Serializable, Cloneable   {
4495
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_args");
4496
 
4497
    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);
4498
 
4499
    private long id; // required
4500
 
4501
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4502
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4503
      ID((short)1, "id");
4504
 
4505
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4506
 
4507
      static {
4508
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4509
          byName.put(field.getFieldName(), field);
4510
        }
4511
      }
4512
 
4513
      /**
4514
       * Find the _Fields constant that matches fieldId, or null if its not found.
4515
       */
4516
      public static _Fields findByThriftId(int fieldId) {
4517
        switch(fieldId) {
4518
          case 1: // ID
4519
            return ID;
4520
          default:
4521
            return null;
4522
        }
4523
      }
4524
 
4525
      /**
4526
       * Find the _Fields constant that matches fieldId, throwing an exception
4527
       * if it is not found.
4528
       */
4529
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4530
        _Fields fields = findByThriftId(fieldId);
4531
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4532
        return fields;
4533
      }
4534
 
4535
      /**
4536
       * Find the _Fields constant that matches name, or null if its not found.
4537
       */
4538
      public static _Fields findByName(String name) {
4539
        return byName.get(name);
4540
      }
4541
 
4542
      private final short _thriftId;
4543
      private final String _fieldName;
4544
 
4545
      _Fields(short thriftId, String fieldName) {
4546
        _thriftId = thriftId;
4547
        _fieldName = fieldName;
4548
      }
4549
 
4550
      public short getThriftFieldId() {
4551
        return _thriftId;
4552
      }
4553
 
4554
      public String getFieldName() {
4555
        return _fieldName;
4556
      }
4557
    }
4558
 
4559
    // isset id assignments
4560
    private static final int __ID_ISSET_ID = 0;
4561
    private BitSet __isset_bit_vector = new BitSet(1);
4562
 
4563
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4564
    static {
4565
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4566
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4567
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4568
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4569
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_args.class, metaDataMap);
4570
    }
4571
 
4572
    public getSupplier_args() {
4573
    }
4574
 
4575
    public getSupplier_args(
4576
      long id)
4577
    {
4578
      this();
4579
      this.id = id;
4580
      setIdIsSet(true);
4581
    }
4582
 
4583
    /**
4584
     * Performs a deep copy on <i>other</i>.
4585
     */
4586
    public getSupplier_args(getSupplier_args other) {
4587
      __isset_bit_vector.clear();
4588
      __isset_bit_vector.or(other.__isset_bit_vector);
4589
      this.id = other.id;
4590
    }
4591
 
4592
    public getSupplier_args deepCopy() {
4593
      return new getSupplier_args(this);
4594
    }
4595
 
4596
    @Override
4597
    public void clear() {
4598
      setIdIsSet(false);
4599
      this.id = 0;
4600
    }
4601
 
4602
    public long getId() {
4603
      return this.id;
4604
    }
4605
 
4606
    public void setId(long id) {
4607
      this.id = id;
4608
      setIdIsSet(true);
4609
    }
4610
 
4611
    public void unsetId() {
4612
      __isset_bit_vector.clear(__ID_ISSET_ID);
4613
    }
4614
 
4615
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
4616
    public boolean isSetId() {
4617
      return __isset_bit_vector.get(__ID_ISSET_ID);
4618
    }
4619
 
4620
    public void setIdIsSet(boolean value) {
4621
      __isset_bit_vector.set(__ID_ISSET_ID, value);
4622
    }
4623
 
4624
    public void setFieldValue(_Fields field, Object value) {
4625
      switch (field) {
4626
      case ID:
4627
        if (value == null) {
4628
          unsetId();
4629
        } else {
4630
          setId((Long)value);
4631
        }
4632
        break;
4633
 
4634
      }
4635
    }
4636
 
4637
    public Object getFieldValue(_Fields field) {
4638
      switch (field) {
4639
      case ID:
4640
        return Long.valueOf(getId());
4641
 
4642
      }
4643
      throw new IllegalStateException();
4644
    }
4645
 
4646
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4647
    public boolean isSet(_Fields field) {
4648
      if (field == null) {
4649
        throw new IllegalArgumentException();
4650
      }
4651
 
4652
      switch (field) {
4653
      case ID:
4654
        return isSetId();
4655
      }
4656
      throw new IllegalStateException();
4657
    }
4658
 
4659
    @Override
4660
    public boolean equals(Object that) {
4661
      if (that == null)
4662
        return false;
4663
      if (that instanceof getSupplier_args)
4664
        return this.equals((getSupplier_args)that);
4665
      return false;
4666
    }
4667
 
4668
    public boolean equals(getSupplier_args that) {
4669
      if (that == null)
4670
        return false;
4671
 
4672
      boolean this_present_id = true;
4673
      boolean that_present_id = true;
4674
      if (this_present_id || that_present_id) {
4675
        if (!(this_present_id && that_present_id))
4676
          return false;
4677
        if (this.id != that.id)
4678
          return false;
4679
      }
4680
 
4681
      return true;
4682
    }
4683
 
4684
    @Override
4685
    public int hashCode() {
4686
      return 0;
4687
    }
4688
 
4689
    public int compareTo(getSupplier_args other) {
4690
      if (!getClass().equals(other.getClass())) {
4691
        return getClass().getName().compareTo(other.getClass().getName());
4692
      }
4693
 
4694
      int lastComparison = 0;
4695
      getSupplier_args typedOther = (getSupplier_args)other;
4696
 
4697
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
4698
      if (lastComparison != 0) {
4699
        return lastComparison;
4700
      }
4701
      if (isSetId()) {
4702
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
4703
        if (lastComparison != 0) {
4704
          return lastComparison;
4705
        }
4706
      }
4707
      return 0;
4708
    }
4709
 
4710
    public _Fields fieldForId(int fieldId) {
4711
      return _Fields.findByThriftId(fieldId);
4712
    }
4713
 
4714
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4715
      org.apache.thrift.protocol.TField field;
4716
      iprot.readStructBegin();
4717
      while (true)
4718
      {
4719
        field = iprot.readFieldBegin();
4720
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4721
          break;
4722
        }
4723
        switch (field.id) {
4724
          case 1: // ID
4725
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4726
              this.id = iprot.readI64();
4727
              setIdIsSet(true);
4728
            } else { 
4729
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4730
            }
4731
            break;
4732
          default:
4733
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4734
        }
4735
        iprot.readFieldEnd();
4736
      }
4737
      iprot.readStructEnd();
4738
      validate();
4739
    }
4740
 
4741
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4742
      validate();
4743
 
4744
      oprot.writeStructBegin(STRUCT_DESC);
4745
      oprot.writeFieldBegin(ID_FIELD_DESC);
4746
      oprot.writeI64(this.id);
4747
      oprot.writeFieldEnd();
4748
      oprot.writeFieldStop();
4749
      oprot.writeStructEnd();
4750
    }
4751
 
4752
    @Override
4753
    public String toString() {
4754
      StringBuilder sb = new StringBuilder("getSupplier_args(");
4755
      boolean first = true;
4756
 
4757
      sb.append("id:");
4758
      sb.append(this.id);
4759
      first = false;
4760
      sb.append(")");
4761
      return sb.toString();
4762
    }
4763
 
4764
    public void validate() throws org.apache.thrift.TException {
4765
      // check for required fields
4766
    }
4767
 
4768
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4769
      try {
4770
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4771
      } catch (org.apache.thrift.TException te) {
4772
        throw new java.io.IOException(te);
4773
      }
4774
    }
4775
 
4776
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4777
      try {
4778
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
4779
        __isset_bit_vector = new BitSet(1);
4780
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4781
      } catch (org.apache.thrift.TException te) {
4782
        throw new java.io.IOException(te);
4783
      }
4784
    }
4785
 
4786
  }
4787
 
4788
  public static class getSupplier_result implements org.apache.thrift.TBase<getSupplier_result, getSupplier_result._Fields>, java.io.Serializable, Cloneable   {
4789
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_result");
4790
 
4791
    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);
4792
    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);
4793
 
4794
    private Supplier success; // required
4795
    private PurchaseServiceException e; // required
4796
 
4797
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4798
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4799
      SUCCESS((short)0, "success"),
4800
      E((short)1, "e");
4801
 
4802
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4803
 
4804
      static {
4805
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4806
          byName.put(field.getFieldName(), field);
4807
        }
4808
      }
4809
 
4810
      /**
4811
       * Find the _Fields constant that matches fieldId, or null if its not found.
4812
       */
4813
      public static _Fields findByThriftId(int fieldId) {
4814
        switch(fieldId) {
4815
          case 0: // SUCCESS
4816
            return SUCCESS;
4817
          case 1: // E
4818
            return E;
4819
          default:
4820
            return null;
4821
        }
4822
      }
4823
 
4824
      /**
4825
       * Find the _Fields constant that matches fieldId, throwing an exception
4826
       * if it is not found.
4827
       */
4828
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4829
        _Fields fields = findByThriftId(fieldId);
4830
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4831
        return fields;
4832
      }
4833
 
4834
      /**
4835
       * Find the _Fields constant that matches name, or null if its not found.
4836
       */
4837
      public static _Fields findByName(String name) {
4838
        return byName.get(name);
4839
      }
4840
 
4841
      private final short _thriftId;
4842
      private final String _fieldName;
4843
 
4844
      _Fields(short thriftId, String fieldName) {
4845
        _thriftId = thriftId;
4846
        _fieldName = fieldName;
4847
      }
4848
 
4849
      public short getThriftFieldId() {
4850
        return _thriftId;
4851
      }
4852
 
4853
      public String getFieldName() {
4854
        return _fieldName;
4855
      }
4856
    }
4857
 
4858
    // isset id assignments
4859
 
4860
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4861
    static {
4862
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4863
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4864
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
4865
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4866
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4867
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4868
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_result.class, metaDataMap);
4869
    }
4870
 
4871
    public getSupplier_result() {
4872
    }
4873
 
4874
    public getSupplier_result(
4875
      Supplier success,
4876
      PurchaseServiceException e)
4877
    {
4878
      this();
4879
      this.success = success;
4880
      this.e = e;
4881
    }
4882
 
4883
    /**
4884
     * Performs a deep copy on <i>other</i>.
4885
     */
4886
    public getSupplier_result(getSupplier_result other) {
4887
      if (other.isSetSuccess()) {
4888
        this.success = new Supplier(other.success);
4889
      }
4890
      if (other.isSetE()) {
4891
        this.e = new PurchaseServiceException(other.e);
4892
      }
4893
    }
4894
 
4895
    public getSupplier_result deepCopy() {
4896
      return new getSupplier_result(this);
4897
    }
4898
 
4899
    @Override
4900
    public void clear() {
4901
      this.success = null;
4902
      this.e = null;
4903
    }
4904
 
4905
    public Supplier getSuccess() {
4906
      return this.success;
4907
    }
4908
 
4909
    public void setSuccess(Supplier success) {
4910
      this.success = success;
4911
    }
4912
 
4913
    public void unsetSuccess() {
4914
      this.success = null;
4915
    }
4916
 
4917
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
4918
    public boolean isSetSuccess() {
4919
      return this.success != null;
4920
    }
4921
 
4922
    public void setSuccessIsSet(boolean value) {
4923
      if (!value) {
4924
        this.success = null;
4925
      }
4926
    }
4927
 
4928
    public PurchaseServiceException getE() {
4929
      return this.e;
4930
    }
4931
 
4932
    public void setE(PurchaseServiceException e) {
4933
      this.e = e;
4934
    }
4935
 
4936
    public void unsetE() {
4937
      this.e = null;
4938
    }
4939
 
4940
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
4941
    public boolean isSetE() {
4942
      return this.e != null;
4943
    }
4944
 
4945
    public void setEIsSet(boolean value) {
4946
      if (!value) {
4947
        this.e = null;
4948
      }
4949
    }
4950
 
4951
    public void setFieldValue(_Fields field, Object value) {
4952
      switch (field) {
4953
      case SUCCESS:
4954
        if (value == null) {
4955
          unsetSuccess();
4956
        } else {
4957
          setSuccess((Supplier)value);
4958
        }
4959
        break;
4960
 
4961
      case E:
4962
        if (value == null) {
4963
          unsetE();
4964
        } else {
4965
          setE((PurchaseServiceException)value);
4966
        }
4967
        break;
4968
 
4969
      }
4970
    }
4971
 
4972
    public Object getFieldValue(_Fields field) {
4973
      switch (field) {
4974
      case SUCCESS:
4975
        return getSuccess();
4976
 
4977
      case E:
4978
        return getE();
4979
 
4980
      }
4981
      throw new IllegalStateException();
4982
    }
4983
 
4984
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4985
    public boolean isSet(_Fields field) {
4986
      if (field == null) {
4987
        throw new IllegalArgumentException();
4988
      }
4989
 
4990
      switch (field) {
4991
      case SUCCESS:
4992
        return isSetSuccess();
4993
      case E:
4994
        return isSetE();
4995
      }
4996
      throw new IllegalStateException();
4997
    }
4998
 
4999
    @Override
5000
    public boolean equals(Object that) {
5001
      if (that == null)
5002
        return false;
5003
      if (that instanceof getSupplier_result)
5004
        return this.equals((getSupplier_result)that);
5005
      return false;
5006
    }
5007
 
5008
    public boolean equals(getSupplier_result that) {
5009
      if (that == null)
5010
        return false;
5011
 
5012
      boolean this_present_success = true && this.isSetSuccess();
5013
      boolean that_present_success = true && that.isSetSuccess();
5014
      if (this_present_success || that_present_success) {
5015
        if (!(this_present_success && that_present_success))
5016
          return false;
5017
        if (!this.success.equals(that.success))
5018
          return false;
5019
      }
5020
 
5021
      boolean this_present_e = true && this.isSetE();
5022
      boolean that_present_e = true && that.isSetE();
5023
      if (this_present_e || that_present_e) {
5024
        if (!(this_present_e && that_present_e))
5025
          return false;
5026
        if (!this.e.equals(that.e))
5027
          return false;
5028
      }
5029
 
5030
      return true;
5031
    }
5032
 
5033
    @Override
5034
    public int hashCode() {
5035
      return 0;
5036
    }
5037
 
5038
    public int compareTo(getSupplier_result other) {
5039
      if (!getClass().equals(other.getClass())) {
5040
        return getClass().getName().compareTo(other.getClass().getName());
5041
      }
5042
 
5043
      int lastComparison = 0;
5044
      getSupplier_result typedOther = (getSupplier_result)other;
5045
 
5046
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5047
      if (lastComparison != 0) {
5048
        return lastComparison;
5049
      }
5050
      if (isSetSuccess()) {
5051
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5052
        if (lastComparison != 0) {
5053
          return lastComparison;
5054
        }
5055
      }
5056
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
5057
      if (lastComparison != 0) {
5058
        return lastComparison;
5059
      }
5060
      if (isSetE()) {
5061
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
5062
        if (lastComparison != 0) {
5063
          return lastComparison;
5064
        }
5065
      }
5066
      return 0;
5067
    }
5068
 
5069
    public _Fields fieldForId(int fieldId) {
5070
      return _Fields.findByThriftId(fieldId);
5071
    }
5072
 
5073
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5074
      org.apache.thrift.protocol.TField field;
5075
      iprot.readStructBegin();
5076
      while (true)
5077
      {
5078
        field = iprot.readFieldBegin();
5079
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5080
          break;
5081
        }
5082
        switch (field.id) {
5083
          case 0: // SUCCESS
5084
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5085
              this.success = new Supplier();
5086
              this.success.read(iprot);
5087
            } else { 
5088
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5089
            }
5090
            break;
5091
          case 1: // E
5092
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5093
              this.e = new PurchaseServiceException();
5094
              this.e.read(iprot);
5095
            } else { 
5096
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5097
            }
5098
            break;
5099
          default:
5100
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5101
        }
5102
        iprot.readFieldEnd();
5103
      }
5104
      iprot.readStructEnd();
5105
      validate();
5106
    }
5107
 
5108
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5109
      oprot.writeStructBegin(STRUCT_DESC);
5110
 
5111
      if (this.isSetSuccess()) {
5112
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5113
        this.success.write(oprot);
5114
        oprot.writeFieldEnd();
5115
      } else if (this.isSetE()) {
5116
        oprot.writeFieldBegin(E_FIELD_DESC);
5117
        this.e.write(oprot);
5118
        oprot.writeFieldEnd();
5119
      }
5120
      oprot.writeFieldStop();
5121
      oprot.writeStructEnd();
5122
    }
5123
 
5124
    @Override
5125
    public String toString() {
5126
      StringBuilder sb = new StringBuilder("getSupplier_result(");
5127
      boolean first = true;
5128
 
5129
      sb.append("success:");
5130
      if (this.success == null) {
5131
        sb.append("null");
5132
      } else {
5133
        sb.append(this.success);
5134
      }
5135
      first = false;
5136
      if (!first) sb.append(", ");
5137
      sb.append("e:");
5138
      if (this.e == null) {
5139
        sb.append("null");
5140
      } else {
5141
        sb.append(this.e);
5142
      }
5143
      first = false;
5144
      sb.append(")");
5145
      return sb.toString();
5146
    }
5147
 
5148
    public void validate() throws org.apache.thrift.TException {
5149
      // check for required fields
5150
    }
5151
 
5152
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5153
      try {
5154
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5155
      } catch (org.apache.thrift.TException te) {
5156
        throw new java.io.IOException(te);
5157
      }
5158
    }
5159
 
5160
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5161
      try {
5162
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5163
      } catch (org.apache.thrift.TException te) {
5164
        throw new java.io.IOException(te);
5165
      }
5166
    }
5167
 
5168
  }
5169
 
5170
  public static class startPurchase_args implements org.apache.thrift.TBase<startPurchase_args, startPurchase_args._Fields>, java.io.Serializable, Cloneable   {
5171
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_args");
5172
 
5173
    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);
5174
    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);
5175
    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);
5176
 
5177
    private long purchaseOrderId; // required
5178
    private String invoiceNumber; // required
5179
    private double freightCharges; // required
5180
 
5181
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5182
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5183
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
5184
      INVOICE_NUMBER((short)2, "invoiceNumber"),
5185
      FREIGHT_CHARGES((short)3, "freightCharges");
5186
 
5187
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5188
 
5189
      static {
5190
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5191
          byName.put(field.getFieldName(), field);
5192
        }
5193
      }
5194
 
5195
      /**
5196
       * Find the _Fields constant that matches fieldId, or null if its not found.
5197
       */
5198
      public static _Fields findByThriftId(int fieldId) {
5199
        switch(fieldId) {
5200
          case 1: // PURCHASE_ORDER_ID
5201
            return PURCHASE_ORDER_ID;
5202
          case 2: // INVOICE_NUMBER
5203
            return INVOICE_NUMBER;
5204
          case 3: // FREIGHT_CHARGES
5205
            return FREIGHT_CHARGES;
5206
          default:
5207
            return null;
5208
        }
5209
      }
5210
 
5211
      /**
5212
       * Find the _Fields constant that matches fieldId, throwing an exception
5213
       * if it is not found.
5214
       */
5215
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5216
        _Fields fields = findByThriftId(fieldId);
5217
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5218
        return fields;
5219
      }
5220
 
5221
      /**
5222
       * Find the _Fields constant that matches name, or null if its not found.
5223
       */
5224
      public static _Fields findByName(String name) {
5225
        return byName.get(name);
5226
      }
5227
 
5228
      private final short _thriftId;
5229
      private final String _fieldName;
5230
 
5231
      _Fields(short thriftId, String fieldName) {
5232
        _thriftId = thriftId;
5233
        _fieldName = fieldName;
5234
      }
5235
 
5236
      public short getThriftFieldId() {
5237
        return _thriftId;
5238
      }
5239
 
5240
      public String getFieldName() {
5241
        return _fieldName;
5242
      }
5243
    }
5244
 
5245
    // isset id assignments
5246
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
5247
    private static final int __FREIGHTCHARGES_ISSET_ID = 1;
5248
    private BitSet __isset_bit_vector = new BitSet(2);
5249
 
5250
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5251
    static {
5252
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5253
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5254
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5255
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5256
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
5257
      tmpMap.put(_Fields.FREIGHT_CHARGES, new org.apache.thrift.meta_data.FieldMetaData("freightCharges", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5258
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
5259
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5260
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_args.class, metaDataMap);
5261
    }
5262
 
5263
    public startPurchase_args() {
5264
    }
5265
 
5266
    public startPurchase_args(
5267
      long purchaseOrderId,
5268
      String invoiceNumber,
5269
      double freightCharges)
5270
    {
5271
      this();
5272
      this.purchaseOrderId = purchaseOrderId;
5273
      setPurchaseOrderIdIsSet(true);
5274
      this.invoiceNumber = invoiceNumber;
5275
      this.freightCharges = freightCharges;
5276
      setFreightChargesIsSet(true);
5277
    }
5278
 
5279
    /**
5280
     * Performs a deep copy on <i>other</i>.
5281
     */
5282
    public startPurchase_args(startPurchase_args other) {
5283
      __isset_bit_vector.clear();
5284
      __isset_bit_vector.or(other.__isset_bit_vector);
5285
      this.purchaseOrderId = other.purchaseOrderId;
5286
      if (other.isSetInvoiceNumber()) {
5287
        this.invoiceNumber = other.invoiceNumber;
5288
      }
5289
      this.freightCharges = other.freightCharges;
5290
    }
5291
 
5292
    public startPurchase_args deepCopy() {
5293
      return new startPurchase_args(this);
5294
    }
5295
 
5296
    @Override
5297
    public void clear() {
5298
      setPurchaseOrderIdIsSet(false);
5299
      this.purchaseOrderId = 0;
5300
      this.invoiceNumber = null;
5301
      setFreightChargesIsSet(false);
5302
      this.freightCharges = 0.0;
5303
    }
5304
 
5305
    public long getPurchaseOrderId() {
5306
      return this.purchaseOrderId;
5307
    }
5308
 
5309
    public void setPurchaseOrderId(long purchaseOrderId) {
5310
      this.purchaseOrderId = purchaseOrderId;
5311
      setPurchaseOrderIdIsSet(true);
5312
    }
5313
 
5314
    public void unsetPurchaseOrderId() {
5315
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
5316
    }
5317
 
5318
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
5319
    public boolean isSetPurchaseOrderId() {
5320
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
5321
    }
5322
 
5323
    public void setPurchaseOrderIdIsSet(boolean value) {
5324
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
5325
    }
5326
 
5327
    public String getInvoiceNumber() {
5328
      return this.invoiceNumber;
5329
    }
5330
 
5331
    public void setInvoiceNumber(String invoiceNumber) {
5332
      this.invoiceNumber = invoiceNumber;
5333
    }
5334
 
5335
    public void unsetInvoiceNumber() {
5336
      this.invoiceNumber = null;
5337
    }
5338
 
5339
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
5340
    public boolean isSetInvoiceNumber() {
5341
      return this.invoiceNumber != null;
5342
    }
5343
 
5344
    public void setInvoiceNumberIsSet(boolean value) {
5345
      if (!value) {
5346
        this.invoiceNumber = null;
5347
      }
5348
    }
5349
 
5350
    public double getFreightCharges() {
5351
      return this.freightCharges;
5352
    }
5353
 
5354
    public void setFreightCharges(double freightCharges) {
5355
      this.freightCharges = freightCharges;
5356
      setFreightChargesIsSet(true);
5357
    }
5358
 
5359
    public void unsetFreightCharges() {
5360
      __isset_bit_vector.clear(__FREIGHTCHARGES_ISSET_ID);
5361
    }
5362
 
5363
    /** Returns true if field freightCharges is set (has been assigned a value) and false otherwise */
5364
    public boolean isSetFreightCharges() {
5365
      return __isset_bit_vector.get(__FREIGHTCHARGES_ISSET_ID);
5366
    }
5367
 
5368
    public void setFreightChargesIsSet(boolean value) {
5369
      __isset_bit_vector.set(__FREIGHTCHARGES_ISSET_ID, value);
5370
    }
5371
 
5372
    public void setFieldValue(_Fields field, Object value) {
5373
      switch (field) {
5374
      case PURCHASE_ORDER_ID:
5375
        if (value == null) {
5376
          unsetPurchaseOrderId();
5377
        } else {
5378
          setPurchaseOrderId((Long)value);
5379
        }
5380
        break;
5381
 
5382
      case INVOICE_NUMBER:
5383
        if (value == null) {
5384
          unsetInvoiceNumber();
5385
        } else {
5386
          setInvoiceNumber((String)value);
5387
        }
5388
        break;
5389
 
5390
      case FREIGHT_CHARGES:
5391
        if (value == null) {
5392
          unsetFreightCharges();
5393
        } else {
5394
          setFreightCharges((Double)value);
5395
        }
5396
        break;
5397
 
5398
      }
5399
    }
5400
 
5401
    public Object getFieldValue(_Fields field) {
5402
      switch (field) {
5403
      case PURCHASE_ORDER_ID:
5404
        return Long.valueOf(getPurchaseOrderId());
5405
 
5406
      case INVOICE_NUMBER:
5407
        return getInvoiceNumber();
5408
 
5409
      case FREIGHT_CHARGES:
5410
        return Double.valueOf(getFreightCharges());
5411
 
5412
      }
5413
      throw new IllegalStateException();
5414
    }
5415
 
5416
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5417
    public boolean isSet(_Fields field) {
5418
      if (field == null) {
5419
        throw new IllegalArgumentException();
5420
      }
5421
 
5422
      switch (field) {
5423
      case PURCHASE_ORDER_ID:
5424
        return isSetPurchaseOrderId();
5425
      case INVOICE_NUMBER:
5426
        return isSetInvoiceNumber();
5427
      case FREIGHT_CHARGES:
5428
        return isSetFreightCharges();
5429
      }
5430
      throw new IllegalStateException();
5431
    }
5432
 
5433
    @Override
5434
    public boolean equals(Object that) {
5435
      if (that == null)
5436
        return false;
5437
      if (that instanceof startPurchase_args)
5438
        return this.equals((startPurchase_args)that);
5439
      return false;
5440
    }
5441
 
5442
    public boolean equals(startPurchase_args that) {
5443
      if (that == null)
5444
        return false;
5445
 
5446
      boolean this_present_purchaseOrderId = true;
5447
      boolean that_present_purchaseOrderId = true;
5448
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
5449
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
5450
          return false;
5451
        if (this.purchaseOrderId != that.purchaseOrderId)
5452
          return false;
5453
      }
5454
 
5455
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
5456
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
5457
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
5458
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
5459
          return false;
5460
        if (!this.invoiceNumber.equals(that.invoiceNumber))
5461
          return false;
5462
      }
5463
 
5464
      boolean this_present_freightCharges = true;
5465
      boolean that_present_freightCharges = true;
5466
      if (this_present_freightCharges || that_present_freightCharges) {
5467
        if (!(this_present_freightCharges && that_present_freightCharges))
5468
          return false;
5469
        if (this.freightCharges != that.freightCharges)
5470
          return false;
5471
      }
5472
 
5473
      return true;
5474
    }
5475
 
5476
    @Override
5477
    public int hashCode() {
5478
      return 0;
5479
    }
5480
 
5481
    public int compareTo(startPurchase_args other) {
5482
      if (!getClass().equals(other.getClass())) {
5483
        return getClass().getName().compareTo(other.getClass().getName());
5484
      }
5485
 
5486
      int lastComparison = 0;
5487
      startPurchase_args typedOther = (startPurchase_args)other;
5488
 
5489
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
5490
      if (lastComparison != 0) {
5491
        return lastComparison;
5492
      }
5493
      if (isSetPurchaseOrderId()) {
5494
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
5495
        if (lastComparison != 0) {
5496
          return lastComparison;
5497
        }
5498
      }
5499
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
5500
      if (lastComparison != 0) {
5501
        return lastComparison;
5502
      }
5503
      if (isSetInvoiceNumber()) {
5504
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
5505
        if (lastComparison != 0) {
5506
          return lastComparison;
5507
        }
5508
      }
5509
      lastComparison = Boolean.valueOf(isSetFreightCharges()).compareTo(typedOther.isSetFreightCharges());
5510
      if (lastComparison != 0) {
5511
        return lastComparison;
5512
      }
5513
      if (isSetFreightCharges()) {
5514
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freightCharges, typedOther.freightCharges);
5515
        if (lastComparison != 0) {
5516
          return lastComparison;
5517
        }
5518
      }
5519
      return 0;
5520
    }
5521
 
5522
    public _Fields fieldForId(int fieldId) {
5523
      return _Fields.findByThriftId(fieldId);
5524
    }
5525
 
5526
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5527
      org.apache.thrift.protocol.TField field;
5528
      iprot.readStructBegin();
5529
      while (true)
5530
      {
5531
        field = iprot.readFieldBegin();
5532
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5533
          break;
5534
        }
5535
        switch (field.id) {
5536
          case 1: // PURCHASE_ORDER_ID
5537
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5538
              this.purchaseOrderId = iprot.readI64();
5539
              setPurchaseOrderIdIsSet(true);
5540
            } else { 
5541
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5542
            }
5543
            break;
5544
          case 2: // INVOICE_NUMBER
5545
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
5546
              this.invoiceNumber = iprot.readString();
5547
            } else { 
5548
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5549
            }
5550
            break;
5551
          case 3: // FREIGHT_CHARGES
5552
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
5553
              this.freightCharges = iprot.readDouble();
5554
              setFreightChargesIsSet(true);
5555
            } else { 
5556
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5557
            }
5558
            break;
5559
          default:
5560
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5561
        }
5562
        iprot.readFieldEnd();
5563
      }
5564
      iprot.readStructEnd();
5565
      validate();
5566
    }
5567
 
5568
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5569
      validate();
5570
 
5571
      oprot.writeStructBegin(STRUCT_DESC);
5572
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
5573
      oprot.writeI64(this.purchaseOrderId);
5574
      oprot.writeFieldEnd();
5575
      if (this.invoiceNumber != null) {
5576
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
5577
        oprot.writeString(this.invoiceNumber);
5578
        oprot.writeFieldEnd();
5579
      }
5580
      oprot.writeFieldBegin(FREIGHT_CHARGES_FIELD_DESC);
5581
      oprot.writeDouble(this.freightCharges);
5582
      oprot.writeFieldEnd();
5583
      oprot.writeFieldStop();
5584
      oprot.writeStructEnd();
5585
    }
5586
 
5587
    @Override
5588
    public String toString() {
5589
      StringBuilder sb = new StringBuilder("startPurchase_args(");
5590
      boolean first = true;
5591
 
5592
      sb.append("purchaseOrderId:");
5593
      sb.append(this.purchaseOrderId);
5594
      first = false;
5595
      if (!first) sb.append(", ");
5596
      sb.append("invoiceNumber:");
5597
      if (this.invoiceNumber == null) {
5598
        sb.append("null");
5599
      } else {
5600
        sb.append(this.invoiceNumber);
5601
      }
5602
      first = false;
5603
      if (!first) sb.append(", ");
5604
      sb.append("freightCharges:");
5605
      sb.append(this.freightCharges);
5606
      first = false;
5607
      sb.append(")");
5608
      return sb.toString();
5609
    }
5610
 
5611
    public void validate() throws org.apache.thrift.TException {
5612
      // check for required fields
5613
    }
5614
 
5615
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5616
      try {
5617
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5618
      } catch (org.apache.thrift.TException te) {
5619
        throw new java.io.IOException(te);
5620
      }
5621
    }
5622
 
5623
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5624
      try {
5625
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5626
      } catch (org.apache.thrift.TException te) {
5627
        throw new java.io.IOException(te);
5628
      }
5629
    }
5630
 
5631
  }
5632
 
5633
  public static class startPurchase_result implements org.apache.thrift.TBase<startPurchase_result, startPurchase_result._Fields>, java.io.Serializable, Cloneable   {
5634
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_result");
5635
 
5636
    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);
5637
    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);
5638
 
5639
    private long success; // required
5640
    private PurchaseServiceException e; // required
5641
 
5642
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5643
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5644
      SUCCESS((short)0, "success"),
5645
      E((short)1, "e");
5646
 
5647
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5648
 
5649
      static {
5650
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5651
          byName.put(field.getFieldName(), field);
5652
        }
5653
      }
5654
 
5655
      /**
5656
       * Find the _Fields constant that matches fieldId, or null if its not found.
5657
       */
5658
      public static _Fields findByThriftId(int fieldId) {
5659
        switch(fieldId) {
5660
          case 0: // SUCCESS
5661
            return SUCCESS;
5662
          case 1: // E
5663
            return E;
5664
          default:
5665
            return null;
5666
        }
5667
      }
5668
 
5669
      /**
5670
       * Find the _Fields constant that matches fieldId, throwing an exception
5671
       * if it is not found.
5672
       */
5673
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5674
        _Fields fields = findByThriftId(fieldId);
5675
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5676
        return fields;
5677
      }
5678
 
5679
      /**
5680
       * Find the _Fields constant that matches name, or null if its not found.
5681
       */
5682
      public static _Fields findByName(String name) {
5683
        return byName.get(name);
5684
      }
5685
 
5686
      private final short _thriftId;
5687
      private final String _fieldName;
5688
 
5689
      _Fields(short thriftId, String fieldName) {
5690
        _thriftId = thriftId;
5691
        _fieldName = fieldName;
5692
      }
5693
 
5694
      public short getThriftFieldId() {
5695
        return _thriftId;
5696
      }
5697
 
5698
      public String getFieldName() {
5699
        return _fieldName;
5700
      }
5701
    }
5702
 
5703
    // isset id assignments
5704
    private static final int __SUCCESS_ISSET_ID = 0;
5705
    private BitSet __isset_bit_vector = new BitSet(1);
5706
 
5707
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5708
    static {
5709
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5710
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5711
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5712
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5713
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5714
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5715
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_result.class, metaDataMap);
5716
    }
5717
 
5718
    public startPurchase_result() {
5719
    }
5720
 
5721
    public startPurchase_result(
5722
      long success,
5723
      PurchaseServiceException e)
5724
    {
5725
      this();
5726
      this.success = success;
5727
      setSuccessIsSet(true);
5728
      this.e = e;
5729
    }
5730
 
5731
    /**
5732
     * Performs a deep copy on <i>other</i>.
5733
     */
5734
    public startPurchase_result(startPurchase_result other) {
5735
      __isset_bit_vector.clear();
5736
      __isset_bit_vector.or(other.__isset_bit_vector);
5737
      this.success = other.success;
5738
      if (other.isSetE()) {
5739
        this.e = new PurchaseServiceException(other.e);
5740
      }
5741
    }
5742
 
5743
    public startPurchase_result deepCopy() {
5744
      return new startPurchase_result(this);
5745
    }
5746
 
5747
    @Override
5748
    public void clear() {
5749
      setSuccessIsSet(false);
5750
      this.success = 0;
5751
      this.e = null;
5752
    }
5753
 
5754
    public long getSuccess() {
5755
      return this.success;
5756
    }
5757
 
5758
    public void setSuccess(long success) {
5759
      this.success = success;
5760
      setSuccessIsSet(true);
5761
    }
5762
 
5763
    public void unsetSuccess() {
5764
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
5765
    }
5766
 
5767
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5768
    public boolean isSetSuccess() {
5769
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
5770
    }
5771
 
5772
    public void setSuccessIsSet(boolean value) {
5773
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
5774
    }
5775
 
5776
    public PurchaseServiceException getE() {
5777
      return this.e;
5778
    }
5779
 
5780
    public void setE(PurchaseServiceException e) {
5781
      this.e = e;
5782
    }
5783
 
5784
    public void unsetE() {
5785
      this.e = null;
5786
    }
5787
 
5788
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
5789
    public boolean isSetE() {
5790
      return this.e != null;
5791
    }
5792
 
5793
    public void setEIsSet(boolean value) {
5794
      if (!value) {
5795
        this.e = null;
5796
      }
5797
    }
5798
 
5799
    public void setFieldValue(_Fields field, Object value) {
5800
      switch (field) {
5801
      case SUCCESS:
5802
        if (value == null) {
5803
          unsetSuccess();
5804
        } else {
5805
          setSuccess((Long)value);
5806
        }
5807
        break;
5808
 
5809
      case E:
5810
        if (value == null) {
5811
          unsetE();
5812
        } else {
5813
          setE((PurchaseServiceException)value);
5814
        }
5815
        break;
5816
 
5817
      }
5818
    }
5819
 
5820
    public Object getFieldValue(_Fields field) {
5821
      switch (field) {
5822
      case SUCCESS:
5823
        return Long.valueOf(getSuccess());
5824
 
5825
      case E:
5826
        return getE();
5827
 
5828
      }
5829
      throw new IllegalStateException();
5830
    }
5831
 
5832
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5833
    public boolean isSet(_Fields field) {
5834
      if (field == null) {
5835
        throw new IllegalArgumentException();
5836
      }
5837
 
5838
      switch (field) {
5839
      case SUCCESS:
5840
        return isSetSuccess();
5841
      case E:
5842
        return isSetE();
5843
      }
5844
      throw new IllegalStateException();
5845
    }
5846
 
5847
    @Override
5848
    public boolean equals(Object that) {
5849
      if (that == null)
5850
        return false;
5851
      if (that instanceof startPurchase_result)
5852
        return this.equals((startPurchase_result)that);
5853
      return false;
5854
    }
5855
 
5856
    public boolean equals(startPurchase_result that) {
5857
      if (that == null)
5858
        return false;
5859
 
5860
      boolean this_present_success = true;
5861
      boolean that_present_success = true;
5862
      if (this_present_success || that_present_success) {
5863
        if (!(this_present_success && that_present_success))
5864
          return false;
5865
        if (this.success != that.success)
5866
          return false;
5867
      }
5868
 
5869
      boolean this_present_e = true && this.isSetE();
5870
      boolean that_present_e = true && that.isSetE();
5871
      if (this_present_e || that_present_e) {
5872
        if (!(this_present_e && that_present_e))
5873
          return false;
5874
        if (!this.e.equals(that.e))
5875
          return false;
5876
      }
5877
 
5878
      return true;
5879
    }
5880
 
5881
    @Override
5882
    public int hashCode() {
5883
      return 0;
5884
    }
5885
 
5886
    public int compareTo(startPurchase_result other) {
5887
      if (!getClass().equals(other.getClass())) {
5888
        return getClass().getName().compareTo(other.getClass().getName());
5889
      }
5890
 
5891
      int lastComparison = 0;
5892
      startPurchase_result typedOther = (startPurchase_result)other;
5893
 
5894
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5895
      if (lastComparison != 0) {
5896
        return lastComparison;
5897
      }
5898
      if (isSetSuccess()) {
5899
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5900
        if (lastComparison != 0) {
5901
          return lastComparison;
5902
        }
5903
      }
5904
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
5905
      if (lastComparison != 0) {
5906
        return lastComparison;
5907
      }
5908
      if (isSetE()) {
5909
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
5910
        if (lastComparison != 0) {
5911
          return lastComparison;
5912
        }
5913
      }
5914
      return 0;
5915
    }
5916
 
5917
    public _Fields fieldForId(int fieldId) {
5918
      return _Fields.findByThriftId(fieldId);
5919
    }
5920
 
5921
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5922
      org.apache.thrift.protocol.TField field;
5923
      iprot.readStructBegin();
5924
      while (true)
5925
      {
5926
        field = iprot.readFieldBegin();
5927
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5928
          break;
5929
        }
5930
        switch (field.id) {
5931
          case 0: // SUCCESS
5932
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5933
              this.success = iprot.readI64();
5934
              setSuccessIsSet(true);
5935
            } else { 
5936
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5937
            }
5938
            break;
5939
          case 1: // E
5940
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5941
              this.e = new PurchaseServiceException();
5942
              this.e.read(iprot);
5943
            } else { 
5944
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5945
            }
5946
            break;
5947
          default:
5948
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5949
        }
5950
        iprot.readFieldEnd();
5951
      }
5952
      iprot.readStructEnd();
5953
      validate();
5954
    }
5955
 
5956
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5957
      oprot.writeStructBegin(STRUCT_DESC);
5958
 
5959
      if (this.isSetSuccess()) {
5960
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5961
        oprot.writeI64(this.success);
5962
        oprot.writeFieldEnd();
5963
      } else if (this.isSetE()) {
5964
        oprot.writeFieldBegin(E_FIELD_DESC);
5965
        this.e.write(oprot);
5966
        oprot.writeFieldEnd();
5967
      }
5968
      oprot.writeFieldStop();
5969
      oprot.writeStructEnd();
5970
    }
5971
 
5972
    @Override
5973
    public String toString() {
5974
      StringBuilder sb = new StringBuilder("startPurchase_result(");
5975
      boolean first = true;
5976
 
5977
      sb.append("success:");
5978
      sb.append(this.success);
5979
      first = false;
5980
      if (!first) sb.append(", ");
5981
      sb.append("e:");
5982
      if (this.e == null) {
5983
        sb.append("null");
5984
      } else {
5985
        sb.append(this.e);
5986
      }
5987
      first = false;
5988
      sb.append(")");
5989
      return sb.toString();
5990
    }
5991
 
5992
    public void validate() throws org.apache.thrift.TException {
5993
      // check for required fields
5994
    }
5995
 
5996
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5997
      try {
5998
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5999
      } catch (org.apache.thrift.TException te) {
6000
        throw new java.io.IOException(te);
6001
      }
6002
    }
6003
 
6004
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6005
      try {
6006
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6007
      } catch (org.apache.thrift.TException te) {
6008
        throw new java.io.IOException(te);
6009
      }
6010
    }
6011
 
6012
  }
6013
 
6014
  public static class closePurchase_args implements org.apache.thrift.TBase<closePurchase_args, closePurchase_args._Fields>, java.io.Serializable, Cloneable   {
6015
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_args");
6016
 
6017
    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);
6018
 
6019
    private long purchaseId; // required
6020
 
6021
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6022
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6023
      PURCHASE_ID((short)1, "purchaseId");
6024
 
6025
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6026
 
6027
      static {
6028
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6029
          byName.put(field.getFieldName(), field);
6030
        }
6031
      }
6032
 
6033
      /**
6034
       * Find the _Fields constant that matches fieldId, or null if its not found.
6035
       */
6036
      public static _Fields findByThriftId(int fieldId) {
6037
        switch(fieldId) {
6038
          case 1: // PURCHASE_ID
6039
            return PURCHASE_ID;
6040
          default:
6041
            return null;
6042
        }
6043
      }
6044
 
6045
      /**
6046
       * Find the _Fields constant that matches fieldId, throwing an exception
6047
       * if it is not found.
6048
       */
6049
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6050
        _Fields fields = findByThriftId(fieldId);
6051
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6052
        return fields;
6053
      }
6054
 
6055
      /**
6056
       * Find the _Fields constant that matches name, or null if its not found.
6057
       */
6058
      public static _Fields findByName(String name) {
6059
        return byName.get(name);
6060
      }
6061
 
6062
      private final short _thriftId;
6063
      private final String _fieldName;
6064
 
6065
      _Fields(short thriftId, String fieldName) {
6066
        _thriftId = thriftId;
6067
        _fieldName = fieldName;
6068
      }
6069
 
6070
      public short getThriftFieldId() {
6071
        return _thriftId;
6072
      }
6073
 
6074
      public String getFieldName() {
6075
        return _fieldName;
6076
      }
6077
    }
6078
 
6079
    // isset id assignments
6080
    private static final int __PURCHASEID_ISSET_ID = 0;
6081
    private BitSet __isset_bit_vector = new BitSet(1);
6082
 
6083
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6084
    static {
6085
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6086
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6087
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6088
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6089
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_args.class, metaDataMap);
6090
    }
6091
 
6092
    public closePurchase_args() {
6093
    }
6094
 
6095
    public closePurchase_args(
6096
      long purchaseId)
6097
    {
6098
      this();
6099
      this.purchaseId = purchaseId;
6100
      setPurchaseIdIsSet(true);
6101
    }
6102
 
6103
    /**
6104
     * Performs a deep copy on <i>other</i>.
6105
     */
6106
    public closePurchase_args(closePurchase_args other) {
6107
      __isset_bit_vector.clear();
6108
      __isset_bit_vector.or(other.__isset_bit_vector);
6109
      this.purchaseId = other.purchaseId;
6110
    }
6111
 
6112
    public closePurchase_args deepCopy() {
6113
      return new closePurchase_args(this);
6114
    }
6115
 
6116
    @Override
6117
    public void clear() {
6118
      setPurchaseIdIsSet(false);
6119
      this.purchaseId = 0;
6120
    }
6121
 
6122
    public long getPurchaseId() {
6123
      return this.purchaseId;
6124
    }
6125
 
6126
    public void setPurchaseId(long purchaseId) {
6127
      this.purchaseId = purchaseId;
6128
      setPurchaseIdIsSet(true);
6129
    }
6130
 
6131
    public void unsetPurchaseId() {
6132
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
6133
    }
6134
 
6135
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
6136
    public boolean isSetPurchaseId() {
6137
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
6138
    }
6139
 
6140
    public void setPurchaseIdIsSet(boolean value) {
6141
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
6142
    }
6143
 
6144
    public void setFieldValue(_Fields field, Object value) {
6145
      switch (field) {
6146
      case PURCHASE_ID:
6147
        if (value == null) {
6148
          unsetPurchaseId();
6149
        } else {
6150
          setPurchaseId((Long)value);
6151
        }
6152
        break;
6153
 
6154
      }
6155
    }
6156
 
6157
    public Object getFieldValue(_Fields field) {
6158
      switch (field) {
6159
      case PURCHASE_ID:
6160
        return Long.valueOf(getPurchaseId());
6161
 
6162
      }
6163
      throw new IllegalStateException();
6164
    }
6165
 
6166
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6167
    public boolean isSet(_Fields field) {
6168
      if (field == null) {
6169
        throw new IllegalArgumentException();
6170
      }
6171
 
6172
      switch (field) {
6173
      case PURCHASE_ID:
6174
        return isSetPurchaseId();
6175
      }
6176
      throw new IllegalStateException();
6177
    }
6178
 
6179
    @Override
6180
    public boolean equals(Object that) {
6181
      if (that == null)
6182
        return false;
6183
      if (that instanceof closePurchase_args)
6184
        return this.equals((closePurchase_args)that);
6185
      return false;
6186
    }
6187
 
6188
    public boolean equals(closePurchase_args that) {
6189
      if (that == null)
6190
        return false;
6191
 
6192
      boolean this_present_purchaseId = true;
6193
      boolean that_present_purchaseId = true;
6194
      if (this_present_purchaseId || that_present_purchaseId) {
6195
        if (!(this_present_purchaseId && that_present_purchaseId))
6196
          return false;
6197
        if (this.purchaseId != that.purchaseId)
6198
          return false;
6199
      }
6200
 
6201
      return true;
6202
    }
6203
 
6204
    @Override
6205
    public int hashCode() {
6206
      return 0;
6207
    }
6208
 
6209
    public int compareTo(closePurchase_args other) {
6210
      if (!getClass().equals(other.getClass())) {
6211
        return getClass().getName().compareTo(other.getClass().getName());
6212
      }
6213
 
6214
      int lastComparison = 0;
6215
      closePurchase_args typedOther = (closePurchase_args)other;
6216
 
6217
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
6218
      if (lastComparison != 0) {
6219
        return lastComparison;
6220
      }
6221
      if (isSetPurchaseId()) {
6222
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
6223
        if (lastComparison != 0) {
6224
          return lastComparison;
6225
        }
6226
      }
6227
      return 0;
6228
    }
6229
 
6230
    public _Fields fieldForId(int fieldId) {
6231
      return _Fields.findByThriftId(fieldId);
6232
    }
6233
 
6234
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6235
      org.apache.thrift.protocol.TField field;
6236
      iprot.readStructBegin();
6237
      while (true)
6238
      {
6239
        field = iprot.readFieldBegin();
6240
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6241
          break;
6242
        }
6243
        switch (field.id) {
6244
          case 1: // PURCHASE_ID
6245
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6246
              this.purchaseId = iprot.readI64();
6247
              setPurchaseIdIsSet(true);
6248
            } else { 
6249
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6250
            }
6251
            break;
6252
          default:
6253
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6254
        }
6255
        iprot.readFieldEnd();
6256
      }
6257
      iprot.readStructEnd();
6258
      validate();
6259
    }
6260
 
6261
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6262
      validate();
6263
 
6264
      oprot.writeStructBegin(STRUCT_DESC);
6265
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
6266
      oprot.writeI64(this.purchaseId);
6267
      oprot.writeFieldEnd();
6268
      oprot.writeFieldStop();
6269
      oprot.writeStructEnd();
6270
    }
6271
 
6272
    @Override
6273
    public String toString() {
6274
      StringBuilder sb = new StringBuilder("closePurchase_args(");
6275
      boolean first = true;
6276
 
6277
      sb.append("purchaseId:");
6278
      sb.append(this.purchaseId);
6279
      first = false;
6280
      sb.append(")");
6281
      return sb.toString();
6282
    }
6283
 
6284
    public void validate() throws org.apache.thrift.TException {
6285
      // check for required fields
6286
    }
6287
 
6288
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6289
      try {
6290
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6291
      } catch (org.apache.thrift.TException te) {
6292
        throw new java.io.IOException(te);
6293
      }
6294
    }
6295
 
6296
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6297
      try {
6298
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6299
      } catch (org.apache.thrift.TException te) {
6300
        throw new java.io.IOException(te);
6301
      }
6302
    }
6303
 
6304
  }
6305
 
6306
  public static class closePurchase_result implements org.apache.thrift.TBase<closePurchase_result, closePurchase_result._Fields>, java.io.Serializable, Cloneable   {
6307
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_result");
6308
 
6309
    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);
6310
    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);
6311
 
6312
    private long success; // required
6313
    private PurchaseServiceException e; // required
6314
 
6315
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6316
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6317
      SUCCESS((short)0, "success"),
6318
      E((short)1, "e");
6319
 
6320
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6321
 
6322
      static {
6323
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6324
          byName.put(field.getFieldName(), field);
6325
        }
6326
      }
6327
 
6328
      /**
6329
       * Find the _Fields constant that matches fieldId, or null if its not found.
6330
       */
6331
      public static _Fields findByThriftId(int fieldId) {
6332
        switch(fieldId) {
6333
          case 0: // SUCCESS
6334
            return SUCCESS;
6335
          case 1: // E
6336
            return E;
6337
          default:
6338
            return null;
6339
        }
6340
      }
6341
 
6342
      /**
6343
       * Find the _Fields constant that matches fieldId, throwing an exception
6344
       * if it is not found.
6345
       */
6346
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6347
        _Fields fields = findByThriftId(fieldId);
6348
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6349
        return fields;
6350
      }
6351
 
6352
      /**
6353
       * Find the _Fields constant that matches name, or null if its not found.
6354
       */
6355
      public static _Fields findByName(String name) {
6356
        return byName.get(name);
6357
      }
6358
 
6359
      private final short _thriftId;
6360
      private final String _fieldName;
6361
 
6362
      _Fields(short thriftId, String fieldName) {
6363
        _thriftId = thriftId;
6364
        _fieldName = fieldName;
6365
      }
6366
 
6367
      public short getThriftFieldId() {
6368
        return _thriftId;
6369
      }
6370
 
6371
      public String getFieldName() {
6372
        return _fieldName;
6373
      }
6374
    }
6375
 
6376
    // isset id assignments
6377
    private static final int __SUCCESS_ISSET_ID = 0;
6378
    private BitSet __isset_bit_vector = new BitSet(1);
6379
 
6380
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6381
    static {
6382
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6383
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6384
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6385
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6386
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6387
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6388
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_result.class, metaDataMap);
6389
    }
6390
 
6391
    public closePurchase_result() {
6392
    }
6393
 
6394
    public closePurchase_result(
6395
      long success,
6396
      PurchaseServiceException e)
6397
    {
6398
      this();
6399
      this.success = success;
6400
      setSuccessIsSet(true);
6401
      this.e = e;
6402
    }
6403
 
6404
    /**
6405
     * Performs a deep copy on <i>other</i>.
6406
     */
6407
    public closePurchase_result(closePurchase_result other) {
6408
      __isset_bit_vector.clear();
6409
      __isset_bit_vector.or(other.__isset_bit_vector);
6410
      this.success = other.success;
6411
      if (other.isSetE()) {
6412
        this.e = new PurchaseServiceException(other.e);
6413
      }
6414
    }
6415
 
6416
    public closePurchase_result deepCopy() {
6417
      return new closePurchase_result(this);
6418
    }
6419
 
6420
    @Override
6421
    public void clear() {
6422
      setSuccessIsSet(false);
6423
      this.success = 0;
6424
      this.e = null;
6425
    }
6426
 
6427
    public long getSuccess() {
6428
      return this.success;
6429
    }
6430
 
6431
    public void setSuccess(long success) {
6432
      this.success = success;
6433
      setSuccessIsSet(true);
6434
    }
6435
 
6436
    public void unsetSuccess() {
6437
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
6438
    }
6439
 
6440
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
6441
    public boolean isSetSuccess() {
6442
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
6443
    }
6444
 
6445
    public void setSuccessIsSet(boolean value) {
6446
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
6447
    }
6448
 
6449
    public PurchaseServiceException getE() {
6450
      return this.e;
6451
    }
6452
 
6453
    public void setE(PurchaseServiceException e) {
6454
      this.e = e;
6455
    }
6456
 
6457
    public void unsetE() {
6458
      this.e = null;
6459
    }
6460
 
6461
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
6462
    public boolean isSetE() {
6463
      return this.e != null;
6464
    }
6465
 
6466
    public void setEIsSet(boolean value) {
6467
      if (!value) {
6468
        this.e = null;
6469
      }
6470
    }
6471
 
6472
    public void setFieldValue(_Fields field, Object value) {
6473
      switch (field) {
6474
      case SUCCESS:
6475
        if (value == null) {
6476
          unsetSuccess();
6477
        } else {
6478
          setSuccess((Long)value);
6479
        }
6480
        break;
6481
 
6482
      case E:
6483
        if (value == null) {
6484
          unsetE();
6485
        } else {
6486
          setE((PurchaseServiceException)value);
6487
        }
6488
        break;
6489
 
6490
      }
6491
    }
6492
 
6493
    public Object getFieldValue(_Fields field) {
6494
      switch (field) {
6495
      case SUCCESS:
6496
        return Long.valueOf(getSuccess());
6497
 
6498
      case E:
6499
        return getE();
6500
 
6501
      }
6502
      throw new IllegalStateException();
6503
    }
6504
 
6505
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6506
    public boolean isSet(_Fields field) {
6507
      if (field == null) {
6508
        throw new IllegalArgumentException();
6509
      }
6510
 
6511
      switch (field) {
6512
      case SUCCESS:
6513
        return isSetSuccess();
6514
      case E:
6515
        return isSetE();
6516
      }
6517
      throw new IllegalStateException();
6518
    }
6519
 
6520
    @Override
6521
    public boolean equals(Object that) {
6522
      if (that == null)
6523
        return false;
6524
      if (that instanceof closePurchase_result)
6525
        return this.equals((closePurchase_result)that);
6526
      return false;
6527
    }
6528
 
6529
    public boolean equals(closePurchase_result that) {
6530
      if (that == null)
6531
        return false;
6532
 
6533
      boolean this_present_success = true;
6534
      boolean that_present_success = true;
6535
      if (this_present_success || that_present_success) {
6536
        if (!(this_present_success && that_present_success))
6537
          return false;
6538
        if (this.success != that.success)
6539
          return false;
6540
      }
6541
 
6542
      boolean this_present_e = true && this.isSetE();
6543
      boolean that_present_e = true && that.isSetE();
6544
      if (this_present_e || that_present_e) {
6545
        if (!(this_present_e && that_present_e))
6546
          return false;
6547
        if (!this.e.equals(that.e))
6548
          return false;
6549
      }
6550
 
6551
      return true;
6552
    }
6553
 
6554
    @Override
6555
    public int hashCode() {
6556
      return 0;
6557
    }
6558
 
6559
    public int compareTo(closePurchase_result other) {
6560
      if (!getClass().equals(other.getClass())) {
6561
        return getClass().getName().compareTo(other.getClass().getName());
6562
      }
6563
 
6564
      int lastComparison = 0;
6565
      closePurchase_result typedOther = (closePurchase_result)other;
6566
 
6567
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6568
      if (lastComparison != 0) {
6569
        return lastComparison;
6570
      }
6571
      if (isSetSuccess()) {
6572
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6573
        if (lastComparison != 0) {
6574
          return lastComparison;
6575
        }
6576
      }
6577
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
6578
      if (lastComparison != 0) {
6579
        return lastComparison;
6580
      }
6581
      if (isSetE()) {
6582
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
6583
        if (lastComparison != 0) {
6584
          return lastComparison;
6585
        }
6586
      }
6587
      return 0;
6588
    }
6589
 
6590
    public _Fields fieldForId(int fieldId) {
6591
      return _Fields.findByThriftId(fieldId);
6592
    }
6593
 
6594
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6595
      org.apache.thrift.protocol.TField field;
6596
      iprot.readStructBegin();
6597
      while (true)
6598
      {
6599
        field = iprot.readFieldBegin();
6600
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6601
          break;
6602
        }
6603
        switch (field.id) {
6604
          case 0: // SUCCESS
6605
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6606
              this.success = iprot.readI64();
6607
              setSuccessIsSet(true);
6608
            } else { 
6609
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6610
            }
6611
            break;
6612
          case 1: // E
6613
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6614
              this.e = new PurchaseServiceException();
6615
              this.e.read(iprot);
6616
            } else { 
6617
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6618
            }
6619
            break;
6620
          default:
6621
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6622
        }
6623
        iprot.readFieldEnd();
6624
      }
6625
      iprot.readStructEnd();
6626
      validate();
6627
    }
6628
 
6629
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6630
      oprot.writeStructBegin(STRUCT_DESC);
6631
 
6632
      if (this.isSetSuccess()) {
6633
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6634
        oprot.writeI64(this.success);
6635
        oprot.writeFieldEnd();
6636
      } else if (this.isSetE()) {
6637
        oprot.writeFieldBegin(E_FIELD_DESC);
6638
        this.e.write(oprot);
6639
        oprot.writeFieldEnd();
6640
      }
6641
      oprot.writeFieldStop();
6642
      oprot.writeStructEnd();
6643
    }
6644
 
6645
    @Override
6646
    public String toString() {
6647
      StringBuilder sb = new StringBuilder("closePurchase_result(");
6648
      boolean first = true;
6649
 
6650
      sb.append("success:");
6651
      sb.append(this.success);
6652
      first = false;
6653
      if (!first) sb.append(", ");
6654
      sb.append("e:");
6655
      if (this.e == null) {
6656
        sb.append("null");
6657
      } else {
6658
        sb.append(this.e);
6659
      }
6660
      first = false;
6661
      sb.append(")");
6662
      return sb.toString();
6663
    }
6664
 
6665
    public void validate() throws org.apache.thrift.TException {
6666
      // check for required fields
6667
    }
6668
 
6669
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6670
      try {
6671
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6672
      } catch (org.apache.thrift.TException te) {
6673
        throw new java.io.IOException(te);
6674
      }
6675
    }
6676
 
6677
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6678
      try {
6679
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6680
      } catch (org.apache.thrift.TException te) {
6681
        throw new java.io.IOException(te);
6682
      }
6683
    }
6684
 
6685
  }
6686
 
6687
  public static class getAllPurchases_args implements org.apache.thrift.TBase<getAllPurchases_args, getAllPurchases_args._Fields>, java.io.Serializable, Cloneable   {
6688
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_args");
6689
 
6690
    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);
6691
    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);
6692
 
6693
    private long purchaseOrderId; // required
6694
    private boolean open; // required
6695
 
6696
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6697
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6698
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
6699
      OPEN((short)2, "open");
6700
 
6701
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6702
 
6703
      static {
6704
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6705
          byName.put(field.getFieldName(), field);
6706
        }
6707
      }
6708
 
6709
      /**
6710
       * Find the _Fields constant that matches fieldId, or null if its not found.
6711
       */
6712
      public static _Fields findByThriftId(int fieldId) {
6713
        switch(fieldId) {
6714
          case 1: // PURCHASE_ORDER_ID
6715
            return PURCHASE_ORDER_ID;
6716
          case 2: // OPEN
6717
            return OPEN;
6718
          default:
6719
            return null;
6720
        }
6721
      }
6722
 
6723
      /**
6724
       * Find the _Fields constant that matches fieldId, throwing an exception
6725
       * if it is not found.
6726
       */
6727
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6728
        _Fields fields = findByThriftId(fieldId);
6729
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6730
        return fields;
6731
      }
6732
 
6733
      /**
6734
       * Find the _Fields constant that matches name, or null if its not found.
6735
       */
6736
      public static _Fields findByName(String name) {
6737
        return byName.get(name);
6738
      }
6739
 
6740
      private final short _thriftId;
6741
      private final String _fieldName;
6742
 
6743
      _Fields(short thriftId, String fieldName) {
6744
        _thriftId = thriftId;
6745
        _fieldName = fieldName;
6746
      }
6747
 
6748
      public short getThriftFieldId() {
6749
        return _thriftId;
6750
      }
6751
 
6752
      public String getFieldName() {
6753
        return _fieldName;
6754
      }
6755
    }
6756
 
6757
    // isset id assignments
6758
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
6759
    private static final int __OPEN_ISSET_ID = 1;
6760
    private BitSet __isset_bit_vector = new BitSet(2);
6761
 
6762
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6763
    static {
6764
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6765
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6766
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6767
      tmpMap.put(_Fields.OPEN, new org.apache.thrift.meta_data.FieldMetaData("open", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6768
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
6769
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6770
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_args.class, metaDataMap);
6771
    }
6772
 
6773
    public getAllPurchases_args() {
6774
    }
6775
 
6776
    public getAllPurchases_args(
6777
      long purchaseOrderId,
6778
      boolean open)
6779
    {
6780
      this();
6781
      this.purchaseOrderId = purchaseOrderId;
6782
      setPurchaseOrderIdIsSet(true);
6783
      this.open = open;
6784
      setOpenIsSet(true);
6785
    }
6786
 
6787
    /**
6788
     * Performs a deep copy on <i>other</i>.
6789
     */
6790
    public getAllPurchases_args(getAllPurchases_args other) {
6791
      __isset_bit_vector.clear();
6792
      __isset_bit_vector.or(other.__isset_bit_vector);
6793
      this.purchaseOrderId = other.purchaseOrderId;
6794
      this.open = other.open;
6795
    }
6796
 
6797
    public getAllPurchases_args deepCopy() {
6798
      return new getAllPurchases_args(this);
6799
    }
6800
 
6801
    @Override
6802
    public void clear() {
6803
      setPurchaseOrderIdIsSet(false);
6804
      this.purchaseOrderId = 0;
6805
      setOpenIsSet(false);
6806
      this.open = false;
6807
    }
6808
 
6809
    public long getPurchaseOrderId() {
6810
      return this.purchaseOrderId;
6811
    }
6812
 
6813
    public void setPurchaseOrderId(long purchaseOrderId) {
6814
      this.purchaseOrderId = purchaseOrderId;
6815
      setPurchaseOrderIdIsSet(true);
6816
    }
6817
 
6818
    public void unsetPurchaseOrderId() {
6819
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
6820
    }
6821
 
6822
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
6823
    public boolean isSetPurchaseOrderId() {
6824
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
6825
    }
6826
 
6827
    public void setPurchaseOrderIdIsSet(boolean value) {
6828
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
6829
    }
6830
 
6831
    public boolean isOpen() {
6832
      return this.open;
6833
    }
6834
 
6835
    public void setOpen(boolean open) {
6836
      this.open = open;
6837
      setOpenIsSet(true);
6838
    }
6839
 
6840
    public void unsetOpen() {
6841
      __isset_bit_vector.clear(__OPEN_ISSET_ID);
6842
    }
6843
 
6844
    /** Returns true if field open is set (has been assigned a value) and false otherwise */
6845
    public boolean isSetOpen() {
6846
      return __isset_bit_vector.get(__OPEN_ISSET_ID);
6847
    }
6848
 
6849
    public void setOpenIsSet(boolean value) {
6850
      __isset_bit_vector.set(__OPEN_ISSET_ID, value);
6851
    }
6852
 
6853
    public void setFieldValue(_Fields field, Object value) {
6854
      switch (field) {
6855
      case PURCHASE_ORDER_ID:
6856
        if (value == null) {
6857
          unsetPurchaseOrderId();
6858
        } else {
6859
          setPurchaseOrderId((Long)value);
6860
        }
6861
        break;
6862
 
6863
      case OPEN:
6864
        if (value == null) {
6865
          unsetOpen();
6866
        } else {
6867
          setOpen((Boolean)value);
6868
        }
6869
        break;
6870
 
6871
      }
6872
    }
6873
 
6874
    public Object getFieldValue(_Fields field) {
6875
      switch (field) {
6876
      case PURCHASE_ORDER_ID:
6877
        return Long.valueOf(getPurchaseOrderId());
6878
 
6879
      case OPEN:
6880
        return Boolean.valueOf(isOpen());
6881
 
6882
      }
6883
      throw new IllegalStateException();
6884
    }
6885
 
6886
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6887
    public boolean isSet(_Fields field) {
6888
      if (field == null) {
6889
        throw new IllegalArgumentException();
6890
      }
6891
 
6892
      switch (field) {
6893
      case PURCHASE_ORDER_ID:
6894
        return isSetPurchaseOrderId();
6895
      case OPEN:
6896
        return isSetOpen();
6897
      }
6898
      throw new IllegalStateException();
6899
    }
6900
 
6901
    @Override
6902
    public boolean equals(Object that) {
6903
      if (that == null)
6904
        return false;
6905
      if (that instanceof getAllPurchases_args)
6906
        return this.equals((getAllPurchases_args)that);
6907
      return false;
6908
    }
6909
 
6910
    public boolean equals(getAllPurchases_args that) {
6911
      if (that == null)
6912
        return false;
6913
 
6914
      boolean this_present_purchaseOrderId = true;
6915
      boolean that_present_purchaseOrderId = true;
6916
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
6917
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
6918
          return false;
6919
        if (this.purchaseOrderId != that.purchaseOrderId)
6920
          return false;
6921
      }
6922
 
6923
      boolean this_present_open = true;
6924
      boolean that_present_open = true;
6925
      if (this_present_open || that_present_open) {
6926
        if (!(this_present_open && that_present_open))
6927
          return false;
6928
        if (this.open != that.open)
6929
          return false;
6930
      }
6931
 
6932
      return true;
6933
    }
6934
 
6935
    @Override
6936
    public int hashCode() {
6937
      return 0;
6938
    }
6939
 
6940
    public int compareTo(getAllPurchases_args other) {
6941
      if (!getClass().equals(other.getClass())) {
6942
        return getClass().getName().compareTo(other.getClass().getName());
6943
      }
6944
 
6945
      int lastComparison = 0;
6946
      getAllPurchases_args typedOther = (getAllPurchases_args)other;
6947
 
6948
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
6949
      if (lastComparison != 0) {
6950
        return lastComparison;
6951
      }
6952
      if (isSetPurchaseOrderId()) {
6953
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
6954
        if (lastComparison != 0) {
6955
          return lastComparison;
6956
        }
6957
      }
6958
      lastComparison = Boolean.valueOf(isSetOpen()).compareTo(typedOther.isSetOpen());
6959
      if (lastComparison != 0) {
6960
        return lastComparison;
6961
      }
6962
      if (isSetOpen()) {
6963
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.open, typedOther.open);
6964
        if (lastComparison != 0) {
6965
          return lastComparison;
6966
        }
6967
      }
6968
      return 0;
6969
    }
6970
 
6971
    public _Fields fieldForId(int fieldId) {
6972
      return _Fields.findByThriftId(fieldId);
6973
    }
6974
 
6975
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6976
      org.apache.thrift.protocol.TField field;
6977
      iprot.readStructBegin();
6978
      while (true)
6979
      {
6980
        field = iprot.readFieldBegin();
6981
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6982
          break;
6983
        }
6984
        switch (field.id) {
6985
          case 1: // PURCHASE_ORDER_ID
6986
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6987
              this.purchaseOrderId = iprot.readI64();
6988
              setPurchaseOrderIdIsSet(true);
6989
            } else { 
6990
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6991
            }
6992
            break;
6993
          case 2: // OPEN
6994
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
6995
              this.open = iprot.readBool();
6996
              setOpenIsSet(true);
6997
            } else { 
6998
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6999
            }
7000
            break;
7001
          default:
7002
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7003
        }
7004
        iprot.readFieldEnd();
7005
      }
7006
      iprot.readStructEnd();
7007
      validate();
7008
    }
7009
 
7010
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7011
      validate();
7012
 
7013
      oprot.writeStructBegin(STRUCT_DESC);
7014
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
7015
      oprot.writeI64(this.purchaseOrderId);
7016
      oprot.writeFieldEnd();
7017
      oprot.writeFieldBegin(OPEN_FIELD_DESC);
7018
      oprot.writeBool(this.open);
7019
      oprot.writeFieldEnd();
7020
      oprot.writeFieldStop();
7021
      oprot.writeStructEnd();
7022
    }
7023
 
7024
    @Override
7025
    public String toString() {
7026
      StringBuilder sb = new StringBuilder("getAllPurchases_args(");
7027
      boolean first = true;
7028
 
7029
      sb.append("purchaseOrderId:");
7030
      sb.append(this.purchaseOrderId);
7031
      first = false;
7032
      if (!first) sb.append(", ");
7033
      sb.append("open:");
7034
      sb.append(this.open);
7035
      first = false;
7036
      sb.append(")");
7037
      return sb.toString();
7038
    }
7039
 
7040
    public void validate() throws org.apache.thrift.TException {
7041
      // check for required fields
7042
    }
7043
 
7044
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7045
      try {
7046
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7047
      } catch (org.apache.thrift.TException te) {
7048
        throw new java.io.IOException(te);
7049
      }
7050
    }
7051
 
7052
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7053
      try {
7054
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7055
      } catch (org.apache.thrift.TException te) {
7056
        throw new java.io.IOException(te);
7057
      }
7058
    }
7059
 
7060
  }
7061
 
7062
  public static class getAllPurchases_result implements org.apache.thrift.TBase<getAllPurchases_result, getAllPurchases_result._Fields>, java.io.Serializable, Cloneable   {
7063
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_result");
7064
 
7065
    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);
7066
    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);
7067
 
7068
    private List<Purchase> success; // required
7069
    private PurchaseServiceException e; // required
7070
 
7071
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7072
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7073
      SUCCESS((short)0, "success"),
7074
      E((short)1, "e");
7075
 
7076
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7077
 
7078
      static {
7079
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7080
          byName.put(field.getFieldName(), field);
7081
        }
7082
      }
7083
 
7084
      /**
7085
       * Find the _Fields constant that matches fieldId, or null if its not found.
7086
       */
7087
      public static _Fields findByThriftId(int fieldId) {
7088
        switch(fieldId) {
7089
          case 0: // SUCCESS
7090
            return SUCCESS;
7091
          case 1: // E
7092
            return E;
7093
          default:
7094
            return null;
7095
        }
7096
      }
7097
 
7098
      /**
7099
       * Find the _Fields constant that matches fieldId, throwing an exception
7100
       * if it is not found.
7101
       */
7102
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7103
        _Fields fields = findByThriftId(fieldId);
7104
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7105
        return fields;
7106
      }
7107
 
7108
      /**
7109
       * Find the _Fields constant that matches name, or null if its not found.
7110
       */
7111
      public static _Fields findByName(String name) {
7112
        return byName.get(name);
7113
      }
7114
 
7115
      private final short _thriftId;
7116
      private final String _fieldName;
7117
 
7118
      _Fields(short thriftId, String fieldName) {
7119
        _thriftId = thriftId;
7120
        _fieldName = fieldName;
7121
      }
7122
 
7123
      public short getThriftFieldId() {
7124
        return _thriftId;
7125
      }
7126
 
7127
      public String getFieldName() {
7128
        return _fieldName;
7129
      }
7130
    }
7131
 
7132
    // isset id assignments
7133
 
7134
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7135
    static {
7136
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7137
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7138
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7139
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));
7140
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7141
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7142
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7143
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_result.class, metaDataMap);
7144
    }
7145
 
7146
    public getAllPurchases_result() {
7147
    }
7148
 
7149
    public getAllPurchases_result(
7150
      List<Purchase> success,
7151
      PurchaseServiceException e)
7152
    {
7153
      this();
7154
      this.success = success;
7155
      this.e = e;
7156
    }
7157
 
7158
    /**
7159
     * Performs a deep copy on <i>other</i>.
7160
     */
7161
    public getAllPurchases_result(getAllPurchases_result other) {
7162
      if (other.isSetSuccess()) {
7163
        List<Purchase> __this__success = new ArrayList<Purchase>();
7164
        for (Purchase other_element : other.success) {
7165
          __this__success.add(new Purchase(other_element));
7166
        }
7167
        this.success = __this__success;
7168
      }
7169
      if (other.isSetE()) {
7170
        this.e = new PurchaseServiceException(other.e);
7171
      }
7172
    }
7173
 
7174
    public getAllPurchases_result deepCopy() {
7175
      return new getAllPurchases_result(this);
7176
    }
7177
 
7178
    @Override
7179
    public void clear() {
7180
      this.success = null;
7181
      this.e = null;
7182
    }
7183
 
7184
    public int getSuccessSize() {
7185
      return (this.success == null) ? 0 : this.success.size();
7186
    }
7187
 
7188
    public java.util.Iterator<Purchase> getSuccessIterator() {
7189
      return (this.success == null) ? null : this.success.iterator();
7190
    }
7191
 
7192
    public void addToSuccess(Purchase elem) {
7193
      if (this.success == null) {
7194
        this.success = new ArrayList<Purchase>();
7195
      }
7196
      this.success.add(elem);
7197
    }
7198
 
7199
    public List<Purchase> getSuccess() {
7200
      return this.success;
7201
    }
7202
 
7203
    public void setSuccess(List<Purchase> success) {
7204
      this.success = success;
7205
    }
7206
 
7207
    public void unsetSuccess() {
7208
      this.success = null;
7209
    }
7210
 
7211
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7212
    public boolean isSetSuccess() {
7213
      return this.success != null;
7214
    }
7215
 
7216
    public void setSuccessIsSet(boolean value) {
7217
      if (!value) {
7218
        this.success = null;
7219
      }
7220
    }
7221
 
7222
    public PurchaseServiceException getE() {
7223
      return this.e;
7224
    }
7225
 
7226
    public void setE(PurchaseServiceException e) {
7227
      this.e = e;
7228
    }
7229
 
7230
    public void unsetE() {
7231
      this.e = null;
7232
    }
7233
 
7234
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
7235
    public boolean isSetE() {
7236
      return this.e != null;
7237
    }
7238
 
7239
    public void setEIsSet(boolean value) {
7240
      if (!value) {
7241
        this.e = null;
7242
      }
7243
    }
7244
 
7245
    public void setFieldValue(_Fields field, Object value) {
7246
      switch (field) {
7247
      case SUCCESS:
7248
        if (value == null) {
7249
          unsetSuccess();
7250
        } else {
7251
          setSuccess((List<Purchase>)value);
7252
        }
7253
        break;
7254
 
7255
      case E:
7256
        if (value == null) {
7257
          unsetE();
7258
        } else {
7259
          setE((PurchaseServiceException)value);
7260
        }
7261
        break;
7262
 
7263
      }
7264
    }
7265
 
7266
    public Object getFieldValue(_Fields field) {
7267
      switch (field) {
7268
      case SUCCESS:
7269
        return getSuccess();
7270
 
7271
      case E:
7272
        return getE();
7273
 
7274
      }
7275
      throw new IllegalStateException();
7276
    }
7277
 
7278
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7279
    public boolean isSet(_Fields field) {
7280
      if (field == null) {
7281
        throw new IllegalArgumentException();
7282
      }
7283
 
7284
      switch (field) {
7285
      case SUCCESS:
7286
        return isSetSuccess();
7287
      case E:
7288
        return isSetE();
7289
      }
7290
      throw new IllegalStateException();
7291
    }
7292
 
7293
    @Override
7294
    public boolean equals(Object that) {
7295
      if (that == null)
7296
        return false;
7297
      if (that instanceof getAllPurchases_result)
7298
        return this.equals((getAllPurchases_result)that);
7299
      return false;
7300
    }
7301
 
7302
    public boolean equals(getAllPurchases_result that) {
7303
      if (that == null)
7304
        return false;
7305
 
7306
      boolean this_present_success = true && this.isSetSuccess();
7307
      boolean that_present_success = true && that.isSetSuccess();
7308
      if (this_present_success || that_present_success) {
7309
        if (!(this_present_success && that_present_success))
7310
          return false;
7311
        if (!this.success.equals(that.success))
7312
          return false;
7313
      }
7314
 
7315
      boolean this_present_e = true && this.isSetE();
7316
      boolean that_present_e = true && that.isSetE();
7317
      if (this_present_e || that_present_e) {
7318
        if (!(this_present_e && that_present_e))
7319
          return false;
7320
        if (!this.e.equals(that.e))
7321
          return false;
7322
      }
7323
 
7324
      return true;
7325
    }
7326
 
7327
    @Override
7328
    public int hashCode() {
7329
      return 0;
7330
    }
7331
 
7332
    public int compareTo(getAllPurchases_result other) {
7333
      if (!getClass().equals(other.getClass())) {
7334
        return getClass().getName().compareTo(other.getClass().getName());
7335
      }
7336
 
7337
      int lastComparison = 0;
7338
      getAllPurchases_result typedOther = (getAllPurchases_result)other;
7339
 
7340
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7341
      if (lastComparison != 0) {
7342
        return lastComparison;
7343
      }
7344
      if (isSetSuccess()) {
7345
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7346
        if (lastComparison != 0) {
7347
          return lastComparison;
7348
        }
7349
      }
7350
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
7351
      if (lastComparison != 0) {
7352
        return lastComparison;
7353
      }
7354
      if (isSetE()) {
7355
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
7356
        if (lastComparison != 0) {
7357
          return lastComparison;
7358
        }
7359
      }
7360
      return 0;
7361
    }
7362
 
7363
    public _Fields fieldForId(int fieldId) {
7364
      return _Fields.findByThriftId(fieldId);
7365
    }
7366
 
7367
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7368
      org.apache.thrift.protocol.TField field;
7369
      iprot.readStructBegin();
7370
      while (true)
7371
      {
7372
        field = iprot.readFieldBegin();
7373
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7374
          break;
7375
        }
7376
        switch (field.id) {
7377
          case 0: // SUCCESS
7378
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
7379
              {
7380
                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
7381
                this.success = new ArrayList<Purchase>(_list8.size);
7382
                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
7383
                {
7384
                  Purchase _elem10; // required
7385
                  _elem10 = new Purchase();
7386
                  _elem10.read(iprot);
7387
                  this.success.add(_elem10);
7388
                }
7389
                iprot.readListEnd();
7390
              }
7391
            } else { 
7392
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7393
            }
7394
            break;
7395
          case 1: // E
7396
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7397
              this.e = new PurchaseServiceException();
7398
              this.e.read(iprot);
7399
            } else { 
7400
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7401
            }
7402
            break;
7403
          default:
7404
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7405
        }
7406
        iprot.readFieldEnd();
7407
      }
7408
      iprot.readStructEnd();
7409
      validate();
7410
    }
7411
 
7412
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7413
      oprot.writeStructBegin(STRUCT_DESC);
7414
 
7415
      if (this.isSetSuccess()) {
7416
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7417
        {
7418
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7419
          for (Purchase _iter11 : this.success)
7420
          {
7421
            _iter11.write(oprot);
7422
          }
7423
          oprot.writeListEnd();
7424
        }
7425
        oprot.writeFieldEnd();
7426
      } else if (this.isSetE()) {
7427
        oprot.writeFieldBegin(E_FIELD_DESC);
7428
        this.e.write(oprot);
7429
        oprot.writeFieldEnd();
7430
      }
7431
      oprot.writeFieldStop();
7432
      oprot.writeStructEnd();
7433
    }
7434
 
7435
    @Override
7436
    public String toString() {
7437
      StringBuilder sb = new StringBuilder("getAllPurchases_result(");
7438
      boolean first = true;
7439
 
7440
      sb.append("success:");
7441
      if (this.success == null) {
7442
        sb.append("null");
7443
      } else {
7444
        sb.append(this.success);
7445
      }
7446
      first = false;
7447
      if (!first) sb.append(", ");
7448
      sb.append("e:");
7449
      if (this.e == null) {
7450
        sb.append("null");
7451
      } else {
7452
        sb.append(this.e);
7453
      }
7454
      first = false;
7455
      sb.append(")");
7456
      return sb.toString();
7457
    }
7458
 
7459
    public void validate() throws org.apache.thrift.TException {
7460
      // check for required fields
7461
    }
7462
 
7463
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7464
      try {
7465
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7466
      } catch (org.apache.thrift.TException te) {
7467
        throw new java.io.IOException(te);
7468
      }
7469
    }
7470
 
7471
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7472
      try {
7473
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7474
      } catch (org.apache.thrift.TException te) {
7475
        throw new java.io.IOException(te);
7476
      }
7477
    }
7478
 
7479
  }
7480
 
6385 amar.kumar 7481
  public static class getPurchasesForPO_args implements org.apache.thrift.TBase<getPurchasesForPO_args, getPurchasesForPO_args._Fields>, java.io.Serializable, Cloneable   {
7482
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchasesForPO_args");
7483
 
7484
    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);
7485
 
7486
    private long purchaseOrderId; // required
7487
 
7488
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7489
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7490
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId");
7491
 
7492
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7493
 
7494
      static {
7495
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7496
          byName.put(field.getFieldName(), field);
7497
        }
7498
      }
7499
 
7500
      /**
7501
       * Find the _Fields constant that matches fieldId, or null if its not found.
7502
       */
7503
      public static _Fields findByThriftId(int fieldId) {
7504
        switch(fieldId) {
7505
          case 1: // PURCHASE_ORDER_ID
7506
            return PURCHASE_ORDER_ID;
7507
          default:
7508
            return null;
7509
        }
7510
      }
7511
 
7512
      /**
7513
       * Find the _Fields constant that matches fieldId, throwing an exception
7514
       * if it is not found.
7515
       */
7516
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7517
        _Fields fields = findByThriftId(fieldId);
7518
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7519
        return fields;
7520
      }
7521
 
7522
      /**
7523
       * Find the _Fields constant that matches name, or null if its not found.
7524
       */
7525
      public static _Fields findByName(String name) {
7526
        return byName.get(name);
7527
      }
7528
 
7529
      private final short _thriftId;
7530
      private final String _fieldName;
7531
 
7532
      _Fields(short thriftId, String fieldName) {
7533
        _thriftId = thriftId;
7534
        _fieldName = fieldName;
7535
      }
7536
 
7537
      public short getThriftFieldId() {
7538
        return _thriftId;
7539
      }
7540
 
7541
      public String getFieldName() {
7542
        return _fieldName;
7543
      }
7544
    }
7545
 
7546
    // isset id assignments
7547
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
7548
    private BitSet __isset_bit_vector = new BitSet(1);
7549
 
7550
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7551
    static {
7552
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7553
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7554
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7555
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7556
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchasesForPO_args.class, metaDataMap);
7557
    }
7558
 
7559
    public getPurchasesForPO_args() {
7560
    }
7561
 
7562
    public getPurchasesForPO_args(
7563
      long purchaseOrderId)
7564
    {
7565
      this();
7566
      this.purchaseOrderId = purchaseOrderId;
7567
      setPurchaseOrderIdIsSet(true);
7568
    }
7569
 
7570
    /**
7571
     * Performs a deep copy on <i>other</i>.
7572
     */
7573
    public getPurchasesForPO_args(getPurchasesForPO_args other) {
7574
      __isset_bit_vector.clear();
7575
      __isset_bit_vector.or(other.__isset_bit_vector);
7576
      this.purchaseOrderId = other.purchaseOrderId;
7577
    }
7578
 
7579
    public getPurchasesForPO_args deepCopy() {
7580
      return new getPurchasesForPO_args(this);
7581
    }
7582
 
7583
    @Override
7584
    public void clear() {
7585
      setPurchaseOrderIdIsSet(false);
7586
      this.purchaseOrderId = 0;
7587
    }
7588
 
7589
    public long getPurchaseOrderId() {
7590
      return this.purchaseOrderId;
7591
    }
7592
 
7593
    public void setPurchaseOrderId(long purchaseOrderId) {
7594
      this.purchaseOrderId = purchaseOrderId;
7595
      setPurchaseOrderIdIsSet(true);
7596
    }
7597
 
7598
    public void unsetPurchaseOrderId() {
7599
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
7600
    }
7601
 
7602
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
7603
    public boolean isSetPurchaseOrderId() {
7604
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
7605
    }
7606
 
7607
    public void setPurchaseOrderIdIsSet(boolean value) {
7608
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
7609
    }
7610
 
7611
    public void setFieldValue(_Fields field, Object value) {
7612
      switch (field) {
7613
      case PURCHASE_ORDER_ID:
7614
        if (value == null) {
7615
          unsetPurchaseOrderId();
7616
        } else {
7617
          setPurchaseOrderId((Long)value);
7618
        }
7619
        break;
7620
 
7621
      }
7622
    }
7623
 
7624
    public Object getFieldValue(_Fields field) {
7625
      switch (field) {
7626
      case PURCHASE_ORDER_ID:
7627
        return Long.valueOf(getPurchaseOrderId());
7628
 
7629
      }
7630
      throw new IllegalStateException();
7631
    }
7632
 
7633
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7634
    public boolean isSet(_Fields field) {
7635
      if (field == null) {
7636
        throw new IllegalArgumentException();
7637
      }
7638
 
7639
      switch (field) {
7640
      case PURCHASE_ORDER_ID:
7641
        return isSetPurchaseOrderId();
7642
      }
7643
      throw new IllegalStateException();
7644
    }
7645
 
7646
    @Override
7647
    public boolean equals(Object that) {
7648
      if (that == null)
7649
        return false;
7650
      if (that instanceof getPurchasesForPO_args)
7651
        return this.equals((getPurchasesForPO_args)that);
7652
      return false;
7653
    }
7654
 
7655
    public boolean equals(getPurchasesForPO_args that) {
7656
      if (that == null)
7657
        return false;
7658
 
7659
      boolean this_present_purchaseOrderId = true;
7660
      boolean that_present_purchaseOrderId = true;
7661
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
7662
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
7663
          return false;
7664
        if (this.purchaseOrderId != that.purchaseOrderId)
7665
          return false;
7666
      }
7667
 
7668
      return true;
7669
    }
7670
 
7671
    @Override
7672
    public int hashCode() {
7673
      return 0;
7674
    }
7675
 
7676
    public int compareTo(getPurchasesForPO_args other) {
7677
      if (!getClass().equals(other.getClass())) {
7678
        return getClass().getName().compareTo(other.getClass().getName());
7679
      }
7680
 
7681
      int lastComparison = 0;
7682
      getPurchasesForPO_args typedOther = (getPurchasesForPO_args)other;
7683
 
7684
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
7685
      if (lastComparison != 0) {
7686
        return lastComparison;
7687
      }
7688
      if (isSetPurchaseOrderId()) {
7689
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
7690
        if (lastComparison != 0) {
7691
          return lastComparison;
7692
        }
7693
      }
7694
      return 0;
7695
    }
7696
 
7697
    public _Fields fieldForId(int fieldId) {
7698
      return _Fields.findByThriftId(fieldId);
7699
    }
7700
 
7701
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7702
      org.apache.thrift.protocol.TField field;
7703
      iprot.readStructBegin();
7704
      while (true)
7705
      {
7706
        field = iprot.readFieldBegin();
7707
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7708
          break;
7709
        }
7710
        switch (field.id) {
7711
          case 1: // PURCHASE_ORDER_ID
7712
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7713
              this.purchaseOrderId = iprot.readI64();
7714
              setPurchaseOrderIdIsSet(true);
7715
            } else { 
7716
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7717
            }
7718
            break;
7719
          default:
7720
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7721
        }
7722
        iprot.readFieldEnd();
7723
      }
7724
      iprot.readStructEnd();
7725
      validate();
7726
    }
7727
 
7728
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7729
      validate();
7730
 
7731
      oprot.writeStructBegin(STRUCT_DESC);
7732
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
7733
      oprot.writeI64(this.purchaseOrderId);
7734
      oprot.writeFieldEnd();
7735
      oprot.writeFieldStop();
7736
      oprot.writeStructEnd();
7737
    }
7738
 
7739
    @Override
7740
    public String toString() {
7741
      StringBuilder sb = new StringBuilder("getPurchasesForPO_args(");
7742
      boolean first = true;
7743
 
7744
      sb.append("purchaseOrderId:");
7745
      sb.append(this.purchaseOrderId);
7746
      first = false;
7747
      sb.append(")");
7748
      return sb.toString();
7749
    }
7750
 
7751
    public void validate() throws org.apache.thrift.TException {
7752
      // check for required fields
7753
    }
7754
 
7755
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7756
      try {
7757
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7758
      } catch (org.apache.thrift.TException te) {
7759
        throw new java.io.IOException(te);
7760
      }
7761
    }
7762
 
7763
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7764
      try {
7765
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
7766
        __isset_bit_vector = new BitSet(1);
7767
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7768
      } catch (org.apache.thrift.TException te) {
7769
        throw new java.io.IOException(te);
7770
      }
7771
    }
7772
 
7773
  }
7774
 
7775
  public static class getPurchasesForPO_result implements org.apache.thrift.TBase<getPurchasesForPO_result, getPurchasesForPO_result._Fields>, java.io.Serializable, Cloneable   {
7776
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchasesForPO_result");
7777
 
7778
    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);
7779
    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);
7780
 
7781
    private List<Purchase> success; // required
7782
    private PurchaseServiceException e; // required
7783
 
7784
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7785
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7786
      SUCCESS((short)0, "success"),
7787
      E((short)1, "e");
7788
 
7789
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7790
 
7791
      static {
7792
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7793
          byName.put(field.getFieldName(), field);
7794
        }
7795
      }
7796
 
7797
      /**
7798
       * Find the _Fields constant that matches fieldId, or null if its not found.
7799
       */
7800
      public static _Fields findByThriftId(int fieldId) {
7801
        switch(fieldId) {
7802
          case 0: // SUCCESS
7803
            return SUCCESS;
7804
          case 1: // E
7805
            return E;
7806
          default:
7807
            return null;
7808
        }
7809
      }
7810
 
7811
      /**
7812
       * Find the _Fields constant that matches fieldId, throwing an exception
7813
       * if it is not found.
7814
       */
7815
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7816
        _Fields fields = findByThriftId(fieldId);
7817
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7818
        return fields;
7819
      }
7820
 
7821
      /**
7822
       * Find the _Fields constant that matches name, or null if its not found.
7823
       */
7824
      public static _Fields findByName(String name) {
7825
        return byName.get(name);
7826
      }
7827
 
7828
      private final short _thriftId;
7829
      private final String _fieldName;
7830
 
7831
      _Fields(short thriftId, String fieldName) {
7832
        _thriftId = thriftId;
7833
        _fieldName = fieldName;
7834
      }
7835
 
7836
      public short getThriftFieldId() {
7837
        return _thriftId;
7838
      }
7839
 
7840
      public String getFieldName() {
7841
        return _fieldName;
7842
      }
7843
    }
7844
 
7845
    // isset id assignments
7846
 
7847
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7848
    static {
7849
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7850
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7851
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7852
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));
7853
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7854
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7855
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7856
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchasesForPO_result.class, metaDataMap);
7857
    }
7858
 
7859
    public getPurchasesForPO_result() {
7860
    }
7861
 
7862
    public getPurchasesForPO_result(
7863
      List<Purchase> success,
7864
      PurchaseServiceException e)
7865
    {
7866
      this();
7867
      this.success = success;
7868
      this.e = e;
7869
    }
7870
 
7871
    /**
7872
     * Performs a deep copy on <i>other</i>.
7873
     */
7874
    public getPurchasesForPO_result(getPurchasesForPO_result other) {
7875
      if (other.isSetSuccess()) {
7876
        List<Purchase> __this__success = new ArrayList<Purchase>();
7877
        for (Purchase other_element : other.success) {
7878
          __this__success.add(new Purchase(other_element));
7879
        }
7880
        this.success = __this__success;
7881
      }
7882
      if (other.isSetE()) {
7883
        this.e = new PurchaseServiceException(other.e);
7884
      }
7885
    }
7886
 
7887
    public getPurchasesForPO_result deepCopy() {
7888
      return new getPurchasesForPO_result(this);
7889
    }
7890
 
7891
    @Override
7892
    public void clear() {
7893
      this.success = null;
7894
      this.e = null;
7895
    }
7896
 
7897
    public int getSuccessSize() {
7898
      return (this.success == null) ? 0 : this.success.size();
7899
    }
7900
 
7901
    public java.util.Iterator<Purchase> getSuccessIterator() {
7902
      return (this.success == null) ? null : this.success.iterator();
7903
    }
7904
 
7905
    public void addToSuccess(Purchase elem) {
7906
      if (this.success == null) {
7907
        this.success = new ArrayList<Purchase>();
7908
      }
7909
      this.success.add(elem);
7910
    }
7911
 
7912
    public List<Purchase> getSuccess() {
7913
      return this.success;
7914
    }
7915
 
7916
    public void setSuccess(List<Purchase> success) {
7917
      this.success = success;
7918
    }
7919
 
7920
    public void unsetSuccess() {
7921
      this.success = null;
7922
    }
7923
 
7924
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7925
    public boolean isSetSuccess() {
7926
      return this.success != null;
7927
    }
7928
 
7929
    public void setSuccessIsSet(boolean value) {
7930
      if (!value) {
7931
        this.success = null;
7932
      }
7933
    }
7934
 
7935
    public PurchaseServiceException getE() {
7936
      return this.e;
7937
    }
7938
 
7939
    public void setE(PurchaseServiceException e) {
7940
      this.e = e;
7941
    }
7942
 
7943
    public void unsetE() {
7944
      this.e = null;
7945
    }
7946
 
7947
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
7948
    public boolean isSetE() {
7949
      return this.e != null;
7950
    }
7951
 
7952
    public void setEIsSet(boolean value) {
7953
      if (!value) {
7954
        this.e = null;
7955
      }
7956
    }
7957
 
7958
    public void setFieldValue(_Fields field, Object value) {
7959
      switch (field) {
7960
      case SUCCESS:
7961
        if (value == null) {
7962
          unsetSuccess();
7963
        } else {
7964
          setSuccess((List<Purchase>)value);
7965
        }
7966
        break;
7967
 
7968
      case E:
7969
        if (value == null) {
7970
          unsetE();
7971
        } else {
7972
          setE((PurchaseServiceException)value);
7973
        }
7974
        break;
7975
 
7976
      }
7977
    }
7978
 
7979
    public Object getFieldValue(_Fields field) {
7980
      switch (field) {
7981
      case SUCCESS:
7982
        return getSuccess();
7983
 
7984
      case E:
7985
        return getE();
7986
 
7987
      }
7988
      throw new IllegalStateException();
7989
    }
7990
 
7991
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7992
    public boolean isSet(_Fields field) {
7993
      if (field == null) {
7994
        throw new IllegalArgumentException();
7995
      }
7996
 
7997
      switch (field) {
7998
      case SUCCESS:
7999
        return isSetSuccess();
8000
      case E:
8001
        return isSetE();
8002
      }
8003
      throw new IllegalStateException();
8004
    }
8005
 
8006
    @Override
8007
    public boolean equals(Object that) {
8008
      if (that == null)
8009
        return false;
8010
      if (that instanceof getPurchasesForPO_result)
8011
        return this.equals((getPurchasesForPO_result)that);
8012
      return false;
8013
    }
8014
 
8015
    public boolean equals(getPurchasesForPO_result that) {
8016
      if (that == null)
8017
        return false;
8018
 
8019
      boolean this_present_success = true && this.isSetSuccess();
8020
      boolean that_present_success = true && that.isSetSuccess();
8021
      if (this_present_success || that_present_success) {
8022
        if (!(this_present_success && that_present_success))
8023
          return false;
8024
        if (!this.success.equals(that.success))
8025
          return false;
8026
      }
8027
 
8028
      boolean this_present_e = true && this.isSetE();
8029
      boolean that_present_e = true && that.isSetE();
8030
      if (this_present_e || that_present_e) {
8031
        if (!(this_present_e && that_present_e))
8032
          return false;
8033
        if (!this.e.equals(that.e))
8034
          return false;
8035
      }
8036
 
8037
      return true;
8038
    }
8039
 
8040
    @Override
8041
    public int hashCode() {
8042
      return 0;
8043
    }
8044
 
8045
    public int compareTo(getPurchasesForPO_result other) {
8046
      if (!getClass().equals(other.getClass())) {
8047
        return getClass().getName().compareTo(other.getClass().getName());
8048
      }
8049
 
8050
      int lastComparison = 0;
8051
      getPurchasesForPO_result typedOther = (getPurchasesForPO_result)other;
8052
 
8053
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8054
      if (lastComparison != 0) {
8055
        return lastComparison;
8056
      }
8057
      if (isSetSuccess()) {
8058
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8059
        if (lastComparison != 0) {
8060
          return lastComparison;
8061
        }
8062
      }
8063
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
8064
      if (lastComparison != 0) {
8065
        return lastComparison;
8066
      }
8067
      if (isSetE()) {
8068
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
8069
        if (lastComparison != 0) {
8070
          return lastComparison;
8071
        }
8072
      }
8073
      return 0;
8074
    }
8075
 
8076
    public _Fields fieldForId(int fieldId) {
8077
      return _Fields.findByThriftId(fieldId);
8078
    }
8079
 
8080
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8081
      org.apache.thrift.protocol.TField field;
8082
      iprot.readStructBegin();
8083
      while (true)
8084
      {
8085
        field = iprot.readFieldBegin();
8086
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8087
          break;
8088
        }
8089
        switch (field.id) {
8090
          case 0: // SUCCESS
8091
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8092
              {
8093
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
8094
                this.success = new ArrayList<Purchase>(_list12.size);
8095
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
8096
                {
8097
                  Purchase _elem14; // required
8098
                  _elem14 = new Purchase();
8099
                  _elem14.read(iprot);
8100
                  this.success.add(_elem14);
8101
                }
8102
                iprot.readListEnd();
8103
              }
8104
            } else { 
8105
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8106
            }
8107
            break;
8108
          case 1: // E
8109
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8110
              this.e = new PurchaseServiceException();
8111
              this.e.read(iprot);
8112
            } else { 
8113
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8114
            }
8115
            break;
8116
          default:
8117
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8118
        }
8119
        iprot.readFieldEnd();
8120
      }
8121
      iprot.readStructEnd();
8122
      validate();
8123
    }
8124
 
8125
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8126
      oprot.writeStructBegin(STRUCT_DESC);
8127
 
8128
      if (this.isSetSuccess()) {
8129
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8130
        {
8131
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
8132
          for (Purchase _iter15 : this.success)
8133
          {
8134
            _iter15.write(oprot);
8135
          }
8136
          oprot.writeListEnd();
8137
        }
8138
        oprot.writeFieldEnd();
8139
      } else if (this.isSetE()) {
8140
        oprot.writeFieldBegin(E_FIELD_DESC);
8141
        this.e.write(oprot);
8142
        oprot.writeFieldEnd();
8143
      }
8144
      oprot.writeFieldStop();
8145
      oprot.writeStructEnd();
8146
    }
8147
 
8148
    @Override
8149
    public String toString() {
8150
      StringBuilder sb = new StringBuilder("getPurchasesForPO_result(");
8151
      boolean first = true;
8152
 
8153
      sb.append("success:");
8154
      if (this.success == null) {
8155
        sb.append("null");
8156
      } else {
8157
        sb.append(this.success);
8158
      }
8159
      first = false;
8160
      if (!first) sb.append(", ");
8161
      sb.append("e:");
8162
      if (this.e == null) {
8163
        sb.append("null");
8164
      } else {
8165
        sb.append(this.e);
8166
      }
8167
      first = false;
8168
      sb.append(")");
8169
      return sb.toString();
8170
    }
8171
 
8172
    public void validate() throws org.apache.thrift.TException {
8173
      // check for required fields
8174
    }
8175
 
8176
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8177
      try {
8178
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8179
      } catch (org.apache.thrift.TException te) {
8180
        throw new java.io.IOException(te);
8181
      }
8182
    }
8183
 
8184
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8185
      try {
8186
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8187
      } catch (org.apache.thrift.TException te) {
8188
        throw new java.io.IOException(te);
8189
      }
8190
    }
8191
 
8192
  }
8193
 
4555 mandeep.dh 8194
  public static class getPurchaseOrderForPurchase_args implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_args, getPurchaseOrderForPurchase_args._Fields>, java.io.Serializable, Cloneable   {
8195
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_args");
4496 mandeep.dh 8196
 
8197
    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);
8198
 
8199
    private long purchaseId; // required
8200
 
8201
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8202
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4555 mandeep.dh 8203
      PURCHASE_ID((short)1, "purchaseId");
4496 mandeep.dh 8204
 
8205
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8206
 
8207
      static {
8208
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8209
          byName.put(field.getFieldName(), field);
8210
        }
8211
      }
8212
 
8213
      /**
8214
       * Find the _Fields constant that matches fieldId, or null if its not found.
8215
       */
8216
      public static _Fields findByThriftId(int fieldId) {
8217
        switch(fieldId) {
8218
          case 1: // PURCHASE_ID
8219
            return PURCHASE_ID;
8220
          default:
8221
            return null;
8222
        }
8223
      }
8224
 
8225
      /**
8226
       * Find the _Fields constant that matches fieldId, throwing an exception
8227
       * if it is not found.
8228
       */
8229
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8230
        _Fields fields = findByThriftId(fieldId);
8231
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8232
        return fields;
8233
      }
8234
 
8235
      /**
8236
       * Find the _Fields constant that matches name, or null if its not found.
8237
       */
8238
      public static _Fields findByName(String name) {
8239
        return byName.get(name);
8240
      }
8241
 
8242
      private final short _thriftId;
8243
      private final String _fieldName;
8244
 
8245
      _Fields(short thriftId, String fieldName) {
8246
        _thriftId = thriftId;
8247
        _fieldName = fieldName;
8248
      }
8249
 
8250
      public short getThriftFieldId() {
8251
        return _thriftId;
8252
      }
8253
 
8254
      public String getFieldName() {
8255
        return _fieldName;
8256
      }
8257
    }
8258
 
8259
    // isset id assignments
8260
    private static final int __PURCHASEID_ISSET_ID = 0;
4555 mandeep.dh 8261
    private BitSet __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 8262
 
8263
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8264
    static {
8265
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8266
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8267
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8268
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 8269
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_args.class, metaDataMap);
4496 mandeep.dh 8270
    }
8271
 
4555 mandeep.dh 8272
    public getPurchaseOrderForPurchase_args() {
4496 mandeep.dh 8273
    }
8274
 
4555 mandeep.dh 8275
    public getPurchaseOrderForPurchase_args(
8276
      long purchaseId)
4496 mandeep.dh 8277
    {
8278
      this();
8279
      this.purchaseId = purchaseId;
8280
      setPurchaseIdIsSet(true);
8281
    }
8282
 
8283
    /**
8284
     * Performs a deep copy on <i>other</i>.
8285
     */
4555 mandeep.dh 8286
    public getPurchaseOrderForPurchase_args(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 8287
      __isset_bit_vector.clear();
8288
      __isset_bit_vector.or(other.__isset_bit_vector);
8289
      this.purchaseId = other.purchaseId;
8290
    }
8291
 
4555 mandeep.dh 8292
    public getPurchaseOrderForPurchase_args deepCopy() {
8293
      return new getPurchaseOrderForPurchase_args(this);
4496 mandeep.dh 8294
    }
8295
 
8296
    @Override
8297
    public void clear() {
8298
      setPurchaseIdIsSet(false);
8299
      this.purchaseId = 0;
8300
    }
8301
 
8302
    public long getPurchaseId() {
8303
      return this.purchaseId;
8304
    }
8305
 
8306
    public void setPurchaseId(long purchaseId) {
8307
      this.purchaseId = purchaseId;
8308
      setPurchaseIdIsSet(true);
8309
    }
8310
 
8311
    public void unsetPurchaseId() {
8312
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
8313
    }
8314
 
8315
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
8316
    public boolean isSetPurchaseId() {
8317
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
8318
    }
8319
 
8320
    public void setPurchaseIdIsSet(boolean value) {
8321
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
8322
    }
8323
 
8324
    public void setFieldValue(_Fields field, Object value) {
8325
      switch (field) {
8326
      case PURCHASE_ID:
8327
        if (value == null) {
8328
          unsetPurchaseId();
8329
        } else {
8330
          setPurchaseId((Long)value);
8331
        }
8332
        break;
8333
 
8334
      }
8335
    }
8336
 
8337
    public Object getFieldValue(_Fields field) {
8338
      switch (field) {
8339
      case PURCHASE_ID:
8340
        return Long.valueOf(getPurchaseId());
8341
 
8342
      }
8343
      throw new IllegalStateException();
8344
    }
8345
 
8346
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8347
    public boolean isSet(_Fields field) {
8348
      if (field == null) {
8349
        throw new IllegalArgumentException();
8350
      }
8351
 
8352
      switch (field) {
8353
      case PURCHASE_ID:
8354
        return isSetPurchaseId();
8355
      }
8356
      throw new IllegalStateException();
8357
    }
8358
 
8359
    @Override
8360
    public boolean equals(Object that) {
8361
      if (that == null)
8362
        return false;
4555 mandeep.dh 8363
      if (that instanceof getPurchaseOrderForPurchase_args)
8364
        return this.equals((getPurchaseOrderForPurchase_args)that);
4496 mandeep.dh 8365
      return false;
8366
    }
8367
 
4555 mandeep.dh 8368
    public boolean equals(getPurchaseOrderForPurchase_args that) {
4496 mandeep.dh 8369
      if (that == null)
8370
        return false;
8371
 
8372
      boolean this_present_purchaseId = true;
8373
      boolean that_present_purchaseId = true;
8374
      if (this_present_purchaseId || that_present_purchaseId) {
8375
        if (!(this_present_purchaseId && that_present_purchaseId))
8376
          return false;
8377
        if (this.purchaseId != that.purchaseId)
8378
          return false;
8379
      }
8380
 
8381
      return true;
8382
    }
8383
 
8384
    @Override
8385
    public int hashCode() {
8386
      return 0;
8387
    }
8388
 
4555 mandeep.dh 8389
    public int compareTo(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 8390
      if (!getClass().equals(other.getClass())) {
8391
        return getClass().getName().compareTo(other.getClass().getName());
8392
      }
8393
 
8394
      int lastComparison = 0;
4555 mandeep.dh 8395
      getPurchaseOrderForPurchase_args typedOther = (getPurchaseOrderForPurchase_args)other;
4496 mandeep.dh 8396
 
8397
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
8398
      if (lastComparison != 0) {
8399
        return lastComparison;
8400
      }
8401
      if (isSetPurchaseId()) {
8402
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
8403
        if (lastComparison != 0) {
8404
          return lastComparison;
8405
        }
8406
      }
8407
      return 0;
8408
    }
8409
 
8410
    public _Fields fieldForId(int fieldId) {
8411
      return _Fields.findByThriftId(fieldId);
8412
    }
8413
 
8414
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8415
      org.apache.thrift.protocol.TField field;
8416
      iprot.readStructBegin();
8417
      while (true)
8418
      {
8419
        field = iprot.readFieldBegin();
8420
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8421
          break;
8422
        }
8423
        switch (field.id) {
8424
          case 1: // PURCHASE_ID
8425
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8426
              this.purchaseId = iprot.readI64();
8427
              setPurchaseIdIsSet(true);
8428
            } else { 
8429
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8430
            }
8431
            break;
8432
          default:
8433
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8434
        }
8435
        iprot.readFieldEnd();
8436
      }
8437
      iprot.readStructEnd();
8438
      validate();
8439
    }
8440
 
8441
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8442
      validate();
8443
 
8444
      oprot.writeStructBegin(STRUCT_DESC);
8445
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
8446
      oprot.writeI64(this.purchaseId);
8447
      oprot.writeFieldEnd();
8448
      oprot.writeFieldStop();
8449
      oprot.writeStructEnd();
8450
    }
8451
 
8452
    @Override
8453
    public String toString() {
4555 mandeep.dh 8454
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_args(");
4496 mandeep.dh 8455
      boolean first = true;
8456
 
8457
      sb.append("purchaseId:");
8458
      sb.append(this.purchaseId);
8459
      first = false;
8460
      sb.append(")");
8461
      return sb.toString();
8462
    }
8463
 
8464
    public void validate() throws org.apache.thrift.TException {
8465
      // check for required fields
8466
    }
8467
 
8468
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8469
      try {
8470
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8471
      } catch (org.apache.thrift.TException te) {
8472
        throw new java.io.IOException(te);
8473
      }
8474
    }
8475
 
8476
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8477
      try {
4555 mandeep.dh 8478
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8479
        __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 8480
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8481
      } catch (org.apache.thrift.TException te) {
8482
        throw new java.io.IOException(te);
8483
      }
8484
    }
8485
 
8486
  }
8487
 
4555 mandeep.dh 8488
  public static class getPurchaseOrderForPurchase_result implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_result, getPurchaseOrderForPurchase_result._Fields>, java.io.Serializable, Cloneable   {
8489
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_result");
4496 mandeep.dh 8490
 
4555 mandeep.dh 8491
    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 8492
 
4555 mandeep.dh 8493
    private PurchaseOrder success; // required
4496 mandeep.dh 8494
 
8495
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8496
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8497
      SUCCESS((short)0, "success");
8498
 
8499
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8500
 
8501
      static {
8502
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8503
          byName.put(field.getFieldName(), field);
8504
        }
8505
      }
8506
 
8507
      /**
8508
       * Find the _Fields constant that matches fieldId, or null if its not found.
8509
       */
8510
      public static _Fields findByThriftId(int fieldId) {
8511
        switch(fieldId) {
8512
          case 0: // SUCCESS
8513
            return SUCCESS;
8514
          default:
8515
            return null;
8516
        }
8517
      }
8518
 
8519
      /**
8520
       * Find the _Fields constant that matches fieldId, throwing an exception
8521
       * if it is not found.
8522
       */
8523
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8524
        _Fields fields = findByThriftId(fieldId);
8525
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8526
        return fields;
8527
      }
8528
 
8529
      /**
8530
       * Find the _Fields constant that matches name, or null if its not found.
8531
       */
8532
      public static _Fields findByName(String name) {
8533
        return byName.get(name);
8534
      }
8535
 
8536
      private final short _thriftId;
8537
      private final String _fieldName;
8538
 
8539
      _Fields(short thriftId, String fieldName) {
8540
        _thriftId = thriftId;
8541
        _fieldName = fieldName;
8542
      }
8543
 
8544
      public short getThriftFieldId() {
8545
        return _thriftId;
8546
      }
8547
 
8548
      public String getFieldName() {
8549
        return _fieldName;
8550
      }
8551
    }
8552
 
8553
    // isset id assignments
8554
 
8555
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8556
    static {
8557
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8558
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 8559
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
4496 mandeep.dh 8560
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 8561
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_result.class, metaDataMap);
4496 mandeep.dh 8562
    }
8563
 
4555 mandeep.dh 8564
    public getPurchaseOrderForPurchase_result() {
4496 mandeep.dh 8565
    }
8566
 
4555 mandeep.dh 8567
    public getPurchaseOrderForPurchase_result(
8568
      PurchaseOrder success)
4496 mandeep.dh 8569
    {
8570
      this();
8571
      this.success = success;
8572
    }
8573
 
8574
    /**
8575
     * Performs a deep copy on <i>other</i>.
8576
     */
4555 mandeep.dh 8577
    public getPurchaseOrderForPurchase_result(getPurchaseOrderForPurchase_result other) {
8578
      if (other.isSetSuccess()) {
8579
        this.success = new PurchaseOrder(other.success);
8580
      }
4496 mandeep.dh 8581
    }
8582
 
4555 mandeep.dh 8583
    public getPurchaseOrderForPurchase_result deepCopy() {
8584
      return new getPurchaseOrderForPurchase_result(this);
4496 mandeep.dh 8585
    }
8586
 
8587
    @Override
8588
    public void clear() {
4555 mandeep.dh 8589
      this.success = null;
4496 mandeep.dh 8590
    }
8591
 
4555 mandeep.dh 8592
    public PurchaseOrder getSuccess() {
4496 mandeep.dh 8593
      return this.success;
8594
    }
8595
 
4555 mandeep.dh 8596
    public void setSuccess(PurchaseOrder success) {
4496 mandeep.dh 8597
      this.success = success;
8598
    }
8599
 
8600
    public void unsetSuccess() {
4555 mandeep.dh 8601
      this.success = null;
4496 mandeep.dh 8602
    }
8603
 
8604
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8605
    public boolean isSetSuccess() {
4555 mandeep.dh 8606
      return this.success != null;
4496 mandeep.dh 8607
    }
8608
 
8609
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 8610
      if (!value) {
8611
        this.success = null;
8612
      }
4496 mandeep.dh 8613
    }
8614
 
8615
    public void setFieldValue(_Fields field, Object value) {
8616
      switch (field) {
8617
      case SUCCESS:
8618
        if (value == null) {
8619
          unsetSuccess();
8620
        } else {
4555 mandeep.dh 8621
          setSuccess((PurchaseOrder)value);
4496 mandeep.dh 8622
        }
8623
        break;
8624
 
8625
      }
8626
    }
8627
 
8628
    public Object getFieldValue(_Fields field) {
8629
      switch (field) {
8630
      case SUCCESS:
4555 mandeep.dh 8631
        return getSuccess();
4496 mandeep.dh 8632
 
8633
      }
8634
      throw new IllegalStateException();
8635
    }
8636
 
8637
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8638
    public boolean isSet(_Fields field) {
8639
      if (field == null) {
8640
        throw new IllegalArgumentException();
8641
      }
8642
 
8643
      switch (field) {
8644
      case SUCCESS:
8645
        return isSetSuccess();
8646
      }
8647
      throw new IllegalStateException();
8648
    }
8649
 
8650
    @Override
8651
    public boolean equals(Object that) {
8652
      if (that == null)
8653
        return false;
4555 mandeep.dh 8654
      if (that instanceof getPurchaseOrderForPurchase_result)
8655
        return this.equals((getPurchaseOrderForPurchase_result)that);
4496 mandeep.dh 8656
      return false;
8657
    }
8658
 
4555 mandeep.dh 8659
    public boolean equals(getPurchaseOrderForPurchase_result that) {
4496 mandeep.dh 8660
      if (that == null)
8661
        return false;
8662
 
4555 mandeep.dh 8663
      boolean this_present_success = true && this.isSetSuccess();
8664
      boolean that_present_success = true && that.isSetSuccess();
4496 mandeep.dh 8665
      if (this_present_success || that_present_success) {
8666
        if (!(this_present_success && that_present_success))
8667
          return false;
4555 mandeep.dh 8668
        if (!this.success.equals(that.success))
4496 mandeep.dh 8669
          return false;
8670
      }
8671
 
8672
      return true;
8673
    }
8674
 
8675
    @Override
8676
    public int hashCode() {
8677
      return 0;
8678
    }
8679
 
4555 mandeep.dh 8680
    public int compareTo(getPurchaseOrderForPurchase_result other) {
4496 mandeep.dh 8681
      if (!getClass().equals(other.getClass())) {
8682
        return getClass().getName().compareTo(other.getClass().getName());
8683
      }
8684
 
8685
      int lastComparison = 0;
4555 mandeep.dh 8686
      getPurchaseOrderForPurchase_result typedOther = (getPurchaseOrderForPurchase_result)other;
4496 mandeep.dh 8687
 
8688
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8689
      if (lastComparison != 0) {
8690
        return lastComparison;
8691
      }
8692
      if (isSetSuccess()) {
8693
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8694
        if (lastComparison != 0) {
8695
          return lastComparison;
8696
        }
8697
      }
8698
      return 0;
8699
    }
8700
 
8701
    public _Fields fieldForId(int fieldId) {
8702
      return _Fields.findByThriftId(fieldId);
8703
    }
8704
 
8705
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8706
      org.apache.thrift.protocol.TField field;
8707
      iprot.readStructBegin();
8708
      while (true)
8709
      {
8710
        field = iprot.readFieldBegin();
8711
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8712
          break;
8713
        }
8714
        switch (field.id) {
8715
          case 0: // SUCCESS
4555 mandeep.dh 8716
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8717
              this.success = new PurchaseOrder();
8718
              this.success.read(iprot);
4496 mandeep.dh 8719
            } else { 
8720
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8721
            }
8722
            break;
8723
          default:
8724
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8725
        }
8726
        iprot.readFieldEnd();
8727
      }
8728
      iprot.readStructEnd();
8729
      validate();
8730
    }
8731
 
8732
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8733
      oprot.writeStructBegin(STRUCT_DESC);
8734
 
8735
      if (this.isSetSuccess()) {
8736
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 8737
        this.success.write(oprot);
4496 mandeep.dh 8738
        oprot.writeFieldEnd();
8739
      }
8740
      oprot.writeFieldStop();
8741
      oprot.writeStructEnd();
8742
    }
8743
 
8744
    @Override
8745
    public String toString() {
4555 mandeep.dh 8746
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_result(");
4496 mandeep.dh 8747
      boolean first = true;
8748
 
8749
      sb.append("success:");
4555 mandeep.dh 8750
      if (this.success == null) {
8751
        sb.append("null");
8752
      } else {
8753
        sb.append(this.success);
8754
      }
4496 mandeep.dh 8755
      first = false;
8756
      sb.append(")");
8757
      return sb.toString();
8758
    }
8759
 
8760
    public void validate() throws org.apache.thrift.TException {
8761
      // check for required fields
8762
    }
8763
 
8764
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8765
      try {
8766
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8767
      } catch (org.apache.thrift.TException te) {
8768
        throw new java.io.IOException(te);
8769
      }
8770
    }
8771
 
8772
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8773
      try {
8774
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8775
      } catch (org.apache.thrift.TException te) {
8776
        throw new java.io.IOException(te);
8777
      }
8778
    }
8779
 
8780
  }
8781
 
4754 mandeep.dh 8782
  public static class getPendingPurchaseOrders_args implements org.apache.thrift.TBase<getPendingPurchaseOrders_args, getPendingPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
8783
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_args");
8784
 
8785
    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);
8786
 
8787
    private long warehouseId; // required
8788
 
8789
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8790
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8791
      WAREHOUSE_ID((short)1, "warehouseId");
8792
 
8793
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8794
 
8795
      static {
8796
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8797
          byName.put(field.getFieldName(), field);
8798
        }
8799
      }
8800
 
8801
      /**
8802
       * Find the _Fields constant that matches fieldId, or null if its not found.
8803
       */
8804
      public static _Fields findByThriftId(int fieldId) {
8805
        switch(fieldId) {
8806
          case 1: // WAREHOUSE_ID
8807
            return WAREHOUSE_ID;
8808
          default:
8809
            return null;
8810
        }
8811
      }
8812
 
8813
      /**
8814
       * Find the _Fields constant that matches fieldId, throwing an exception
8815
       * if it is not found.
8816
       */
8817
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8818
        _Fields fields = findByThriftId(fieldId);
8819
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8820
        return fields;
8821
      }
8822
 
8823
      /**
8824
       * Find the _Fields constant that matches name, or null if its not found.
8825
       */
8826
      public static _Fields findByName(String name) {
8827
        return byName.get(name);
8828
      }
8829
 
8830
      private final short _thriftId;
8831
      private final String _fieldName;
8832
 
8833
      _Fields(short thriftId, String fieldName) {
8834
        _thriftId = thriftId;
8835
        _fieldName = fieldName;
8836
      }
8837
 
8838
      public short getThriftFieldId() {
8839
        return _thriftId;
8840
      }
8841
 
8842
      public String getFieldName() {
8843
        return _fieldName;
8844
      }
8845
    }
8846
 
8847
    // isset id assignments
8848
    private static final int __WAREHOUSEID_ISSET_ID = 0;
8849
    private BitSet __isset_bit_vector = new BitSet(1);
8850
 
8851
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8852
    static {
8853
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8854
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8855
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8856
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8857
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_args.class, metaDataMap);
8858
    }
8859
 
8860
    public getPendingPurchaseOrders_args() {
8861
    }
8862
 
8863
    public getPendingPurchaseOrders_args(
8864
      long warehouseId)
8865
    {
8866
      this();
8867
      this.warehouseId = warehouseId;
8868
      setWarehouseIdIsSet(true);
8869
    }
8870
 
8871
    /**
8872
     * Performs a deep copy on <i>other</i>.
8873
     */
8874
    public getPendingPurchaseOrders_args(getPendingPurchaseOrders_args other) {
8875
      __isset_bit_vector.clear();
8876
      __isset_bit_vector.or(other.__isset_bit_vector);
8877
      this.warehouseId = other.warehouseId;
8878
    }
8879
 
8880
    public getPendingPurchaseOrders_args deepCopy() {
8881
      return new getPendingPurchaseOrders_args(this);
8882
    }
8883
 
8884
    @Override
8885
    public void clear() {
8886
      setWarehouseIdIsSet(false);
8887
      this.warehouseId = 0;
8888
    }
8889
 
8890
    public long getWarehouseId() {
8891
      return this.warehouseId;
8892
    }
8893
 
8894
    public void setWarehouseId(long warehouseId) {
8895
      this.warehouseId = warehouseId;
8896
      setWarehouseIdIsSet(true);
8897
    }
8898
 
8899
    public void unsetWarehouseId() {
8900
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
8901
    }
8902
 
8903
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
8904
    public boolean isSetWarehouseId() {
8905
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
8906
    }
8907
 
8908
    public void setWarehouseIdIsSet(boolean value) {
8909
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
8910
    }
8911
 
8912
    public void setFieldValue(_Fields field, Object value) {
8913
      switch (field) {
8914
      case WAREHOUSE_ID:
8915
        if (value == null) {
8916
          unsetWarehouseId();
8917
        } else {
8918
          setWarehouseId((Long)value);
8919
        }
8920
        break;
8921
 
8922
      }
8923
    }
8924
 
8925
    public Object getFieldValue(_Fields field) {
8926
      switch (field) {
8927
      case WAREHOUSE_ID:
8928
        return Long.valueOf(getWarehouseId());
8929
 
8930
      }
8931
      throw new IllegalStateException();
8932
    }
8933
 
8934
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8935
    public boolean isSet(_Fields field) {
8936
      if (field == null) {
8937
        throw new IllegalArgumentException();
8938
      }
8939
 
8940
      switch (field) {
8941
      case WAREHOUSE_ID:
8942
        return isSetWarehouseId();
8943
      }
8944
      throw new IllegalStateException();
8945
    }
8946
 
8947
    @Override
8948
    public boolean equals(Object that) {
8949
      if (that == null)
8950
        return false;
8951
      if (that instanceof getPendingPurchaseOrders_args)
8952
        return this.equals((getPendingPurchaseOrders_args)that);
8953
      return false;
8954
    }
8955
 
8956
    public boolean equals(getPendingPurchaseOrders_args that) {
8957
      if (that == null)
8958
        return false;
8959
 
8960
      boolean this_present_warehouseId = true;
8961
      boolean that_present_warehouseId = true;
8962
      if (this_present_warehouseId || that_present_warehouseId) {
8963
        if (!(this_present_warehouseId && that_present_warehouseId))
8964
          return false;
8965
        if (this.warehouseId != that.warehouseId)
8966
          return false;
8967
      }
8968
 
8969
      return true;
8970
    }
8971
 
8972
    @Override
8973
    public int hashCode() {
8974
      return 0;
8975
    }
8976
 
8977
    public int compareTo(getPendingPurchaseOrders_args other) {
8978
      if (!getClass().equals(other.getClass())) {
8979
        return getClass().getName().compareTo(other.getClass().getName());
8980
      }
8981
 
8982
      int lastComparison = 0;
8983
      getPendingPurchaseOrders_args typedOther = (getPendingPurchaseOrders_args)other;
8984
 
8985
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
8986
      if (lastComparison != 0) {
8987
        return lastComparison;
8988
      }
8989
      if (isSetWarehouseId()) {
8990
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
8991
        if (lastComparison != 0) {
8992
          return lastComparison;
8993
        }
8994
      }
8995
      return 0;
8996
    }
8997
 
8998
    public _Fields fieldForId(int fieldId) {
8999
      return _Fields.findByThriftId(fieldId);
9000
    }
9001
 
9002
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9003
      org.apache.thrift.protocol.TField field;
9004
      iprot.readStructBegin();
9005
      while (true)
9006
      {
9007
        field = iprot.readFieldBegin();
9008
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9009
          break;
9010
        }
9011
        switch (field.id) {
9012
          case 1: // WAREHOUSE_ID
9013
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9014
              this.warehouseId = iprot.readI64();
9015
              setWarehouseIdIsSet(true);
9016
            } else { 
9017
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9018
            }
9019
            break;
9020
          default:
9021
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9022
        }
9023
        iprot.readFieldEnd();
9024
      }
9025
      iprot.readStructEnd();
9026
      validate();
9027
    }
9028
 
9029
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9030
      validate();
9031
 
9032
      oprot.writeStructBegin(STRUCT_DESC);
9033
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
9034
      oprot.writeI64(this.warehouseId);
9035
      oprot.writeFieldEnd();
9036
      oprot.writeFieldStop();
9037
      oprot.writeStructEnd();
9038
    }
9039
 
9040
    @Override
9041
    public String toString() {
9042
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_args(");
9043
      boolean first = true;
9044
 
9045
      sb.append("warehouseId:");
9046
      sb.append(this.warehouseId);
9047
      first = false;
9048
      sb.append(")");
9049
      return sb.toString();
9050
    }
9051
 
9052
    public void validate() throws org.apache.thrift.TException {
9053
      // check for required fields
9054
    }
9055
 
9056
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9057
      try {
9058
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9059
      } catch (org.apache.thrift.TException te) {
9060
        throw new java.io.IOException(te);
9061
      }
9062
    }
9063
 
9064
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9065
      try {
9066
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9067
        __isset_bit_vector = new BitSet(1);
9068
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9069
      } catch (org.apache.thrift.TException te) {
9070
        throw new java.io.IOException(te);
9071
      }
9072
    }
9073
 
9074
  }
9075
 
9076
  public static class getPendingPurchaseOrders_result implements org.apache.thrift.TBase<getPendingPurchaseOrders_result, getPendingPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
9077
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_result");
9078
 
9079
    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);
9080
    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);
9081
 
9082
    private List<PurchaseOrder> success; // required
9083
    private PurchaseServiceException e; // required
9084
 
9085
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9086
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9087
      SUCCESS((short)0, "success"),
9088
      E((short)1, "e");
9089
 
9090
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9091
 
9092
      static {
9093
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9094
          byName.put(field.getFieldName(), field);
9095
        }
9096
      }
9097
 
9098
      /**
9099
       * Find the _Fields constant that matches fieldId, or null if its not found.
9100
       */
9101
      public static _Fields findByThriftId(int fieldId) {
9102
        switch(fieldId) {
9103
          case 0: // SUCCESS
9104
            return SUCCESS;
9105
          case 1: // E
9106
            return E;
9107
          default:
9108
            return null;
9109
        }
9110
      }
9111
 
9112
      /**
9113
       * Find the _Fields constant that matches fieldId, throwing an exception
9114
       * if it is not found.
9115
       */
9116
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9117
        _Fields fields = findByThriftId(fieldId);
9118
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9119
        return fields;
9120
      }
9121
 
9122
      /**
9123
       * Find the _Fields constant that matches name, or null if its not found.
9124
       */
9125
      public static _Fields findByName(String name) {
9126
        return byName.get(name);
9127
      }
9128
 
9129
      private final short _thriftId;
9130
      private final String _fieldName;
9131
 
9132
      _Fields(short thriftId, String fieldName) {
9133
        _thriftId = thriftId;
9134
        _fieldName = fieldName;
9135
      }
9136
 
9137
      public short getThriftFieldId() {
9138
        return _thriftId;
9139
      }
9140
 
9141
      public String getFieldName() {
9142
        return _fieldName;
9143
      }
9144
    }
9145
 
9146
    // isset id assignments
9147
 
9148
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9149
    static {
9150
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9151
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9152
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
9153
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
9154
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9155
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9156
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9157
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_result.class, metaDataMap);
9158
    }
9159
 
9160
    public getPendingPurchaseOrders_result() {
9161
    }
9162
 
9163
    public getPendingPurchaseOrders_result(
9164
      List<PurchaseOrder> success,
9165
      PurchaseServiceException e)
9166
    {
9167
      this();
9168
      this.success = success;
9169
      this.e = e;
9170
    }
9171
 
9172
    /**
9173
     * Performs a deep copy on <i>other</i>.
9174
     */
9175
    public getPendingPurchaseOrders_result(getPendingPurchaseOrders_result other) {
9176
      if (other.isSetSuccess()) {
9177
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
9178
        for (PurchaseOrder other_element : other.success) {
9179
          __this__success.add(new PurchaseOrder(other_element));
9180
        }
9181
        this.success = __this__success;
9182
      }
9183
      if (other.isSetE()) {
9184
        this.e = new PurchaseServiceException(other.e);
9185
      }
9186
    }
9187
 
9188
    public getPendingPurchaseOrders_result deepCopy() {
9189
      return new getPendingPurchaseOrders_result(this);
9190
    }
9191
 
9192
    @Override
9193
    public void clear() {
9194
      this.success = null;
9195
      this.e = null;
9196
    }
9197
 
9198
    public int getSuccessSize() {
9199
      return (this.success == null) ? 0 : this.success.size();
9200
    }
9201
 
9202
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
9203
      return (this.success == null) ? null : this.success.iterator();
9204
    }
9205
 
9206
    public void addToSuccess(PurchaseOrder elem) {
9207
      if (this.success == null) {
9208
        this.success = new ArrayList<PurchaseOrder>();
9209
      }
9210
      this.success.add(elem);
9211
    }
9212
 
9213
    public List<PurchaseOrder> getSuccess() {
9214
      return this.success;
9215
    }
9216
 
9217
    public void setSuccess(List<PurchaseOrder> success) {
9218
      this.success = success;
9219
    }
9220
 
9221
    public void unsetSuccess() {
9222
      this.success = null;
9223
    }
9224
 
9225
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9226
    public boolean isSetSuccess() {
9227
      return this.success != null;
9228
    }
9229
 
9230
    public void setSuccessIsSet(boolean value) {
9231
      if (!value) {
9232
        this.success = null;
9233
      }
9234
    }
9235
 
9236
    public PurchaseServiceException getE() {
9237
      return this.e;
9238
    }
9239
 
9240
    public void setE(PurchaseServiceException e) {
9241
      this.e = e;
9242
    }
9243
 
9244
    public void unsetE() {
9245
      this.e = null;
9246
    }
9247
 
9248
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
9249
    public boolean isSetE() {
9250
      return this.e != null;
9251
    }
9252
 
9253
    public void setEIsSet(boolean value) {
9254
      if (!value) {
9255
        this.e = null;
9256
      }
9257
    }
9258
 
9259
    public void setFieldValue(_Fields field, Object value) {
9260
      switch (field) {
9261
      case SUCCESS:
9262
        if (value == null) {
9263
          unsetSuccess();
9264
        } else {
9265
          setSuccess((List<PurchaseOrder>)value);
9266
        }
9267
        break;
9268
 
9269
      case E:
9270
        if (value == null) {
9271
          unsetE();
9272
        } else {
9273
          setE((PurchaseServiceException)value);
9274
        }
9275
        break;
9276
 
9277
      }
9278
    }
9279
 
9280
    public Object getFieldValue(_Fields field) {
9281
      switch (field) {
9282
      case SUCCESS:
9283
        return getSuccess();
9284
 
9285
      case E:
9286
        return getE();
9287
 
9288
      }
9289
      throw new IllegalStateException();
9290
    }
9291
 
9292
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9293
    public boolean isSet(_Fields field) {
9294
      if (field == null) {
9295
        throw new IllegalArgumentException();
9296
      }
9297
 
9298
      switch (field) {
9299
      case SUCCESS:
9300
        return isSetSuccess();
9301
      case E:
9302
        return isSetE();
9303
      }
9304
      throw new IllegalStateException();
9305
    }
9306
 
9307
    @Override
9308
    public boolean equals(Object that) {
9309
      if (that == null)
9310
        return false;
9311
      if (that instanceof getPendingPurchaseOrders_result)
9312
        return this.equals((getPendingPurchaseOrders_result)that);
9313
      return false;
9314
    }
9315
 
9316
    public boolean equals(getPendingPurchaseOrders_result that) {
9317
      if (that == null)
9318
        return false;
9319
 
9320
      boolean this_present_success = true && this.isSetSuccess();
9321
      boolean that_present_success = true && that.isSetSuccess();
9322
      if (this_present_success || that_present_success) {
9323
        if (!(this_present_success && that_present_success))
9324
          return false;
9325
        if (!this.success.equals(that.success))
9326
          return false;
9327
      }
9328
 
9329
      boolean this_present_e = true && this.isSetE();
9330
      boolean that_present_e = true && that.isSetE();
9331
      if (this_present_e || that_present_e) {
9332
        if (!(this_present_e && that_present_e))
9333
          return false;
9334
        if (!this.e.equals(that.e))
9335
          return false;
9336
      }
9337
 
9338
      return true;
9339
    }
9340
 
9341
    @Override
9342
    public int hashCode() {
9343
      return 0;
9344
    }
9345
 
9346
    public int compareTo(getPendingPurchaseOrders_result other) {
9347
      if (!getClass().equals(other.getClass())) {
9348
        return getClass().getName().compareTo(other.getClass().getName());
9349
      }
9350
 
9351
      int lastComparison = 0;
9352
      getPendingPurchaseOrders_result typedOther = (getPendingPurchaseOrders_result)other;
9353
 
9354
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9355
      if (lastComparison != 0) {
9356
        return lastComparison;
9357
      }
9358
      if (isSetSuccess()) {
9359
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9360
        if (lastComparison != 0) {
9361
          return lastComparison;
9362
        }
9363
      }
9364
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
9365
      if (lastComparison != 0) {
9366
        return lastComparison;
9367
      }
9368
      if (isSetE()) {
9369
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
9370
        if (lastComparison != 0) {
9371
          return lastComparison;
9372
        }
9373
      }
9374
      return 0;
9375
    }
9376
 
9377
    public _Fields fieldForId(int fieldId) {
9378
      return _Fields.findByThriftId(fieldId);
9379
    }
9380
 
9381
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9382
      org.apache.thrift.protocol.TField field;
9383
      iprot.readStructBegin();
9384
      while (true)
9385
      {
9386
        field = iprot.readFieldBegin();
9387
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9388
          break;
9389
        }
9390
        switch (field.id) {
9391
          case 0: // SUCCESS
9392
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
9393
              {
6385 amar.kumar 9394
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
9395
                this.success = new ArrayList<PurchaseOrder>(_list16.size);
9396
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
4754 mandeep.dh 9397
                {
6385 amar.kumar 9398
                  PurchaseOrder _elem18; // required
9399
                  _elem18 = new PurchaseOrder();
9400
                  _elem18.read(iprot);
9401
                  this.success.add(_elem18);
4754 mandeep.dh 9402
                }
9403
                iprot.readListEnd();
9404
              }
9405
            } else { 
9406
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9407
            }
9408
            break;
9409
          case 1: // E
9410
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9411
              this.e = new PurchaseServiceException();
9412
              this.e.read(iprot);
9413
            } else { 
9414
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9415
            }
9416
            break;
9417
          default:
9418
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9419
        }
9420
        iprot.readFieldEnd();
9421
      }
9422
      iprot.readStructEnd();
9423
      validate();
9424
    }
9425
 
9426
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9427
      oprot.writeStructBegin(STRUCT_DESC);
9428
 
9429
      if (this.isSetSuccess()) {
9430
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9431
        {
9432
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 9433
          for (PurchaseOrder _iter19 : this.success)
4754 mandeep.dh 9434
          {
6385 amar.kumar 9435
            _iter19.write(oprot);
4754 mandeep.dh 9436
          }
9437
          oprot.writeListEnd();
9438
        }
9439
        oprot.writeFieldEnd();
9440
      } else if (this.isSetE()) {
9441
        oprot.writeFieldBegin(E_FIELD_DESC);
9442
        this.e.write(oprot);
9443
        oprot.writeFieldEnd();
9444
      }
9445
      oprot.writeFieldStop();
9446
      oprot.writeStructEnd();
9447
    }
9448
 
9449
    @Override
9450
    public String toString() {
9451
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_result(");
9452
      boolean first = true;
9453
 
9454
      sb.append("success:");
9455
      if (this.success == null) {
9456
        sb.append("null");
9457
      } else {
9458
        sb.append(this.success);
9459
      }
9460
      first = false;
9461
      if (!first) sb.append(", ");
9462
      sb.append("e:");
9463
      if (this.e == null) {
9464
        sb.append("null");
9465
      } else {
9466
        sb.append(this.e);
9467
      }
9468
      first = false;
9469
      sb.append(")");
9470
      return sb.toString();
9471
    }
9472
 
9473
    public void validate() throws org.apache.thrift.TException {
9474
      // check for required fields
9475
    }
9476
 
9477
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9478
      try {
9479
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9480
      } catch (org.apache.thrift.TException te) {
9481
        throw new java.io.IOException(te);
9482
      }
9483
    }
9484
 
9485
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9486
      try {
9487
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9488
      } catch (org.apache.thrift.TException te) {
9489
        throw new java.io.IOException(te);
9490
      }
9491
    }
9492
 
9493
  }
9494
 
9495
  public static class getSuppliers_args implements org.apache.thrift.TBase<getSuppliers_args, getSuppliers_args._Fields>, java.io.Serializable, Cloneable   {
9496
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_args");
9497
 
9498
 
9499
 
9500
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9501
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9502
;
9503
 
9504
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9505
 
9506
      static {
9507
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9508
          byName.put(field.getFieldName(), field);
9509
        }
9510
      }
9511
 
9512
      /**
9513
       * Find the _Fields constant that matches fieldId, or null if its not found.
9514
       */
9515
      public static _Fields findByThriftId(int fieldId) {
9516
        switch(fieldId) {
9517
          default:
9518
            return null;
9519
        }
9520
      }
9521
 
9522
      /**
9523
       * Find the _Fields constant that matches fieldId, throwing an exception
9524
       * if it is not found.
9525
       */
9526
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9527
        _Fields fields = findByThriftId(fieldId);
9528
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9529
        return fields;
9530
      }
9531
 
9532
      /**
9533
       * Find the _Fields constant that matches name, or null if its not found.
9534
       */
9535
      public static _Fields findByName(String name) {
9536
        return byName.get(name);
9537
      }
9538
 
9539
      private final short _thriftId;
9540
      private final String _fieldName;
9541
 
9542
      _Fields(short thriftId, String fieldName) {
9543
        _thriftId = thriftId;
9544
        _fieldName = fieldName;
9545
      }
9546
 
9547
      public short getThriftFieldId() {
9548
        return _thriftId;
9549
      }
9550
 
9551
      public String getFieldName() {
9552
        return _fieldName;
9553
      }
9554
    }
9555
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9556
    static {
9557
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9558
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9559
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_args.class, metaDataMap);
9560
    }
9561
 
9562
    public getSuppliers_args() {
9563
    }
9564
 
9565
    /**
9566
     * Performs a deep copy on <i>other</i>.
9567
     */
9568
    public getSuppliers_args(getSuppliers_args other) {
9569
    }
9570
 
9571
    public getSuppliers_args deepCopy() {
9572
      return new getSuppliers_args(this);
9573
    }
9574
 
9575
    @Override
9576
    public void clear() {
9577
    }
9578
 
9579
    public void setFieldValue(_Fields field, Object value) {
9580
      switch (field) {
9581
      }
9582
    }
9583
 
9584
    public Object getFieldValue(_Fields field) {
9585
      switch (field) {
9586
      }
9587
      throw new IllegalStateException();
9588
    }
9589
 
9590
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9591
    public boolean isSet(_Fields field) {
9592
      if (field == null) {
9593
        throw new IllegalArgumentException();
9594
      }
9595
 
9596
      switch (field) {
9597
      }
9598
      throw new IllegalStateException();
9599
    }
9600
 
9601
    @Override
9602
    public boolean equals(Object that) {
9603
      if (that == null)
9604
        return false;
9605
      if (that instanceof getSuppliers_args)
9606
        return this.equals((getSuppliers_args)that);
9607
      return false;
9608
    }
9609
 
9610
    public boolean equals(getSuppliers_args that) {
9611
      if (that == null)
9612
        return false;
9613
 
9614
      return true;
9615
    }
9616
 
9617
    @Override
9618
    public int hashCode() {
9619
      return 0;
9620
    }
9621
 
9622
    public int compareTo(getSuppliers_args other) {
9623
      if (!getClass().equals(other.getClass())) {
9624
        return getClass().getName().compareTo(other.getClass().getName());
9625
      }
9626
 
9627
      int lastComparison = 0;
9628
      getSuppliers_args typedOther = (getSuppliers_args)other;
9629
 
9630
      return 0;
9631
    }
9632
 
9633
    public _Fields fieldForId(int fieldId) {
9634
      return _Fields.findByThriftId(fieldId);
9635
    }
9636
 
9637
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9638
      org.apache.thrift.protocol.TField field;
9639
      iprot.readStructBegin();
9640
      while (true)
9641
      {
9642
        field = iprot.readFieldBegin();
9643
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9644
          break;
9645
        }
9646
        switch (field.id) {
9647
          default:
9648
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9649
        }
9650
        iprot.readFieldEnd();
9651
      }
9652
      iprot.readStructEnd();
9653
      validate();
9654
    }
9655
 
9656
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9657
      validate();
9658
 
9659
      oprot.writeStructBegin(STRUCT_DESC);
9660
      oprot.writeFieldStop();
9661
      oprot.writeStructEnd();
9662
    }
9663
 
9664
    @Override
9665
    public String toString() {
9666
      StringBuilder sb = new StringBuilder("getSuppliers_args(");
9667
      boolean first = true;
9668
 
9669
      sb.append(")");
9670
      return sb.toString();
9671
    }
9672
 
9673
    public void validate() throws org.apache.thrift.TException {
9674
      // check for required fields
9675
    }
9676
 
9677
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9678
      try {
9679
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9680
      } catch (org.apache.thrift.TException te) {
9681
        throw new java.io.IOException(te);
9682
      }
9683
    }
9684
 
9685
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9686
      try {
9687
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9688
      } catch (org.apache.thrift.TException te) {
9689
        throw new java.io.IOException(te);
9690
      }
9691
    }
9692
 
9693
  }
9694
 
9695
  public static class getSuppliers_result implements org.apache.thrift.TBase<getSuppliers_result, getSuppliers_result._Fields>, java.io.Serializable, Cloneable   {
9696
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_result");
9697
 
9698
    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);
9699
    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);
9700
 
9701
    private List<Supplier> success; // required
9702
    private PurchaseServiceException e; // required
9703
 
9704
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9705
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9706
      SUCCESS((short)0, "success"),
9707
      E((short)1, "e");
9708
 
9709
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9710
 
9711
      static {
9712
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9713
          byName.put(field.getFieldName(), field);
9714
        }
9715
      }
9716
 
9717
      /**
9718
       * Find the _Fields constant that matches fieldId, or null if its not found.
9719
       */
9720
      public static _Fields findByThriftId(int fieldId) {
9721
        switch(fieldId) {
9722
          case 0: // SUCCESS
9723
            return SUCCESS;
9724
          case 1: // E
9725
            return E;
9726
          default:
9727
            return null;
9728
        }
9729
      }
9730
 
9731
      /**
9732
       * Find the _Fields constant that matches fieldId, throwing an exception
9733
       * if it is not found.
9734
       */
9735
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9736
        _Fields fields = findByThriftId(fieldId);
9737
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9738
        return fields;
9739
      }
9740
 
9741
      /**
9742
       * Find the _Fields constant that matches name, or null if its not found.
9743
       */
9744
      public static _Fields findByName(String name) {
9745
        return byName.get(name);
9746
      }
9747
 
9748
      private final short _thriftId;
9749
      private final String _fieldName;
9750
 
9751
      _Fields(short thriftId, String fieldName) {
9752
        _thriftId = thriftId;
9753
        _fieldName = fieldName;
9754
      }
9755
 
9756
      public short getThriftFieldId() {
9757
        return _thriftId;
9758
      }
9759
 
9760
      public String getFieldName() {
9761
        return _fieldName;
9762
      }
9763
    }
9764
 
9765
    // isset id assignments
9766
 
9767
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9768
    static {
9769
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9770
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9771
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
9772
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class))));
9773
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9774
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9775
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9776
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_result.class, metaDataMap);
9777
    }
9778
 
9779
    public getSuppliers_result() {
9780
    }
9781
 
9782
    public getSuppliers_result(
9783
      List<Supplier> success,
9784
      PurchaseServiceException e)
9785
    {
9786
      this();
9787
      this.success = success;
9788
      this.e = e;
9789
    }
9790
 
9791
    /**
9792
     * Performs a deep copy on <i>other</i>.
9793
     */
9794
    public getSuppliers_result(getSuppliers_result other) {
9795
      if (other.isSetSuccess()) {
9796
        List<Supplier> __this__success = new ArrayList<Supplier>();
9797
        for (Supplier other_element : other.success) {
9798
          __this__success.add(new Supplier(other_element));
9799
        }
9800
        this.success = __this__success;
9801
      }
9802
      if (other.isSetE()) {
9803
        this.e = new PurchaseServiceException(other.e);
9804
      }
9805
    }
9806
 
9807
    public getSuppliers_result deepCopy() {
9808
      return new getSuppliers_result(this);
9809
    }
9810
 
9811
    @Override
9812
    public void clear() {
9813
      this.success = null;
9814
      this.e = null;
9815
    }
9816
 
9817
    public int getSuccessSize() {
9818
      return (this.success == null) ? 0 : this.success.size();
9819
    }
9820
 
9821
    public java.util.Iterator<Supplier> getSuccessIterator() {
9822
      return (this.success == null) ? null : this.success.iterator();
9823
    }
9824
 
9825
    public void addToSuccess(Supplier elem) {
9826
      if (this.success == null) {
9827
        this.success = new ArrayList<Supplier>();
9828
      }
9829
      this.success.add(elem);
9830
    }
9831
 
9832
    public List<Supplier> getSuccess() {
9833
      return this.success;
9834
    }
9835
 
9836
    public void setSuccess(List<Supplier> success) {
9837
      this.success = success;
9838
    }
9839
 
9840
    public void unsetSuccess() {
9841
      this.success = null;
9842
    }
9843
 
9844
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9845
    public boolean isSetSuccess() {
9846
      return this.success != null;
9847
    }
9848
 
9849
    public void setSuccessIsSet(boolean value) {
9850
      if (!value) {
9851
        this.success = null;
9852
      }
9853
    }
9854
 
9855
    public PurchaseServiceException getE() {
9856
      return this.e;
9857
    }
9858
 
9859
    public void setE(PurchaseServiceException e) {
9860
      this.e = e;
9861
    }
9862
 
9863
    public void unsetE() {
9864
      this.e = null;
9865
    }
9866
 
9867
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
9868
    public boolean isSetE() {
9869
      return this.e != null;
9870
    }
9871
 
9872
    public void setEIsSet(boolean value) {
9873
      if (!value) {
9874
        this.e = null;
9875
      }
9876
    }
9877
 
9878
    public void setFieldValue(_Fields field, Object value) {
9879
      switch (field) {
9880
      case SUCCESS:
9881
        if (value == null) {
9882
          unsetSuccess();
9883
        } else {
9884
          setSuccess((List<Supplier>)value);
9885
        }
9886
        break;
9887
 
9888
      case E:
9889
        if (value == null) {
9890
          unsetE();
9891
        } else {
9892
          setE((PurchaseServiceException)value);
9893
        }
9894
        break;
9895
 
9896
      }
9897
    }
9898
 
9899
    public Object getFieldValue(_Fields field) {
9900
      switch (field) {
9901
      case SUCCESS:
9902
        return getSuccess();
9903
 
9904
      case E:
9905
        return getE();
9906
 
9907
      }
9908
      throw new IllegalStateException();
9909
    }
9910
 
9911
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9912
    public boolean isSet(_Fields field) {
9913
      if (field == null) {
9914
        throw new IllegalArgumentException();
9915
      }
9916
 
9917
      switch (field) {
9918
      case SUCCESS:
9919
        return isSetSuccess();
9920
      case E:
9921
        return isSetE();
9922
      }
9923
      throw new IllegalStateException();
9924
    }
9925
 
9926
    @Override
9927
    public boolean equals(Object that) {
9928
      if (that == null)
9929
        return false;
9930
      if (that instanceof getSuppliers_result)
9931
        return this.equals((getSuppliers_result)that);
9932
      return false;
9933
    }
9934
 
9935
    public boolean equals(getSuppliers_result that) {
9936
      if (that == null)
9937
        return false;
9938
 
9939
      boolean this_present_success = true && this.isSetSuccess();
9940
      boolean that_present_success = true && that.isSetSuccess();
9941
      if (this_present_success || that_present_success) {
9942
        if (!(this_present_success && that_present_success))
9943
          return false;
9944
        if (!this.success.equals(that.success))
9945
          return false;
9946
      }
9947
 
9948
      boolean this_present_e = true && this.isSetE();
9949
      boolean that_present_e = true && that.isSetE();
9950
      if (this_present_e || that_present_e) {
9951
        if (!(this_present_e && that_present_e))
9952
          return false;
9953
        if (!this.e.equals(that.e))
9954
          return false;
9955
      }
9956
 
9957
      return true;
9958
    }
9959
 
9960
    @Override
9961
    public int hashCode() {
9962
      return 0;
9963
    }
9964
 
9965
    public int compareTo(getSuppliers_result other) {
9966
      if (!getClass().equals(other.getClass())) {
9967
        return getClass().getName().compareTo(other.getClass().getName());
9968
      }
9969
 
9970
      int lastComparison = 0;
9971
      getSuppliers_result typedOther = (getSuppliers_result)other;
9972
 
9973
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9974
      if (lastComparison != 0) {
9975
        return lastComparison;
9976
      }
9977
      if (isSetSuccess()) {
9978
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9979
        if (lastComparison != 0) {
9980
          return lastComparison;
9981
        }
9982
      }
9983
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
9984
      if (lastComparison != 0) {
9985
        return lastComparison;
9986
      }
9987
      if (isSetE()) {
9988
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
9989
        if (lastComparison != 0) {
9990
          return lastComparison;
9991
        }
9992
      }
9993
      return 0;
9994
    }
9995
 
9996
    public _Fields fieldForId(int fieldId) {
9997
      return _Fields.findByThriftId(fieldId);
9998
    }
9999
 
10000
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10001
      org.apache.thrift.protocol.TField field;
10002
      iprot.readStructBegin();
10003
      while (true)
10004
      {
10005
        field = iprot.readFieldBegin();
10006
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10007
          break;
10008
        }
10009
        switch (field.id) {
10010
          case 0: // SUCCESS
10011
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
10012
              {
6385 amar.kumar 10013
                org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
10014
                this.success = new ArrayList<Supplier>(_list20.size);
10015
                for (int _i21 = 0; _i21 < _list20.size; ++_i21)
4754 mandeep.dh 10016
                {
6385 amar.kumar 10017
                  Supplier _elem22; // required
10018
                  _elem22 = new Supplier();
10019
                  _elem22.read(iprot);
10020
                  this.success.add(_elem22);
4754 mandeep.dh 10021
                }
10022
                iprot.readListEnd();
10023
              }
10024
            } else { 
10025
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10026
            }
10027
            break;
10028
          case 1: // E
10029
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10030
              this.e = new PurchaseServiceException();
10031
              this.e.read(iprot);
10032
            } else { 
10033
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10034
            }
10035
            break;
10036
          default:
10037
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10038
        }
10039
        iprot.readFieldEnd();
10040
      }
10041
      iprot.readStructEnd();
10042
      validate();
10043
    }
10044
 
10045
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10046
      oprot.writeStructBegin(STRUCT_DESC);
10047
 
10048
      if (this.isSetSuccess()) {
10049
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10050
        {
10051
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 10052
          for (Supplier _iter23 : this.success)
4754 mandeep.dh 10053
          {
6385 amar.kumar 10054
            _iter23.write(oprot);
4754 mandeep.dh 10055
          }
10056
          oprot.writeListEnd();
10057
        }
10058
        oprot.writeFieldEnd();
10059
      } else if (this.isSetE()) {
10060
        oprot.writeFieldBegin(E_FIELD_DESC);
10061
        this.e.write(oprot);
10062
        oprot.writeFieldEnd();
10063
      }
10064
      oprot.writeFieldStop();
10065
      oprot.writeStructEnd();
10066
    }
10067
 
10068
    @Override
10069
    public String toString() {
10070
      StringBuilder sb = new StringBuilder("getSuppliers_result(");
10071
      boolean first = true;
10072
 
10073
      sb.append("success:");
10074
      if (this.success == null) {
10075
        sb.append("null");
10076
      } else {
10077
        sb.append(this.success);
10078
      }
10079
      first = false;
10080
      if (!first) sb.append(", ");
10081
      sb.append("e:");
10082
      if (this.e == null) {
10083
        sb.append("null");
10084
      } else {
10085
        sb.append(this.e);
10086
      }
10087
      first = false;
10088
      sb.append(")");
10089
      return sb.toString();
10090
    }
10091
 
10092
    public void validate() throws org.apache.thrift.TException {
10093
      // check for required fields
10094
    }
10095
 
10096
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10097
      try {
10098
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10099
      } catch (org.apache.thrift.TException te) {
10100
        throw new java.io.IOException(te);
10101
      }
10102
    }
10103
 
10104
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10105
      try {
10106
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10107
      } catch (org.apache.thrift.TException te) {
10108
        throw new java.io.IOException(te);
10109
      }
10110
    }
10111
 
10112
  }
10113
 
10114
  public static class fulfillPO_args implements org.apache.thrift.TBase<fulfillPO_args, fulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
10115
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_args");
10116
 
10117
    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);
10118
    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);
10119
    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);
10120
 
10121
    private long purchaseOrderId; // required
10122
    private long itemId; // required
10123
    private long quantity; // required
10124
 
10125
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10126
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10127
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
10128
      ITEM_ID((short)2, "itemId"),
10129
      QUANTITY((short)3, "quantity");
10130
 
10131
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10132
 
10133
      static {
10134
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10135
          byName.put(field.getFieldName(), field);
10136
        }
10137
      }
10138
 
10139
      /**
10140
       * Find the _Fields constant that matches fieldId, or null if its not found.
10141
       */
10142
      public static _Fields findByThriftId(int fieldId) {
10143
        switch(fieldId) {
10144
          case 1: // PURCHASE_ORDER_ID
10145
            return PURCHASE_ORDER_ID;
10146
          case 2: // ITEM_ID
10147
            return ITEM_ID;
10148
          case 3: // QUANTITY
10149
            return QUANTITY;
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
 
10189
    // isset id assignments
10190
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
10191
    private static final int __ITEMID_ISSET_ID = 1;
10192
    private static final int __QUANTITY_ISSET_ID = 2;
10193
    private BitSet __isset_bit_vector = new BitSet(3);
10194
 
10195
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10196
    static {
10197
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10198
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10199
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10200
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10201
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10202
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10203
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10204
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10205
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_args.class, metaDataMap);
10206
    }
10207
 
10208
    public fulfillPO_args() {
10209
    }
10210
 
10211
    public fulfillPO_args(
10212
      long purchaseOrderId,
10213
      long itemId,
10214
      long quantity)
10215
    {
10216
      this();
10217
      this.purchaseOrderId = purchaseOrderId;
10218
      setPurchaseOrderIdIsSet(true);
10219
      this.itemId = itemId;
10220
      setItemIdIsSet(true);
10221
      this.quantity = quantity;
10222
      setQuantityIsSet(true);
10223
    }
10224
 
10225
    /**
10226
     * Performs a deep copy on <i>other</i>.
10227
     */
10228
    public fulfillPO_args(fulfillPO_args other) {
10229
      __isset_bit_vector.clear();
10230
      __isset_bit_vector.or(other.__isset_bit_vector);
10231
      this.purchaseOrderId = other.purchaseOrderId;
10232
      this.itemId = other.itemId;
10233
      this.quantity = other.quantity;
10234
    }
10235
 
10236
    public fulfillPO_args deepCopy() {
10237
      return new fulfillPO_args(this);
10238
    }
10239
 
10240
    @Override
10241
    public void clear() {
10242
      setPurchaseOrderIdIsSet(false);
10243
      this.purchaseOrderId = 0;
10244
      setItemIdIsSet(false);
10245
      this.itemId = 0;
10246
      setQuantityIsSet(false);
10247
      this.quantity = 0;
10248
    }
10249
 
10250
    public long getPurchaseOrderId() {
10251
      return this.purchaseOrderId;
10252
    }
10253
 
10254
    public void setPurchaseOrderId(long purchaseOrderId) {
10255
      this.purchaseOrderId = purchaseOrderId;
10256
      setPurchaseOrderIdIsSet(true);
10257
    }
10258
 
10259
    public void unsetPurchaseOrderId() {
10260
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
10261
    }
10262
 
10263
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
10264
    public boolean isSetPurchaseOrderId() {
10265
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
10266
    }
10267
 
10268
    public void setPurchaseOrderIdIsSet(boolean value) {
10269
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
10270
    }
10271
 
10272
    public long getItemId() {
10273
      return this.itemId;
10274
    }
10275
 
10276
    public void setItemId(long itemId) {
10277
      this.itemId = itemId;
10278
      setItemIdIsSet(true);
10279
    }
10280
 
10281
    public void unsetItemId() {
10282
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
10283
    }
10284
 
10285
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
10286
    public boolean isSetItemId() {
10287
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
10288
    }
10289
 
10290
    public void setItemIdIsSet(boolean value) {
10291
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
10292
    }
10293
 
10294
    public long getQuantity() {
10295
      return this.quantity;
10296
    }
10297
 
10298
    public void setQuantity(long quantity) {
10299
      this.quantity = quantity;
10300
      setQuantityIsSet(true);
10301
    }
10302
 
10303
    public void unsetQuantity() {
10304
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
10305
    }
10306
 
10307
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
10308
    public boolean isSetQuantity() {
10309
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
10310
    }
10311
 
10312
    public void setQuantityIsSet(boolean value) {
10313
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
10314
    }
10315
 
10316
    public void setFieldValue(_Fields field, Object value) {
10317
      switch (field) {
10318
      case PURCHASE_ORDER_ID:
10319
        if (value == null) {
10320
          unsetPurchaseOrderId();
10321
        } else {
10322
          setPurchaseOrderId((Long)value);
10323
        }
10324
        break;
10325
 
10326
      case ITEM_ID:
10327
        if (value == null) {
10328
          unsetItemId();
10329
        } else {
10330
          setItemId((Long)value);
10331
        }
10332
        break;
10333
 
10334
      case QUANTITY:
10335
        if (value == null) {
10336
          unsetQuantity();
10337
        } else {
10338
          setQuantity((Long)value);
10339
        }
10340
        break;
10341
 
10342
      }
10343
    }
10344
 
10345
    public Object getFieldValue(_Fields field) {
10346
      switch (field) {
10347
      case PURCHASE_ORDER_ID:
10348
        return Long.valueOf(getPurchaseOrderId());
10349
 
10350
      case ITEM_ID:
10351
        return Long.valueOf(getItemId());
10352
 
10353
      case QUANTITY:
10354
        return Long.valueOf(getQuantity());
10355
 
10356
      }
10357
      throw new IllegalStateException();
10358
    }
10359
 
10360
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10361
    public boolean isSet(_Fields field) {
10362
      if (field == null) {
10363
        throw new IllegalArgumentException();
10364
      }
10365
 
10366
      switch (field) {
10367
      case PURCHASE_ORDER_ID:
10368
        return isSetPurchaseOrderId();
10369
      case ITEM_ID:
10370
        return isSetItemId();
10371
      case QUANTITY:
10372
        return isSetQuantity();
10373
      }
10374
      throw new IllegalStateException();
10375
    }
10376
 
10377
    @Override
10378
    public boolean equals(Object that) {
10379
      if (that == null)
10380
        return false;
10381
      if (that instanceof fulfillPO_args)
10382
        return this.equals((fulfillPO_args)that);
10383
      return false;
10384
    }
10385
 
10386
    public boolean equals(fulfillPO_args that) {
10387
      if (that == null)
10388
        return false;
10389
 
10390
      boolean this_present_purchaseOrderId = true;
10391
      boolean that_present_purchaseOrderId = true;
10392
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
10393
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
10394
          return false;
10395
        if (this.purchaseOrderId != that.purchaseOrderId)
10396
          return false;
10397
      }
10398
 
10399
      boolean this_present_itemId = true;
10400
      boolean that_present_itemId = true;
10401
      if (this_present_itemId || that_present_itemId) {
10402
        if (!(this_present_itemId && that_present_itemId))
10403
          return false;
10404
        if (this.itemId != that.itemId)
10405
          return false;
10406
      }
10407
 
10408
      boolean this_present_quantity = true;
10409
      boolean that_present_quantity = true;
10410
      if (this_present_quantity || that_present_quantity) {
10411
        if (!(this_present_quantity && that_present_quantity))
10412
          return false;
10413
        if (this.quantity != that.quantity)
10414
          return false;
10415
      }
10416
 
10417
      return true;
10418
    }
10419
 
10420
    @Override
10421
    public int hashCode() {
10422
      return 0;
10423
    }
10424
 
10425
    public int compareTo(fulfillPO_args other) {
10426
      if (!getClass().equals(other.getClass())) {
10427
        return getClass().getName().compareTo(other.getClass().getName());
10428
      }
10429
 
10430
      int lastComparison = 0;
10431
      fulfillPO_args typedOther = (fulfillPO_args)other;
10432
 
10433
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
10434
      if (lastComparison != 0) {
10435
        return lastComparison;
10436
      }
10437
      if (isSetPurchaseOrderId()) {
10438
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
10439
        if (lastComparison != 0) {
10440
          return lastComparison;
10441
        }
10442
      }
10443
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
10444
      if (lastComparison != 0) {
10445
        return lastComparison;
10446
      }
10447
      if (isSetItemId()) {
10448
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
10449
        if (lastComparison != 0) {
10450
          return lastComparison;
10451
        }
10452
      }
10453
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
10454
      if (lastComparison != 0) {
10455
        return lastComparison;
10456
      }
10457
      if (isSetQuantity()) {
10458
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
10459
        if (lastComparison != 0) {
10460
          return lastComparison;
10461
        }
10462
      }
10463
      return 0;
10464
    }
10465
 
10466
    public _Fields fieldForId(int fieldId) {
10467
      return _Fields.findByThriftId(fieldId);
10468
    }
10469
 
10470
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10471
      org.apache.thrift.protocol.TField field;
10472
      iprot.readStructBegin();
10473
      while (true)
10474
      {
10475
        field = iprot.readFieldBegin();
10476
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10477
          break;
10478
        }
10479
        switch (field.id) {
10480
          case 1: // PURCHASE_ORDER_ID
10481
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10482
              this.purchaseOrderId = iprot.readI64();
10483
              setPurchaseOrderIdIsSet(true);
10484
            } else { 
10485
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10486
            }
10487
            break;
10488
          case 2: // ITEM_ID
10489
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10490
              this.itemId = iprot.readI64();
10491
              setItemIdIsSet(true);
10492
            } else { 
10493
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10494
            }
10495
            break;
10496
          case 3: // QUANTITY
10497
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10498
              this.quantity = iprot.readI64();
10499
              setQuantityIsSet(true);
10500
            } else { 
10501
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10502
            }
10503
            break;
10504
          default:
10505
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10506
        }
10507
        iprot.readFieldEnd();
10508
      }
10509
      iprot.readStructEnd();
10510
      validate();
10511
    }
10512
 
10513
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10514
      validate();
10515
 
10516
      oprot.writeStructBegin(STRUCT_DESC);
10517
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
10518
      oprot.writeI64(this.purchaseOrderId);
10519
      oprot.writeFieldEnd();
10520
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
10521
      oprot.writeI64(this.itemId);
10522
      oprot.writeFieldEnd();
10523
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
10524
      oprot.writeI64(this.quantity);
10525
      oprot.writeFieldEnd();
10526
      oprot.writeFieldStop();
10527
      oprot.writeStructEnd();
10528
    }
10529
 
10530
    @Override
10531
    public String toString() {
10532
      StringBuilder sb = new StringBuilder("fulfillPO_args(");
10533
      boolean first = true;
10534
 
10535
      sb.append("purchaseOrderId:");
10536
      sb.append(this.purchaseOrderId);
10537
      first = false;
10538
      if (!first) sb.append(", ");
10539
      sb.append("itemId:");
10540
      sb.append(this.itemId);
10541
      first = false;
10542
      if (!first) sb.append(", ");
10543
      sb.append("quantity:");
10544
      sb.append(this.quantity);
10545
      first = false;
10546
      sb.append(")");
10547
      return sb.toString();
10548
    }
10549
 
10550
    public void validate() throws org.apache.thrift.TException {
10551
      // check for required fields
10552
    }
10553
 
10554
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10555
      try {
10556
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10557
      } catch (org.apache.thrift.TException te) {
10558
        throw new java.io.IOException(te);
10559
      }
10560
    }
10561
 
10562
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10563
      try {
10564
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
10565
        __isset_bit_vector = new BitSet(1);
10566
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10567
      } catch (org.apache.thrift.TException te) {
10568
        throw new java.io.IOException(te);
10569
      }
10570
    }
10571
 
10572
  }
10573
 
10574
  public static class fulfillPO_result implements org.apache.thrift.TBase<fulfillPO_result, fulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
10575
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_result");
10576
 
10577
    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);
10578
 
10579
    private PurchaseServiceException e; // required
10580
 
10581
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10582
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10583
      E((short)1, "e");
10584
 
10585
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10586
 
10587
      static {
10588
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10589
          byName.put(field.getFieldName(), field);
10590
        }
10591
      }
10592
 
10593
      /**
10594
       * Find the _Fields constant that matches fieldId, or null if its not found.
10595
       */
10596
      public static _Fields findByThriftId(int fieldId) {
10597
        switch(fieldId) {
10598
          case 1: // E
10599
            return E;
10600
          default:
10601
            return null;
10602
        }
10603
      }
10604
 
10605
      /**
10606
       * Find the _Fields constant that matches fieldId, throwing an exception
10607
       * if it is not found.
10608
       */
10609
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10610
        _Fields fields = findByThriftId(fieldId);
10611
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10612
        return fields;
10613
      }
10614
 
10615
      /**
10616
       * Find the _Fields constant that matches name, or null if its not found.
10617
       */
10618
      public static _Fields findByName(String name) {
10619
        return byName.get(name);
10620
      }
10621
 
10622
      private final short _thriftId;
10623
      private final String _fieldName;
10624
 
10625
      _Fields(short thriftId, String fieldName) {
10626
        _thriftId = thriftId;
10627
        _fieldName = fieldName;
10628
      }
10629
 
10630
      public short getThriftFieldId() {
10631
        return _thriftId;
10632
      }
10633
 
10634
      public String getFieldName() {
10635
        return _fieldName;
10636
      }
10637
    }
10638
 
10639
    // isset id assignments
10640
 
10641
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10642
    static {
10643
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10644
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10645
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
10646
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10647
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_result.class, metaDataMap);
10648
    }
10649
 
10650
    public fulfillPO_result() {
10651
    }
10652
 
10653
    public fulfillPO_result(
10654
      PurchaseServiceException e)
10655
    {
10656
      this();
10657
      this.e = e;
10658
    }
10659
 
10660
    /**
10661
     * Performs a deep copy on <i>other</i>.
10662
     */
10663
    public fulfillPO_result(fulfillPO_result other) {
10664
      if (other.isSetE()) {
10665
        this.e = new PurchaseServiceException(other.e);
10666
      }
10667
    }
10668
 
10669
    public fulfillPO_result deepCopy() {
10670
      return new fulfillPO_result(this);
10671
    }
10672
 
10673
    @Override
10674
    public void clear() {
10675
      this.e = null;
10676
    }
10677
 
10678
    public PurchaseServiceException getE() {
10679
      return this.e;
10680
    }
10681
 
10682
    public void setE(PurchaseServiceException e) {
10683
      this.e = e;
10684
    }
10685
 
10686
    public void unsetE() {
10687
      this.e = null;
10688
    }
10689
 
10690
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
10691
    public boolean isSetE() {
10692
      return this.e != null;
10693
    }
10694
 
10695
    public void setEIsSet(boolean value) {
10696
      if (!value) {
10697
        this.e = null;
10698
      }
10699
    }
10700
 
10701
    public void setFieldValue(_Fields field, Object value) {
10702
      switch (field) {
10703
      case E:
10704
        if (value == null) {
10705
          unsetE();
10706
        } else {
10707
          setE((PurchaseServiceException)value);
10708
        }
10709
        break;
10710
 
10711
      }
10712
    }
10713
 
10714
    public Object getFieldValue(_Fields field) {
10715
      switch (field) {
10716
      case E:
10717
        return getE();
10718
 
10719
      }
10720
      throw new IllegalStateException();
10721
    }
10722
 
10723
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10724
    public boolean isSet(_Fields field) {
10725
      if (field == null) {
10726
        throw new IllegalArgumentException();
10727
      }
10728
 
10729
      switch (field) {
10730
      case E:
10731
        return isSetE();
10732
      }
10733
      throw new IllegalStateException();
10734
    }
10735
 
10736
    @Override
10737
    public boolean equals(Object that) {
10738
      if (that == null)
10739
        return false;
10740
      if (that instanceof fulfillPO_result)
10741
        return this.equals((fulfillPO_result)that);
10742
      return false;
10743
    }
10744
 
10745
    public boolean equals(fulfillPO_result that) {
10746
      if (that == null)
10747
        return false;
10748
 
10749
      boolean this_present_e = true && this.isSetE();
10750
      boolean that_present_e = true && that.isSetE();
10751
      if (this_present_e || that_present_e) {
10752
        if (!(this_present_e && that_present_e))
10753
          return false;
10754
        if (!this.e.equals(that.e))
10755
          return false;
10756
      }
10757
 
10758
      return true;
10759
    }
10760
 
10761
    @Override
10762
    public int hashCode() {
10763
      return 0;
10764
    }
10765
 
10766
    public int compareTo(fulfillPO_result other) {
10767
      if (!getClass().equals(other.getClass())) {
10768
        return getClass().getName().compareTo(other.getClass().getName());
10769
      }
10770
 
10771
      int lastComparison = 0;
10772
      fulfillPO_result typedOther = (fulfillPO_result)other;
10773
 
10774
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
10775
      if (lastComparison != 0) {
10776
        return lastComparison;
10777
      }
10778
      if (isSetE()) {
10779
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
10780
        if (lastComparison != 0) {
10781
          return lastComparison;
10782
        }
10783
      }
10784
      return 0;
10785
    }
10786
 
10787
    public _Fields fieldForId(int fieldId) {
10788
      return _Fields.findByThriftId(fieldId);
10789
    }
10790
 
10791
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10792
      org.apache.thrift.protocol.TField field;
10793
      iprot.readStructBegin();
10794
      while (true)
10795
      {
10796
        field = iprot.readFieldBegin();
10797
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10798
          break;
10799
        }
10800
        switch (field.id) {
10801
          case 1: // E
10802
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10803
              this.e = new PurchaseServiceException();
10804
              this.e.read(iprot);
10805
            } else { 
10806
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10807
            }
10808
            break;
10809
          default:
10810
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10811
        }
10812
        iprot.readFieldEnd();
10813
      }
10814
      iprot.readStructEnd();
10815
      validate();
10816
    }
10817
 
10818
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10819
      oprot.writeStructBegin(STRUCT_DESC);
10820
 
10821
      if (this.isSetE()) {
10822
        oprot.writeFieldBegin(E_FIELD_DESC);
10823
        this.e.write(oprot);
10824
        oprot.writeFieldEnd();
10825
      }
10826
      oprot.writeFieldStop();
10827
      oprot.writeStructEnd();
10828
    }
10829
 
10830
    @Override
10831
    public String toString() {
10832
      StringBuilder sb = new StringBuilder("fulfillPO_result(");
10833
      boolean first = true;
10834
 
10835
      sb.append("e:");
10836
      if (this.e == null) {
10837
        sb.append("null");
10838
      } else {
10839
        sb.append(this.e);
10840
      }
10841
      first = false;
10842
      sb.append(")");
10843
      return sb.toString();
10844
    }
10845
 
10846
    public void validate() throws org.apache.thrift.TException {
10847
      // check for required fields
10848
    }
10849
 
10850
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10851
      try {
10852
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10853
      } catch (org.apache.thrift.TException te) {
10854
        throw new java.io.IOException(te);
10855
      }
10856
    }
10857
 
10858
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10859
      try {
10860
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10861
      } catch (org.apache.thrift.TException te) {
10862
        throw new java.io.IOException(te);
10863
      }
10864
    }
10865
 
10866
  }
10867
 
10868
  public static class updatePurchaseOrder_args implements org.apache.thrift.TBase<updatePurchaseOrder_args, updatePurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
10869
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_args");
10870
 
10871
    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);
10872
 
10873
    private PurchaseOrder purchaseOrder; // required
10874
 
10875
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10876
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10877
      PURCHASE_ORDER((short)1, "purchaseOrder");
10878
 
10879
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10880
 
10881
      static {
10882
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10883
          byName.put(field.getFieldName(), field);
10884
        }
10885
      }
10886
 
10887
      /**
10888
       * Find the _Fields constant that matches fieldId, or null if its not found.
10889
       */
10890
      public static _Fields findByThriftId(int fieldId) {
10891
        switch(fieldId) {
10892
          case 1: // PURCHASE_ORDER
10893
            return PURCHASE_ORDER;
10894
          default:
10895
            return null;
10896
        }
10897
      }
10898
 
10899
      /**
10900
       * Find the _Fields constant that matches fieldId, throwing an exception
10901
       * if it is not found.
10902
       */
10903
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10904
        _Fields fields = findByThriftId(fieldId);
10905
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10906
        return fields;
10907
      }
10908
 
10909
      /**
10910
       * Find the _Fields constant that matches name, or null if its not found.
10911
       */
10912
      public static _Fields findByName(String name) {
10913
        return byName.get(name);
10914
      }
10915
 
10916
      private final short _thriftId;
10917
      private final String _fieldName;
10918
 
10919
      _Fields(short thriftId, String fieldName) {
10920
        _thriftId = thriftId;
10921
        _fieldName = fieldName;
10922
      }
10923
 
10924
      public short getThriftFieldId() {
10925
        return _thriftId;
10926
      }
10927
 
10928
      public String getFieldName() {
10929
        return _fieldName;
10930
      }
10931
    }
10932
 
10933
    // isset id assignments
10934
 
10935
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10936
    static {
10937
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10938
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10939
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
10940
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10941
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_args.class, metaDataMap);
10942
    }
10943
 
10944
    public updatePurchaseOrder_args() {
10945
    }
10946
 
10947
    public updatePurchaseOrder_args(
10948
      PurchaseOrder purchaseOrder)
10949
    {
10950
      this();
10951
      this.purchaseOrder = purchaseOrder;
10952
    }
10953
 
10954
    /**
10955
     * Performs a deep copy on <i>other</i>.
10956
     */
10957
    public updatePurchaseOrder_args(updatePurchaseOrder_args other) {
10958
      if (other.isSetPurchaseOrder()) {
10959
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
10960
      }
10961
    }
10962
 
10963
    public updatePurchaseOrder_args deepCopy() {
10964
      return new updatePurchaseOrder_args(this);
10965
    }
10966
 
10967
    @Override
10968
    public void clear() {
10969
      this.purchaseOrder = null;
10970
    }
10971
 
10972
    public PurchaseOrder getPurchaseOrder() {
10973
      return this.purchaseOrder;
10974
    }
10975
 
10976
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
10977
      this.purchaseOrder = purchaseOrder;
10978
    }
10979
 
10980
    public void unsetPurchaseOrder() {
10981
      this.purchaseOrder = null;
10982
    }
10983
 
10984
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
10985
    public boolean isSetPurchaseOrder() {
10986
      return this.purchaseOrder != null;
10987
    }
10988
 
10989
    public void setPurchaseOrderIsSet(boolean value) {
10990
      if (!value) {
10991
        this.purchaseOrder = null;
10992
      }
10993
    }
10994
 
10995
    public void setFieldValue(_Fields field, Object value) {
10996
      switch (field) {
10997
      case PURCHASE_ORDER:
10998
        if (value == null) {
10999
          unsetPurchaseOrder();
11000
        } else {
11001
          setPurchaseOrder((PurchaseOrder)value);
11002
        }
11003
        break;
11004
 
11005
      }
11006
    }
11007
 
11008
    public Object getFieldValue(_Fields field) {
11009
      switch (field) {
11010
      case PURCHASE_ORDER:
11011
        return getPurchaseOrder();
11012
 
11013
      }
11014
      throw new IllegalStateException();
11015
    }
11016
 
11017
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11018
    public boolean isSet(_Fields field) {
11019
      if (field == null) {
11020
        throw new IllegalArgumentException();
11021
      }
11022
 
11023
      switch (field) {
11024
      case PURCHASE_ORDER:
11025
        return isSetPurchaseOrder();
11026
      }
11027
      throw new IllegalStateException();
11028
    }
11029
 
11030
    @Override
11031
    public boolean equals(Object that) {
11032
      if (that == null)
11033
        return false;
11034
      if (that instanceof updatePurchaseOrder_args)
11035
        return this.equals((updatePurchaseOrder_args)that);
11036
      return false;
11037
    }
11038
 
11039
    public boolean equals(updatePurchaseOrder_args that) {
11040
      if (that == null)
11041
        return false;
11042
 
11043
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
11044
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
11045
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
11046
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
11047
          return false;
11048
        if (!this.purchaseOrder.equals(that.purchaseOrder))
11049
          return false;
11050
      }
11051
 
11052
      return true;
11053
    }
11054
 
11055
    @Override
11056
    public int hashCode() {
11057
      return 0;
11058
    }
11059
 
11060
    public int compareTo(updatePurchaseOrder_args other) {
11061
      if (!getClass().equals(other.getClass())) {
11062
        return getClass().getName().compareTo(other.getClass().getName());
11063
      }
11064
 
11065
      int lastComparison = 0;
11066
      updatePurchaseOrder_args typedOther = (updatePurchaseOrder_args)other;
11067
 
11068
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
11069
      if (lastComparison != 0) {
11070
        return lastComparison;
11071
      }
11072
      if (isSetPurchaseOrder()) {
11073
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
11074
        if (lastComparison != 0) {
11075
          return lastComparison;
11076
        }
11077
      }
11078
      return 0;
11079
    }
11080
 
11081
    public _Fields fieldForId(int fieldId) {
11082
      return _Fields.findByThriftId(fieldId);
11083
    }
11084
 
11085
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11086
      org.apache.thrift.protocol.TField field;
11087
      iprot.readStructBegin();
11088
      while (true)
11089
      {
11090
        field = iprot.readFieldBegin();
11091
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11092
          break;
11093
        }
11094
        switch (field.id) {
11095
          case 1: // PURCHASE_ORDER
11096
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11097
              this.purchaseOrder = new PurchaseOrder();
11098
              this.purchaseOrder.read(iprot);
11099
            } else { 
11100
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11101
            }
11102
            break;
11103
          default:
11104
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11105
        }
11106
        iprot.readFieldEnd();
11107
      }
11108
      iprot.readStructEnd();
11109
      validate();
11110
    }
11111
 
11112
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11113
      validate();
11114
 
11115
      oprot.writeStructBegin(STRUCT_DESC);
11116
      if (this.purchaseOrder != null) {
11117
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
11118
        this.purchaseOrder.write(oprot);
11119
        oprot.writeFieldEnd();
11120
      }
11121
      oprot.writeFieldStop();
11122
      oprot.writeStructEnd();
11123
    }
11124
 
11125
    @Override
11126
    public String toString() {
11127
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_args(");
11128
      boolean first = true;
11129
 
11130
      sb.append("purchaseOrder:");
11131
      if (this.purchaseOrder == null) {
11132
        sb.append("null");
11133
      } else {
11134
        sb.append(this.purchaseOrder);
11135
      }
11136
      first = false;
11137
      sb.append(")");
11138
      return sb.toString();
11139
    }
11140
 
11141
    public void validate() throws org.apache.thrift.TException {
11142
      // check for required fields
11143
    }
11144
 
11145
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11146
      try {
11147
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11148
      } catch (org.apache.thrift.TException te) {
11149
        throw new java.io.IOException(te);
11150
      }
11151
    }
11152
 
11153
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11154
      try {
11155
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11156
      } catch (org.apache.thrift.TException te) {
11157
        throw new java.io.IOException(te);
11158
      }
11159
    }
11160
 
11161
  }
11162
 
11163
  public static class updatePurchaseOrder_result implements org.apache.thrift.TBase<updatePurchaseOrder_result, updatePurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
11164
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_result");
11165
 
11166
    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);
11167
 
11168
    private PurchaseServiceException e; // required
11169
 
11170
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11171
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11172
      E((short)1, "e");
11173
 
11174
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11175
 
11176
      static {
11177
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11178
          byName.put(field.getFieldName(), field);
11179
        }
11180
      }
11181
 
11182
      /**
11183
       * Find the _Fields constant that matches fieldId, or null if its not found.
11184
       */
11185
      public static _Fields findByThriftId(int fieldId) {
11186
        switch(fieldId) {
11187
          case 1: // E
11188
            return E;
11189
          default:
11190
            return null;
11191
        }
11192
      }
11193
 
11194
      /**
11195
       * Find the _Fields constant that matches fieldId, throwing an exception
11196
       * if it is not found.
11197
       */
11198
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11199
        _Fields fields = findByThriftId(fieldId);
11200
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11201
        return fields;
11202
      }
11203
 
11204
      /**
11205
       * Find the _Fields constant that matches name, or null if its not found.
11206
       */
11207
      public static _Fields findByName(String name) {
11208
        return byName.get(name);
11209
      }
11210
 
11211
      private final short _thriftId;
11212
      private final String _fieldName;
11213
 
11214
      _Fields(short thriftId, String fieldName) {
11215
        _thriftId = thriftId;
11216
        _fieldName = fieldName;
11217
      }
11218
 
11219
      public short getThriftFieldId() {
11220
        return _thriftId;
11221
      }
11222
 
11223
      public String getFieldName() {
11224
        return _fieldName;
11225
      }
11226
    }
11227
 
11228
    // isset id assignments
11229
 
11230
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11231
    static {
11232
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11233
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11234
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11235
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11236
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_result.class, metaDataMap);
11237
    }
11238
 
11239
    public updatePurchaseOrder_result() {
11240
    }
11241
 
11242
    public updatePurchaseOrder_result(
11243
      PurchaseServiceException e)
11244
    {
11245
      this();
11246
      this.e = e;
11247
    }
11248
 
11249
    /**
11250
     * Performs a deep copy on <i>other</i>.
11251
     */
11252
    public updatePurchaseOrder_result(updatePurchaseOrder_result other) {
11253
      if (other.isSetE()) {
11254
        this.e = new PurchaseServiceException(other.e);
11255
      }
11256
    }
11257
 
11258
    public updatePurchaseOrder_result deepCopy() {
11259
      return new updatePurchaseOrder_result(this);
11260
    }
11261
 
11262
    @Override
11263
    public void clear() {
11264
      this.e = null;
11265
    }
11266
 
11267
    public PurchaseServiceException getE() {
11268
      return this.e;
11269
    }
11270
 
11271
    public void setE(PurchaseServiceException e) {
11272
      this.e = e;
11273
    }
11274
 
11275
    public void unsetE() {
11276
      this.e = null;
11277
    }
11278
 
11279
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
11280
    public boolean isSetE() {
11281
      return this.e != null;
11282
    }
11283
 
11284
    public void setEIsSet(boolean value) {
11285
      if (!value) {
11286
        this.e = null;
11287
      }
11288
    }
11289
 
11290
    public void setFieldValue(_Fields field, Object value) {
11291
      switch (field) {
11292
      case E:
11293
        if (value == null) {
11294
          unsetE();
11295
        } else {
11296
          setE((PurchaseServiceException)value);
11297
        }
11298
        break;
11299
 
11300
      }
11301
    }
11302
 
11303
    public Object getFieldValue(_Fields field) {
11304
      switch (field) {
11305
      case E:
11306
        return getE();
11307
 
11308
      }
11309
      throw new IllegalStateException();
11310
    }
11311
 
11312
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11313
    public boolean isSet(_Fields field) {
11314
      if (field == null) {
11315
        throw new IllegalArgumentException();
11316
      }
11317
 
11318
      switch (field) {
11319
      case E:
11320
        return isSetE();
11321
      }
11322
      throw new IllegalStateException();
11323
    }
11324
 
11325
    @Override
11326
    public boolean equals(Object that) {
11327
      if (that == null)
11328
        return false;
11329
      if (that instanceof updatePurchaseOrder_result)
11330
        return this.equals((updatePurchaseOrder_result)that);
11331
      return false;
11332
    }
11333
 
11334
    public boolean equals(updatePurchaseOrder_result that) {
11335
      if (that == null)
11336
        return false;
11337
 
11338
      boolean this_present_e = true && this.isSetE();
11339
      boolean that_present_e = true && that.isSetE();
11340
      if (this_present_e || that_present_e) {
11341
        if (!(this_present_e && that_present_e))
11342
          return false;
11343
        if (!this.e.equals(that.e))
11344
          return false;
11345
      }
11346
 
11347
      return true;
11348
    }
11349
 
11350
    @Override
11351
    public int hashCode() {
11352
      return 0;
11353
    }
11354
 
11355
    public int compareTo(updatePurchaseOrder_result other) {
11356
      if (!getClass().equals(other.getClass())) {
11357
        return getClass().getName().compareTo(other.getClass().getName());
11358
      }
11359
 
11360
      int lastComparison = 0;
11361
      updatePurchaseOrder_result typedOther = (updatePurchaseOrder_result)other;
11362
 
11363
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
11364
      if (lastComparison != 0) {
11365
        return lastComparison;
11366
      }
11367
      if (isSetE()) {
11368
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
11369
        if (lastComparison != 0) {
11370
          return lastComparison;
11371
        }
11372
      }
11373
      return 0;
11374
    }
11375
 
11376
    public _Fields fieldForId(int fieldId) {
11377
      return _Fields.findByThriftId(fieldId);
11378
    }
11379
 
11380
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11381
      org.apache.thrift.protocol.TField field;
11382
      iprot.readStructBegin();
11383
      while (true)
11384
      {
11385
        field = iprot.readFieldBegin();
11386
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11387
          break;
11388
        }
11389
        switch (field.id) {
11390
          case 1: // E
11391
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11392
              this.e = new PurchaseServiceException();
11393
              this.e.read(iprot);
11394
            } else { 
11395
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11396
            }
11397
            break;
11398
          default:
11399
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11400
        }
11401
        iprot.readFieldEnd();
11402
      }
11403
      iprot.readStructEnd();
11404
      validate();
11405
    }
11406
 
11407
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11408
      oprot.writeStructBegin(STRUCT_DESC);
11409
 
11410
      if (this.isSetE()) {
11411
        oprot.writeFieldBegin(E_FIELD_DESC);
11412
        this.e.write(oprot);
11413
        oprot.writeFieldEnd();
11414
      }
11415
      oprot.writeFieldStop();
11416
      oprot.writeStructEnd();
11417
    }
11418
 
11419
    @Override
11420
    public String toString() {
11421
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_result(");
11422
      boolean first = true;
11423
 
11424
      sb.append("e:");
11425
      if (this.e == null) {
11426
        sb.append("null");
11427
      } else {
11428
        sb.append(this.e);
11429
      }
11430
      first = false;
11431
      sb.append(")");
11432
      return sb.toString();
11433
    }
11434
 
11435
    public void validate() throws org.apache.thrift.TException {
11436
      // check for required fields
11437
    }
11438
 
11439
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11440
      try {
11441
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11442
      } catch (org.apache.thrift.TException te) {
11443
        throw new java.io.IOException(te);
11444
      }
11445
    }
11446
 
11447
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11448
      try {
11449
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11450
      } catch (org.apache.thrift.TException te) {
11451
        throw new java.io.IOException(te);
11452
      }
11453
    }
11454
 
11455
  }
11456
 
5185 mandeep.dh 11457
  public static class unFulfillPO_args implements org.apache.thrift.TBase<unFulfillPO_args, unFulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
11458
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_args");
11459
 
11460
    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);
11461
    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);
11462
    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);
11463
 
11464
    private long purchaseId; // required
11465
    private long itemId; // required
11466
    private long quantity; // required
11467
 
11468
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11469
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11470
      PURCHASE_ID((short)1, "purchaseId"),
11471
      ITEM_ID((short)2, "itemId"),
11472
      QUANTITY((short)3, "quantity");
11473
 
11474
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11475
 
11476
      static {
11477
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11478
          byName.put(field.getFieldName(), field);
11479
        }
11480
      }
11481
 
11482
      /**
11483
       * Find the _Fields constant that matches fieldId, or null if its not found.
11484
       */
11485
      public static _Fields findByThriftId(int fieldId) {
11486
        switch(fieldId) {
11487
          case 1: // PURCHASE_ID
11488
            return PURCHASE_ID;
11489
          case 2: // ITEM_ID
11490
            return ITEM_ID;
11491
          case 3: // QUANTITY
11492
            return QUANTITY;
11493
          default:
11494
            return null;
11495
        }
11496
      }
11497
 
11498
      /**
11499
       * Find the _Fields constant that matches fieldId, throwing an exception
11500
       * if it is not found.
11501
       */
11502
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11503
        _Fields fields = findByThriftId(fieldId);
11504
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11505
        return fields;
11506
      }
11507
 
11508
      /**
11509
       * Find the _Fields constant that matches name, or null if its not found.
11510
       */
11511
      public static _Fields findByName(String name) {
11512
        return byName.get(name);
11513
      }
11514
 
11515
      private final short _thriftId;
11516
      private final String _fieldName;
11517
 
11518
      _Fields(short thriftId, String fieldName) {
11519
        _thriftId = thriftId;
11520
        _fieldName = fieldName;
11521
      }
11522
 
11523
      public short getThriftFieldId() {
11524
        return _thriftId;
11525
      }
11526
 
11527
      public String getFieldName() {
11528
        return _fieldName;
11529
      }
11530
    }
11531
 
11532
    // isset id assignments
11533
    private static final int __PURCHASEID_ISSET_ID = 0;
11534
    private static final int __ITEMID_ISSET_ID = 1;
11535
    private static final int __QUANTITY_ISSET_ID = 2;
11536
    private BitSet __isset_bit_vector = new BitSet(3);
11537
 
11538
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11539
    static {
11540
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11541
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11542
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11543
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11544
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11545
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11546
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11547
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11548
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_args.class, metaDataMap);
11549
    }
11550
 
11551
    public unFulfillPO_args() {
11552
    }
11553
 
11554
    public unFulfillPO_args(
11555
      long purchaseId,
11556
      long itemId,
11557
      long quantity)
11558
    {
11559
      this();
11560
      this.purchaseId = purchaseId;
11561
      setPurchaseIdIsSet(true);
11562
      this.itemId = itemId;
11563
      setItemIdIsSet(true);
11564
      this.quantity = quantity;
11565
      setQuantityIsSet(true);
11566
    }
11567
 
11568
    /**
11569
     * Performs a deep copy on <i>other</i>.
11570
     */
11571
    public unFulfillPO_args(unFulfillPO_args other) {
11572
      __isset_bit_vector.clear();
11573
      __isset_bit_vector.or(other.__isset_bit_vector);
11574
      this.purchaseId = other.purchaseId;
11575
      this.itemId = other.itemId;
11576
      this.quantity = other.quantity;
11577
    }
11578
 
11579
    public unFulfillPO_args deepCopy() {
11580
      return new unFulfillPO_args(this);
11581
    }
11582
 
11583
    @Override
11584
    public void clear() {
11585
      setPurchaseIdIsSet(false);
11586
      this.purchaseId = 0;
11587
      setItemIdIsSet(false);
11588
      this.itemId = 0;
11589
      setQuantityIsSet(false);
11590
      this.quantity = 0;
11591
    }
11592
 
11593
    public long getPurchaseId() {
11594
      return this.purchaseId;
11595
    }
11596
 
11597
    public void setPurchaseId(long purchaseId) {
11598
      this.purchaseId = purchaseId;
11599
      setPurchaseIdIsSet(true);
11600
    }
11601
 
11602
    public void unsetPurchaseId() {
11603
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
11604
    }
11605
 
11606
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
11607
    public boolean isSetPurchaseId() {
11608
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
11609
    }
11610
 
11611
    public void setPurchaseIdIsSet(boolean value) {
11612
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
11613
    }
11614
 
11615
    public long getItemId() {
11616
      return this.itemId;
11617
    }
11618
 
11619
    public void setItemId(long itemId) {
11620
      this.itemId = itemId;
11621
      setItemIdIsSet(true);
11622
    }
11623
 
11624
    public void unsetItemId() {
11625
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
11626
    }
11627
 
11628
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
11629
    public boolean isSetItemId() {
11630
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
11631
    }
11632
 
11633
    public void setItemIdIsSet(boolean value) {
11634
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
11635
    }
11636
 
11637
    public long getQuantity() {
11638
      return this.quantity;
11639
    }
11640
 
11641
    public void setQuantity(long quantity) {
11642
      this.quantity = quantity;
11643
      setQuantityIsSet(true);
11644
    }
11645
 
11646
    public void unsetQuantity() {
11647
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
11648
    }
11649
 
11650
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
11651
    public boolean isSetQuantity() {
11652
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
11653
    }
11654
 
11655
    public void setQuantityIsSet(boolean value) {
11656
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
11657
    }
11658
 
11659
    public void setFieldValue(_Fields field, Object value) {
11660
      switch (field) {
11661
      case PURCHASE_ID:
11662
        if (value == null) {
11663
          unsetPurchaseId();
11664
        } else {
11665
          setPurchaseId((Long)value);
11666
        }
11667
        break;
11668
 
11669
      case ITEM_ID:
11670
        if (value == null) {
11671
          unsetItemId();
11672
        } else {
11673
          setItemId((Long)value);
11674
        }
11675
        break;
11676
 
11677
      case QUANTITY:
11678
        if (value == null) {
11679
          unsetQuantity();
11680
        } else {
11681
          setQuantity((Long)value);
11682
        }
11683
        break;
11684
 
11685
      }
11686
    }
11687
 
11688
    public Object getFieldValue(_Fields field) {
11689
      switch (field) {
11690
      case PURCHASE_ID:
11691
        return Long.valueOf(getPurchaseId());
11692
 
11693
      case ITEM_ID:
11694
        return Long.valueOf(getItemId());
11695
 
11696
      case QUANTITY:
11697
        return Long.valueOf(getQuantity());
11698
 
11699
      }
11700
      throw new IllegalStateException();
11701
    }
11702
 
11703
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11704
    public boolean isSet(_Fields field) {
11705
      if (field == null) {
11706
        throw new IllegalArgumentException();
11707
      }
11708
 
11709
      switch (field) {
11710
      case PURCHASE_ID:
11711
        return isSetPurchaseId();
11712
      case ITEM_ID:
11713
        return isSetItemId();
11714
      case QUANTITY:
11715
        return isSetQuantity();
11716
      }
11717
      throw new IllegalStateException();
11718
    }
11719
 
11720
    @Override
11721
    public boolean equals(Object that) {
11722
      if (that == null)
11723
        return false;
11724
      if (that instanceof unFulfillPO_args)
11725
        return this.equals((unFulfillPO_args)that);
11726
      return false;
11727
    }
11728
 
11729
    public boolean equals(unFulfillPO_args that) {
11730
      if (that == null)
11731
        return false;
11732
 
11733
      boolean this_present_purchaseId = true;
11734
      boolean that_present_purchaseId = true;
11735
      if (this_present_purchaseId || that_present_purchaseId) {
11736
        if (!(this_present_purchaseId && that_present_purchaseId))
11737
          return false;
11738
        if (this.purchaseId != that.purchaseId)
11739
          return false;
11740
      }
11741
 
11742
      boolean this_present_itemId = true;
11743
      boolean that_present_itemId = true;
11744
      if (this_present_itemId || that_present_itemId) {
11745
        if (!(this_present_itemId && that_present_itemId))
11746
          return false;
11747
        if (this.itemId != that.itemId)
11748
          return false;
11749
      }
11750
 
11751
      boolean this_present_quantity = true;
11752
      boolean that_present_quantity = true;
11753
      if (this_present_quantity || that_present_quantity) {
11754
        if (!(this_present_quantity && that_present_quantity))
11755
          return false;
11756
        if (this.quantity != that.quantity)
11757
          return false;
11758
      }
11759
 
11760
      return true;
11761
    }
11762
 
11763
    @Override
11764
    public int hashCode() {
11765
      return 0;
11766
    }
11767
 
11768
    public int compareTo(unFulfillPO_args other) {
11769
      if (!getClass().equals(other.getClass())) {
11770
        return getClass().getName().compareTo(other.getClass().getName());
11771
      }
11772
 
11773
      int lastComparison = 0;
11774
      unFulfillPO_args typedOther = (unFulfillPO_args)other;
11775
 
11776
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
11777
      if (lastComparison != 0) {
11778
        return lastComparison;
11779
      }
11780
      if (isSetPurchaseId()) {
11781
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
11782
        if (lastComparison != 0) {
11783
          return lastComparison;
11784
        }
11785
      }
11786
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
11787
      if (lastComparison != 0) {
11788
        return lastComparison;
11789
      }
11790
      if (isSetItemId()) {
11791
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
11792
        if (lastComparison != 0) {
11793
          return lastComparison;
11794
        }
11795
      }
11796
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
11797
      if (lastComparison != 0) {
11798
        return lastComparison;
11799
      }
11800
      if (isSetQuantity()) {
11801
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
11802
        if (lastComparison != 0) {
11803
          return lastComparison;
11804
        }
11805
      }
11806
      return 0;
11807
    }
11808
 
11809
    public _Fields fieldForId(int fieldId) {
11810
      return _Fields.findByThriftId(fieldId);
11811
    }
11812
 
11813
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11814
      org.apache.thrift.protocol.TField field;
11815
      iprot.readStructBegin();
11816
      while (true)
11817
      {
11818
        field = iprot.readFieldBegin();
11819
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11820
          break;
11821
        }
11822
        switch (field.id) {
11823
          case 1: // PURCHASE_ID
11824
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11825
              this.purchaseId = iprot.readI64();
11826
              setPurchaseIdIsSet(true);
11827
            } else { 
11828
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11829
            }
11830
            break;
11831
          case 2: // ITEM_ID
11832
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11833
              this.itemId = iprot.readI64();
11834
              setItemIdIsSet(true);
11835
            } else { 
11836
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11837
            }
11838
            break;
11839
          case 3: // QUANTITY
11840
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11841
              this.quantity = iprot.readI64();
11842
              setQuantityIsSet(true);
11843
            } else { 
11844
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11845
            }
11846
            break;
11847
          default:
11848
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11849
        }
11850
        iprot.readFieldEnd();
11851
      }
11852
      iprot.readStructEnd();
11853
      validate();
11854
    }
11855
 
11856
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11857
      validate();
11858
 
11859
      oprot.writeStructBegin(STRUCT_DESC);
11860
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
11861
      oprot.writeI64(this.purchaseId);
11862
      oprot.writeFieldEnd();
11863
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
11864
      oprot.writeI64(this.itemId);
11865
      oprot.writeFieldEnd();
11866
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
11867
      oprot.writeI64(this.quantity);
11868
      oprot.writeFieldEnd();
11869
      oprot.writeFieldStop();
11870
      oprot.writeStructEnd();
11871
    }
11872
 
11873
    @Override
11874
    public String toString() {
11875
      StringBuilder sb = new StringBuilder("unFulfillPO_args(");
11876
      boolean first = true;
11877
 
11878
      sb.append("purchaseId:");
11879
      sb.append(this.purchaseId);
11880
      first = false;
11881
      if (!first) sb.append(", ");
11882
      sb.append("itemId:");
11883
      sb.append(this.itemId);
11884
      first = false;
11885
      if (!first) sb.append(", ");
11886
      sb.append("quantity:");
11887
      sb.append(this.quantity);
11888
      first = false;
11889
      sb.append(")");
11890
      return sb.toString();
11891
    }
11892
 
11893
    public void validate() throws org.apache.thrift.TException {
11894
      // check for required fields
11895
    }
11896
 
11897
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11898
      try {
11899
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11900
      } catch (org.apache.thrift.TException te) {
11901
        throw new java.io.IOException(te);
11902
      }
11903
    }
11904
 
11905
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11906
      try {
11907
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
11908
        __isset_bit_vector = new BitSet(1);
11909
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11910
      } catch (org.apache.thrift.TException te) {
11911
        throw new java.io.IOException(te);
11912
      }
11913
    }
11914
 
11915
  }
11916
 
11917
  public static class unFulfillPO_result implements org.apache.thrift.TBase<unFulfillPO_result, unFulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
11918
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_result");
11919
 
11920
    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);
11921
 
11922
    private PurchaseServiceException e; // required
11923
 
11924
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11925
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11926
      E((short)1, "e");
11927
 
11928
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11929
 
11930
      static {
11931
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11932
          byName.put(field.getFieldName(), field);
11933
        }
11934
      }
11935
 
11936
      /**
11937
       * Find the _Fields constant that matches fieldId, or null if its not found.
11938
       */
11939
      public static _Fields findByThriftId(int fieldId) {
11940
        switch(fieldId) {
11941
          case 1: // E
11942
            return E;
11943
          default:
11944
            return null;
11945
        }
11946
      }
11947
 
11948
      /**
11949
       * Find the _Fields constant that matches fieldId, throwing an exception
11950
       * if it is not found.
11951
       */
11952
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11953
        _Fields fields = findByThriftId(fieldId);
11954
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11955
        return fields;
11956
      }
11957
 
11958
      /**
11959
       * Find the _Fields constant that matches name, or null if its not found.
11960
       */
11961
      public static _Fields findByName(String name) {
11962
        return byName.get(name);
11963
      }
11964
 
11965
      private final short _thriftId;
11966
      private final String _fieldName;
11967
 
11968
      _Fields(short thriftId, String fieldName) {
11969
        _thriftId = thriftId;
11970
        _fieldName = fieldName;
11971
      }
11972
 
11973
      public short getThriftFieldId() {
11974
        return _thriftId;
11975
      }
11976
 
11977
      public String getFieldName() {
11978
        return _fieldName;
11979
      }
11980
    }
11981
 
11982
    // isset id assignments
11983
 
11984
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11985
    static {
11986
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11987
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11988
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11989
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11990
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_result.class, metaDataMap);
11991
    }
11992
 
11993
    public unFulfillPO_result() {
11994
    }
11995
 
11996
    public unFulfillPO_result(
11997
      PurchaseServiceException e)
11998
    {
11999
      this();
12000
      this.e = e;
12001
    }
12002
 
12003
    /**
12004
     * Performs a deep copy on <i>other</i>.
12005
     */
12006
    public unFulfillPO_result(unFulfillPO_result other) {
12007
      if (other.isSetE()) {
12008
        this.e = new PurchaseServiceException(other.e);
12009
      }
12010
    }
12011
 
12012
    public unFulfillPO_result deepCopy() {
12013
      return new unFulfillPO_result(this);
12014
    }
12015
 
12016
    @Override
12017
    public void clear() {
12018
      this.e = null;
12019
    }
12020
 
12021
    public PurchaseServiceException getE() {
12022
      return this.e;
12023
    }
12024
 
12025
    public void setE(PurchaseServiceException e) {
12026
      this.e = e;
12027
    }
12028
 
12029
    public void unsetE() {
12030
      this.e = null;
12031
    }
12032
 
12033
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
12034
    public boolean isSetE() {
12035
      return this.e != null;
12036
    }
12037
 
12038
    public void setEIsSet(boolean value) {
12039
      if (!value) {
12040
        this.e = null;
12041
      }
12042
    }
12043
 
12044
    public void setFieldValue(_Fields field, Object value) {
12045
      switch (field) {
12046
      case E:
12047
        if (value == null) {
12048
          unsetE();
12049
        } else {
12050
          setE((PurchaseServiceException)value);
12051
        }
12052
        break;
12053
 
12054
      }
12055
    }
12056
 
12057
    public Object getFieldValue(_Fields field) {
12058
      switch (field) {
12059
      case E:
12060
        return getE();
12061
 
12062
      }
12063
      throw new IllegalStateException();
12064
    }
12065
 
12066
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12067
    public boolean isSet(_Fields field) {
12068
      if (field == null) {
12069
        throw new IllegalArgumentException();
12070
      }
12071
 
12072
      switch (field) {
12073
      case E:
12074
        return isSetE();
12075
      }
12076
      throw new IllegalStateException();
12077
    }
12078
 
12079
    @Override
12080
    public boolean equals(Object that) {
12081
      if (that == null)
12082
        return false;
12083
      if (that instanceof unFulfillPO_result)
12084
        return this.equals((unFulfillPO_result)that);
12085
      return false;
12086
    }
12087
 
12088
    public boolean equals(unFulfillPO_result that) {
12089
      if (that == null)
12090
        return false;
12091
 
12092
      boolean this_present_e = true && this.isSetE();
12093
      boolean that_present_e = true && that.isSetE();
12094
      if (this_present_e || that_present_e) {
12095
        if (!(this_present_e && that_present_e))
12096
          return false;
12097
        if (!this.e.equals(that.e))
12098
          return false;
12099
      }
12100
 
12101
      return true;
12102
    }
12103
 
12104
    @Override
12105
    public int hashCode() {
12106
      return 0;
12107
    }
12108
 
12109
    public int compareTo(unFulfillPO_result other) {
12110
      if (!getClass().equals(other.getClass())) {
12111
        return getClass().getName().compareTo(other.getClass().getName());
12112
      }
12113
 
12114
      int lastComparison = 0;
12115
      unFulfillPO_result typedOther = (unFulfillPO_result)other;
12116
 
12117
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
12118
      if (lastComparison != 0) {
12119
        return lastComparison;
12120
      }
12121
      if (isSetE()) {
12122
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
12123
        if (lastComparison != 0) {
12124
          return lastComparison;
12125
        }
12126
      }
12127
      return 0;
12128
    }
12129
 
12130
    public _Fields fieldForId(int fieldId) {
12131
      return _Fields.findByThriftId(fieldId);
12132
    }
12133
 
12134
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12135
      org.apache.thrift.protocol.TField field;
12136
      iprot.readStructBegin();
12137
      while (true)
12138
      {
12139
        field = iprot.readFieldBegin();
12140
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12141
          break;
12142
        }
12143
        switch (field.id) {
12144
          case 1: // E
12145
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12146
              this.e = new PurchaseServiceException();
12147
              this.e.read(iprot);
12148
            } else { 
12149
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12150
            }
12151
            break;
12152
          default:
12153
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12154
        }
12155
        iprot.readFieldEnd();
12156
      }
12157
      iprot.readStructEnd();
12158
      validate();
12159
    }
12160
 
12161
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12162
      oprot.writeStructBegin(STRUCT_DESC);
12163
 
12164
      if (this.isSetE()) {
12165
        oprot.writeFieldBegin(E_FIELD_DESC);
12166
        this.e.write(oprot);
12167
        oprot.writeFieldEnd();
12168
      }
12169
      oprot.writeFieldStop();
12170
      oprot.writeStructEnd();
12171
    }
12172
 
12173
    @Override
12174
    public String toString() {
12175
      StringBuilder sb = new StringBuilder("unFulfillPO_result(");
12176
      boolean first = true;
12177
 
12178
      sb.append("e:");
12179
      if (this.e == null) {
12180
        sb.append("null");
12181
      } else {
12182
        sb.append(this.e);
12183
      }
12184
      first = false;
12185
      sb.append(")");
12186
      return sb.toString();
12187
    }
12188
 
12189
    public void validate() throws org.apache.thrift.TException {
12190
      // check for required fields
12191
    }
12192
 
12193
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12194
      try {
12195
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12196
      } catch (org.apache.thrift.TException te) {
12197
        throw new java.io.IOException(te);
12198
      }
12199
    }
12200
 
12201
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12202
      try {
12203
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12204
      } catch (org.apache.thrift.TException te) {
12205
        throw new java.io.IOException(te);
12206
      }
12207
    }
12208
 
12209
  }
12210
 
5443 mandeep.dh 12211
  public static class getInvoices_args implements org.apache.thrift.TBase<getInvoices_args, getInvoices_args._Fields>, java.io.Serializable, Cloneable   {
12212
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_args");
12213
 
12214
    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);
12215
 
12216
    private long date; // required
12217
 
12218
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12219
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12220
      DATE((short)1, "date");
12221
 
12222
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12223
 
12224
      static {
12225
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12226
          byName.put(field.getFieldName(), field);
12227
        }
12228
      }
12229
 
12230
      /**
12231
       * Find the _Fields constant that matches fieldId, or null if its not found.
12232
       */
12233
      public static _Fields findByThriftId(int fieldId) {
12234
        switch(fieldId) {
12235
          case 1: // DATE
12236
            return DATE;
12237
          default:
12238
            return null;
12239
        }
12240
      }
12241
 
12242
      /**
12243
       * Find the _Fields constant that matches fieldId, throwing an exception
12244
       * if it is not found.
12245
       */
12246
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12247
        _Fields fields = findByThriftId(fieldId);
12248
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12249
        return fields;
12250
      }
12251
 
12252
      /**
12253
       * Find the _Fields constant that matches name, or null if its not found.
12254
       */
12255
      public static _Fields findByName(String name) {
12256
        return byName.get(name);
12257
      }
12258
 
12259
      private final short _thriftId;
12260
      private final String _fieldName;
12261
 
12262
      _Fields(short thriftId, String fieldName) {
12263
        _thriftId = thriftId;
12264
        _fieldName = fieldName;
12265
      }
12266
 
12267
      public short getThriftFieldId() {
12268
        return _thriftId;
12269
      }
12270
 
12271
      public String getFieldName() {
12272
        return _fieldName;
12273
      }
12274
    }
12275
 
12276
    // isset id assignments
12277
    private static final int __DATE_ISSET_ID = 0;
12278
    private BitSet __isset_bit_vector = new BitSet(1);
12279
 
12280
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12281
    static {
12282
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12283
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12284
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12285
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12286
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_args.class, metaDataMap);
12287
    }
12288
 
12289
    public getInvoices_args() {
12290
    }
12291
 
12292
    public getInvoices_args(
12293
      long date)
12294
    {
12295
      this();
12296
      this.date = date;
12297
      setDateIsSet(true);
12298
    }
12299
 
12300
    /**
12301
     * Performs a deep copy on <i>other</i>.
12302
     */
12303
    public getInvoices_args(getInvoices_args other) {
12304
      __isset_bit_vector.clear();
12305
      __isset_bit_vector.or(other.__isset_bit_vector);
12306
      this.date = other.date;
12307
    }
12308
 
12309
    public getInvoices_args deepCopy() {
12310
      return new getInvoices_args(this);
12311
    }
12312
 
12313
    @Override
12314
    public void clear() {
12315
      setDateIsSet(false);
12316
      this.date = 0;
12317
    }
12318
 
12319
    public long getDate() {
12320
      return this.date;
12321
    }
12322
 
12323
    public void setDate(long date) {
12324
      this.date = date;
12325
      setDateIsSet(true);
12326
    }
12327
 
12328
    public void unsetDate() {
12329
      __isset_bit_vector.clear(__DATE_ISSET_ID);
12330
    }
12331
 
12332
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
12333
    public boolean isSetDate() {
12334
      return __isset_bit_vector.get(__DATE_ISSET_ID);
12335
    }
12336
 
12337
    public void setDateIsSet(boolean value) {
12338
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
12339
    }
12340
 
12341
    public void setFieldValue(_Fields field, Object value) {
12342
      switch (field) {
12343
      case DATE:
12344
        if (value == null) {
12345
          unsetDate();
12346
        } else {
12347
          setDate((Long)value);
12348
        }
12349
        break;
12350
 
12351
      }
12352
    }
12353
 
12354
    public Object getFieldValue(_Fields field) {
12355
      switch (field) {
12356
      case DATE:
12357
        return Long.valueOf(getDate());
12358
 
12359
      }
12360
      throw new IllegalStateException();
12361
    }
12362
 
12363
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12364
    public boolean isSet(_Fields field) {
12365
      if (field == null) {
12366
        throw new IllegalArgumentException();
12367
      }
12368
 
12369
      switch (field) {
12370
      case DATE:
12371
        return isSetDate();
12372
      }
12373
      throw new IllegalStateException();
12374
    }
12375
 
12376
    @Override
12377
    public boolean equals(Object that) {
12378
      if (that == null)
12379
        return false;
12380
      if (that instanceof getInvoices_args)
12381
        return this.equals((getInvoices_args)that);
12382
      return false;
12383
    }
12384
 
12385
    public boolean equals(getInvoices_args that) {
12386
      if (that == null)
12387
        return false;
12388
 
12389
      boolean this_present_date = true;
12390
      boolean that_present_date = true;
12391
      if (this_present_date || that_present_date) {
12392
        if (!(this_present_date && that_present_date))
12393
          return false;
12394
        if (this.date != that.date)
12395
          return false;
12396
      }
12397
 
12398
      return true;
12399
    }
12400
 
12401
    @Override
12402
    public int hashCode() {
12403
      return 0;
12404
    }
12405
 
12406
    public int compareTo(getInvoices_args other) {
12407
      if (!getClass().equals(other.getClass())) {
12408
        return getClass().getName().compareTo(other.getClass().getName());
12409
      }
12410
 
12411
      int lastComparison = 0;
12412
      getInvoices_args typedOther = (getInvoices_args)other;
12413
 
12414
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
12415
      if (lastComparison != 0) {
12416
        return lastComparison;
12417
      }
12418
      if (isSetDate()) {
12419
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
12420
        if (lastComparison != 0) {
12421
          return lastComparison;
12422
        }
12423
      }
12424
      return 0;
12425
    }
12426
 
12427
    public _Fields fieldForId(int fieldId) {
12428
      return _Fields.findByThriftId(fieldId);
12429
    }
12430
 
12431
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12432
      org.apache.thrift.protocol.TField field;
12433
      iprot.readStructBegin();
12434
      while (true)
12435
      {
12436
        field = iprot.readFieldBegin();
12437
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12438
          break;
12439
        }
12440
        switch (field.id) {
12441
          case 1: // DATE
12442
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12443
              this.date = iprot.readI64();
12444
              setDateIsSet(true);
12445
            } else { 
12446
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12447
            }
12448
            break;
12449
          default:
12450
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12451
        }
12452
        iprot.readFieldEnd();
12453
      }
12454
      iprot.readStructEnd();
12455
      validate();
12456
    }
12457
 
12458
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12459
      validate();
12460
 
12461
      oprot.writeStructBegin(STRUCT_DESC);
12462
      oprot.writeFieldBegin(DATE_FIELD_DESC);
12463
      oprot.writeI64(this.date);
12464
      oprot.writeFieldEnd();
12465
      oprot.writeFieldStop();
12466
      oprot.writeStructEnd();
12467
    }
12468
 
12469
    @Override
12470
    public String toString() {
12471
      StringBuilder sb = new StringBuilder("getInvoices_args(");
12472
      boolean first = true;
12473
 
12474
      sb.append("date:");
12475
      sb.append(this.date);
12476
      first = false;
12477
      sb.append(")");
12478
      return sb.toString();
12479
    }
12480
 
12481
    public void validate() throws org.apache.thrift.TException {
12482
      // check for required fields
12483
    }
12484
 
12485
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12486
      try {
12487
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12488
      } catch (org.apache.thrift.TException te) {
12489
        throw new java.io.IOException(te);
12490
      }
12491
    }
12492
 
12493
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12494
      try {
12495
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
12496
        __isset_bit_vector = new BitSet(1);
12497
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12498
      } catch (org.apache.thrift.TException te) {
12499
        throw new java.io.IOException(te);
12500
      }
12501
    }
12502
 
12503
  }
12504
 
12505
  public static class getInvoices_result implements org.apache.thrift.TBase<getInvoices_result, getInvoices_result._Fields>, java.io.Serializable, Cloneable   {
12506
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_result");
12507
 
12508
    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);
12509
 
12510
    private List<Invoice> success; // required
12511
 
12512
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12513
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12514
      SUCCESS((short)0, "success");
12515
 
12516
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12517
 
12518
      static {
12519
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12520
          byName.put(field.getFieldName(), field);
12521
        }
12522
      }
12523
 
12524
      /**
12525
       * Find the _Fields constant that matches fieldId, or null if its not found.
12526
       */
12527
      public static _Fields findByThriftId(int fieldId) {
12528
        switch(fieldId) {
12529
          case 0: // SUCCESS
12530
            return SUCCESS;
12531
          default:
12532
            return null;
12533
        }
12534
      }
12535
 
12536
      /**
12537
       * Find the _Fields constant that matches fieldId, throwing an exception
12538
       * if it is not found.
12539
       */
12540
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12541
        _Fields fields = findByThriftId(fieldId);
12542
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12543
        return fields;
12544
      }
12545
 
12546
      /**
12547
       * Find the _Fields constant that matches name, or null if its not found.
12548
       */
12549
      public static _Fields findByName(String name) {
12550
        return byName.get(name);
12551
      }
12552
 
12553
      private final short _thriftId;
12554
      private final String _fieldName;
12555
 
12556
      _Fields(short thriftId, String fieldName) {
12557
        _thriftId = thriftId;
12558
        _fieldName = fieldName;
12559
      }
12560
 
12561
      public short getThriftFieldId() {
12562
        return _thriftId;
12563
      }
12564
 
12565
      public String getFieldName() {
12566
        return _fieldName;
12567
      }
12568
    }
12569
 
12570
    // isset id assignments
12571
 
12572
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12573
    static {
12574
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12575
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12576
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
12577
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class))));
12578
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12579
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_result.class, metaDataMap);
12580
    }
12581
 
12582
    public getInvoices_result() {
12583
    }
12584
 
12585
    public getInvoices_result(
12586
      List<Invoice> success)
12587
    {
12588
      this();
12589
      this.success = success;
12590
    }
12591
 
12592
    /**
12593
     * Performs a deep copy on <i>other</i>.
12594
     */
12595
    public getInvoices_result(getInvoices_result other) {
12596
      if (other.isSetSuccess()) {
12597
        List<Invoice> __this__success = new ArrayList<Invoice>();
12598
        for (Invoice other_element : other.success) {
12599
          __this__success.add(new Invoice(other_element));
12600
        }
12601
        this.success = __this__success;
12602
      }
12603
    }
12604
 
12605
    public getInvoices_result deepCopy() {
12606
      return new getInvoices_result(this);
12607
    }
12608
 
12609
    @Override
12610
    public void clear() {
12611
      this.success = null;
12612
    }
12613
 
12614
    public int getSuccessSize() {
12615
      return (this.success == null) ? 0 : this.success.size();
12616
    }
12617
 
12618
    public java.util.Iterator<Invoice> getSuccessIterator() {
12619
      return (this.success == null) ? null : this.success.iterator();
12620
    }
12621
 
12622
    public void addToSuccess(Invoice elem) {
12623
      if (this.success == null) {
12624
        this.success = new ArrayList<Invoice>();
12625
      }
12626
      this.success.add(elem);
12627
    }
12628
 
12629
    public List<Invoice> getSuccess() {
12630
      return this.success;
12631
    }
12632
 
12633
    public void setSuccess(List<Invoice> success) {
12634
      this.success = success;
12635
    }
12636
 
12637
    public void unsetSuccess() {
12638
      this.success = null;
12639
    }
12640
 
12641
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
12642
    public boolean isSetSuccess() {
12643
      return this.success != null;
12644
    }
12645
 
12646
    public void setSuccessIsSet(boolean value) {
12647
      if (!value) {
12648
        this.success = null;
12649
      }
12650
    }
12651
 
12652
    public void setFieldValue(_Fields field, Object value) {
12653
      switch (field) {
12654
      case SUCCESS:
12655
        if (value == null) {
12656
          unsetSuccess();
12657
        } else {
12658
          setSuccess((List<Invoice>)value);
12659
        }
12660
        break;
12661
 
12662
      }
12663
    }
12664
 
12665
    public Object getFieldValue(_Fields field) {
12666
      switch (field) {
12667
      case SUCCESS:
12668
        return getSuccess();
12669
 
12670
      }
12671
      throw new IllegalStateException();
12672
    }
12673
 
12674
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12675
    public boolean isSet(_Fields field) {
12676
      if (field == null) {
12677
        throw new IllegalArgumentException();
12678
      }
12679
 
12680
      switch (field) {
12681
      case SUCCESS:
12682
        return isSetSuccess();
12683
      }
12684
      throw new IllegalStateException();
12685
    }
12686
 
12687
    @Override
12688
    public boolean equals(Object that) {
12689
      if (that == null)
12690
        return false;
12691
      if (that instanceof getInvoices_result)
12692
        return this.equals((getInvoices_result)that);
12693
      return false;
12694
    }
12695
 
12696
    public boolean equals(getInvoices_result that) {
12697
      if (that == null)
12698
        return false;
12699
 
12700
      boolean this_present_success = true && this.isSetSuccess();
12701
      boolean that_present_success = true && that.isSetSuccess();
12702
      if (this_present_success || that_present_success) {
12703
        if (!(this_present_success && that_present_success))
12704
          return false;
12705
        if (!this.success.equals(that.success))
12706
          return false;
12707
      }
12708
 
12709
      return true;
12710
    }
12711
 
12712
    @Override
12713
    public int hashCode() {
12714
      return 0;
12715
    }
12716
 
12717
    public int compareTo(getInvoices_result other) {
12718
      if (!getClass().equals(other.getClass())) {
12719
        return getClass().getName().compareTo(other.getClass().getName());
12720
      }
12721
 
12722
      int lastComparison = 0;
12723
      getInvoices_result typedOther = (getInvoices_result)other;
12724
 
12725
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
12726
      if (lastComparison != 0) {
12727
        return lastComparison;
12728
      }
12729
      if (isSetSuccess()) {
12730
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
12731
        if (lastComparison != 0) {
12732
          return lastComparison;
12733
        }
12734
      }
12735
      return 0;
12736
    }
12737
 
12738
    public _Fields fieldForId(int fieldId) {
12739
      return _Fields.findByThriftId(fieldId);
12740
    }
12741
 
12742
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12743
      org.apache.thrift.protocol.TField field;
12744
      iprot.readStructBegin();
12745
      while (true)
12746
      {
12747
        field = iprot.readFieldBegin();
12748
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12749
          break;
12750
        }
12751
        switch (field.id) {
12752
          case 0: // SUCCESS
12753
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
12754
              {
6385 amar.kumar 12755
                org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
12756
                this.success = new ArrayList<Invoice>(_list24.size);
12757
                for (int _i25 = 0; _i25 < _list24.size; ++_i25)
5443 mandeep.dh 12758
                {
6385 amar.kumar 12759
                  Invoice _elem26; // required
12760
                  _elem26 = new Invoice();
12761
                  _elem26.read(iprot);
12762
                  this.success.add(_elem26);
5443 mandeep.dh 12763
                }
12764
                iprot.readListEnd();
12765
              }
12766
            } else { 
12767
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12768
            }
12769
            break;
12770
          default:
12771
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12772
        }
12773
        iprot.readFieldEnd();
12774
      }
12775
      iprot.readStructEnd();
12776
      validate();
12777
    }
12778
 
12779
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12780
      oprot.writeStructBegin(STRUCT_DESC);
12781
 
12782
      if (this.isSetSuccess()) {
12783
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12784
        {
12785
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 12786
          for (Invoice _iter27 : this.success)
5443 mandeep.dh 12787
          {
6385 amar.kumar 12788
            _iter27.write(oprot);
5443 mandeep.dh 12789
          }
12790
          oprot.writeListEnd();
12791
        }
12792
        oprot.writeFieldEnd();
12793
      }
12794
      oprot.writeFieldStop();
12795
      oprot.writeStructEnd();
12796
    }
12797
 
12798
    @Override
12799
    public String toString() {
12800
      StringBuilder sb = new StringBuilder("getInvoices_result(");
12801
      boolean first = true;
12802
 
12803
      sb.append("success:");
12804
      if (this.success == null) {
12805
        sb.append("null");
12806
      } else {
12807
        sb.append(this.success);
12808
      }
12809
      first = false;
12810
      sb.append(")");
12811
      return sb.toString();
12812
    }
12813
 
12814
    public void validate() throws org.apache.thrift.TException {
12815
      // check for required fields
12816
    }
12817
 
12818
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12819
      try {
12820
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12821
      } catch (org.apache.thrift.TException te) {
12822
        throw new java.io.IOException(te);
12823
      }
12824
    }
12825
 
12826
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12827
      try {
12828
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12829
      } catch (org.apache.thrift.TException te) {
12830
        throw new java.io.IOException(te);
12831
      }
12832
    }
12833
 
12834
  }
12835
 
7410 amar.kumar 12836
  public static class getInvoicesForWarehouse_args implements org.apache.thrift.TBase<getInvoicesForWarehouse_args, getInvoicesForWarehouse_args._Fields>, java.io.Serializable, Cloneable   {
12837
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoicesForWarehouse_args");
12838
 
12839
    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);
12840
    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);
12841
    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);
12842
 
12843
    private long warehouseId; // required
12844
    private long supplierId; // required
12845
    private long date; // required
12846
 
12847
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12848
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12849
      WAREHOUSE_ID((short)1, "warehouseId"),
12850
      SUPPLIER_ID((short)2, "supplierId"),
12851
      DATE((short)3, "date");
12852
 
12853
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12854
 
12855
      static {
12856
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12857
          byName.put(field.getFieldName(), field);
12858
        }
12859
      }
12860
 
12861
      /**
12862
       * Find the _Fields constant that matches fieldId, or null if its not found.
12863
       */
12864
      public static _Fields findByThriftId(int fieldId) {
12865
        switch(fieldId) {
12866
          case 1: // WAREHOUSE_ID
12867
            return WAREHOUSE_ID;
12868
          case 2: // SUPPLIER_ID
12869
            return SUPPLIER_ID;
12870
          case 3: // DATE
12871
            return DATE;
12872
          default:
12873
            return null;
12874
        }
12875
      }
12876
 
12877
      /**
12878
       * Find the _Fields constant that matches fieldId, throwing an exception
12879
       * if it is not found.
12880
       */
12881
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12882
        _Fields fields = findByThriftId(fieldId);
12883
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12884
        return fields;
12885
      }
12886
 
12887
      /**
12888
       * Find the _Fields constant that matches name, or null if its not found.
12889
       */
12890
      public static _Fields findByName(String name) {
12891
        return byName.get(name);
12892
      }
12893
 
12894
      private final short _thriftId;
12895
      private final String _fieldName;
12896
 
12897
      _Fields(short thriftId, String fieldName) {
12898
        _thriftId = thriftId;
12899
        _fieldName = fieldName;
12900
      }
12901
 
12902
      public short getThriftFieldId() {
12903
        return _thriftId;
12904
      }
12905
 
12906
      public String getFieldName() {
12907
        return _fieldName;
12908
      }
12909
    }
12910
 
12911
    // isset id assignments
12912
    private static final int __WAREHOUSEID_ISSET_ID = 0;
12913
    private static final int __SUPPLIERID_ISSET_ID = 1;
12914
    private static final int __DATE_ISSET_ID = 2;
12915
    private BitSet __isset_bit_vector = new BitSet(3);
12916
 
12917
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12918
    static {
12919
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12920
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12921
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12922
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12923
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12924
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12925
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12926
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12927
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoicesForWarehouse_args.class, metaDataMap);
12928
    }
12929
 
12930
    public getInvoicesForWarehouse_args() {
12931
    }
12932
 
12933
    public getInvoicesForWarehouse_args(
12934
      long warehouseId,
12935
      long supplierId,
12936
      long date)
12937
    {
12938
      this();
12939
      this.warehouseId = warehouseId;
12940
      setWarehouseIdIsSet(true);
12941
      this.supplierId = supplierId;
12942
      setSupplierIdIsSet(true);
12943
      this.date = date;
12944
      setDateIsSet(true);
12945
    }
12946
 
12947
    /**
12948
     * Performs a deep copy on <i>other</i>.
12949
     */
12950
    public getInvoicesForWarehouse_args(getInvoicesForWarehouse_args other) {
12951
      __isset_bit_vector.clear();
12952
      __isset_bit_vector.or(other.__isset_bit_vector);
12953
      this.warehouseId = other.warehouseId;
12954
      this.supplierId = other.supplierId;
12955
      this.date = other.date;
12956
    }
12957
 
12958
    public getInvoicesForWarehouse_args deepCopy() {
12959
      return new getInvoicesForWarehouse_args(this);
12960
    }
12961
 
12962
    @Override
12963
    public void clear() {
12964
      setWarehouseIdIsSet(false);
12965
      this.warehouseId = 0;
12966
      setSupplierIdIsSet(false);
12967
      this.supplierId = 0;
12968
      setDateIsSet(false);
12969
      this.date = 0;
12970
    }
12971
 
12972
    public long getWarehouseId() {
12973
      return this.warehouseId;
12974
    }
12975
 
12976
    public void setWarehouseId(long warehouseId) {
12977
      this.warehouseId = warehouseId;
12978
      setWarehouseIdIsSet(true);
12979
    }
12980
 
12981
    public void unsetWarehouseId() {
12982
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
12983
    }
12984
 
12985
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
12986
    public boolean isSetWarehouseId() {
12987
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
12988
    }
12989
 
12990
    public void setWarehouseIdIsSet(boolean value) {
12991
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
12992
    }
12993
 
12994
    public long getSupplierId() {
12995
      return this.supplierId;
12996
    }
12997
 
12998
    public void setSupplierId(long supplierId) {
12999
      this.supplierId = supplierId;
13000
      setSupplierIdIsSet(true);
13001
    }
13002
 
13003
    public void unsetSupplierId() {
13004
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
13005
    }
13006
 
13007
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
13008
    public boolean isSetSupplierId() {
13009
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
13010
    }
13011
 
13012
    public void setSupplierIdIsSet(boolean value) {
13013
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
13014
    }
13015
 
13016
    public long getDate() {
13017
      return this.date;
13018
    }
13019
 
13020
    public void setDate(long date) {
13021
      this.date = date;
13022
      setDateIsSet(true);
13023
    }
13024
 
13025
    public void unsetDate() {
13026
      __isset_bit_vector.clear(__DATE_ISSET_ID);
13027
    }
13028
 
13029
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
13030
    public boolean isSetDate() {
13031
      return __isset_bit_vector.get(__DATE_ISSET_ID);
13032
    }
13033
 
13034
    public void setDateIsSet(boolean value) {
13035
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
13036
    }
13037
 
13038
    public void setFieldValue(_Fields field, Object value) {
13039
      switch (field) {
13040
      case WAREHOUSE_ID:
13041
        if (value == null) {
13042
          unsetWarehouseId();
13043
        } else {
13044
          setWarehouseId((Long)value);
13045
        }
13046
        break;
13047
 
13048
      case SUPPLIER_ID:
13049
        if (value == null) {
13050
          unsetSupplierId();
13051
        } else {
13052
          setSupplierId((Long)value);
13053
        }
13054
        break;
13055
 
13056
      case DATE:
13057
        if (value == null) {
13058
          unsetDate();
13059
        } else {
13060
          setDate((Long)value);
13061
        }
13062
        break;
13063
 
13064
      }
13065
    }
13066
 
13067
    public Object getFieldValue(_Fields field) {
13068
      switch (field) {
13069
      case WAREHOUSE_ID:
13070
        return Long.valueOf(getWarehouseId());
13071
 
13072
      case SUPPLIER_ID:
13073
        return Long.valueOf(getSupplierId());
13074
 
13075
      case DATE:
13076
        return Long.valueOf(getDate());
13077
 
13078
      }
13079
      throw new IllegalStateException();
13080
    }
13081
 
13082
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13083
    public boolean isSet(_Fields field) {
13084
      if (field == null) {
13085
        throw new IllegalArgumentException();
13086
      }
13087
 
13088
      switch (field) {
13089
      case WAREHOUSE_ID:
13090
        return isSetWarehouseId();
13091
      case SUPPLIER_ID:
13092
        return isSetSupplierId();
13093
      case DATE:
13094
        return isSetDate();
13095
      }
13096
      throw new IllegalStateException();
13097
    }
13098
 
13099
    @Override
13100
    public boolean equals(Object that) {
13101
      if (that == null)
13102
        return false;
13103
      if (that instanceof getInvoicesForWarehouse_args)
13104
        return this.equals((getInvoicesForWarehouse_args)that);
13105
      return false;
13106
    }
13107
 
13108
    public boolean equals(getInvoicesForWarehouse_args that) {
13109
      if (that == null)
13110
        return false;
13111
 
13112
      boolean this_present_warehouseId = true;
13113
      boolean that_present_warehouseId = true;
13114
      if (this_present_warehouseId || that_present_warehouseId) {
13115
        if (!(this_present_warehouseId && that_present_warehouseId))
13116
          return false;
13117
        if (this.warehouseId != that.warehouseId)
13118
          return false;
13119
      }
13120
 
13121
      boolean this_present_supplierId = true;
13122
      boolean that_present_supplierId = true;
13123
      if (this_present_supplierId || that_present_supplierId) {
13124
        if (!(this_present_supplierId && that_present_supplierId))
13125
          return false;
13126
        if (this.supplierId != that.supplierId)
13127
          return false;
13128
      }
13129
 
13130
      boolean this_present_date = true;
13131
      boolean that_present_date = true;
13132
      if (this_present_date || that_present_date) {
13133
        if (!(this_present_date && that_present_date))
13134
          return false;
13135
        if (this.date != that.date)
13136
          return false;
13137
      }
13138
 
13139
      return true;
13140
    }
13141
 
13142
    @Override
13143
    public int hashCode() {
13144
      return 0;
13145
    }
13146
 
13147
    public int compareTo(getInvoicesForWarehouse_args other) {
13148
      if (!getClass().equals(other.getClass())) {
13149
        return getClass().getName().compareTo(other.getClass().getName());
13150
      }
13151
 
13152
      int lastComparison = 0;
13153
      getInvoicesForWarehouse_args typedOther = (getInvoicesForWarehouse_args)other;
13154
 
13155
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
13156
      if (lastComparison != 0) {
13157
        return lastComparison;
13158
      }
13159
      if (isSetWarehouseId()) {
13160
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
13161
        if (lastComparison != 0) {
13162
          return lastComparison;
13163
        }
13164
      }
13165
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
13166
      if (lastComparison != 0) {
13167
        return lastComparison;
13168
      }
13169
      if (isSetSupplierId()) {
13170
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
13171
        if (lastComparison != 0) {
13172
          return lastComparison;
13173
        }
13174
      }
13175
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
13176
      if (lastComparison != 0) {
13177
        return lastComparison;
13178
      }
13179
      if (isSetDate()) {
13180
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
13181
        if (lastComparison != 0) {
13182
          return lastComparison;
13183
        }
13184
      }
13185
      return 0;
13186
    }
13187
 
13188
    public _Fields fieldForId(int fieldId) {
13189
      return _Fields.findByThriftId(fieldId);
13190
    }
13191
 
13192
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13193
      org.apache.thrift.protocol.TField field;
13194
      iprot.readStructBegin();
13195
      while (true)
13196
      {
13197
        field = iprot.readFieldBegin();
13198
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13199
          break;
13200
        }
13201
        switch (field.id) {
13202
          case 1: // WAREHOUSE_ID
13203
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13204
              this.warehouseId = iprot.readI64();
13205
              setWarehouseIdIsSet(true);
13206
            } else { 
13207
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13208
            }
13209
            break;
13210
          case 2: // SUPPLIER_ID
13211
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13212
              this.supplierId = iprot.readI64();
13213
              setSupplierIdIsSet(true);
13214
            } else { 
13215
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13216
            }
13217
            break;
13218
          case 3: // DATE
13219
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13220
              this.date = iprot.readI64();
13221
              setDateIsSet(true);
13222
            } else { 
13223
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13224
            }
13225
            break;
13226
          default:
13227
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13228
        }
13229
        iprot.readFieldEnd();
13230
      }
13231
      iprot.readStructEnd();
13232
      validate();
13233
    }
13234
 
13235
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13236
      validate();
13237
 
13238
      oprot.writeStructBegin(STRUCT_DESC);
13239
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
13240
      oprot.writeI64(this.warehouseId);
13241
      oprot.writeFieldEnd();
13242
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
13243
      oprot.writeI64(this.supplierId);
13244
      oprot.writeFieldEnd();
13245
      oprot.writeFieldBegin(DATE_FIELD_DESC);
13246
      oprot.writeI64(this.date);
13247
      oprot.writeFieldEnd();
13248
      oprot.writeFieldStop();
13249
      oprot.writeStructEnd();
13250
    }
13251
 
13252
    @Override
13253
    public String toString() {
13254
      StringBuilder sb = new StringBuilder("getInvoicesForWarehouse_args(");
13255
      boolean first = true;
13256
 
13257
      sb.append("warehouseId:");
13258
      sb.append(this.warehouseId);
13259
      first = false;
13260
      if (!first) sb.append(", ");
13261
      sb.append("supplierId:");
13262
      sb.append(this.supplierId);
13263
      first = false;
13264
      if (!first) sb.append(", ");
13265
      sb.append("date:");
13266
      sb.append(this.date);
13267
      first = false;
13268
      sb.append(")");
13269
      return sb.toString();
13270
    }
13271
 
13272
    public void validate() throws org.apache.thrift.TException {
13273
      // check for required fields
13274
    }
13275
 
13276
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13277
      try {
13278
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13279
      } catch (org.apache.thrift.TException te) {
13280
        throw new java.io.IOException(te);
13281
      }
13282
    }
13283
 
13284
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13285
      try {
13286
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
13287
        __isset_bit_vector = new BitSet(1);
13288
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13289
      } catch (org.apache.thrift.TException te) {
13290
        throw new java.io.IOException(te);
13291
      }
13292
    }
13293
 
13294
  }
13295
 
13296
  public static class getInvoicesForWarehouse_result implements org.apache.thrift.TBase<getInvoicesForWarehouse_result, getInvoicesForWarehouse_result._Fields>, java.io.Serializable, Cloneable   {
13297
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoicesForWarehouse_result");
13298
 
13299
    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);
13300
 
13301
    private List<Invoice> success; // required
13302
 
13303
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13304
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13305
      SUCCESS((short)0, "success");
13306
 
13307
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13308
 
13309
      static {
13310
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13311
          byName.put(field.getFieldName(), field);
13312
        }
13313
      }
13314
 
13315
      /**
13316
       * Find the _Fields constant that matches fieldId, or null if its not found.
13317
       */
13318
      public static _Fields findByThriftId(int fieldId) {
13319
        switch(fieldId) {
13320
          case 0: // SUCCESS
13321
            return SUCCESS;
13322
          default:
13323
            return null;
13324
        }
13325
      }
13326
 
13327
      /**
13328
       * Find the _Fields constant that matches fieldId, throwing an exception
13329
       * if it is not found.
13330
       */
13331
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13332
        _Fields fields = findByThriftId(fieldId);
13333
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13334
        return fields;
13335
      }
13336
 
13337
      /**
13338
       * Find the _Fields constant that matches name, or null if its not found.
13339
       */
13340
      public static _Fields findByName(String name) {
13341
        return byName.get(name);
13342
      }
13343
 
13344
      private final short _thriftId;
13345
      private final String _fieldName;
13346
 
13347
      _Fields(short thriftId, String fieldName) {
13348
        _thriftId = thriftId;
13349
        _fieldName = fieldName;
13350
      }
13351
 
13352
      public short getThriftFieldId() {
13353
        return _thriftId;
13354
      }
13355
 
13356
      public String getFieldName() {
13357
        return _fieldName;
13358
      }
13359
    }
13360
 
13361
    // isset id assignments
13362
 
13363
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13364
    static {
13365
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13366
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13367
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
13368
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class))));
13369
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13370
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoicesForWarehouse_result.class, metaDataMap);
13371
    }
13372
 
13373
    public getInvoicesForWarehouse_result() {
13374
    }
13375
 
13376
    public getInvoicesForWarehouse_result(
13377
      List<Invoice> success)
13378
    {
13379
      this();
13380
      this.success = success;
13381
    }
13382
 
13383
    /**
13384
     * Performs a deep copy on <i>other</i>.
13385
     */
13386
    public getInvoicesForWarehouse_result(getInvoicesForWarehouse_result other) {
13387
      if (other.isSetSuccess()) {
13388
        List<Invoice> __this__success = new ArrayList<Invoice>();
13389
        for (Invoice other_element : other.success) {
13390
          __this__success.add(new Invoice(other_element));
13391
        }
13392
        this.success = __this__success;
13393
      }
13394
    }
13395
 
13396
    public getInvoicesForWarehouse_result deepCopy() {
13397
      return new getInvoicesForWarehouse_result(this);
13398
    }
13399
 
13400
    @Override
13401
    public void clear() {
13402
      this.success = null;
13403
    }
13404
 
13405
    public int getSuccessSize() {
13406
      return (this.success == null) ? 0 : this.success.size();
13407
    }
13408
 
13409
    public java.util.Iterator<Invoice> getSuccessIterator() {
13410
      return (this.success == null) ? null : this.success.iterator();
13411
    }
13412
 
13413
    public void addToSuccess(Invoice elem) {
13414
      if (this.success == null) {
13415
        this.success = new ArrayList<Invoice>();
13416
      }
13417
      this.success.add(elem);
13418
    }
13419
 
13420
    public List<Invoice> getSuccess() {
13421
      return this.success;
13422
    }
13423
 
13424
    public void setSuccess(List<Invoice> success) {
13425
      this.success = success;
13426
    }
13427
 
13428
    public void unsetSuccess() {
13429
      this.success = null;
13430
    }
13431
 
13432
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
13433
    public boolean isSetSuccess() {
13434
      return this.success != null;
13435
    }
13436
 
13437
    public void setSuccessIsSet(boolean value) {
13438
      if (!value) {
13439
        this.success = null;
13440
      }
13441
    }
13442
 
13443
    public void setFieldValue(_Fields field, Object value) {
13444
      switch (field) {
13445
      case SUCCESS:
13446
        if (value == null) {
13447
          unsetSuccess();
13448
        } else {
13449
          setSuccess((List<Invoice>)value);
13450
        }
13451
        break;
13452
 
13453
      }
13454
    }
13455
 
13456
    public Object getFieldValue(_Fields field) {
13457
      switch (field) {
13458
      case SUCCESS:
13459
        return getSuccess();
13460
 
13461
      }
13462
      throw new IllegalStateException();
13463
    }
13464
 
13465
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13466
    public boolean isSet(_Fields field) {
13467
      if (field == null) {
13468
        throw new IllegalArgumentException();
13469
      }
13470
 
13471
      switch (field) {
13472
      case SUCCESS:
13473
        return isSetSuccess();
13474
      }
13475
      throw new IllegalStateException();
13476
    }
13477
 
13478
    @Override
13479
    public boolean equals(Object that) {
13480
      if (that == null)
13481
        return false;
13482
      if (that instanceof getInvoicesForWarehouse_result)
13483
        return this.equals((getInvoicesForWarehouse_result)that);
13484
      return false;
13485
    }
13486
 
13487
    public boolean equals(getInvoicesForWarehouse_result that) {
13488
      if (that == null)
13489
        return false;
13490
 
13491
      boolean this_present_success = true && this.isSetSuccess();
13492
      boolean that_present_success = true && that.isSetSuccess();
13493
      if (this_present_success || that_present_success) {
13494
        if (!(this_present_success && that_present_success))
13495
          return false;
13496
        if (!this.success.equals(that.success))
13497
          return false;
13498
      }
13499
 
13500
      return true;
13501
    }
13502
 
13503
    @Override
13504
    public int hashCode() {
13505
      return 0;
13506
    }
13507
 
13508
    public int compareTo(getInvoicesForWarehouse_result other) {
13509
      if (!getClass().equals(other.getClass())) {
13510
        return getClass().getName().compareTo(other.getClass().getName());
13511
      }
13512
 
13513
      int lastComparison = 0;
13514
      getInvoicesForWarehouse_result typedOther = (getInvoicesForWarehouse_result)other;
13515
 
13516
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
13517
      if (lastComparison != 0) {
13518
        return lastComparison;
13519
      }
13520
      if (isSetSuccess()) {
13521
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
13522
        if (lastComparison != 0) {
13523
          return lastComparison;
13524
        }
13525
      }
13526
      return 0;
13527
    }
13528
 
13529
    public _Fields fieldForId(int fieldId) {
13530
      return _Fields.findByThriftId(fieldId);
13531
    }
13532
 
13533
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13534
      org.apache.thrift.protocol.TField field;
13535
      iprot.readStructBegin();
13536
      while (true)
13537
      {
13538
        field = iprot.readFieldBegin();
13539
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13540
          break;
13541
        }
13542
        switch (field.id) {
13543
          case 0: // SUCCESS
13544
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
13545
              {
13546
                org.apache.thrift.protocol.TList _list28 = iprot.readListBegin();
13547
                this.success = new ArrayList<Invoice>(_list28.size);
13548
                for (int _i29 = 0; _i29 < _list28.size; ++_i29)
13549
                {
13550
                  Invoice _elem30; // required
13551
                  _elem30 = new Invoice();
13552
                  _elem30.read(iprot);
13553
                  this.success.add(_elem30);
13554
                }
13555
                iprot.readListEnd();
13556
              }
13557
            } else { 
13558
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13559
            }
13560
            break;
13561
          default:
13562
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13563
        }
13564
        iprot.readFieldEnd();
13565
      }
13566
      iprot.readStructEnd();
13567
      validate();
13568
    }
13569
 
13570
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13571
      oprot.writeStructBegin(STRUCT_DESC);
13572
 
13573
      if (this.isSetSuccess()) {
13574
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13575
        {
13576
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
13577
          for (Invoice _iter31 : this.success)
13578
          {
13579
            _iter31.write(oprot);
13580
          }
13581
          oprot.writeListEnd();
13582
        }
13583
        oprot.writeFieldEnd();
13584
      }
13585
      oprot.writeFieldStop();
13586
      oprot.writeStructEnd();
13587
    }
13588
 
13589
    @Override
13590
    public String toString() {
13591
      StringBuilder sb = new StringBuilder("getInvoicesForWarehouse_result(");
13592
      boolean first = true;
13593
 
13594
      sb.append("success:");
13595
      if (this.success == null) {
13596
        sb.append("null");
13597
      } else {
13598
        sb.append(this.success);
13599
      }
13600
      first = false;
13601
      sb.append(")");
13602
      return sb.toString();
13603
    }
13604
 
13605
    public void validate() throws org.apache.thrift.TException {
13606
      // check for required fields
13607
    }
13608
 
13609
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13610
      try {
13611
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13612
      } catch (org.apache.thrift.TException te) {
13613
        throw new java.io.IOException(te);
13614
      }
13615
    }
13616
 
13617
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13618
      try {
13619
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13620
      } catch (org.apache.thrift.TException te) {
13621
        throw new java.io.IOException(te);
13622
      }
13623
    }
13624
 
13625
  }
13626
 
5443 mandeep.dh 13627
  public static class createInvoice_args implements org.apache.thrift.TBase<createInvoice_args, createInvoice_args._Fields>, java.io.Serializable, Cloneable   {
13628
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_args");
13629
 
13630
    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);
13631
 
13632
    private Invoice invoice; // required
13633
 
13634
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13635
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13636
      INVOICE((short)1, "invoice");
13637
 
13638
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13639
 
13640
      static {
13641
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13642
          byName.put(field.getFieldName(), field);
13643
        }
13644
      }
13645
 
13646
      /**
13647
       * Find the _Fields constant that matches fieldId, or null if its not found.
13648
       */
13649
      public static _Fields findByThriftId(int fieldId) {
13650
        switch(fieldId) {
13651
          case 1: // INVOICE
13652
            return INVOICE;
13653
          default:
13654
            return null;
13655
        }
13656
      }
13657
 
13658
      /**
13659
       * Find the _Fields constant that matches fieldId, throwing an exception
13660
       * if it is not found.
13661
       */
13662
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13663
        _Fields fields = findByThriftId(fieldId);
13664
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13665
        return fields;
13666
      }
13667
 
13668
      /**
13669
       * Find the _Fields constant that matches name, or null if its not found.
13670
       */
13671
      public static _Fields findByName(String name) {
13672
        return byName.get(name);
13673
      }
13674
 
13675
      private final short _thriftId;
13676
      private final String _fieldName;
13677
 
13678
      _Fields(short thriftId, String fieldName) {
13679
        _thriftId = thriftId;
13680
        _fieldName = fieldName;
13681
      }
13682
 
13683
      public short getThriftFieldId() {
13684
        return _thriftId;
13685
      }
13686
 
13687
      public String getFieldName() {
13688
        return _fieldName;
13689
      }
13690
    }
13691
 
13692
    // isset id assignments
13693
 
13694
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13695
    static {
13696
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13697
      tmpMap.put(_Fields.INVOICE, new org.apache.thrift.meta_data.FieldMetaData("invoice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13698
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class)));
13699
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13700
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_args.class, metaDataMap);
13701
    }
13702
 
13703
    public createInvoice_args() {
13704
    }
13705
 
13706
    public createInvoice_args(
13707
      Invoice invoice)
13708
    {
13709
      this();
13710
      this.invoice = invoice;
13711
    }
13712
 
13713
    /**
13714
     * Performs a deep copy on <i>other</i>.
13715
     */
13716
    public createInvoice_args(createInvoice_args other) {
13717
      if (other.isSetInvoice()) {
13718
        this.invoice = new Invoice(other.invoice);
13719
      }
13720
    }
13721
 
13722
    public createInvoice_args deepCopy() {
13723
      return new createInvoice_args(this);
13724
    }
13725
 
13726
    @Override
13727
    public void clear() {
13728
      this.invoice = null;
13729
    }
13730
 
13731
    public Invoice getInvoice() {
13732
      return this.invoice;
13733
    }
13734
 
13735
    public void setInvoice(Invoice invoice) {
13736
      this.invoice = invoice;
13737
    }
13738
 
13739
    public void unsetInvoice() {
13740
      this.invoice = null;
13741
    }
13742
 
13743
    /** Returns true if field invoice is set (has been assigned a value) and false otherwise */
13744
    public boolean isSetInvoice() {
13745
      return this.invoice != null;
13746
    }
13747
 
13748
    public void setInvoiceIsSet(boolean value) {
13749
      if (!value) {
13750
        this.invoice = null;
13751
      }
13752
    }
13753
 
13754
    public void setFieldValue(_Fields field, Object value) {
13755
      switch (field) {
13756
      case INVOICE:
13757
        if (value == null) {
13758
          unsetInvoice();
13759
        } else {
13760
          setInvoice((Invoice)value);
13761
        }
13762
        break;
13763
 
13764
      }
13765
    }
13766
 
13767
    public Object getFieldValue(_Fields field) {
13768
      switch (field) {
13769
      case INVOICE:
13770
        return getInvoice();
13771
 
13772
      }
13773
      throw new IllegalStateException();
13774
    }
13775
 
13776
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13777
    public boolean isSet(_Fields field) {
13778
      if (field == null) {
13779
        throw new IllegalArgumentException();
13780
      }
13781
 
13782
      switch (field) {
13783
      case INVOICE:
13784
        return isSetInvoice();
13785
      }
13786
      throw new IllegalStateException();
13787
    }
13788
 
13789
    @Override
13790
    public boolean equals(Object that) {
13791
      if (that == null)
13792
        return false;
13793
      if (that instanceof createInvoice_args)
13794
        return this.equals((createInvoice_args)that);
13795
      return false;
13796
    }
13797
 
13798
    public boolean equals(createInvoice_args that) {
13799
      if (that == null)
13800
        return false;
13801
 
13802
      boolean this_present_invoice = true && this.isSetInvoice();
13803
      boolean that_present_invoice = true && that.isSetInvoice();
13804
      if (this_present_invoice || that_present_invoice) {
13805
        if (!(this_present_invoice && that_present_invoice))
13806
          return false;
13807
        if (!this.invoice.equals(that.invoice))
13808
          return false;
13809
      }
13810
 
13811
      return true;
13812
    }
13813
 
13814
    @Override
13815
    public int hashCode() {
13816
      return 0;
13817
    }
13818
 
13819
    public int compareTo(createInvoice_args other) {
13820
      if (!getClass().equals(other.getClass())) {
13821
        return getClass().getName().compareTo(other.getClass().getName());
13822
      }
13823
 
13824
      int lastComparison = 0;
13825
      createInvoice_args typedOther = (createInvoice_args)other;
13826
 
13827
      lastComparison = Boolean.valueOf(isSetInvoice()).compareTo(typedOther.isSetInvoice());
13828
      if (lastComparison != 0) {
13829
        return lastComparison;
13830
      }
13831
      if (isSetInvoice()) {
13832
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoice, typedOther.invoice);
13833
        if (lastComparison != 0) {
13834
          return lastComparison;
13835
        }
13836
      }
13837
      return 0;
13838
    }
13839
 
13840
    public _Fields fieldForId(int fieldId) {
13841
      return _Fields.findByThriftId(fieldId);
13842
    }
13843
 
13844
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13845
      org.apache.thrift.protocol.TField field;
13846
      iprot.readStructBegin();
13847
      while (true)
13848
      {
13849
        field = iprot.readFieldBegin();
13850
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13851
          break;
13852
        }
13853
        switch (field.id) {
13854
          case 1: // INVOICE
13855
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
13856
              this.invoice = new Invoice();
13857
              this.invoice.read(iprot);
13858
            } else { 
13859
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13860
            }
13861
            break;
13862
          default:
13863
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13864
        }
13865
        iprot.readFieldEnd();
13866
      }
13867
      iprot.readStructEnd();
13868
      validate();
13869
    }
13870
 
13871
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13872
      validate();
13873
 
13874
      oprot.writeStructBegin(STRUCT_DESC);
13875
      if (this.invoice != null) {
13876
        oprot.writeFieldBegin(INVOICE_FIELD_DESC);
13877
        this.invoice.write(oprot);
13878
        oprot.writeFieldEnd();
13879
      }
13880
      oprot.writeFieldStop();
13881
      oprot.writeStructEnd();
13882
    }
13883
 
13884
    @Override
13885
    public String toString() {
13886
      StringBuilder sb = new StringBuilder("createInvoice_args(");
13887
      boolean first = true;
13888
 
13889
      sb.append("invoice:");
13890
      if (this.invoice == null) {
13891
        sb.append("null");
13892
      } else {
13893
        sb.append(this.invoice);
13894
      }
13895
      first = false;
13896
      sb.append(")");
13897
      return sb.toString();
13898
    }
13899
 
13900
    public void validate() throws org.apache.thrift.TException {
13901
      // check for required fields
13902
    }
13903
 
13904
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13905
      try {
13906
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13907
      } catch (org.apache.thrift.TException te) {
13908
        throw new java.io.IOException(te);
13909
      }
13910
    }
13911
 
13912
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13913
      try {
13914
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13915
      } catch (org.apache.thrift.TException te) {
13916
        throw new java.io.IOException(te);
13917
      }
13918
    }
13919
 
13920
  }
13921
 
13922
  public static class createInvoice_result implements org.apache.thrift.TBase<createInvoice_result, createInvoice_result._Fields>, java.io.Serializable, Cloneable   {
13923
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_result");
13924
 
13925
    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);
13926
 
13927
    private PurchaseServiceException e; // required
13928
 
13929
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13930
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13931
      E((short)1, "e");
13932
 
13933
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13934
 
13935
      static {
13936
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13937
          byName.put(field.getFieldName(), field);
13938
        }
13939
      }
13940
 
13941
      /**
13942
       * Find the _Fields constant that matches fieldId, or null if its not found.
13943
       */
13944
      public static _Fields findByThriftId(int fieldId) {
13945
        switch(fieldId) {
13946
          case 1: // E
13947
            return E;
13948
          default:
13949
            return null;
13950
        }
13951
      }
13952
 
13953
      /**
13954
       * Find the _Fields constant that matches fieldId, throwing an exception
13955
       * if it is not found.
13956
       */
13957
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13958
        _Fields fields = findByThriftId(fieldId);
13959
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13960
        return fields;
13961
      }
13962
 
13963
      /**
13964
       * Find the _Fields constant that matches name, or null if its not found.
13965
       */
13966
      public static _Fields findByName(String name) {
13967
        return byName.get(name);
13968
      }
13969
 
13970
      private final short _thriftId;
13971
      private final String _fieldName;
13972
 
13973
      _Fields(short thriftId, String fieldName) {
13974
        _thriftId = thriftId;
13975
        _fieldName = fieldName;
13976
      }
13977
 
13978
      public short getThriftFieldId() {
13979
        return _thriftId;
13980
      }
13981
 
13982
      public String getFieldName() {
13983
        return _fieldName;
13984
      }
13985
    }
13986
 
13987
    // isset id assignments
13988
 
13989
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13990
    static {
13991
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13992
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13993
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
13994
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13995
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_result.class, metaDataMap);
13996
    }
13997
 
13998
    public createInvoice_result() {
13999
    }
14000
 
14001
    public createInvoice_result(
14002
      PurchaseServiceException e)
14003
    {
14004
      this();
14005
      this.e = e;
14006
    }
14007
 
14008
    /**
14009
     * Performs a deep copy on <i>other</i>.
14010
     */
14011
    public createInvoice_result(createInvoice_result other) {
14012
      if (other.isSetE()) {
14013
        this.e = new PurchaseServiceException(other.e);
14014
      }
14015
    }
14016
 
14017
    public createInvoice_result deepCopy() {
14018
      return new createInvoice_result(this);
14019
    }
14020
 
14021
    @Override
14022
    public void clear() {
14023
      this.e = null;
14024
    }
14025
 
14026
    public PurchaseServiceException getE() {
14027
      return this.e;
14028
    }
14029
 
14030
    public void setE(PurchaseServiceException e) {
14031
      this.e = e;
14032
    }
14033
 
14034
    public void unsetE() {
14035
      this.e = null;
14036
    }
14037
 
14038
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
14039
    public boolean isSetE() {
14040
      return this.e != null;
14041
    }
14042
 
14043
    public void setEIsSet(boolean value) {
14044
      if (!value) {
14045
        this.e = null;
14046
      }
14047
    }
14048
 
14049
    public void setFieldValue(_Fields field, Object value) {
14050
      switch (field) {
14051
      case E:
14052
        if (value == null) {
14053
          unsetE();
14054
        } else {
14055
          setE((PurchaseServiceException)value);
14056
        }
14057
        break;
14058
 
14059
      }
14060
    }
14061
 
14062
    public Object getFieldValue(_Fields field) {
14063
      switch (field) {
14064
      case E:
14065
        return getE();
14066
 
14067
      }
14068
      throw new IllegalStateException();
14069
    }
14070
 
14071
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14072
    public boolean isSet(_Fields field) {
14073
      if (field == null) {
14074
        throw new IllegalArgumentException();
14075
      }
14076
 
14077
      switch (field) {
14078
      case E:
14079
        return isSetE();
14080
      }
14081
      throw new IllegalStateException();
14082
    }
14083
 
14084
    @Override
14085
    public boolean equals(Object that) {
14086
      if (that == null)
14087
        return false;
14088
      if (that instanceof createInvoice_result)
14089
        return this.equals((createInvoice_result)that);
14090
      return false;
14091
    }
14092
 
14093
    public boolean equals(createInvoice_result that) {
14094
      if (that == null)
14095
        return false;
14096
 
14097
      boolean this_present_e = true && this.isSetE();
14098
      boolean that_present_e = true && that.isSetE();
14099
      if (this_present_e || that_present_e) {
14100
        if (!(this_present_e && that_present_e))
14101
          return false;
14102
        if (!this.e.equals(that.e))
14103
          return false;
14104
      }
14105
 
14106
      return true;
14107
    }
14108
 
14109
    @Override
14110
    public int hashCode() {
14111
      return 0;
14112
    }
14113
 
14114
    public int compareTo(createInvoice_result other) {
14115
      if (!getClass().equals(other.getClass())) {
14116
        return getClass().getName().compareTo(other.getClass().getName());
14117
      }
14118
 
14119
      int lastComparison = 0;
14120
      createInvoice_result typedOther = (createInvoice_result)other;
14121
 
14122
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
14123
      if (lastComparison != 0) {
14124
        return lastComparison;
14125
      }
14126
      if (isSetE()) {
14127
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
14128
        if (lastComparison != 0) {
14129
          return lastComparison;
14130
        }
14131
      }
14132
      return 0;
14133
    }
14134
 
14135
    public _Fields fieldForId(int fieldId) {
14136
      return _Fields.findByThriftId(fieldId);
14137
    }
14138
 
14139
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14140
      org.apache.thrift.protocol.TField field;
14141
      iprot.readStructBegin();
14142
      while (true)
14143
      {
14144
        field = iprot.readFieldBegin();
14145
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14146
          break;
14147
        }
14148
        switch (field.id) {
14149
          case 1: // E
14150
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14151
              this.e = new PurchaseServiceException();
14152
              this.e.read(iprot);
14153
            } else { 
14154
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14155
            }
14156
            break;
14157
          default:
14158
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14159
        }
14160
        iprot.readFieldEnd();
14161
      }
14162
      iprot.readStructEnd();
14163
      validate();
14164
    }
14165
 
14166
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14167
      oprot.writeStructBegin(STRUCT_DESC);
14168
 
14169
      if (this.isSetE()) {
14170
        oprot.writeFieldBegin(E_FIELD_DESC);
14171
        this.e.write(oprot);
14172
        oprot.writeFieldEnd();
14173
      }
14174
      oprot.writeFieldStop();
14175
      oprot.writeStructEnd();
14176
    }
14177
 
14178
    @Override
14179
    public String toString() {
14180
      StringBuilder sb = new StringBuilder("createInvoice_result(");
14181
      boolean first = true;
14182
 
14183
      sb.append("e:");
14184
      if (this.e == null) {
14185
        sb.append("null");
14186
      } else {
14187
        sb.append(this.e);
14188
      }
14189
      first = false;
14190
      sb.append(")");
14191
      return sb.toString();
14192
    }
14193
 
14194
    public void validate() throws org.apache.thrift.TException {
14195
      // check for required fields
14196
    }
14197
 
14198
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14199
      try {
14200
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14201
      } catch (org.apache.thrift.TException te) {
14202
        throw new java.io.IOException(te);
14203
      }
14204
    }
14205
 
14206
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14207
      try {
14208
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14209
      } catch (org.apache.thrift.TException te) {
14210
        throw new java.io.IOException(te);
14211
      }
14212
    }
14213
 
14214
  }
14215
 
5591 mandeep.dh 14216
  public static class addSupplier_args implements org.apache.thrift.TBase<addSupplier_args, addSupplier_args._Fields>, java.io.Serializable, Cloneable   {
14217
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSupplier_args");
14218
 
14219
    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);
14220
 
14221
    private Supplier supplier; // required
14222
 
14223
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14224
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14225
      SUPPLIER((short)1, "supplier");
14226
 
14227
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14228
 
14229
      static {
14230
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14231
          byName.put(field.getFieldName(), field);
14232
        }
14233
      }
14234
 
14235
      /**
14236
       * Find the _Fields constant that matches fieldId, or null if its not found.
14237
       */
14238
      public static _Fields findByThriftId(int fieldId) {
14239
        switch(fieldId) {
14240
          case 1: // SUPPLIER
14241
            return SUPPLIER;
14242
          default:
14243
            return null;
14244
        }
14245
      }
14246
 
14247
      /**
14248
       * Find the _Fields constant that matches fieldId, throwing an exception
14249
       * if it is not found.
14250
       */
14251
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14252
        _Fields fields = findByThriftId(fieldId);
14253
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14254
        return fields;
14255
      }
14256
 
14257
      /**
14258
       * Find the _Fields constant that matches name, or null if its not found.
14259
       */
14260
      public static _Fields findByName(String name) {
14261
        return byName.get(name);
14262
      }
14263
 
14264
      private final short _thriftId;
14265
      private final String _fieldName;
14266
 
14267
      _Fields(short thriftId, String fieldName) {
14268
        _thriftId = thriftId;
14269
        _fieldName = fieldName;
14270
      }
14271
 
14272
      public short getThriftFieldId() {
14273
        return _thriftId;
14274
      }
14275
 
14276
      public String getFieldName() {
14277
        return _fieldName;
14278
      }
14279
    }
14280
 
14281
    // isset id assignments
14282
 
14283
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14284
    static {
14285
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14286
      tmpMap.put(_Fields.SUPPLIER, new org.apache.thrift.meta_data.FieldMetaData("supplier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14287
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
14288
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14289
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSupplier_args.class, metaDataMap);
14290
    }
14291
 
14292
    public addSupplier_args() {
14293
    }
14294
 
14295
    public addSupplier_args(
14296
      Supplier supplier)
14297
    {
14298
      this();
14299
      this.supplier = supplier;
14300
    }
14301
 
14302
    /**
14303
     * Performs a deep copy on <i>other</i>.
14304
     */
14305
    public addSupplier_args(addSupplier_args other) {
14306
      if (other.isSetSupplier()) {
14307
        this.supplier = new Supplier(other.supplier);
14308
      }
14309
    }
14310
 
14311
    public addSupplier_args deepCopy() {
14312
      return new addSupplier_args(this);
14313
    }
14314
 
14315
    @Override
14316
    public void clear() {
14317
      this.supplier = null;
14318
    }
14319
 
14320
    public Supplier getSupplier() {
14321
      return this.supplier;
14322
    }
14323
 
14324
    public void setSupplier(Supplier supplier) {
14325
      this.supplier = supplier;
14326
    }
14327
 
14328
    public void unsetSupplier() {
14329
      this.supplier = null;
14330
    }
14331
 
14332
    /** Returns true if field supplier is set (has been assigned a value) and false otherwise */
14333
    public boolean isSetSupplier() {
14334
      return this.supplier != null;
14335
    }
14336
 
14337
    public void setSupplierIsSet(boolean value) {
14338
      if (!value) {
14339
        this.supplier = null;
14340
      }
14341
    }
14342
 
14343
    public void setFieldValue(_Fields field, Object value) {
14344
      switch (field) {
14345
      case SUPPLIER:
14346
        if (value == null) {
14347
          unsetSupplier();
14348
        } else {
14349
          setSupplier((Supplier)value);
14350
        }
14351
        break;
14352
 
14353
      }
14354
    }
14355
 
14356
    public Object getFieldValue(_Fields field) {
14357
      switch (field) {
14358
      case SUPPLIER:
14359
        return getSupplier();
14360
 
14361
      }
14362
      throw new IllegalStateException();
14363
    }
14364
 
14365
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14366
    public boolean isSet(_Fields field) {
14367
      if (field == null) {
14368
        throw new IllegalArgumentException();
14369
      }
14370
 
14371
      switch (field) {
14372
      case SUPPLIER:
14373
        return isSetSupplier();
14374
      }
14375
      throw new IllegalStateException();
14376
    }
14377
 
14378
    @Override
14379
    public boolean equals(Object that) {
14380
      if (that == null)
14381
        return false;
14382
      if (that instanceof addSupplier_args)
14383
        return this.equals((addSupplier_args)that);
14384
      return false;
14385
    }
14386
 
14387
    public boolean equals(addSupplier_args that) {
14388
      if (that == null)
14389
        return false;
14390
 
14391
      boolean this_present_supplier = true && this.isSetSupplier();
14392
      boolean that_present_supplier = true && that.isSetSupplier();
14393
      if (this_present_supplier || that_present_supplier) {
14394
        if (!(this_present_supplier && that_present_supplier))
14395
          return false;
14396
        if (!this.supplier.equals(that.supplier))
14397
          return false;
14398
      }
14399
 
14400
      return true;
14401
    }
14402
 
14403
    @Override
14404
    public int hashCode() {
14405
      return 0;
14406
    }
14407
 
14408
    public int compareTo(addSupplier_args other) {
14409
      if (!getClass().equals(other.getClass())) {
14410
        return getClass().getName().compareTo(other.getClass().getName());
14411
      }
14412
 
14413
      int lastComparison = 0;
14414
      addSupplier_args typedOther = (addSupplier_args)other;
14415
 
14416
      lastComparison = Boolean.valueOf(isSetSupplier()).compareTo(typedOther.isSetSupplier());
14417
      if (lastComparison != 0) {
14418
        return lastComparison;
14419
      }
14420
      if (isSetSupplier()) {
14421
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplier, typedOther.supplier);
14422
        if (lastComparison != 0) {
14423
          return lastComparison;
14424
        }
14425
      }
14426
      return 0;
14427
    }
14428
 
14429
    public _Fields fieldForId(int fieldId) {
14430
      return _Fields.findByThriftId(fieldId);
14431
    }
14432
 
14433
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14434
      org.apache.thrift.protocol.TField field;
14435
      iprot.readStructBegin();
14436
      while (true)
14437
      {
14438
        field = iprot.readFieldBegin();
14439
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14440
          break;
14441
        }
14442
        switch (field.id) {
14443
          case 1: // SUPPLIER
14444
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14445
              this.supplier = new Supplier();
14446
              this.supplier.read(iprot);
14447
            } else { 
14448
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14449
            }
14450
            break;
14451
          default:
14452
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14453
        }
14454
        iprot.readFieldEnd();
14455
      }
14456
      iprot.readStructEnd();
14457
      validate();
14458
    }
14459
 
14460
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14461
      validate();
14462
 
14463
      oprot.writeStructBegin(STRUCT_DESC);
14464
      if (this.supplier != null) {
14465
        oprot.writeFieldBegin(SUPPLIER_FIELD_DESC);
14466
        this.supplier.write(oprot);
14467
        oprot.writeFieldEnd();
14468
      }
14469
      oprot.writeFieldStop();
14470
      oprot.writeStructEnd();
14471
    }
14472
 
14473
    @Override
14474
    public String toString() {
14475
      StringBuilder sb = new StringBuilder("addSupplier_args(");
14476
      boolean first = true;
14477
 
14478
      sb.append("supplier:");
14479
      if (this.supplier == null) {
14480
        sb.append("null");
14481
      } else {
14482
        sb.append(this.supplier);
14483
      }
14484
      first = false;
14485
      sb.append(")");
14486
      return sb.toString();
14487
    }
14488
 
14489
    public void validate() throws org.apache.thrift.TException {
14490
      // check for required fields
14491
    }
14492
 
14493
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14494
      try {
14495
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14496
      } catch (org.apache.thrift.TException te) {
14497
        throw new java.io.IOException(te);
14498
      }
14499
    }
14500
 
14501
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14502
      try {
14503
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14504
      } catch (org.apache.thrift.TException te) {
14505
        throw new java.io.IOException(te);
14506
      }
14507
    }
14508
 
14509
  }
14510
 
14511
  public static class addSupplier_result implements org.apache.thrift.TBase<addSupplier_result, addSupplier_result._Fields>, java.io.Serializable, Cloneable   {
14512
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSupplier_result");
14513
 
14514
    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);
14515
 
14516
    private Supplier success; // required
14517
 
14518
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14519
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14520
      SUCCESS((short)0, "success");
14521
 
14522
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14523
 
14524
      static {
14525
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14526
          byName.put(field.getFieldName(), field);
14527
        }
14528
      }
14529
 
14530
      /**
14531
       * Find the _Fields constant that matches fieldId, or null if its not found.
14532
       */
14533
      public static _Fields findByThriftId(int fieldId) {
14534
        switch(fieldId) {
14535
          case 0: // SUCCESS
14536
            return SUCCESS;
14537
          default:
14538
            return null;
14539
        }
14540
      }
14541
 
14542
      /**
14543
       * Find the _Fields constant that matches fieldId, throwing an exception
14544
       * if it is not found.
14545
       */
14546
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14547
        _Fields fields = findByThriftId(fieldId);
14548
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14549
        return fields;
14550
      }
14551
 
14552
      /**
14553
       * Find the _Fields constant that matches name, or null if its not found.
14554
       */
14555
      public static _Fields findByName(String name) {
14556
        return byName.get(name);
14557
      }
14558
 
14559
      private final short _thriftId;
14560
      private final String _fieldName;
14561
 
14562
      _Fields(short thriftId, String fieldName) {
14563
        _thriftId = thriftId;
14564
        _fieldName = fieldName;
14565
      }
14566
 
14567
      public short getThriftFieldId() {
14568
        return _thriftId;
14569
      }
14570
 
14571
      public String getFieldName() {
14572
        return _fieldName;
14573
      }
14574
    }
14575
 
14576
    // isset id assignments
14577
 
14578
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14579
    static {
14580
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14581
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14582
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
14583
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14584
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSupplier_result.class, metaDataMap);
14585
    }
14586
 
14587
    public addSupplier_result() {
14588
    }
14589
 
14590
    public addSupplier_result(
14591
      Supplier success)
14592
    {
14593
      this();
14594
      this.success = success;
14595
    }
14596
 
14597
    /**
14598
     * Performs a deep copy on <i>other</i>.
14599
     */
14600
    public addSupplier_result(addSupplier_result other) {
14601
      if (other.isSetSuccess()) {
14602
        this.success = new Supplier(other.success);
14603
      }
14604
    }
14605
 
14606
    public addSupplier_result deepCopy() {
14607
      return new addSupplier_result(this);
14608
    }
14609
 
14610
    @Override
14611
    public void clear() {
14612
      this.success = null;
14613
    }
14614
 
14615
    public Supplier getSuccess() {
14616
      return this.success;
14617
    }
14618
 
14619
    public void setSuccess(Supplier success) {
14620
      this.success = success;
14621
    }
14622
 
14623
    public void unsetSuccess() {
14624
      this.success = null;
14625
    }
14626
 
14627
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
14628
    public boolean isSetSuccess() {
14629
      return this.success != null;
14630
    }
14631
 
14632
    public void setSuccessIsSet(boolean value) {
14633
      if (!value) {
14634
        this.success = null;
14635
      }
14636
    }
14637
 
14638
    public void setFieldValue(_Fields field, Object value) {
14639
      switch (field) {
14640
      case SUCCESS:
14641
        if (value == null) {
14642
          unsetSuccess();
14643
        } else {
14644
          setSuccess((Supplier)value);
14645
        }
14646
        break;
14647
 
14648
      }
14649
    }
14650
 
14651
    public Object getFieldValue(_Fields field) {
14652
      switch (field) {
14653
      case SUCCESS:
14654
        return getSuccess();
14655
 
14656
      }
14657
      throw new IllegalStateException();
14658
    }
14659
 
14660
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14661
    public boolean isSet(_Fields field) {
14662
      if (field == null) {
14663
        throw new IllegalArgumentException();
14664
      }
14665
 
14666
      switch (field) {
14667
      case SUCCESS:
14668
        return isSetSuccess();
14669
      }
14670
      throw new IllegalStateException();
14671
    }
14672
 
14673
    @Override
14674
    public boolean equals(Object that) {
14675
      if (that == null)
14676
        return false;
14677
      if (that instanceof addSupplier_result)
14678
        return this.equals((addSupplier_result)that);
14679
      return false;
14680
    }
14681
 
14682
    public boolean equals(addSupplier_result that) {
14683
      if (that == null)
14684
        return false;
14685
 
14686
      boolean this_present_success = true && this.isSetSuccess();
14687
      boolean that_present_success = true && that.isSetSuccess();
14688
      if (this_present_success || that_present_success) {
14689
        if (!(this_present_success && that_present_success))
14690
          return false;
14691
        if (!this.success.equals(that.success))
14692
          return false;
14693
      }
14694
 
14695
      return true;
14696
    }
14697
 
14698
    @Override
14699
    public int hashCode() {
14700
      return 0;
14701
    }
14702
 
14703
    public int compareTo(addSupplier_result other) {
14704
      if (!getClass().equals(other.getClass())) {
14705
        return getClass().getName().compareTo(other.getClass().getName());
14706
      }
14707
 
14708
      int lastComparison = 0;
14709
      addSupplier_result typedOther = (addSupplier_result)other;
14710
 
14711
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
14712
      if (lastComparison != 0) {
14713
        return lastComparison;
14714
      }
14715
      if (isSetSuccess()) {
14716
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
14717
        if (lastComparison != 0) {
14718
          return lastComparison;
14719
        }
14720
      }
14721
      return 0;
14722
    }
14723
 
14724
    public _Fields fieldForId(int fieldId) {
14725
      return _Fields.findByThriftId(fieldId);
14726
    }
14727
 
14728
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14729
      org.apache.thrift.protocol.TField field;
14730
      iprot.readStructBegin();
14731
      while (true)
14732
      {
14733
        field = iprot.readFieldBegin();
14734
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14735
          break;
14736
        }
14737
        switch (field.id) {
14738
          case 0: // SUCCESS
14739
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14740
              this.success = new Supplier();
14741
              this.success.read(iprot);
14742
            } else { 
14743
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14744
            }
14745
            break;
14746
          default:
14747
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14748
        }
14749
        iprot.readFieldEnd();
14750
      }
14751
      iprot.readStructEnd();
14752
      validate();
14753
    }
14754
 
14755
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14756
      oprot.writeStructBegin(STRUCT_DESC);
14757
 
14758
      if (this.isSetSuccess()) {
14759
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14760
        this.success.write(oprot);
14761
        oprot.writeFieldEnd();
14762
      }
14763
      oprot.writeFieldStop();
14764
      oprot.writeStructEnd();
14765
    }
14766
 
14767
    @Override
14768
    public String toString() {
14769
      StringBuilder sb = new StringBuilder("addSupplier_result(");
14770
      boolean first = true;
14771
 
14772
      sb.append("success:");
14773
      if (this.success == null) {
14774
        sb.append("null");
14775
      } else {
14776
        sb.append(this.success);
14777
      }
14778
      first = false;
14779
      sb.append(")");
14780
      return sb.toString();
14781
    }
14782
 
14783
    public void validate() throws org.apache.thrift.TException {
14784
      // check for required fields
14785
    }
14786
 
14787
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14788
      try {
14789
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14790
      } catch (org.apache.thrift.TException te) {
14791
        throw new java.io.IOException(te);
14792
      }
14793
    }
14794
 
14795
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14796
      try {
14797
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14798
      } catch (org.apache.thrift.TException te) {
14799
        throw new java.io.IOException(te);
14800
      }
14801
    }
14802
 
14803
  }
14804
 
14805
  public static class updateSupplier_args implements org.apache.thrift.TBase<updateSupplier_args, updateSupplier_args._Fields>, java.io.Serializable, Cloneable   {
14806
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSupplier_args");
14807
 
14808
    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);
14809
 
14810
    private Supplier supplier; // required
14811
 
14812
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14813
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14814
      SUPPLIER((short)1, "supplier");
14815
 
14816
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14817
 
14818
      static {
14819
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14820
          byName.put(field.getFieldName(), field);
14821
        }
14822
      }
14823
 
14824
      /**
14825
       * Find the _Fields constant that matches fieldId, or null if its not found.
14826
       */
14827
      public static _Fields findByThriftId(int fieldId) {
14828
        switch(fieldId) {
14829
          case 1: // SUPPLIER
14830
            return SUPPLIER;
14831
          default:
14832
            return null;
14833
        }
14834
      }
14835
 
14836
      /**
14837
       * Find the _Fields constant that matches fieldId, throwing an exception
14838
       * if it is not found.
14839
       */
14840
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14841
        _Fields fields = findByThriftId(fieldId);
14842
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14843
        return fields;
14844
      }
14845
 
14846
      /**
14847
       * Find the _Fields constant that matches name, or null if its not found.
14848
       */
14849
      public static _Fields findByName(String name) {
14850
        return byName.get(name);
14851
      }
14852
 
14853
      private final short _thriftId;
14854
      private final String _fieldName;
14855
 
14856
      _Fields(short thriftId, String fieldName) {
14857
        _thriftId = thriftId;
14858
        _fieldName = fieldName;
14859
      }
14860
 
14861
      public short getThriftFieldId() {
14862
        return _thriftId;
14863
      }
14864
 
14865
      public String getFieldName() {
14866
        return _fieldName;
14867
      }
14868
    }
14869
 
14870
    // isset id assignments
14871
 
14872
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14873
    static {
14874
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14875
      tmpMap.put(_Fields.SUPPLIER, new org.apache.thrift.meta_data.FieldMetaData("supplier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14876
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
14877
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14878
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSupplier_args.class, metaDataMap);
14879
    }
14880
 
14881
    public updateSupplier_args() {
14882
    }
14883
 
14884
    public updateSupplier_args(
14885
      Supplier supplier)
14886
    {
14887
      this();
14888
      this.supplier = supplier;
14889
    }
14890
 
14891
    /**
14892
     * Performs a deep copy on <i>other</i>.
14893
     */
14894
    public updateSupplier_args(updateSupplier_args other) {
14895
      if (other.isSetSupplier()) {
14896
        this.supplier = new Supplier(other.supplier);
14897
      }
14898
    }
14899
 
14900
    public updateSupplier_args deepCopy() {
14901
      return new updateSupplier_args(this);
14902
    }
14903
 
14904
    @Override
14905
    public void clear() {
14906
      this.supplier = null;
14907
    }
14908
 
14909
    public Supplier getSupplier() {
14910
      return this.supplier;
14911
    }
14912
 
14913
    public void setSupplier(Supplier supplier) {
14914
      this.supplier = supplier;
14915
    }
14916
 
14917
    public void unsetSupplier() {
14918
      this.supplier = null;
14919
    }
14920
 
14921
    /** Returns true if field supplier is set (has been assigned a value) and false otherwise */
14922
    public boolean isSetSupplier() {
14923
      return this.supplier != null;
14924
    }
14925
 
14926
    public void setSupplierIsSet(boolean value) {
14927
      if (!value) {
14928
        this.supplier = null;
14929
      }
14930
    }
14931
 
14932
    public void setFieldValue(_Fields field, Object value) {
14933
      switch (field) {
14934
      case SUPPLIER:
14935
        if (value == null) {
14936
          unsetSupplier();
14937
        } else {
14938
          setSupplier((Supplier)value);
14939
        }
14940
        break;
14941
 
14942
      }
14943
    }
14944
 
14945
    public Object getFieldValue(_Fields field) {
14946
      switch (field) {
14947
      case SUPPLIER:
14948
        return getSupplier();
14949
 
14950
      }
14951
      throw new IllegalStateException();
14952
    }
14953
 
14954
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14955
    public boolean isSet(_Fields field) {
14956
      if (field == null) {
14957
        throw new IllegalArgumentException();
14958
      }
14959
 
14960
      switch (field) {
14961
      case SUPPLIER:
14962
        return isSetSupplier();
14963
      }
14964
      throw new IllegalStateException();
14965
    }
14966
 
14967
    @Override
14968
    public boolean equals(Object that) {
14969
      if (that == null)
14970
        return false;
14971
      if (that instanceof updateSupplier_args)
14972
        return this.equals((updateSupplier_args)that);
14973
      return false;
14974
    }
14975
 
14976
    public boolean equals(updateSupplier_args that) {
14977
      if (that == null)
14978
        return false;
14979
 
14980
      boolean this_present_supplier = true && this.isSetSupplier();
14981
      boolean that_present_supplier = true && that.isSetSupplier();
14982
      if (this_present_supplier || that_present_supplier) {
14983
        if (!(this_present_supplier && that_present_supplier))
14984
          return false;
14985
        if (!this.supplier.equals(that.supplier))
14986
          return false;
14987
      }
14988
 
14989
      return true;
14990
    }
14991
 
14992
    @Override
14993
    public int hashCode() {
14994
      return 0;
14995
    }
14996
 
14997
    public int compareTo(updateSupplier_args other) {
14998
      if (!getClass().equals(other.getClass())) {
14999
        return getClass().getName().compareTo(other.getClass().getName());
15000
      }
15001
 
15002
      int lastComparison = 0;
15003
      updateSupplier_args typedOther = (updateSupplier_args)other;
15004
 
15005
      lastComparison = Boolean.valueOf(isSetSupplier()).compareTo(typedOther.isSetSupplier());
15006
      if (lastComparison != 0) {
15007
        return lastComparison;
15008
      }
15009
      if (isSetSupplier()) {
15010
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplier, typedOther.supplier);
15011
        if (lastComparison != 0) {
15012
          return lastComparison;
15013
        }
15014
      }
15015
      return 0;
15016
    }
15017
 
15018
    public _Fields fieldForId(int fieldId) {
15019
      return _Fields.findByThriftId(fieldId);
15020
    }
15021
 
15022
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15023
      org.apache.thrift.protocol.TField field;
15024
      iprot.readStructBegin();
15025
      while (true)
15026
      {
15027
        field = iprot.readFieldBegin();
15028
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15029
          break;
15030
        }
15031
        switch (field.id) {
15032
          case 1: // SUPPLIER
15033
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15034
              this.supplier = new Supplier();
15035
              this.supplier.read(iprot);
15036
            } else { 
15037
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15038
            }
15039
            break;
15040
          default:
15041
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15042
        }
15043
        iprot.readFieldEnd();
15044
      }
15045
      iprot.readStructEnd();
15046
      validate();
15047
    }
15048
 
15049
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15050
      validate();
15051
 
15052
      oprot.writeStructBegin(STRUCT_DESC);
15053
      if (this.supplier != null) {
15054
        oprot.writeFieldBegin(SUPPLIER_FIELD_DESC);
15055
        this.supplier.write(oprot);
15056
        oprot.writeFieldEnd();
15057
      }
15058
      oprot.writeFieldStop();
15059
      oprot.writeStructEnd();
15060
    }
15061
 
15062
    @Override
15063
    public String toString() {
15064
      StringBuilder sb = new StringBuilder("updateSupplier_args(");
15065
      boolean first = true;
15066
 
15067
      sb.append("supplier:");
15068
      if (this.supplier == null) {
15069
        sb.append("null");
15070
      } else {
15071
        sb.append(this.supplier);
15072
      }
15073
      first = false;
15074
      sb.append(")");
15075
      return sb.toString();
15076
    }
15077
 
15078
    public void validate() throws org.apache.thrift.TException {
15079
      // check for required fields
15080
    }
15081
 
15082
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15083
      try {
15084
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15085
      } catch (org.apache.thrift.TException te) {
15086
        throw new java.io.IOException(te);
15087
      }
15088
    }
15089
 
15090
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15091
      try {
15092
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15093
      } catch (org.apache.thrift.TException te) {
15094
        throw new java.io.IOException(te);
15095
      }
15096
    }
15097
 
15098
  }
15099
 
15100
  public static class updateSupplier_result implements org.apache.thrift.TBase<updateSupplier_result, updateSupplier_result._Fields>, java.io.Serializable, Cloneable   {
15101
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSupplier_result");
15102
 
15103
 
15104
 
15105
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15106
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15107
;
15108
 
15109
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15110
 
15111
      static {
15112
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15113
          byName.put(field.getFieldName(), field);
15114
        }
15115
      }
15116
 
15117
      /**
15118
       * Find the _Fields constant that matches fieldId, or null if its not found.
15119
       */
15120
      public static _Fields findByThriftId(int fieldId) {
15121
        switch(fieldId) {
15122
          default:
15123
            return null;
15124
        }
15125
      }
15126
 
15127
      /**
15128
       * Find the _Fields constant that matches fieldId, throwing an exception
15129
       * if it is not found.
15130
       */
15131
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15132
        _Fields fields = findByThriftId(fieldId);
15133
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15134
        return fields;
15135
      }
15136
 
15137
      /**
15138
       * Find the _Fields constant that matches name, or null if its not found.
15139
       */
15140
      public static _Fields findByName(String name) {
15141
        return byName.get(name);
15142
      }
15143
 
15144
      private final short _thriftId;
15145
      private final String _fieldName;
15146
 
15147
      _Fields(short thriftId, String fieldName) {
15148
        _thriftId = thriftId;
15149
        _fieldName = fieldName;
15150
      }
15151
 
15152
      public short getThriftFieldId() {
15153
        return _thriftId;
15154
      }
15155
 
15156
      public String getFieldName() {
15157
        return _fieldName;
15158
      }
15159
    }
15160
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15161
    static {
15162
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15163
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15164
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSupplier_result.class, metaDataMap);
15165
    }
15166
 
15167
    public updateSupplier_result() {
15168
    }
15169
 
15170
    /**
15171
     * Performs a deep copy on <i>other</i>.
15172
     */
15173
    public updateSupplier_result(updateSupplier_result other) {
15174
    }
15175
 
15176
    public updateSupplier_result deepCopy() {
15177
      return new updateSupplier_result(this);
15178
    }
15179
 
15180
    @Override
15181
    public void clear() {
15182
    }
15183
 
15184
    public void setFieldValue(_Fields field, Object value) {
15185
      switch (field) {
15186
      }
15187
    }
15188
 
15189
    public Object getFieldValue(_Fields field) {
15190
      switch (field) {
15191
      }
15192
      throw new IllegalStateException();
15193
    }
15194
 
15195
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15196
    public boolean isSet(_Fields field) {
15197
      if (field == null) {
15198
        throw new IllegalArgumentException();
15199
      }
15200
 
15201
      switch (field) {
15202
      }
15203
      throw new IllegalStateException();
15204
    }
15205
 
15206
    @Override
15207
    public boolean equals(Object that) {
15208
      if (that == null)
15209
        return false;
15210
      if (that instanceof updateSupplier_result)
15211
        return this.equals((updateSupplier_result)that);
15212
      return false;
15213
    }
15214
 
15215
    public boolean equals(updateSupplier_result that) {
15216
      if (that == null)
15217
        return false;
15218
 
15219
      return true;
15220
    }
15221
 
15222
    @Override
15223
    public int hashCode() {
15224
      return 0;
15225
    }
15226
 
15227
    public int compareTo(updateSupplier_result other) {
15228
      if (!getClass().equals(other.getClass())) {
15229
        return getClass().getName().compareTo(other.getClass().getName());
15230
      }
15231
 
15232
      int lastComparison = 0;
15233
      updateSupplier_result typedOther = (updateSupplier_result)other;
15234
 
15235
      return 0;
15236
    }
15237
 
15238
    public _Fields fieldForId(int fieldId) {
15239
      return _Fields.findByThriftId(fieldId);
15240
    }
15241
 
15242
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15243
      org.apache.thrift.protocol.TField field;
15244
      iprot.readStructBegin();
15245
      while (true)
15246
      {
15247
        field = iprot.readFieldBegin();
15248
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15249
          break;
15250
        }
15251
        switch (field.id) {
15252
          default:
15253
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15254
        }
15255
        iprot.readFieldEnd();
15256
      }
15257
      iprot.readStructEnd();
15258
      validate();
15259
    }
15260
 
15261
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15262
      oprot.writeStructBegin(STRUCT_DESC);
15263
 
15264
      oprot.writeFieldStop();
15265
      oprot.writeStructEnd();
15266
    }
15267
 
15268
    @Override
15269
    public String toString() {
15270
      StringBuilder sb = new StringBuilder("updateSupplier_result(");
15271
      boolean first = true;
15272
 
15273
      sb.append(")");
15274
      return sb.toString();
15275
    }
15276
 
15277
    public void validate() throws org.apache.thrift.TException {
15278
      // check for required fields
15279
    }
15280
 
15281
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15282
      try {
15283
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15284
      } catch (org.apache.thrift.TException te) {
15285
        throw new java.io.IOException(te);
15286
      }
15287
    }
15288
 
15289
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15290
      try {
15291
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15292
      } catch (org.apache.thrift.TException te) {
15293
        throw new java.io.IOException(te);
15294
      }
15295
    }
15296
 
15297
  }
15298
 
6467 amar.kumar 15299
  public static class createPurchaseReturn_args implements org.apache.thrift.TBase<createPurchaseReturn_args, createPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
15300
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseReturn_args");
15301
 
15302
    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);
15303
 
15304
    private PurchaseReturn purchaseReturn; // required
15305
 
15306
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15307
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15308
      PURCHASE_RETURN((short)1, "purchaseReturn");
15309
 
15310
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15311
 
15312
      static {
15313
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15314
          byName.put(field.getFieldName(), field);
15315
        }
15316
      }
15317
 
15318
      /**
15319
       * Find the _Fields constant that matches fieldId, or null if its not found.
15320
       */
15321
      public static _Fields findByThriftId(int fieldId) {
15322
        switch(fieldId) {
15323
          case 1: // PURCHASE_RETURN
15324
            return PURCHASE_RETURN;
15325
          default:
15326
            return null;
15327
        }
15328
      }
15329
 
15330
      /**
15331
       * Find the _Fields constant that matches fieldId, throwing an exception
15332
       * if it is not found.
15333
       */
15334
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15335
        _Fields fields = findByThriftId(fieldId);
15336
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15337
        return fields;
15338
      }
15339
 
15340
      /**
15341
       * Find the _Fields constant that matches name, or null if its not found.
15342
       */
15343
      public static _Fields findByName(String name) {
15344
        return byName.get(name);
15345
      }
15346
 
15347
      private final short _thriftId;
15348
      private final String _fieldName;
15349
 
15350
      _Fields(short thriftId, String fieldName) {
15351
        _thriftId = thriftId;
15352
        _fieldName = fieldName;
15353
      }
15354
 
15355
      public short getThriftFieldId() {
15356
        return _thriftId;
15357
      }
15358
 
15359
      public String getFieldName() {
15360
        return _fieldName;
15361
      }
15362
    }
15363
 
15364
    // isset id assignments
15365
 
15366
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15367
    static {
15368
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15369
      tmpMap.put(_Fields.PURCHASE_RETURN, new org.apache.thrift.meta_data.FieldMetaData("purchaseReturn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15370
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class)));
15371
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15372
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseReturn_args.class, metaDataMap);
15373
    }
15374
 
15375
    public createPurchaseReturn_args() {
15376
    }
15377
 
15378
    public createPurchaseReturn_args(
15379
      PurchaseReturn purchaseReturn)
15380
    {
15381
      this();
15382
      this.purchaseReturn = purchaseReturn;
15383
    }
15384
 
15385
    /**
15386
     * Performs a deep copy on <i>other</i>.
15387
     */
15388
    public createPurchaseReturn_args(createPurchaseReturn_args other) {
15389
      if (other.isSetPurchaseReturn()) {
15390
        this.purchaseReturn = new PurchaseReturn(other.purchaseReturn);
15391
      }
15392
    }
15393
 
15394
    public createPurchaseReturn_args deepCopy() {
15395
      return new createPurchaseReturn_args(this);
15396
    }
15397
 
15398
    @Override
15399
    public void clear() {
15400
      this.purchaseReturn = null;
15401
    }
15402
 
15403
    public PurchaseReturn getPurchaseReturn() {
15404
      return this.purchaseReturn;
15405
    }
15406
 
15407
    public void setPurchaseReturn(PurchaseReturn purchaseReturn) {
15408
      this.purchaseReturn = purchaseReturn;
15409
    }
15410
 
15411
    public void unsetPurchaseReturn() {
15412
      this.purchaseReturn = null;
15413
    }
15414
 
15415
    /** Returns true if field purchaseReturn is set (has been assigned a value) and false otherwise */
15416
    public boolean isSetPurchaseReturn() {
15417
      return this.purchaseReturn != null;
15418
    }
15419
 
15420
    public void setPurchaseReturnIsSet(boolean value) {
15421
      if (!value) {
15422
        this.purchaseReturn = null;
15423
      }
15424
    }
15425
 
15426
    public void setFieldValue(_Fields field, Object value) {
15427
      switch (field) {
15428
      case PURCHASE_RETURN:
15429
        if (value == null) {
15430
          unsetPurchaseReturn();
15431
        } else {
15432
          setPurchaseReturn((PurchaseReturn)value);
15433
        }
15434
        break;
15435
 
15436
      }
15437
    }
15438
 
15439
    public Object getFieldValue(_Fields field) {
15440
      switch (field) {
15441
      case PURCHASE_RETURN:
15442
        return getPurchaseReturn();
15443
 
15444
      }
15445
      throw new IllegalStateException();
15446
    }
15447
 
15448
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15449
    public boolean isSet(_Fields field) {
15450
      if (field == null) {
15451
        throw new IllegalArgumentException();
15452
      }
15453
 
15454
      switch (field) {
15455
      case PURCHASE_RETURN:
15456
        return isSetPurchaseReturn();
15457
      }
15458
      throw new IllegalStateException();
15459
    }
15460
 
15461
    @Override
15462
    public boolean equals(Object that) {
15463
      if (that == null)
15464
        return false;
15465
      if (that instanceof createPurchaseReturn_args)
15466
        return this.equals((createPurchaseReturn_args)that);
15467
      return false;
15468
    }
15469
 
15470
    public boolean equals(createPurchaseReturn_args that) {
15471
      if (that == null)
15472
        return false;
15473
 
15474
      boolean this_present_purchaseReturn = true && this.isSetPurchaseReturn();
15475
      boolean that_present_purchaseReturn = true && that.isSetPurchaseReturn();
15476
      if (this_present_purchaseReturn || that_present_purchaseReturn) {
15477
        if (!(this_present_purchaseReturn && that_present_purchaseReturn))
15478
          return false;
15479
        if (!this.purchaseReturn.equals(that.purchaseReturn))
15480
          return false;
15481
      }
15482
 
15483
      return true;
15484
    }
15485
 
15486
    @Override
15487
    public int hashCode() {
15488
      return 0;
15489
    }
15490
 
15491
    public int compareTo(createPurchaseReturn_args other) {
15492
      if (!getClass().equals(other.getClass())) {
15493
        return getClass().getName().compareTo(other.getClass().getName());
15494
      }
15495
 
15496
      int lastComparison = 0;
15497
      createPurchaseReturn_args typedOther = (createPurchaseReturn_args)other;
15498
 
15499
      lastComparison = Boolean.valueOf(isSetPurchaseReturn()).compareTo(typedOther.isSetPurchaseReturn());
15500
      if (lastComparison != 0) {
15501
        return lastComparison;
15502
      }
15503
      if (isSetPurchaseReturn()) {
15504
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseReturn, typedOther.purchaseReturn);
15505
        if (lastComparison != 0) {
15506
          return lastComparison;
15507
        }
15508
      }
15509
      return 0;
15510
    }
15511
 
15512
    public _Fields fieldForId(int fieldId) {
15513
      return _Fields.findByThriftId(fieldId);
15514
    }
15515
 
15516
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15517
      org.apache.thrift.protocol.TField field;
15518
      iprot.readStructBegin();
15519
      while (true)
15520
      {
15521
        field = iprot.readFieldBegin();
15522
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15523
          break;
15524
        }
15525
        switch (field.id) {
15526
          case 1: // PURCHASE_RETURN
15527
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15528
              this.purchaseReturn = new PurchaseReturn();
15529
              this.purchaseReturn.read(iprot);
15530
            } else { 
15531
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15532
            }
15533
            break;
15534
          default:
15535
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15536
        }
15537
        iprot.readFieldEnd();
15538
      }
15539
      iprot.readStructEnd();
15540
      validate();
15541
    }
15542
 
15543
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15544
      validate();
15545
 
15546
      oprot.writeStructBegin(STRUCT_DESC);
15547
      if (this.purchaseReturn != null) {
15548
        oprot.writeFieldBegin(PURCHASE_RETURN_FIELD_DESC);
15549
        this.purchaseReturn.write(oprot);
15550
        oprot.writeFieldEnd();
15551
      }
15552
      oprot.writeFieldStop();
15553
      oprot.writeStructEnd();
15554
    }
15555
 
15556
    @Override
15557
    public String toString() {
15558
      StringBuilder sb = new StringBuilder("createPurchaseReturn_args(");
15559
      boolean first = true;
15560
 
15561
      sb.append("purchaseReturn:");
15562
      if (this.purchaseReturn == null) {
15563
        sb.append("null");
15564
      } else {
15565
        sb.append(this.purchaseReturn);
15566
      }
15567
      first = false;
15568
      sb.append(")");
15569
      return sb.toString();
15570
    }
15571
 
15572
    public void validate() throws org.apache.thrift.TException {
15573
      // check for required fields
15574
    }
15575
 
15576
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15577
      try {
15578
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15579
      } catch (org.apache.thrift.TException te) {
15580
        throw new java.io.IOException(te);
15581
      }
15582
    }
15583
 
15584
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15585
      try {
15586
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15587
      } catch (org.apache.thrift.TException te) {
15588
        throw new java.io.IOException(te);
15589
      }
15590
    }
15591
 
15592
  }
15593
 
15594
  public static class createPurchaseReturn_result implements org.apache.thrift.TBase<createPurchaseReturn_result, createPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
15595
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseReturn_result");
15596
 
15597
    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);
15598
 
15599
    private long success; // required
15600
 
15601
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15602
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15603
      SUCCESS((short)0, "success");
15604
 
15605
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15606
 
15607
      static {
15608
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15609
          byName.put(field.getFieldName(), field);
15610
        }
15611
      }
15612
 
15613
      /**
15614
       * Find the _Fields constant that matches fieldId, or null if its not found.
15615
       */
15616
      public static _Fields findByThriftId(int fieldId) {
15617
        switch(fieldId) {
15618
          case 0: // SUCCESS
15619
            return SUCCESS;
15620
          default:
15621
            return null;
15622
        }
15623
      }
15624
 
15625
      /**
15626
       * Find the _Fields constant that matches fieldId, throwing an exception
15627
       * if it is not found.
15628
       */
15629
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15630
        _Fields fields = findByThriftId(fieldId);
15631
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15632
        return fields;
15633
      }
15634
 
15635
      /**
15636
       * Find the _Fields constant that matches name, or null if its not found.
15637
       */
15638
      public static _Fields findByName(String name) {
15639
        return byName.get(name);
15640
      }
15641
 
15642
      private final short _thriftId;
15643
      private final String _fieldName;
15644
 
15645
      _Fields(short thriftId, String fieldName) {
15646
        _thriftId = thriftId;
15647
        _fieldName = fieldName;
15648
      }
15649
 
15650
      public short getThriftFieldId() {
15651
        return _thriftId;
15652
      }
15653
 
15654
      public String getFieldName() {
15655
        return _fieldName;
15656
      }
15657
    }
15658
 
15659
    // isset id assignments
15660
    private static final int __SUCCESS_ISSET_ID = 0;
15661
    private BitSet __isset_bit_vector = new BitSet(1);
15662
 
15663
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15664
    static {
15665
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15666
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15667
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
15668
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15669
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseReturn_result.class, metaDataMap);
15670
    }
15671
 
15672
    public createPurchaseReturn_result() {
15673
    }
15674
 
15675
    public createPurchaseReturn_result(
15676
      long success)
15677
    {
15678
      this();
15679
      this.success = success;
15680
      setSuccessIsSet(true);
15681
    }
15682
 
15683
    /**
15684
     * Performs a deep copy on <i>other</i>.
15685
     */
15686
    public createPurchaseReturn_result(createPurchaseReturn_result other) {
15687
      __isset_bit_vector.clear();
15688
      __isset_bit_vector.or(other.__isset_bit_vector);
15689
      this.success = other.success;
15690
    }
15691
 
15692
    public createPurchaseReturn_result deepCopy() {
15693
      return new createPurchaseReturn_result(this);
15694
    }
15695
 
15696
    @Override
15697
    public void clear() {
15698
      setSuccessIsSet(false);
15699
      this.success = 0;
15700
    }
15701
 
15702
    public long getSuccess() {
15703
      return this.success;
15704
    }
15705
 
15706
    public void setSuccess(long success) {
15707
      this.success = success;
15708
      setSuccessIsSet(true);
15709
    }
15710
 
15711
    public void unsetSuccess() {
15712
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15713
    }
15714
 
15715
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
15716
    public boolean isSetSuccess() {
15717
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15718
    }
15719
 
15720
    public void setSuccessIsSet(boolean value) {
15721
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15722
    }
15723
 
15724
    public void setFieldValue(_Fields field, Object value) {
15725
      switch (field) {
15726
      case SUCCESS:
15727
        if (value == null) {
15728
          unsetSuccess();
15729
        } else {
15730
          setSuccess((Long)value);
15731
        }
15732
        break;
15733
 
15734
      }
15735
    }
15736
 
15737
    public Object getFieldValue(_Fields field) {
15738
      switch (field) {
15739
      case SUCCESS:
15740
        return Long.valueOf(getSuccess());
15741
 
15742
      }
15743
      throw new IllegalStateException();
15744
    }
15745
 
15746
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15747
    public boolean isSet(_Fields field) {
15748
      if (field == null) {
15749
        throw new IllegalArgumentException();
15750
      }
15751
 
15752
      switch (field) {
15753
      case SUCCESS:
15754
        return isSetSuccess();
15755
      }
15756
      throw new IllegalStateException();
15757
    }
15758
 
15759
    @Override
15760
    public boolean equals(Object that) {
15761
      if (that == null)
15762
        return false;
15763
      if (that instanceof createPurchaseReturn_result)
15764
        return this.equals((createPurchaseReturn_result)that);
15765
      return false;
15766
    }
15767
 
15768
    public boolean equals(createPurchaseReturn_result that) {
15769
      if (that == null)
15770
        return false;
15771
 
15772
      boolean this_present_success = true;
15773
      boolean that_present_success = true;
15774
      if (this_present_success || that_present_success) {
15775
        if (!(this_present_success && that_present_success))
15776
          return false;
15777
        if (this.success != that.success)
15778
          return false;
15779
      }
15780
 
15781
      return true;
15782
    }
15783
 
15784
    @Override
15785
    public int hashCode() {
15786
      return 0;
15787
    }
15788
 
15789
    public int compareTo(createPurchaseReturn_result other) {
15790
      if (!getClass().equals(other.getClass())) {
15791
        return getClass().getName().compareTo(other.getClass().getName());
15792
      }
15793
 
15794
      int lastComparison = 0;
15795
      createPurchaseReturn_result typedOther = (createPurchaseReturn_result)other;
15796
 
15797
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
15798
      if (lastComparison != 0) {
15799
        return lastComparison;
15800
      }
15801
      if (isSetSuccess()) {
15802
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
15803
        if (lastComparison != 0) {
15804
          return lastComparison;
15805
        }
15806
      }
15807
      return 0;
15808
    }
15809
 
15810
    public _Fields fieldForId(int fieldId) {
15811
      return _Fields.findByThriftId(fieldId);
15812
    }
15813
 
15814
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15815
      org.apache.thrift.protocol.TField field;
15816
      iprot.readStructBegin();
15817
      while (true)
15818
      {
15819
        field = iprot.readFieldBegin();
15820
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15821
          break;
15822
        }
15823
        switch (field.id) {
15824
          case 0: // SUCCESS
15825
            if (field.type == org.apache.thrift.protocol.TType.I64) {
15826
              this.success = iprot.readI64();
15827
              setSuccessIsSet(true);
15828
            } else { 
15829
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15830
            }
15831
            break;
15832
          default:
15833
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15834
        }
15835
        iprot.readFieldEnd();
15836
      }
15837
      iprot.readStructEnd();
15838
      validate();
15839
    }
15840
 
15841
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15842
      oprot.writeStructBegin(STRUCT_DESC);
15843
 
15844
      if (this.isSetSuccess()) {
15845
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15846
        oprot.writeI64(this.success);
15847
        oprot.writeFieldEnd();
15848
      }
15849
      oprot.writeFieldStop();
15850
      oprot.writeStructEnd();
15851
    }
15852
 
15853
    @Override
15854
    public String toString() {
15855
      StringBuilder sb = new StringBuilder("createPurchaseReturn_result(");
15856
      boolean first = true;
15857
 
15858
      sb.append("success:");
15859
      sb.append(this.success);
15860
      first = false;
15861
      sb.append(")");
15862
      return sb.toString();
15863
    }
15864
 
15865
    public void validate() throws org.apache.thrift.TException {
15866
      // check for required fields
15867
    }
15868
 
15869
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15870
      try {
15871
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15872
      } catch (org.apache.thrift.TException te) {
15873
        throw new java.io.IOException(te);
15874
      }
15875
    }
15876
 
15877
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15878
      try {
15879
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15880
      } catch (org.apache.thrift.TException te) {
15881
        throw new java.io.IOException(te);
15882
      }
15883
    }
15884
 
15885
  }
15886
 
15887
  public static class settlePurchaseReturn_args implements org.apache.thrift.TBase<settlePurchaseReturn_args, settlePurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
15888
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("settlePurchaseReturn_args");
15889
 
15890
    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);
15891
 
15892
    private long id; // required
15893
 
15894
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15895
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15896
      ID((short)1, "id");
15897
 
15898
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15899
 
15900
      static {
15901
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15902
          byName.put(field.getFieldName(), field);
15903
        }
15904
      }
15905
 
15906
      /**
15907
       * Find the _Fields constant that matches fieldId, or null if its not found.
15908
       */
15909
      public static _Fields findByThriftId(int fieldId) {
15910
        switch(fieldId) {
15911
          case 1: // ID
15912
            return ID;
15913
          default:
15914
            return null;
15915
        }
15916
      }
15917
 
15918
      /**
15919
       * Find the _Fields constant that matches fieldId, throwing an exception
15920
       * if it is not found.
15921
       */
15922
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15923
        _Fields fields = findByThriftId(fieldId);
15924
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15925
        return fields;
15926
      }
15927
 
15928
      /**
15929
       * Find the _Fields constant that matches name, or null if its not found.
15930
       */
15931
      public static _Fields findByName(String name) {
15932
        return byName.get(name);
15933
      }
15934
 
15935
      private final short _thriftId;
15936
      private final String _fieldName;
15937
 
15938
      _Fields(short thriftId, String fieldName) {
15939
        _thriftId = thriftId;
15940
        _fieldName = fieldName;
15941
      }
15942
 
15943
      public short getThriftFieldId() {
15944
        return _thriftId;
15945
      }
15946
 
15947
      public String getFieldName() {
15948
        return _fieldName;
15949
      }
15950
    }
15951
 
15952
    // isset id assignments
15953
    private static final int __ID_ISSET_ID = 0;
15954
    private BitSet __isset_bit_vector = new BitSet(1);
15955
 
15956
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15957
    static {
15958
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15959
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15960
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
15961
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15962
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(settlePurchaseReturn_args.class, metaDataMap);
15963
    }
15964
 
15965
    public settlePurchaseReturn_args() {
15966
    }
15967
 
15968
    public settlePurchaseReturn_args(
15969
      long id)
15970
    {
15971
      this();
15972
      this.id = id;
15973
      setIdIsSet(true);
15974
    }
15975
 
15976
    /**
15977
     * Performs a deep copy on <i>other</i>.
15978
     */
15979
    public settlePurchaseReturn_args(settlePurchaseReturn_args other) {
15980
      __isset_bit_vector.clear();
15981
      __isset_bit_vector.or(other.__isset_bit_vector);
15982
      this.id = other.id;
15983
    }
15984
 
15985
    public settlePurchaseReturn_args deepCopy() {
15986
      return new settlePurchaseReturn_args(this);
15987
    }
15988
 
15989
    @Override
15990
    public void clear() {
15991
      setIdIsSet(false);
15992
      this.id = 0;
15993
    }
15994
 
15995
    public long getId() {
15996
      return this.id;
15997
    }
15998
 
15999
    public void setId(long id) {
16000
      this.id = id;
16001
      setIdIsSet(true);
16002
    }
16003
 
16004
    public void unsetId() {
16005
      __isset_bit_vector.clear(__ID_ISSET_ID);
16006
    }
16007
 
16008
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
16009
    public boolean isSetId() {
16010
      return __isset_bit_vector.get(__ID_ISSET_ID);
16011
    }
16012
 
16013
    public void setIdIsSet(boolean value) {
16014
      __isset_bit_vector.set(__ID_ISSET_ID, value);
16015
    }
16016
 
16017
    public void setFieldValue(_Fields field, Object value) {
16018
      switch (field) {
16019
      case ID:
16020
        if (value == null) {
16021
          unsetId();
16022
        } else {
16023
          setId((Long)value);
16024
        }
16025
        break;
16026
 
16027
      }
16028
    }
16029
 
16030
    public Object getFieldValue(_Fields field) {
16031
      switch (field) {
16032
      case ID:
16033
        return Long.valueOf(getId());
16034
 
16035
      }
16036
      throw new IllegalStateException();
16037
    }
16038
 
16039
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16040
    public boolean isSet(_Fields field) {
16041
      if (field == null) {
16042
        throw new IllegalArgumentException();
16043
      }
16044
 
16045
      switch (field) {
16046
      case ID:
16047
        return isSetId();
16048
      }
16049
      throw new IllegalStateException();
16050
    }
16051
 
16052
    @Override
16053
    public boolean equals(Object that) {
16054
      if (that == null)
16055
        return false;
16056
      if (that instanceof settlePurchaseReturn_args)
16057
        return this.equals((settlePurchaseReturn_args)that);
16058
      return false;
16059
    }
16060
 
16061
    public boolean equals(settlePurchaseReturn_args that) {
16062
      if (that == null)
16063
        return false;
16064
 
16065
      boolean this_present_id = true;
16066
      boolean that_present_id = true;
16067
      if (this_present_id || that_present_id) {
16068
        if (!(this_present_id && that_present_id))
16069
          return false;
16070
        if (this.id != that.id)
16071
          return false;
16072
      }
16073
 
16074
      return true;
16075
    }
16076
 
16077
    @Override
16078
    public int hashCode() {
16079
      return 0;
16080
    }
16081
 
16082
    public int compareTo(settlePurchaseReturn_args other) {
16083
      if (!getClass().equals(other.getClass())) {
16084
        return getClass().getName().compareTo(other.getClass().getName());
16085
      }
16086
 
16087
      int lastComparison = 0;
16088
      settlePurchaseReturn_args typedOther = (settlePurchaseReturn_args)other;
16089
 
16090
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
16091
      if (lastComparison != 0) {
16092
        return lastComparison;
16093
      }
16094
      if (isSetId()) {
16095
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
16096
        if (lastComparison != 0) {
16097
          return lastComparison;
16098
        }
16099
      }
16100
      return 0;
16101
    }
16102
 
16103
    public _Fields fieldForId(int fieldId) {
16104
      return _Fields.findByThriftId(fieldId);
16105
    }
16106
 
16107
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16108
      org.apache.thrift.protocol.TField field;
16109
      iprot.readStructBegin();
16110
      while (true)
16111
      {
16112
        field = iprot.readFieldBegin();
16113
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16114
          break;
16115
        }
16116
        switch (field.id) {
16117
          case 1: // ID
16118
            if (field.type == org.apache.thrift.protocol.TType.I64) {
16119
              this.id = iprot.readI64();
16120
              setIdIsSet(true);
16121
            } else { 
16122
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16123
            }
16124
            break;
16125
          default:
16126
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16127
        }
16128
        iprot.readFieldEnd();
16129
      }
16130
      iprot.readStructEnd();
16131
      validate();
16132
    }
16133
 
16134
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16135
      validate();
16136
 
16137
      oprot.writeStructBegin(STRUCT_DESC);
16138
      oprot.writeFieldBegin(ID_FIELD_DESC);
16139
      oprot.writeI64(this.id);
16140
      oprot.writeFieldEnd();
16141
      oprot.writeFieldStop();
16142
      oprot.writeStructEnd();
16143
    }
16144
 
16145
    @Override
16146
    public String toString() {
16147
      StringBuilder sb = new StringBuilder("settlePurchaseReturn_args(");
16148
      boolean first = true;
16149
 
16150
      sb.append("id:");
16151
      sb.append(this.id);
16152
      first = false;
16153
      sb.append(")");
16154
      return sb.toString();
16155
    }
16156
 
16157
    public void validate() throws org.apache.thrift.TException {
16158
      // check for required fields
16159
    }
16160
 
16161
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16162
      try {
16163
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16164
      } catch (org.apache.thrift.TException te) {
16165
        throw new java.io.IOException(te);
16166
      }
16167
    }
16168
 
16169
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16170
      try {
16171
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
16172
        __isset_bit_vector = new BitSet(1);
16173
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16174
      } catch (org.apache.thrift.TException te) {
16175
        throw new java.io.IOException(te);
16176
      }
16177
    }
16178
 
16179
  }
16180
 
16181
  public static class settlePurchaseReturn_result implements org.apache.thrift.TBase<settlePurchaseReturn_result, settlePurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
16182
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("settlePurchaseReturn_result");
16183
 
16184
 
16185
 
16186
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16187
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16188
;
16189
 
16190
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16191
 
16192
      static {
16193
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16194
          byName.put(field.getFieldName(), field);
16195
        }
16196
      }
16197
 
16198
      /**
16199
       * Find the _Fields constant that matches fieldId, or null if its not found.
16200
       */
16201
      public static _Fields findByThriftId(int fieldId) {
16202
        switch(fieldId) {
16203
          default:
16204
            return null;
16205
        }
16206
      }
16207
 
16208
      /**
16209
       * Find the _Fields constant that matches fieldId, throwing an exception
16210
       * if it is not found.
16211
       */
16212
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16213
        _Fields fields = findByThriftId(fieldId);
16214
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16215
        return fields;
16216
      }
16217
 
16218
      /**
16219
       * Find the _Fields constant that matches name, or null if its not found.
16220
       */
16221
      public static _Fields findByName(String name) {
16222
        return byName.get(name);
16223
      }
16224
 
16225
      private final short _thriftId;
16226
      private final String _fieldName;
16227
 
16228
      _Fields(short thriftId, String fieldName) {
16229
        _thriftId = thriftId;
16230
        _fieldName = fieldName;
16231
      }
16232
 
16233
      public short getThriftFieldId() {
16234
        return _thriftId;
16235
      }
16236
 
16237
      public String getFieldName() {
16238
        return _fieldName;
16239
      }
16240
    }
16241
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16242
    static {
16243
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16244
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16245
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(settlePurchaseReturn_result.class, metaDataMap);
16246
    }
16247
 
16248
    public settlePurchaseReturn_result() {
16249
    }
16250
 
16251
    /**
16252
     * Performs a deep copy on <i>other</i>.
16253
     */
16254
    public settlePurchaseReturn_result(settlePurchaseReturn_result other) {
16255
    }
16256
 
16257
    public settlePurchaseReturn_result deepCopy() {
16258
      return new settlePurchaseReturn_result(this);
16259
    }
16260
 
16261
    @Override
16262
    public void clear() {
16263
    }
16264
 
16265
    public void setFieldValue(_Fields field, Object value) {
16266
      switch (field) {
16267
      }
16268
    }
16269
 
16270
    public Object getFieldValue(_Fields field) {
16271
      switch (field) {
16272
      }
16273
      throw new IllegalStateException();
16274
    }
16275
 
16276
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16277
    public boolean isSet(_Fields field) {
16278
      if (field == null) {
16279
        throw new IllegalArgumentException();
16280
      }
16281
 
16282
      switch (field) {
16283
      }
16284
      throw new IllegalStateException();
16285
    }
16286
 
16287
    @Override
16288
    public boolean equals(Object that) {
16289
      if (that == null)
16290
        return false;
16291
      if (that instanceof settlePurchaseReturn_result)
16292
        return this.equals((settlePurchaseReturn_result)that);
16293
      return false;
16294
    }
16295
 
16296
    public boolean equals(settlePurchaseReturn_result that) {
16297
      if (that == null)
16298
        return false;
16299
 
16300
      return true;
16301
    }
16302
 
16303
    @Override
16304
    public int hashCode() {
16305
      return 0;
16306
    }
16307
 
16308
    public int compareTo(settlePurchaseReturn_result other) {
16309
      if (!getClass().equals(other.getClass())) {
16310
        return getClass().getName().compareTo(other.getClass().getName());
16311
      }
16312
 
16313
      int lastComparison = 0;
16314
      settlePurchaseReturn_result typedOther = (settlePurchaseReturn_result)other;
16315
 
16316
      return 0;
16317
    }
16318
 
16319
    public _Fields fieldForId(int fieldId) {
16320
      return _Fields.findByThriftId(fieldId);
16321
    }
16322
 
16323
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16324
      org.apache.thrift.protocol.TField field;
16325
      iprot.readStructBegin();
16326
      while (true)
16327
      {
16328
        field = iprot.readFieldBegin();
16329
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16330
          break;
16331
        }
16332
        switch (field.id) {
16333
          default:
16334
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16335
        }
16336
        iprot.readFieldEnd();
16337
      }
16338
      iprot.readStructEnd();
16339
      validate();
16340
    }
16341
 
16342
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16343
      oprot.writeStructBegin(STRUCT_DESC);
16344
 
16345
      oprot.writeFieldStop();
16346
      oprot.writeStructEnd();
16347
    }
16348
 
16349
    @Override
16350
    public String toString() {
16351
      StringBuilder sb = new StringBuilder("settlePurchaseReturn_result(");
16352
      boolean first = true;
16353
 
16354
      sb.append(")");
16355
      return sb.toString();
16356
    }
16357
 
16358
    public void validate() throws org.apache.thrift.TException {
16359
      // check for required fields
16360
    }
16361
 
16362
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16363
      try {
16364
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16365
      } catch (org.apache.thrift.TException te) {
16366
        throw new java.io.IOException(te);
16367
      }
16368
    }
16369
 
16370
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16371
      try {
16372
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16373
      } catch (org.apache.thrift.TException te) {
16374
        throw new java.io.IOException(te);
16375
      }
16376
    }
16377
 
16378
  }
16379
 
16380
  public static class getUnsettledPurchaseReturns_args implements org.apache.thrift.TBase<getUnsettledPurchaseReturns_args, getUnsettledPurchaseReturns_args._Fields>, java.io.Serializable, Cloneable   {
16381
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUnsettledPurchaseReturns_args");
16382
 
16383
 
16384
 
16385
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16386
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16387
;
16388
 
16389
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16390
 
16391
      static {
16392
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16393
          byName.put(field.getFieldName(), field);
16394
        }
16395
      }
16396
 
16397
      /**
16398
       * Find the _Fields constant that matches fieldId, or null if its not found.
16399
       */
16400
      public static _Fields findByThriftId(int fieldId) {
16401
        switch(fieldId) {
16402
          default:
16403
            return null;
16404
        }
16405
      }
16406
 
16407
      /**
16408
       * Find the _Fields constant that matches fieldId, throwing an exception
16409
       * if it is not found.
16410
       */
16411
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16412
        _Fields fields = findByThriftId(fieldId);
16413
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16414
        return fields;
16415
      }
16416
 
16417
      /**
16418
       * Find the _Fields constant that matches name, or null if its not found.
16419
       */
16420
      public static _Fields findByName(String name) {
16421
        return byName.get(name);
16422
      }
16423
 
16424
      private final short _thriftId;
16425
      private final String _fieldName;
16426
 
16427
      _Fields(short thriftId, String fieldName) {
16428
        _thriftId = thriftId;
16429
        _fieldName = fieldName;
16430
      }
16431
 
16432
      public short getThriftFieldId() {
16433
        return _thriftId;
16434
      }
16435
 
16436
      public String getFieldName() {
16437
        return _fieldName;
16438
      }
16439
    }
16440
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16441
    static {
16442
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16443
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16444
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUnsettledPurchaseReturns_args.class, metaDataMap);
16445
    }
16446
 
16447
    public getUnsettledPurchaseReturns_args() {
16448
    }
16449
 
16450
    /**
16451
     * Performs a deep copy on <i>other</i>.
16452
     */
16453
    public getUnsettledPurchaseReturns_args(getUnsettledPurchaseReturns_args other) {
16454
    }
16455
 
16456
    public getUnsettledPurchaseReturns_args deepCopy() {
16457
      return new getUnsettledPurchaseReturns_args(this);
16458
    }
16459
 
16460
    @Override
16461
    public void clear() {
16462
    }
16463
 
16464
    public void setFieldValue(_Fields field, Object value) {
16465
      switch (field) {
16466
      }
16467
    }
16468
 
16469
    public Object getFieldValue(_Fields field) {
16470
      switch (field) {
16471
      }
16472
      throw new IllegalStateException();
16473
    }
16474
 
16475
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16476
    public boolean isSet(_Fields field) {
16477
      if (field == null) {
16478
        throw new IllegalArgumentException();
16479
      }
16480
 
16481
      switch (field) {
16482
      }
16483
      throw new IllegalStateException();
16484
    }
16485
 
16486
    @Override
16487
    public boolean equals(Object that) {
16488
      if (that == null)
16489
        return false;
16490
      if (that instanceof getUnsettledPurchaseReturns_args)
16491
        return this.equals((getUnsettledPurchaseReturns_args)that);
16492
      return false;
16493
    }
16494
 
16495
    public boolean equals(getUnsettledPurchaseReturns_args that) {
16496
      if (that == null)
16497
        return false;
16498
 
16499
      return true;
16500
    }
16501
 
16502
    @Override
16503
    public int hashCode() {
16504
      return 0;
16505
    }
16506
 
16507
    public int compareTo(getUnsettledPurchaseReturns_args other) {
16508
      if (!getClass().equals(other.getClass())) {
16509
        return getClass().getName().compareTo(other.getClass().getName());
16510
      }
16511
 
16512
      int lastComparison = 0;
16513
      getUnsettledPurchaseReturns_args typedOther = (getUnsettledPurchaseReturns_args)other;
16514
 
16515
      return 0;
16516
    }
16517
 
16518
    public _Fields fieldForId(int fieldId) {
16519
      return _Fields.findByThriftId(fieldId);
16520
    }
16521
 
16522
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16523
      org.apache.thrift.protocol.TField field;
16524
      iprot.readStructBegin();
16525
      while (true)
16526
      {
16527
        field = iprot.readFieldBegin();
16528
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16529
          break;
16530
        }
16531
        switch (field.id) {
16532
          default:
16533
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16534
        }
16535
        iprot.readFieldEnd();
16536
      }
16537
      iprot.readStructEnd();
16538
      validate();
16539
    }
16540
 
16541
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16542
      validate();
16543
 
16544
      oprot.writeStructBegin(STRUCT_DESC);
16545
      oprot.writeFieldStop();
16546
      oprot.writeStructEnd();
16547
    }
16548
 
16549
    @Override
16550
    public String toString() {
16551
      StringBuilder sb = new StringBuilder("getUnsettledPurchaseReturns_args(");
16552
      boolean first = true;
16553
 
16554
      sb.append(")");
16555
      return sb.toString();
16556
    }
16557
 
16558
    public void validate() throws org.apache.thrift.TException {
16559
      // check for required fields
16560
    }
16561
 
16562
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16563
      try {
16564
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16565
      } catch (org.apache.thrift.TException te) {
16566
        throw new java.io.IOException(te);
16567
      }
16568
    }
16569
 
16570
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16571
      try {
16572
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16573
      } catch (org.apache.thrift.TException te) {
16574
        throw new java.io.IOException(te);
16575
      }
16576
    }
16577
 
16578
  }
16579
 
16580
  public static class getUnsettledPurchaseReturns_result implements org.apache.thrift.TBase<getUnsettledPurchaseReturns_result, getUnsettledPurchaseReturns_result._Fields>, java.io.Serializable, Cloneable   {
16581
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUnsettledPurchaseReturns_result");
16582
 
16583
    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);
16584
 
16585
    private List<PurchaseReturn> success; // required
16586
 
16587
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16588
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16589
      SUCCESS((short)0, "success");
16590
 
16591
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16592
 
16593
      static {
16594
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16595
          byName.put(field.getFieldName(), field);
16596
        }
16597
      }
16598
 
16599
      /**
16600
       * Find the _Fields constant that matches fieldId, or null if its not found.
16601
       */
16602
      public static _Fields findByThriftId(int fieldId) {
16603
        switch(fieldId) {
16604
          case 0: // SUCCESS
16605
            return SUCCESS;
16606
          default:
16607
            return null;
16608
        }
16609
      }
16610
 
16611
      /**
16612
       * Find the _Fields constant that matches fieldId, throwing an exception
16613
       * if it is not found.
16614
       */
16615
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16616
        _Fields fields = findByThriftId(fieldId);
16617
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16618
        return fields;
16619
      }
16620
 
16621
      /**
16622
       * Find the _Fields constant that matches name, or null if its not found.
16623
       */
16624
      public static _Fields findByName(String name) {
16625
        return byName.get(name);
16626
      }
16627
 
16628
      private final short _thriftId;
16629
      private final String _fieldName;
16630
 
16631
      _Fields(short thriftId, String fieldName) {
16632
        _thriftId = thriftId;
16633
        _fieldName = fieldName;
16634
      }
16635
 
16636
      public short getThriftFieldId() {
16637
        return _thriftId;
16638
      }
16639
 
16640
      public String getFieldName() {
16641
        return _fieldName;
16642
      }
16643
    }
16644
 
16645
    // isset id assignments
16646
 
16647
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16648
    static {
16649
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16650
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16651
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
16652
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class))));
16653
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16654
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUnsettledPurchaseReturns_result.class, metaDataMap);
16655
    }
16656
 
16657
    public getUnsettledPurchaseReturns_result() {
16658
    }
16659
 
16660
    public getUnsettledPurchaseReturns_result(
16661
      List<PurchaseReturn> success)
16662
    {
16663
      this();
16664
      this.success = success;
16665
    }
16666
 
16667
    /**
16668
     * Performs a deep copy on <i>other</i>.
16669
     */
16670
    public getUnsettledPurchaseReturns_result(getUnsettledPurchaseReturns_result other) {
16671
      if (other.isSetSuccess()) {
16672
        List<PurchaseReturn> __this__success = new ArrayList<PurchaseReturn>();
16673
        for (PurchaseReturn other_element : other.success) {
16674
          __this__success.add(new PurchaseReturn(other_element));
16675
        }
16676
        this.success = __this__success;
16677
      }
16678
    }
16679
 
16680
    public getUnsettledPurchaseReturns_result deepCopy() {
16681
      return new getUnsettledPurchaseReturns_result(this);
16682
    }
16683
 
16684
    @Override
16685
    public void clear() {
16686
      this.success = null;
16687
    }
16688
 
16689
    public int getSuccessSize() {
16690
      return (this.success == null) ? 0 : this.success.size();
16691
    }
16692
 
16693
    public java.util.Iterator<PurchaseReturn> getSuccessIterator() {
16694
      return (this.success == null) ? null : this.success.iterator();
16695
    }
16696
 
16697
    public void addToSuccess(PurchaseReturn elem) {
16698
      if (this.success == null) {
16699
        this.success = new ArrayList<PurchaseReturn>();
16700
      }
16701
      this.success.add(elem);
16702
    }
16703
 
16704
    public List<PurchaseReturn> getSuccess() {
16705
      return this.success;
16706
    }
16707
 
16708
    public void setSuccess(List<PurchaseReturn> success) {
16709
      this.success = success;
16710
    }
16711
 
16712
    public void unsetSuccess() {
16713
      this.success = null;
16714
    }
16715
 
16716
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
16717
    public boolean isSetSuccess() {
16718
      return this.success != null;
16719
    }
16720
 
16721
    public void setSuccessIsSet(boolean value) {
16722
      if (!value) {
16723
        this.success = null;
16724
      }
16725
    }
16726
 
16727
    public void setFieldValue(_Fields field, Object value) {
16728
      switch (field) {
16729
      case SUCCESS:
16730
        if (value == null) {
16731
          unsetSuccess();
16732
        } else {
16733
          setSuccess((List<PurchaseReturn>)value);
16734
        }
16735
        break;
16736
 
16737
      }
16738
    }
16739
 
16740
    public Object getFieldValue(_Fields field) {
16741
      switch (field) {
16742
      case SUCCESS:
16743
        return getSuccess();
16744
 
16745
      }
16746
      throw new IllegalStateException();
16747
    }
16748
 
16749
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16750
    public boolean isSet(_Fields field) {
16751
      if (field == null) {
16752
        throw new IllegalArgumentException();
16753
      }
16754
 
16755
      switch (field) {
16756
      case SUCCESS:
16757
        return isSetSuccess();
16758
      }
16759
      throw new IllegalStateException();
16760
    }
16761
 
16762
    @Override
16763
    public boolean equals(Object that) {
16764
      if (that == null)
16765
        return false;
16766
      if (that instanceof getUnsettledPurchaseReturns_result)
16767
        return this.equals((getUnsettledPurchaseReturns_result)that);
16768
      return false;
16769
    }
16770
 
16771
    public boolean equals(getUnsettledPurchaseReturns_result that) {
16772
      if (that == null)
16773
        return false;
16774
 
16775
      boolean this_present_success = true && this.isSetSuccess();
16776
      boolean that_present_success = true && that.isSetSuccess();
16777
      if (this_present_success || that_present_success) {
16778
        if (!(this_present_success && that_present_success))
16779
          return false;
16780
        if (!this.success.equals(that.success))
16781
          return false;
16782
      }
16783
 
16784
      return true;
16785
    }
16786
 
16787
    @Override
16788
    public int hashCode() {
16789
      return 0;
16790
    }
16791
 
16792
    public int compareTo(getUnsettledPurchaseReturns_result other) {
16793
      if (!getClass().equals(other.getClass())) {
16794
        return getClass().getName().compareTo(other.getClass().getName());
16795
      }
16796
 
16797
      int lastComparison = 0;
16798
      getUnsettledPurchaseReturns_result typedOther = (getUnsettledPurchaseReturns_result)other;
16799
 
16800
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
16801
      if (lastComparison != 0) {
16802
        return lastComparison;
16803
      }
16804
      if (isSetSuccess()) {
16805
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
16806
        if (lastComparison != 0) {
16807
          return lastComparison;
16808
        }
16809
      }
16810
      return 0;
16811
    }
16812
 
16813
    public _Fields fieldForId(int fieldId) {
16814
      return _Fields.findByThriftId(fieldId);
16815
    }
16816
 
16817
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16818
      org.apache.thrift.protocol.TField field;
16819
      iprot.readStructBegin();
16820
      while (true)
16821
      {
16822
        field = iprot.readFieldBegin();
16823
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16824
          break;
16825
        }
16826
        switch (field.id) {
16827
          case 0: // SUCCESS
16828
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
16829
              {
7410 amar.kumar 16830
                org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
16831
                this.success = new ArrayList<PurchaseReturn>(_list32.size);
16832
                for (int _i33 = 0; _i33 < _list32.size; ++_i33)
6467 amar.kumar 16833
                {
7410 amar.kumar 16834
                  PurchaseReturn _elem34; // required
16835
                  _elem34 = new PurchaseReturn();
16836
                  _elem34.read(iprot);
16837
                  this.success.add(_elem34);
6467 amar.kumar 16838
                }
16839
                iprot.readListEnd();
16840
              }
16841
            } else { 
16842
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16843
            }
16844
            break;
16845
          default:
16846
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16847
        }
16848
        iprot.readFieldEnd();
16849
      }
16850
      iprot.readStructEnd();
16851
      validate();
16852
    }
16853
 
16854
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16855
      oprot.writeStructBegin(STRUCT_DESC);
16856
 
16857
      if (this.isSetSuccess()) {
16858
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16859
        {
16860
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7410 amar.kumar 16861
          for (PurchaseReturn _iter35 : this.success)
6467 amar.kumar 16862
          {
7410 amar.kumar 16863
            _iter35.write(oprot);
6467 amar.kumar 16864
          }
16865
          oprot.writeListEnd();
16866
        }
16867
        oprot.writeFieldEnd();
16868
      }
16869
      oprot.writeFieldStop();
16870
      oprot.writeStructEnd();
16871
    }
16872
 
16873
    @Override
16874
    public String toString() {
16875
      StringBuilder sb = new StringBuilder("getUnsettledPurchaseReturns_result(");
16876
      boolean first = true;
16877
 
16878
      sb.append("success:");
16879
      if (this.success == null) {
16880
        sb.append("null");
16881
      } else {
16882
        sb.append(this.success);
16883
      }
16884
      first = false;
16885
      sb.append(")");
16886
      return sb.toString();
16887
    }
16888
 
16889
    public void validate() throws org.apache.thrift.TException {
16890
      // check for required fields
16891
    }
16892
 
16893
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16894
      try {
16895
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16896
      } catch (org.apache.thrift.TException te) {
16897
        throw new java.io.IOException(te);
16898
      }
16899
    }
16900
 
16901
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16902
      try {
16903
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16904
      } catch (org.apache.thrift.TException te) {
16905
        throw new java.io.IOException(te);
16906
      }
16907
    }
16908
 
16909
  }
16910
 
6630 amar.kumar 16911
  public static class getInvoice_args implements org.apache.thrift.TBase<getInvoice_args, getInvoice_args._Fields>, java.io.Serializable, Cloneable   {
16912
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoice_args");
16913
 
16914
    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);
16915
    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);
16916
 
16917
    private String invoiceNumber; // required
16918
    private long supplierId; // required
16919
 
16920
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16921
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16922
      INVOICE_NUMBER((short)1, "invoiceNumber"),
16923
      SUPPLIER_ID((short)2, "supplierId");
16924
 
16925
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16926
 
16927
      static {
16928
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16929
          byName.put(field.getFieldName(), field);
16930
        }
16931
      }
16932
 
16933
      /**
16934
       * Find the _Fields constant that matches fieldId, or null if its not found.
16935
       */
16936
      public static _Fields findByThriftId(int fieldId) {
16937
        switch(fieldId) {
16938
          case 1: // INVOICE_NUMBER
16939
            return INVOICE_NUMBER;
16940
          case 2: // SUPPLIER_ID
16941
            return SUPPLIER_ID;
16942
          default:
16943
            return null;
16944
        }
16945
      }
16946
 
16947
      /**
16948
       * Find the _Fields constant that matches fieldId, throwing an exception
16949
       * if it is not found.
16950
       */
16951
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16952
        _Fields fields = findByThriftId(fieldId);
16953
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16954
        return fields;
16955
      }
16956
 
16957
      /**
16958
       * Find the _Fields constant that matches name, or null if its not found.
16959
       */
16960
      public static _Fields findByName(String name) {
16961
        return byName.get(name);
16962
      }
16963
 
16964
      private final short _thriftId;
16965
      private final String _fieldName;
16966
 
16967
      _Fields(short thriftId, String fieldName) {
16968
        _thriftId = thriftId;
16969
        _fieldName = fieldName;
16970
      }
16971
 
16972
      public short getThriftFieldId() {
16973
        return _thriftId;
16974
      }
16975
 
16976
      public String getFieldName() {
16977
        return _fieldName;
16978
      }
16979
    }
16980
 
16981
    // isset id assignments
16982
    private static final int __SUPPLIERID_ISSET_ID = 0;
16983
    private BitSet __isset_bit_vector = new BitSet(1);
16984
 
16985
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16986
    static {
16987
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16988
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16989
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
16990
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16991
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
16992
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16993
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoice_args.class, metaDataMap);
16994
    }
16995
 
16996
    public getInvoice_args() {
16997
    }
16998
 
16999
    public getInvoice_args(
17000
      String invoiceNumber,
17001
      long supplierId)
17002
    {
17003
      this();
17004
      this.invoiceNumber = invoiceNumber;
17005
      this.supplierId = supplierId;
17006
      setSupplierIdIsSet(true);
17007
    }
17008
 
17009
    /**
17010
     * Performs a deep copy on <i>other</i>.
17011
     */
17012
    public getInvoice_args(getInvoice_args other) {
17013
      __isset_bit_vector.clear();
17014
      __isset_bit_vector.or(other.__isset_bit_vector);
17015
      if (other.isSetInvoiceNumber()) {
17016
        this.invoiceNumber = other.invoiceNumber;
17017
      }
17018
      this.supplierId = other.supplierId;
17019
    }
17020
 
17021
    public getInvoice_args deepCopy() {
17022
      return new getInvoice_args(this);
17023
    }
17024
 
17025
    @Override
17026
    public void clear() {
17027
      this.invoiceNumber = null;
17028
      setSupplierIdIsSet(false);
17029
      this.supplierId = 0;
17030
    }
17031
 
17032
    public String getInvoiceNumber() {
17033
      return this.invoiceNumber;
17034
    }
17035
 
17036
    public void setInvoiceNumber(String invoiceNumber) {
17037
      this.invoiceNumber = invoiceNumber;
17038
    }
17039
 
17040
    public void unsetInvoiceNumber() {
17041
      this.invoiceNumber = null;
17042
    }
17043
 
17044
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
17045
    public boolean isSetInvoiceNumber() {
17046
      return this.invoiceNumber != null;
17047
    }
17048
 
17049
    public void setInvoiceNumberIsSet(boolean value) {
17050
      if (!value) {
17051
        this.invoiceNumber = null;
17052
      }
17053
    }
17054
 
17055
    public long getSupplierId() {
17056
      return this.supplierId;
17057
    }
17058
 
17059
    public void setSupplierId(long supplierId) {
17060
      this.supplierId = supplierId;
17061
      setSupplierIdIsSet(true);
17062
    }
17063
 
17064
    public void unsetSupplierId() {
17065
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
17066
    }
17067
 
17068
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
17069
    public boolean isSetSupplierId() {
17070
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
17071
    }
17072
 
17073
    public void setSupplierIdIsSet(boolean value) {
17074
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
17075
    }
17076
 
17077
    public void setFieldValue(_Fields field, Object value) {
17078
      switch (field) {
17079
      case INVOICE_NUMBER:
17080
        if (value == null) {
17081
          unsetInvoiceNumber();
17082
        } else {
17083
          setInvoiceNumber((String)value);
17084
        }
17085
        break;
17086
 
17087
      case SUPPLIER_ID:
17088
        if (value == null) {
17089
          unsetSupplierId();
17090
        } else {
17091
          setSupplierId((Long)value);
17092
        }
17093
        break;
17094
 
17095
      }
17096
    }
17097
 
17098
    public Object getFieldValue(_Fields field) {
17099
      switch (field) {
17100
      case INVOICE_NUMBER:
17101
        return getInvoiceNumber();
17102
 
17103
      case SUPPLIER_ID:
17104
        return Long.valueOf(getSupplierId());
17105
 
17106
      }
17107
      throw new IllegalStateException();
17108
    }
17109
 
17110
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17111
    public boolean isSet(_Fields field) {
17112
      if (field == null) {
17113
        throw new IllegalArgumentException();
17114
      }
17115
 
17116
      switch (field) {
17117
      case INVOICE_NUMBER:
17118
        return isSetInvoiceNumber();
17119
      case SUPPLIER_ID:
17120
        return isSetSupplierId();
17121
      }
17122
      throw new IllegalStateException();
17123
    }
17124
 
17125
    @Override
17126
    public boolean equals(Object that) {
17127
      if (that == null)
17128
        return false;
17129
      if (that instanceof getInvoice_args)
17130
        return this.equals((getInvoice_args)that);
17131
      return false;
17132
    }
17133
 
17134
    public boolean equals(getInvoice_args that) {
17135
      if (that == null)
17136
        return false;
17137
 
17138
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
17139
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
17140
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
17141
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
17142
          return false;
17143
        if (!this.invoiceNumber.equals(that.invoiceNumber))
17144
          return false;
17145
      }
17146
 
17147
      boolean this_present_supplierId = true;
17148
      boolean that_present_supplierId = true;
17149
      if (this_present_supplierId || that_present_supplierId) {
17150
        if (!(this_present_supplierId && that_present_supplierId))
17151
          return false;
17152
        if (this.supplierId != that.supplierId)
17153
          return false;
17154
      }
17155
 
17156
      return true;
17157
    }
17158
 
17159
    @Override
17160
    public int hashCode() {
17161
      return 0;
17162
    }
17163
 
17164
    public int compareTo(getInvoice_args other) {
17165
      if (!getClass().equals(other.getClass())) {
17166
        return getClass().getName().compareTo(other.getClass().getName());
17167
      }
17168
 
17169
      int lastComparison = 0;
17170
      getInvoice_args typedOther = (getInvoice_args)other;
17171
 
17172
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
17173
      if (lastComparison != 0) {
17174
        return lastComparison;
17175
      }
17176
      if (isSetInvoiceNumber()) {
17177
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
17178
        if (lastComparison != 0) {
17179
          return lastComparison;
17180
        }
17181
      }
17182
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
17183
      if (lastComparison != 0) {
17184
        return lastComparison;
17185
      }
17186
      if (isSetSupplierId()) {
17187
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
17188
        if (lastComparison != 0) {
17189
          return lastComparison;
17190
        }
17191
      }
17192
      return 0;
17193
    }
17194
 
17195
    public _Fields fieldForId(int fieldId) {
17196
      return _Fields.findByThriftId(fieldId);
17197
    }
17198
 
17199
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17200
      org.apache.thrift.protocol.TField field;
17201
      iprot.readStructBegin();
17202
      while (true)
17203
      {
17204
        field = iprot.readFieldBegin();
17205
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17206
          break;
17207
        }
17208
        switch (field.id) {
17209
          case 1: // INVOICE_NUMBER
17210
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
17211
              this.invoiceNumber = iprot.readString();
17212
            } else { 
17213
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17214
            }
17215
            break;
17216
          case 2: // SUPPLIER_ID
17217
            if (field.type == org.apache.thrift.protocol.TType.I64) {
17218
              this.supplierId = iprot.readI64();
17219
              setSupplierIdIsSet(true);
17220
            } else { 
17221
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17222
            }
17223
            break;
17224
          default:
17225
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17226
        }
17227
        iprot.readFieldEnd();
17228
      }
17229
      iprot.readStructEnd();
17230
      validate();
17231
    }
17232
 
17233
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17234
      validate();
17235
 
17236
      oprot.writeStructBegin(STRUCT_DESC);
17237
      if (this.invoiceNumber != null) {
17238
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
17239
        oprot.writeString(this.invoiceNumber);
17240
        oprot.writeFieldEnd();
17241
      }
17242
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
17243
      oprot.writeI64(this.supplierId);
17244
      oprot.writeFieldEnd();
17245
      oprot.writeFieldStop();
17246
      oprot.writeStructEnd();
17247
    }
17248
 
17249
    @Override
17250
    public String toString() {
17251
      StringBuilder sb = new StringBuilder("getInvoice_args(");
17252
      boolean first = true;
17253
 
17254
      sb.append("invoiceNumber:");
17255
      if (this.invoiceNumber == null) {
17256
        sb.append("null");
17257
      } else {
17258
        sb.append(this.invoiceNumber);
17259
      }
17260
      first = false;
17261
      if (!first) sb.append(", ");
17262
      sb.append("supplierId:");
17263
      sb.append(this.supplierId);
17264
      first = false;
17265
      sb.append(")");
17266
      return sb.toString();
17267
    }
17268
 
17269
    public void validate() throws org.apache.thrift.TException {
17270
      // check for required fields
17271
    }
17272
 
17273
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17274
      try {
17275
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17276
      } catch (org.apache.thrift.TException te) {
17277
        throw new java.io.IOException(te);
17278
      }
17279
    }
17280
 
17281
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17282
      try {
17283
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17284
      } catch (org.apache.thrift.TException te) {
17285
        throw new java.io.IOException(te);
17286
      }
17287
    }
17288
 
17289
  }
17290
 
17291
  public static class getInvoice_result implements org.apache.thrift.TBase<getInvoice_result, getInvoice_result._Fields>, java.io.Serializable, Cloneable   {
17292
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoice_result");
17293
 
17294
    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);
17295
 
17296
    private List<PurchaseReturn> success; // required
17297
 
17298
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17299
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17300
      SUCCESS((short)0, "success");
17301
 
17302
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17303
 
17304
      static {
17305
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17306
          byName.put(field.getFieldName(), field);
17307
        }
17308
      }
17309
 
17310
      /**
17311
       * Find the _Fields constant that matches fieldId, or null if its not found.
17312
       */
17313
      public static _Fields findByThriftId(int fieldId) {
17314
        switch(fieldId) {
17315
          case 0: // SUCCESS
17316
            return SUCCESS;
17317
          default:
17318
            return null;
17319
        }
17320
      }
17321
 
17322
      /**
17323
       * Find the _Fields constant that matches fieldId, throwing an exception
17324
       * if it is not found.
17325
       */
17326
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17327
        _Fields fields = findByThriftId(fieldId);
17328
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17329
        return fields;
17330
      }
17331
 
17332
      /**
17333
       * Find the _Fields constant that matches name, or null if its not found.
17334
       */
17335
      public static _Fields findByName(String name) {
17336
        return byName.get(name);
17337
      }
17338
 
17339
      private final short _thriftId;
17340
      private final String _fieldName;
17341
 
17342
      _Fields(short thriftId, String fieldName) {
17343
        _thriftId = thriftId;
17344
        _fieldName = fieldName;
17345
      }
17346
 
17347
      public short getThriftFieldId() {
17348
        return _thriftId;
17349
      }
17350
 
17351
      public String getFieldName() {
17352
        return _fieldName;
17353
      }
17354
    }
17355
 
17356
    // isset id assignments
17357
 
17358
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17359
    static {
17360
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17361
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17362
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
17363
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class))));
17364
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17365
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoice_result.class, metaDataMap);
17366
    }
17367
 
17368
    public getInvoice_result() {
17369
    }
17370
 
17371
    public getInvoice_result(
17372
      List<PurchaseReturn> success)
17373
    {
17374
      this();
17375
      this.success = success;
17376
    }
17377
 
17378
    /**
17379
     * Performs a deep copy on <i>other</i>.
17380
     */
17381
    public getInvoice_result(getInvoice_result other) {
17382
      if (other.isSetSuccess()) {
17383
        List<PurchaseReturn> __this__success = new ArrayList<PurchaseReturn>();
17384
        for (PurchaseReturn other_element : other.success) {
17385
          __this__success.add(new PurchaseReturn(other_element));
17386
        }
17387
        this.success = __this__success;
17388
      }
17389
    }
17390
 
17391
    public getInvoice_result deepCopy() {
17392
      return new getInvoice_result(this);
17393
    }
17394
 
17395
    @Override
17396
    public void clear() {
17397
      this.success = null;
17398
    }
17399
 
17400
    public int getSuccessSize() {
17401
      return (this.success == null) ? 0 : this.success.size();
17402
    }
17403
 
17404
    public java.util.Iterator<PurchaseReturn> getSuccessIterator() {
17405
      return (this.success == null) ? null : this.success.iterator();
17406
    }
17407
 
17408
    public void addToSuccess(PurchaseReturn elem) {
17409
      if (this.success == null) {
17410
        this.success = new ArrayList<PurchaseReturn>();
17411
      }
17412
      this.success.add(elem);
17413
    }
17414
 
17415
    public List<PurchaseReturn> getSuccess() {
17416
      return this.success;
17417
    }
17418
 
17419
    public void setSuccess(List<PurchaseReturn> success) {
17420
      this.success = success;
17421
    }
17422
 
17423
    public void unsetSuccess() {
17424
      this.success = null;
17425
    }
17426
 
17427
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
17428
    public boolean isSetSuccess() {
17429
      return this.success != null;
17430
    }
17431
 
17432
    public void setSuccessIsSet(boolean value) {
17433
      if (!value) {
17434
        this.success = null;
17435
      }
17436
    }
17437
 
17438
    public void setFieldValue(_Fields field, Object value) {
17439
      switch (field) {
17440
      case SUCCESS:
17441
        if (value == null) {
17442
          unsetSuccess();
17443
        } else {
17444
          setSuccess((List<PurchaseReturn>)value);
17445
        }
17446
        break;
17447
 
17448
      }
17449
    }
17450
 
17451
    public Object getFieldValue(_Fields field) {
17452
      switch (field) {
17453
      case SUCCESS:
17454
        return getSuccess();
17455
 
17456
      }
17457
      throw new IllegalStateException();
17458
    }
17459
 
17460
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17461
    public boolean isSet(_Fields field) {
17462
      if (field == null) {
17463
        throw new IllegalArgumentException();
17464
      }
17465
 
17466
      switch (field) {
17467
      case SUCCESS:
17468
        return isSetSuccess();
17469
      }
17470
      throw new IllegalStateException();
17471
    }
17472
 
17473
    @Override
17474
    public boolean equals(Object that) {
17475
      if (that == null)
17476
        return false;
17477
      if (that instanceof getInvoice_result)
17478
        return this.equals((getInvoice_result)that);
17479
      return false;
17480
    }
17481
 
17482
    public boolean equals(getInvoice_result that) {
17483
      if (that == null)
17484
        return false;
17485
 
17486
      boolean this_present_success = true && this.isSetSuccess();
17487
      boolean that_present_success = true && that.isSetSuccess();
17488
      if (this_present_success || that_present_success) {
17489
        if (!(this_present_success && that_present_success))
17490
          return false;
17491
        if (!this.success.equals(that.success))
17492
          return false;
17493
      }
17494
 
17495
      return true;
17496
    }
17497
 
17498
    @Override
17499
    public int hashCode() {
17500
      return 0;
17501
    }
17502
 
17503
    public int compareTo(getInvoice_result other) {
17504
      if (!getClass().equals(other.getClass())) {
17505
        return getClass().getName().compareTo(other.getClass().getName());
17506
      }
17507
 
17508
      int lastComparison = 0;
17509
      getInvoice_result typedOther = (getInvoice_result)other;
17510
 
17511
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
17512
      if (lastComparison != 0) {
17513
        return lastComparison;
17514
      }
17515
      if (isSetSuccess()) {
17516
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
17517
        if (lastComparison != 0) {
17518
          return lastComparison;
17519
        }
17520
      }
17521
      return 0;
17522
    }
17523
 
17524
    public _Fields fieldForId(int fieldId) {
17525
      return _Fields.findByThriftId(fieldId);
17526
    }
17527
 
17528
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17529
      org.apache.thrift.protocol.TField field;
17530
      iprot.readStructBegin();
17531
      while (true)
17532
      {
17533
        field = iprot.readFieldBegin();
17534
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17535
          break;
17536
        }
17537
        switch (field.id) {
17538
          case 0: // SUCCESS
17539
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
17540
              {
7410 amar.kumar 17541
                org.apache.thrift.protocol.TList _list36 = iprot.readListBegin();
17542
                this.success = new ArrayList<PurchaseReturn>(_list36.size);
17543
                for (int _i37 = 0; _i37 < _list36.size; ++_i37)
6630 amar.kumar 17544
                {
7410 amar.kumar 17545
                  PurchaseReturn _elem38; // required
17546
                  _elem38 = new PurchaseReturn();
17547
                  _elem38.read(iprot);
17548
                  this.success.add(_elem38);
6630 amar.kumar 17549
                }
17550
                iprot.readListEnd();
17551
              }
17552
            } else { 
17553
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17554
            }
17555
            break;
17556
          default:
17557
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17558
        }
17559
        iprot.readFieldEnd();
17560
      }
17561
      iprot.readStructEnd();
17562
      validate();
17563
    }
17564
 
17565
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17566
      oprot.writeStructBegin(STRUCT_DESC);
17567
 
17568
      if (this.isSetSuccess()) {
17569
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17570
        {
17571
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7410 amar.kumar 17572
          for (PurchaseReturn _iter39 : this.success)
6630 amar.kumar 17573
          {
7410 amar.kumar 17574
            _iter39.write(oprot);
6630 amar.kumar 17575
          }
17576
          oprot.writeListEnd();
17577
        }
17578
        oprot.writeFieldEnd();
17579
      }
17580
      oprot.writeFieldStop();
17581
      oprot.writeStructEnd();
17582
    }
17583
 
17584
    @Override
17585
    public String toString() {
17586
      StringBuilder sb = new StringBuilder("getInvoice_result(");
17587
      boolean first = true;
17588
 
17589
      sb.append("success:");
17590
      if (this.success == null) {
17591
        sb.append("null");
17592
      } else {
17593
        sb.append(this.success);
17594
      }
17595
      first = false;
17596
      sb.append(")");
17597
      return sb.toString();
17598
    }
17599
 
17600
    public void validate() throws org.apache.thrift.TException {
17601
      // check for required fields
17602
    }
17603
 
17604
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17605
      try {
17606
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17607
      } catch (org.apache.thrift.TException te) {
17608
        throw new java.io.IOException(te);
17609
      }
17610
    }
17611
 
17612
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17613
      try {
17614
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17615
      } catch (org.apache.thrift.TException te) {
17616
        throw new java.io.IOException(te);
17617
      }
17618
    }
17619
 
17620
  }
17621
 
6762 amar.kumar 17622
  public static class createPurchaseForOurExtBilling_args implements org.apache.thrift.TBase<createPurchaseForOurExtBilling_args, createPurchaseForOurExtBilling_args._Fields>, java.io.Serializable, Cloneable   {
17623
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseForOurExtBilling_args");
17624
 
17625
    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);
17626
    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);
17627
    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)3);
17628
 
17629
    private String invoiceNumber; // required
17630
    private double unitPrice; // required
17631
    private long itemId; // required
17632
 
17633
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17634
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17635
      INVOICE_NUMBER((short)1, "invoiceNumber"),
17636
      UNIT_PRICE((short)2, "unitPrice"),
17637
      ITEM_ID((short)3, "itemId");
17638
 
17639
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17640
 
17641
      static {
17642
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17643
          byName.put(field.getFieldName(), field);
17644
        }
17645
      }
17646
 
17647
      /**
17648
       * Find the _Fields constant that matches fieldId, or null if its not found.
17649
       */
17650
      public static _Fields findByThriftId(int fieldId) {
17651
        switch(fieldId) {
17652
          case 1: // INVOICE_NUMBER
17653
            return INVOICE_NUMBER;
17654
          case 2: // UNIT_PRICE
17655
            return UNIT_PRICE;
17656
          case 3: // ITEM_ID
17657
            return ITEM_ID;
17658
          default:
17659
            return null;
17660
        }
17661
      }
17662
 
17663
      /**
17664
       * Find the _Fields constant that matches fieldId, throwing an exception
17665
       * if it is not found.
17666
       */
17667
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17668
        _Fields fields = findByThriftId(fieldId);
17669
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17670
        return fields;
17671
      }
17672
 
17673
      /**
17674
       * Find the _Fields constant that matches name, or null if its not found.
17675
       */
17676
      public static _Fields findByName(String name) {
17677
        return byName.get(name);
17678
      }
17679
 
17680
      private final short _thriftId;
17681
      private final String _fieldName;
17682
 
17683
      _Fields(short thriftId, String fieldName) {
17684
        _thriftId = thriftId;
17685
        _fieldName = fieldName;
17686
      }
17687
 
17688
      public short getThriftFieldId() {
17689
        return _thriftId;
17690
      }
17691
 
17692
      public String getFieldName() {
17693
        return _fieldName;
17694
      }
17695
    }
17696
 
17697
    // isset id assignments
17698
    private static final int __UNITPRICE_ISSET_ID = 0;
17699
    private static final int __ITEMID_ISSET_ID = 1;
17700
    private BitSet __isset_bit_vector = new BitSet(2);
17701
 
17702
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17703
    static {
17704
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17705
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17706
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
17707
      tmpMap.put(_Fields.UNIT_PRICE, new org.apache.thrift.meta_data.FieldMetaData("unitPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17708
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
17709
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17710
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
17711
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17712
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseForOurExtBilling_args.class, metaDataMap);
17713
    }
17714
 
17715
    public createPurchaseForOurExtBilling_args() {
17716
    }
17717
 
17718
    public createPurchaseForOurExtBilling_args(
17719
      String invoiceNumber,
17720
      double unitPrice,
17721
      long itemId)
17722
    {
17723
      this();
17724
      this.invoiceNumber = invoiceNumber;
17725
      this.unitPrice = unitPrice;
17726
      setUnitPriceIsSet(true);
17727
      this.itemId = itemId;
17728
      setItemIdIsSet(true);
17729
    }
17730
 
17731
    /**
17732
     * Performs a deep copy on <i>other</i>.
17733
     */
17734
    public createPurchaseForOurExtBilling_args(createPurchaseForOurExtBilling_args other) {
17735
      __isset_bit_vector.clear();
17736
      __isset_bit_vector.or(other.__isset_bit_vector);
17737
      if (other.isSetInvoiceNumber()) {
17738
        this.invoiceNumber = other.invoiceNumber;
17739
      }
17740
      this.unitPrice = other.unitPrice;
17741
      this.itemId = other.itemId;
17742
    }
17743
 
17744
    public createPurchaseForOurExtBilling_args deepCopy() {
17745
      return new createPurchaseForOurExtBilling_args(this);
17746
    }
17747
 
17748
    @Override
17749
    public void clear() {
17750
      this.invoiceNumber = null;
17751
      setUnitPriceIsSet(false);
17752
      this.unitPrice = 0.0;
17753
      setItemIdIsSet(false);
17754
      this.itemId = 0;
17755
    }
17756
 
17757
    public String getInvoiceNumber() {
17758
      return this.invoiceNumber;
17759
    }
17760
 
17761
    public void setInvoiceNumber(String invoiceNumber) {
17762
      this.invoiceNumber = invoiceNumber;
17763
    }
17764
 
17765
    public void unsetInvoiceNumber() {
17766
      this.invoiceNumber = null;
17767
    }
17768
 
17769
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
17770
    public boolean isSetInvoiceNumber() {
17771
      return this.invoiceNumber != null;
17772
    }
17773
 
17774
    public void setInvoiceNumberIsSet(boolean value) {
17775
      if (!value) {
17776
        this.invoiceNumber = null;
17777
      }
17778
    }
17779
 
17780
    public double getUnitPrice() {
17781
      return this.unitPrice;
17782
    }
17783
 
17784
    public void setUnitPrice(double unitPrice) {
17785
      this.unitPrice = unitPrice;
17786
      setUnitPriceIsSet(true);
17787
    }
17788
 
17789
    public void unsetUnitPrice() {
17790
      __isset_bit_vector.clear(__UNITPRICE_ISSET_ID);
17791
    }
17792
 
17793
    /** Returns true if field unitPrice is set (has been assigned a value) and false otherwise */
17794
    public boolean isSetUnitPrice() {
17795
      return __isset_bit_vector.get(__UNITPRICE_ISSET_ID);
17796
    }
17797
 
17798
    public void setUnitPriceIsSet(boolean value) {
17799
      __isset_bit_vector.set(__UNITPRICE_ISSET_ID, value);
17800
    }
17801
 
17802
    public long getItemId() {
17803
      return this.itemId;
17804
    }
17805
 
17806
    public void setItemId(long itemId) {
17807
      this.itemId = itemId;
17808
      setItemIdIsSet(true);
17809
    }
17810
 
17811
    public void unsetItemId() {
17812
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
17813
    }
17814
 
17815
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
17816
    public boolean isSetItemId() {
17817
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
17818
    }
17819
 
17820
    public void setItemIdIsSet(boolean value) {
17821
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
17822
    }
17823
 
17824
    public void setFieldValue(_Fields field, Object value) {
17825
      switch (field) {
17826
      case INVOICE_NUMBER:
17827
        if (value == null) {
17828
          unsetInvoiceNumber();
17829
        } else {
17830
          setInvoiceNumber((String)value);
17831
        }
17832
        break;
17833
 
17834
      case UNIT_PRICE:
17835
        if (value == null) {
17836
          unsetUnitPrice();
17837
        } else {
17838
          setUnitPrice((Double)value);
17839
        }
17840
        break;
17841
 
17842
      case ITEM_ID:
17843
        if (value == null) {
17844
          unsetItemId();
17845
        } else {
17846
          setItemId((Long)value);
17847
        }
17848
        break;
17849
 
17850
      }
17851
    }
17852
 
17853
    public Object getFieldValue(_Fields field) {
17854
      switch (field) {
17855
      case INVOICE_NUMBER:
17856
        return getInvoiceNumber();
17857
 
17858
      case UNIT_PRICE:
17859
        return Double.valueOf(getUnitPrice());
17860
 
17861
      case ITEM_ID:
17862
        return Long.valueOf(getItemId());
17863
 
17864
      }
17865
      throw new IllegalStateException();
17866
    }
17867
 
17868
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17869
    public boolean isSet(_Fields field) {
17870
      if (field == null) {
17871
        throw new IllegalArgumentException();
17872
      }
17873
 
17874
      switch (field) {
17875
      case INVOICE_NUMBER:
17876
        return isSetInvoiceNumber();
17877
      case UNIT_PRICE:
17878
        return isSetUnitPrice();
17879
      case ITEM_ID:
17880
        return isSetItemId();
17881
      }
17882
      throw new IllegalStateException();
17883
    }
17884
 
17885
    @Override
17886
    public boolean equals(Object that) {
17887
      if (that == null)
17888
        return false;
17889
      if (that instanceof createPurchaseForOurExtBilling_args)
17890
        return this.equals((createPurchaseForOurExtBilling_args)that);
17891
      return false;
17892
    }
17893
 
17894
    public boolean equals(createPurchaseForOurExtBilling_args that) {
17895
      if (that == null)
17896
        return false;
17897
 
17898
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
17899
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
17900
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
17901
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
17902
          return false;
17903
        if (!this.invoiceNumber.equals(that.invoiceNumber))
17904
          return false;
17905
      }
17906
 
17907
      boolean this_present_unitPrice = true;
17908
      boolean that_present_unitPrice = true;
17909
      if (this_present_unitPrice || that_present_unitPrice) {
17910
        if (!(this_present_unitPrice && that_present_unitPrice))
17911
          return false;
17912
        if (this.unitPrice != that.unitPrice)
17913
          return false;
17914
      }
17915
 
17916
      boolean this_present_itemId = true;
17917
      boolean that_present_itemId = true;
17918
      if (this_present_itemId || that_present_itemId) {
17919
        if (!(this_present_itemId && that_present_itemId))
17920
          return false;
17921
        if (this.itemId != that.itemId)
17922
          return false;
17923
      }
17924
 
17925
      return true;
17926
    }
17927
 
17928
    @Override
17929
    public int hashCode() {
17930
      return 0;
17931
    }
17932
 
17933
    public int compareTo(createPurchaseForOurExtBilling_args other) {
17934
      if (!getClass().equals(other.getClass())) {
17935
        return getClass().getName().compareTo(other.getClass().getName());
17936
      }
17937
 
17938
      int lastComparison = 0;
17939
      createPurchaseForOurExtBilling_args typedOther = (createPurchaseForOurExtBilling_args)other;
17940
 
17941
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
17942
      if (lastComparison != 0) {
17943
        return lastComparison;
17944
      }
17945
      if (isSetInvoiceNumber()) {
17946
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
17947
        if (lastComparison != 0) {
17948
          return lastComparison;
17949
        }
17950
      }
17951
      lastComparison = Boolean.valueOf(isSetUnitPrice()).compareTo(typedOther.isSetUnitPrice());
17952
      if (lastComparison != 0) {
17953
        return lastComparison;
17954
      }
17955
      if (isSetUnitPrice()) {
17956
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unitPrice, typedOther.unitPrice);
17957
        if (lastComparison != 0) {
17958
          return lastComparison;
17959
        }
17960
      }
17961
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
17962
      if (lastComparison != 0) {
17963
        return lastComparison;
17964
      }
17965
      if (isSetItemId()) {
17966
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
17967
        if (lastComparison != 0) {
17968
          return lastComparison;
17969
        }
17970
      }
17971
      return 0;
17972
    }
17973
 
17974
    public _Fields fieldForId(int fieldId) {
17975
      return _Fields.findByThriftId(fieldId);
17976
    }
17977
 
17978
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17979
      org.apache.thrift.protocol.TField field;
17980
      iprot.readStructBegin();
17981
      while (true)
17982
      {
17983
        field = iprot.readFieldBegin();
17984
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17985
          break;
17986
        }
17987
        switch (field.id) {
17988
          case 1: // INVOICE_NUMBER
17989
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
17990
              this.invoiceNumber = iprot.readString();
17991
            } else { 
17992
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17993
            }
17994
            break;
17995
          case 2: // UNIT_PRICE
17996
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
17997
              this.unitPrice = iprot.readDouble();
17998
              setUnitPriceIsSet(true);
17999
            } else { 
18000
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18001
            }
18002
            break;
18003
          case 3: // ITEM_ID
18004
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18005
              this.itemId = iprot.readI64();
18006
              setItemIdIsSet(true);
18007
            } else { 
18008
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18009
            }
18010
            break;
18011
          default:
18012
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18013
        }
18014
        iprot.readFieldEnd();
18015
      }
18016
      iprot.readStructEnd();
18017
      validate();
18018
    }
18019
 
18020
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18021
      validate();
18022
 
18023
      oprot.writeStructBegin(STRUCT_DESC);
18024
      if (this.invoiceNumber != null) {
18025
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
18026
        oprot.writeString(this.invoiceNumber);
18027
        oprot.writeFieldEnd();
18028
      }
18029
      oprot.writeFieldBegin(UNIT_PRICE_FIELD_DESC);
18030
      oprot.writeDouble(this.unitPrice);
18031
      oprot.writeFieldEnd();
18032
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
18033
      oprot.writeI64(this.itemId);
18034
      oprot.writeFieldEnd();
18035
      oprot.writeFieldStop();
18036
      oprot.writeStructEnd();
18037
    }
18038
 
18039
    @Override
18040
    public String toString() {
18041
      StringBuilder sb = new StringBuilder("createPurchaseForOurExtBilling_args(");
18042
      boolean first = true;
18043
 
18044
      sb.append("invoiceNumber:");
18045
      if (this.invoiceNumber == null) {
18046
        sb.append("null");
18047
      } else {
18048
        sb.append(this.invoiceNumber);
18049
      }
18050
      first = false;
18051
      if (!first) sb.append(", ");
18052
      sb.append("unitPrice:");
18053
      sb.append(this.unitPrice);
18054
      first = false;
18055
      if (!first) sb.append(", ");
18056
      sb.append("itemId:");
18057
      sb.append(this.itemId);
18058
      first = false;
18059
      sb.append(")");
18060
      return sb.toString();
18061
    }
18062
 
18063
    public void validate() throws org.apache.thrift.TException {
18064
      // check for required fields
18065
    }
18066
 
18067
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18068
      try {
18069
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18070
      } catch (org.apache.thrift.TException te) {
18071
        throw new java.io.IOException(te);
18072
      }
18073
    }
18074
 
18075
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18076
      try {
18077
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
18078
        __isset_bit_vector = new BitSet(1);
18079
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18080
      } catch (org.apache.thrift.TException te) {
18081
        throw new java.io.IOException(te);
18082
      }
18083
    }
18084
 
18085
  }
18086
 
18087
  public static class createPurchaseForOurExtBilling_result implements org.apache.thrift.TBase<createPurchaseForOurExtBilling_result, createPurchaseForOurExtBilling_result._Fields>, java.io.Serializable, Cloneable   {
18088
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseForOurExtBilling_result");
18089
 
18090
    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);
18091
 
18092
    private long success; // required
18093
 
18094
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18095
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18096
      SUCCESS((short)0, "success");
18097
 
18098
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18099
 
18100
      static {
18101
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18102
          byName.put(field.getFieldName(), field);
18103
        }
18104
      }
18105
 
18106
      /**
18107
       * Find the _Fields constant that matches fieldId, or null if its not found.
18108
       */
18109
      public static _Fields findByThriftId(int fieldId) {
18110
        switch(fieldId) {
18111
          case 0: // SUCCESS
18112
            return SUCCESS;
18113
          default:
18114
            return null;
18115
        }
18116
      }
18117
 
18118
      /**
18119
       * Find the _Fields constant that matches fieldId, throwing an exception
18120
       * if it is not found.
18121
       */
18122
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18123
        _Fields fields = findByThriftId(fieldId);
18124
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18125
        return fields;
18126
      }
18127
 
18128
      /**
18129
       * Find the _Fields constant that matches name, or null if its not found.
18130
       */
18131
      public static _Fields findByName(String name) {
18132
        return byName.get(name);
18133
      }
18134
 
18135
      private final short _thriftId;
18136
      private final String _fieldName;
18137
 
18138
      _Fields(short thriftId, String fieldName) {
18139
        _thriftId = thriftId;
18140
        _fieldName = fieldName;
18141
      }
18142
 
18143
      public short getThriftFieldId() {
18144
        return _thriftId;
18145
      }
18146
 
18147
      public String getFieldName() {
18148
        return _fieldName;
18149
      }
18150
    }
18151
 
18152
    // isset id assignments
18153
    private static final int __SUCCESS_ISSET_ID = 0;
18154
    private BitSet __isset_bit_vector = new BitSet(1);
18155
 
18156
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18157
    static {
18158
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18159
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18160
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18161
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18162
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseForOurExtBilling_result.class, metaDataMap);
18163
    }
18164
 
18165
    public createPurchaseForOurExtBilling_result() {
18166
    }
18167
 
18168
    public createPurchaseForOurExtBilling_result(
18169
      long success)
18170
    {
18171
      this();
18172
      this.success = success;
18173
      setSuccessIsSet(true);
18174
    }
18175
 
18176
    /**
18177
     * Performs a deep copy on <i>other</i>.
18178
     */
18179
    public createPurchaseForOurExtBilling_result(createPurchaseForOurExtBilling_result other) {
18180
      __isset_bit_vector.clear();
18181
      __isset_bit_vector.or(other.__isset_bit_vector);
18182
      this.success = other.success;
18183
    }
18184
 
18185
    public createPurchaseForOurExtBilling_result deepCopy() {
18186
      return new createPurchaseForOurExtBilling_result(this);
18187
    }
18188
 
18189
    @Override
18190
    public void clear() {
18191
      setSuccessIsSet(false);
18192
      this.success = 0;
18193
    }
18194
 
18195
    public long getSuccess() {
18196
      return this.success;
18197
    }
18198
 
18199
    public void setSuccess(long success) {
18200
      this.success = success;
18201
      setSuccessIsSet(true);
18202
    }
18203
 
18204
    public void unsetSuccess() {
18205
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
18206
    }
18207
 
18208
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
18209
    public boolean isSetSuccess() {
18210
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
18211
    }
18212
 
18213
    public void setSuccessIsSet(boolean value) {
18214
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
18215
    }
18216
 
18217
    public void setFieldValue(_Fields field, Object value) {
18218
      switch (field) {
18219
      case SUCCESS:
18220
        if (value == null) {
18221
          unsetSuccess();
18222
        } else {
18223
          setSuccess((Long)value);
18224
        }
18225
        break;
18226
 
18227
      }
18228
    }
18229
 
18230
    public Object getFieldValue(_Fields field) {
18231
      switch (field) {
18232
      case SUCCESS:
18233
        return Long.valueOf(getSuccess());
18234
 
18235
      }
18236
      throw new IllegalStateException();
18237
    }
18238
 
18239
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18240
    public boolean isSet(_Fields field) {
18241
      if (field == null) {
18242
        throw new IllegalArgumentException();
18243
      }
18244
 
18245
      switch (field) {
18246
      case SUCCESS:
18247
        return isSetSuccess();
18248
      }
18249
      throw new IllegalStateException();
18250
    }
18251
 
18252
    @Override
18253
    public boolean equals(Object that) {
18254
      if (that == null)
18255
        return false;
18256
      if (that instanceof createPurchaseForOurExtBilling_result)
18257
        return this.equals((createPurchaseForOurExtBilling_result)that);
18258
      return false;
18259
    }
18260
 
18261
    public boolean equals(createPurchaseForOurExtBilling_result that) {
18262
      if (that == null)
18263
        return false;
18264
 
18265
      boolean this_present_success = true;
18266
      boolean that_present_success = true;
18267
      if (this_present_success || that_present_success) {
18268
        if (!(this_present_success && that_present_success))
18269
          return false;
18270
        if (this.success != that.success)
18271
          return false;
18272
      }
18273
 
18274
      return true;
18275
    }
18276
 
18277
    @Override
18278
    public int hashCode() {
18279
      return 0;
18280
    }
18281
 
18282
    public int compareTo(createPurchaseForOurExtBilling_result other) {
18283
      if (!getClass().equals(other.getClass())) {
18284
        return getClass().getName().compareTo(other.getClass().getName());
18285
      }
18286
 
18287
      int lastComparison = 0;
18288
      createPurchaseForOurExtBilling_result typedOther = (createPurchaseForOurExtBilling_result)other;
18289
 
18290
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
18291
      if (lastComparison != 0) {
18292
        return lastComparison;
18293
      }
18294
      if (isSetSuccess()) {
18295
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
18296
        if (lastComparison != 0) {
18297
          return lastComparison;
18298
        }
18299
      }
18300
      return 0;
18301
    }
18302
 
18303
    public _Fields fieldForId(int fieldId) {
18304
      return _Fields.findByThriftId(fieldId);
18305
    }
18306
 
18307
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18308
      org.apache.thrift.protocol.TField field;
18309
      iprot.readStructBegin();
18310
      while (true)
18311
      {
18312
        field = iprot.readFieldBegin();
18313
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18314
          break;
18315
        }
18316
        switch (field.id) {
18317
          case 0: // SUCCESS
18318
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18319
              this.success = iprot.readI64();
18320
              setSuccessIsSet(true);
18321
            } else { 
18322
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18323
            }
18324
            break;
18325
          default:
18326
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18327
        }
18328
        iprot.readFieldEnd();
18329
      }
18330
      iprot.readStructEnd();
18331
      validate();
18332
    }
18333
 
18334
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18335
      oprot.writeStructBegin(STRUCT_DESC);
18336
 
18337
      if (this.isSetSuccess()) {
18338
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18339
        oprot.writeI64(this.success);
18340
        oprot.writeFieldEnd();
18341
      }
18342
      oprot.writeFieldStop();
18343
      oprot.writeStructEnd();
18344
    }
18345
 
18346
    @Override
18347
    public String toString() {
18348
      StringBuilder sb = new StringBuilder("createPurchaseForOurExtBilling_result(");
18349
      boolean first = true;
18350
 
18351
      sb.append("success:");
18352
      sb.append(this.success);
18353
      first = false;
18354
      sb.append(")");
18355
      return sb.toString();
18356
    }
18357
 
18358
    public void validate() throws org.apache.thrift.TException {
18359
      // check for required fields
18360
    }
18361
 
18362
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18363
      try {
18364
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18365
      } catch (org.apache.thrift.TException te) {
18366
        throw new java.io.IOException(te);
18367
      }
18368
    }
18369
 
18370
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18371
      try {
18372
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18373
      } catch (org.apache.thrift.TException te) {
18374
        throw new java.io.IOException(te);
18375
      }
18376
    }
18377
 
18378
  }
18379
 
18380
  public static class fulfillPOForExtBilling_args implements org.apache.thrift.TBase<fulfillPOForExtBilling_args, fulfillPOForExtBilling_args._Fields>, java.io.Serializable, Cloneable   {
18381
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPOForExtBilling_args");
18382
 
18383
    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);
18384
    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);
18385
 
18386
    private long itemId; // required
18387
    private long quantity; // required
18388
 
18389
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18390
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18391
      ITEM_ID((short)1, "itemId"),
18392
      QUANTITY((short)2, "quantity");
18393
 
18394
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18395
 
18396
      static {
18397
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18398
          byName.put(field.getFieldName(), field);
18399
        }
18400
      }
18401
 
18402
      /**
18403
       * Find the _Fields constant that matches fieldId, or null if its not found.
18404
       */
18405
      public static _Fields findByThriftId(int fieldId) {
18406
        switch(fieldId) {
18407
          case 1: // ITEM_ID
18408
            return ITEM_ID;
18409
          case 2: // QUANTITY
18410
            return QUANTITY;
18411
          default:
18412
            return null;
18413
        }
18414
      }
18415
 
18416
      /**
18417
       * Find the _Fields constant that matches fieldId, throwing an exception
18418
       * if it is not found.
18419
       */
18420
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18421
        _Fields fields = findByThriftId(fieldId);
18422
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18423
        return fields;
18424
      }
18425
 
18426
      /**
18427
       * Find the _Fields constant that matches name, or null if its not found.
18428
       */
18429
      public static _Fields findByName(String name) {
18430
        return byName.get(name);
18431
      }
18432
 
18433
      private final short _thriftId;
18434
      private final String _fieldName;
18435
 
18436
      _Fields(short thriftId, String fieldName) {
18437
        _thriftId = thriftId;
18438
        _fieldName = fieldName;
18439
      }
18440
 
18441
      public short getThriftFieldId() {
18442
        return _thriftId;
18443
      }
18444
 
18445
      public String getFieldName() {
18446
        return _fieldName;
18447
      }
18448
    }
18449
 
18450
    // isset id assignments
18451
    private static final int __ITEMID_ISSET_ID = 0;
18452
    private static final int __QUANTITY_ISSET_ID = 1;
18453
    private BitSet __isset_bit_vector = new BitSet(2);
18454
 
18455
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18456
    static {
18457
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18458
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18459
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18460
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18461
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18462
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18463
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPOForExtBilling_args.class, metaDataMap);
18464
    }
18465
 
18466
    public fulfillPOForExtBilling_args() {
18467
    }
18468
 
18469
    public fulfillPOForExtBilling_args(
18470
      long itemId,
18471
      long quantity)
18472
    {
18473
      this();
18474
      this.itemId = itemId;
18475
      setItemIdIsSet(true);
18476
      this.quantity = quantity;
18477
      setQuantityIsSet(true);
18478
    }
18479
 
18480
    /**
18481
     * Performs a deep copy on <i>other</i>.
18482
     */
18483
    public fulfillPOForExtBilling_args(fulfillPOForExtBilling_args other) {
18484
      __isset_bit_vector.clear();
18485
      __isset_bit_vector.or(other.__isset_bit_vector);
18486
      this.itemId = other.itemId;
18487
      this.quantity = other.quantity;
18488
    }
18489
 
18490
    public fulfillPOForExtBilling_args deepCopy() {
18491
      return new fulfillPOForExtBilling_args(this);
18492
    }
18493
 
18494
    @Override
18495
    public void clear() {
18496
      setItemIdIsSet(false);
18497
      this.itemId = 0;
18498
      setQuantityIsSet(false);
18499
      this.quantity = 0;
18500
    }
18501
 
18502
    public long getItemId() {
18503
      return this.itemId;
18504
    }
18505
 
18506
    public void setItemId(long itemId) {
18507
      this.itemId = itemId;
18508
      setItemIdIsSet(true);
18509
    }
18510
 
18511
    public void unsetItemId() {
18512
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
18513
    }
18514
 
18515
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
18516
    public boolean isSetItemId() {
18517
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
18518
    }
18519
 
18520
    public void setItemIdIsSet(boolean value) {
18521
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
18522
    }
18523
 
18524
    public long getQuantity() {
18525
      return this.quantity;
18526
    }
18527
 
18528
    public void setQuantity(long quantity) {
18529
      this.quantity = quantity;
18530
      setQuantityIsSet(true);
18531
    }
18532
 
18533
    public void unsetQuantity() {
18534
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
18535
    }
18536
 
18537
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
18538
    public boolean isSetQuantity() {
18539
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
18540
    }
18541
 
18542
    public void setQuantityIsSet(boolean value) {
18543
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
18544
    }
18545
 
18546
    public void setFieldValue(_Fields field, Object value) {
18547
      switch (field) {
18548
      case ITEM_ID:
18549
        if (value == null) {
18550
          unsetItemId();
18551
        } else {
18552
          setItemId((Long)value);
18553
        }
18554
        break;
18555
 
18556
      case QUANTITY:
18557
        if (value == null) {
18558
          unsetQuantity();
18559
        } else {
18560
          setQuantity((Long)value);
18561
        }
18562
        break;
18563
 
18564
      }
18565
    }
18566
 
18567
    public Object getFieldValue(_Fields field) {
18568
      switch (field) {
18569
      case ITEM_ID:
18570
        return Long.valueOf(getItemId());
18571
 
18572
      case QUANTITY:
18573
        return Long.valueOf(getQuantity());
18574
 
18575
      }
18576
      throw new IllegalStateException();
18577
    }
18578
 
18579
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18580
    public boolean isSet(_Fields field) {
18581
      if (field == null) {
18582
        throw new IllegalArgumentException();
18583
      }
18584
 
18585
      switch (field) {
18586
      case ITEM_ID:
18587
        return isSetItemId();
18588
      case QUANTITY:
18589
        return isSetQuantity();
18590
      }
18591
      throw new IllegalStateException();
18592
    }
18593
 
18594
    @Override
18595
    public boolean equals(Object that) {
18596
      if (that == null)
18597
        return false;
18598
      if (that instanceof fulfillPOForExtBilling_args)
18599
        return this.equals((fulfillPOForExtBilling_args)that);
18600
      return false;
18601
    }
18602
 
18603
    public boolean equals(fulfillPOForExtBilling_args that) {
18604
      if (that == null)
18605
        return false;
18606
 
18607
      boolean this_present_itemId = true;
18608
      boolean that_present_itemId = true;
18609
      if (this_present_itemId || that_present_itemId) {
18610
        if (!(this_present_itemId && that_present_itemId))
18611
          return false;
18612
        if (this.itemId != that.itemId)
18613
          return false;
18614
      }
18615
 
18616
      boolean this_present_quantity = true;
18617
      boolean that_present_quantity = true;
18618
      if (this_present_quantity || that_present_quantity) {
18619
        if (!(this_present_quantity && that_present_quantity))
18620
          return false;
18621
        if (this.quantity != that.quantity)
18622
          return false;
18623
      }
18624
 
18625
      return true;
18626
    }
18627
 
18628
    @Override
18629
    public int hashCode() {
18630
      return 0;
18631
    }
18632
 
18633
    public int compareTo(fulfillPOForExtBilling_args other) {
18634
      if (!getClass().equals(other.getClass())) {
18635
        return getClass().getName().compareTo(other.getClass().getName());
18636
      }
18637
 
18638
      int lastComparison = 0;
18639
      fulfillPOForExtBilling_args typedOther = (fulfillPOForExtBilling_args)other;
18640
 
18641
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
18642
      if (lastComparison != 0) {
18643
        return lastComparison;
18644
      }
18645
      if (isSetItemId()) {
18646
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
18647
        if (lastComparison != 0) {
18648
          return lastComparison;
18649
        }
18650
      }
18651
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
18652
      if (lastComparison != 0) {
18653
        return lastComparison;
18654
      }
18655
      if (isSetQuantity()) {
18656
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
18657
        if (lastComparison != 0) {
18658
          return lastComparison;
18659
        }
18660
      }
18661
      return 0;
18662
    }
18663
 
18664
    public _Fields fieldForId(int fieldId) {
18665
      return _Fields.findByThriftId(fieldId);
18666
    }
18667
 
18668
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18669
      org.apache.thrift.protocol.TField field;
18670
      iprot.readStructBegin();
18671
      while (true)
18672
      {
18673
        field = iprot.readFieldBegin();
18674
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18675
          break;
18676
        }
18677
        switch (field.id) {
18678
          case 1: // ITEM_ID
18679
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18680
              this.itemId = iprot.readI64();
18681
              setItemIdIsSet(true);
18682
            } else { 
18683
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18684
            }
18685
            break;
18686
          case 2: // QUANTITY
18687
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18688
              this.quantity = iprot.readI64();
18689
              setQuantityIsSet(true);
18690
            } else { 
18691
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18692
            }
18693
            break;
18694
          default:
18695
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18696
        }
18697
        iprot.readFieldEnd();
18698
      }
18699
      iprot.readStructEnd();
18700
      validate();
18701
    }
18702
 
18703
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18704
      validate();
18705
 
18706
      oprot.writeStructBegin(STRUCT_DESC);
18707
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
18708
      oprot.writeI64(this.itemId);
18709
      oprot.writeFieldEnd();
18710
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
18711
      oprot.writeI64(this.quantity);
18712
      oprot.writeFieldEnd();
18713
      oprot.writeFieldStop();
18714
      oprot.writeStructEnd();
18715
    }
18716
 
18717
    @Override
18718
    public String toString() {
18719
      StringBuilder sb = new StringBuilder("fulfillPOForExtBilling_args(");
18720
      boolean first = true;
18721
 
18722
      sb.append("itemId:");
18723
      sb.append(this.itemId);
18724
      first = false;
18725
      if (!first) sb.append(", ");
18726
      sb.append("quantity:");
18727
      sb.append(this.quantity);
18728
      first = false;
18729
      sb.append(")");
18730
      return sb.toString();
18731
    }
18732
 
18733
    public void validate() throws org.apache.thrift.TException {
18734
      // check for required fields
18735
    }
18736
 
18737
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18738
      try {
18739
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18740
      } catch (org.apache.thrift.TException te) {
18741
        throw new java.io.IOException(te);
18742
      }
18743
    }
18744
 
18745
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18746
      try {
18747
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
18748
        __isset_bit_vector = new BitSet(1);
18749
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18750
      } catch (org.apache.thrift.TException te) {
18751
        throw new java.io.IOException(te);
18752
      }
18753
    }
18754
 
18755
  }
18756
 
18757
  public static class fulfillPOForExtBilling_result implements org.apache.thrift.TBase<fulfillPOForExtBilling_result, fulfillPOForExtBilling_result._Fields>, java.io.Serializable, Cloneable   {
18758
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPOForExtBilling_result");
18759
 
18760
 
18761
 
18762
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18763
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18764
;
18765
 
18766
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18767
 
18768
      static {
18769
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18770
          byName.put(field.getFieldName(), field);
18771
        }
18772
      }
18773
 
18774
      /**
18775
       * Find the _Fields constant that matches fieldId, or null if its not found.
18776
       */
18777
      public static _Fields findByThriftId(int fieldId) {
18778
        switch(fieldId) {
18779
          default:
18780
            return null;
18781
        }
18782
      }
18783
 
18784
      /**
18785
       * Find the _Fields constant that matches fieldId, throwing an exception
18786
       * if it is not found.
18787
       */
18788
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18789
        _Fields fields = findByThriftId(fieldId);
18790
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18791
        return fields;
18792
      }
18793
 
18794
      /**
18795
       * Find the _Fields constant that matches name, or null if its not found.
18796
       */
18797
      public static _Fields findByName(String name) {
18798
        return byName.get(name);
18799
      }
18800
 
18801
      private final short _thriftId;
18802
      private final String _fieldName;
18803
 
18804
      _Fields(short thriftId, String fieldName) {
18805
        _thriftId = thriftId;
18806
        _fieldName = fieldName;
18807
      }
18808
 
18809
      public short getThriftFieldId() {
18810
        return _thriftId;
18811
      }
18812
 
18813
      public String getFieldName() {
18814
        return _fieldName;
18815
      }
18816
    }
18817
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18818
    static {
18819
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18820
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18821
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPOForExtBilling_result.class, metaDataMap);
18822
    }
18823
 
18824
    public fulfillPOForExtBilling_result() {
18825
    }
18826
 
18827
    /**
18828
     * Performs a deep copy on <i>other</i>.
18829
     */
18830
    public fulfillPOForExtBilling_result(fulfillPOForExtBilling_result other) {
18831
    }
18832
 
18833
    public fulfillPOForExtBilling_result deepCopy() {
18834
      return new fulfillPOForExtBilling_result(this);
18835
    }
18836
 
18837
    @Override
18838
    public void clear() {
18839
    }
18840
 
18841
    public void setFieldValue(_Fields field, Object value) {
18842
      switch (field) {
18843
      }
18844
    }
18845
 
18846
    public Object getFieldValue(_Fields field) {
18847
      switch (field) {
18848
      }
18849
      throw new IllegalStateException();
18850
    }
18851
 
18852
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18853
    public boolean isSet(_Fields field) {
18854
      if (field == null) {
18855
        throw new IllegalArgumentException();
18856
      }
18857
 
18858
      switch (field) {
18859
      }
18860
      throw new IllegalStateException();
18861
    }
18862
 
18863
    @Override
18864
    public boolean equals(Object that) {
18865
      if (that == null)
18866
        return false;
18867
      if (that instanceof fulfillPOForExtBilling_result)
18868
        return this.equals((fulfillPOForExtBilling_result)that);
18869
      return false;
18870
    }
18871
 
18872
    public boolean equals(fulfillPOForExtBilling_result that) {
18873
      if (that == null)
18874
        return false;
18875
 
18876
      return true;
18877
    }
18878
 
18879
    @Override
18880
    public int hashCode() {
18881
      return 0;
18882
    }
18883
 
18884
    public int compareTo(fulfillPOForExtBilling_result other) {
18885
      if (!getClass().equals(other.getClass())) {
18886
        return getClass().getName().compareTo(other.getClass().getName());
18887
      }
18888
 
18889
      int lastComparison = 0;
18890
      fulfillPOForExtBilling_result typedOther = (fulfillPOForExtBilling_result)other;
18891
 
18892
      return 0;
18893
    }
18894
 
18895
    public _Fields fieldForId(int fieldId) {
18896
      return _Fields.findByThriftId(fieldId);
18897
    }
18898
 
18899
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18900
      org.apache.thrift.protocol.TField field;
18901
      iprot.readStructBegin();
18902
      while (true)
18903
      {
18904
        field = iprot.readFieldBegin();
18905
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18906
          break;
18907
        }
18908
        switch (field.id) {
18909
          default:
18910
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18911
        }
18912
        iprot.readFieldEnd();
18913
      }
18914
      iprot.readStructEnd();
18915
      validate();
18916
    }
18917
 
18918
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18919
      oprot.writeStructBegin(STRUCT_DESC);
18920
 
18921
      oprot.writeFieldStop();
18922
      oprot.writeStructEnd();
18923
    }
18924
 
18925
    @Override
18926
    public String toString() {
18927
      StringBuilder sb = new StringBuilder("fulfillPOForExtBilling_result(");
18928
      boolean first = true;
18929
 
18930
      sb.append(")");
18931
      return sb.toString();
18932
    }
18933
 
18934
    public void validate() throws org.apache.thrift.TException {
18935
      // check for required fields
18936
    }
18937
 
18938
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18939
      try {
18940
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18941
      } catch (org.apache.thrift.TException te) {
18942
        throw new java.io.IOException(te);
18943
      }
18944
    }
18945
 
18946
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18947
      try {
18948
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18949
      } catch (org.apache.thrift.TException te) {
18950
        throw new java.io.IOException(te);
18951
      }
18952
    }
18953
 
18954
  }
18955
 
7410 amar.kumar 18956
  public static class closePO_args implements org.apache.thrift.TBase<closePO_args, closePO_args._Fields>, java.io.Serializable, Cloneable   {
18957
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePO_args");
18958
 
18959
    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);
18960
 
18961
    private long poId; // required
18962
 
18963
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18964
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18965
      PO_ID((short)1, "poId");
18966
 
18967
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18968
 
18969
      static {
18970
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18971
          byName.put(field.getFieldName(), field);
18972
        }
18973
      }
18974
 
18975
      /**
18976
       * Find the _Fields constant that matches fieldId, or null if its not found.
18977
       */
18978
      public static _Fields findByThriftId(int fieldId) {
18979
        switch(fieldId) {
18980
          case 1: // PO_ID
18981
            return PO_ID;
18982
          default:
18983
            return null;
18984
        }
18985
      }
18986
 
18987
      /**
18988
       * Find the _Fields constant that matches fieldId, throwing an exception
18989
       * if it is not found.
18990
       */
18991
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18992
        _Fields fields = findByThriftId(fieldId);
18993
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18994
        return fields;
18995
      }
18996
 
18997
      /**
18998
       * Find the _Fields constant that matches name, or null if its not found.
18999
       */
19000
      public static _Fields findByName(String name) {
19001
        return byName.get(name);
19002
      }
19003
 
19004
      private final short _thriftId;
19005
      private final String _fieldName;
19006
 
19007
      _Fields(short thriftId, String fieldName) {
19008
        _thriftId = thriftId;
19009
        _fieldName = fieldName;
19010
      }
19011
 
19012
      public short getThriftFieldId() {
19013
        return _thriftId;
19014
      }
19015
 
19016
      public String getFieldName() {
19017
        return _fieldName;
19018
      }
19019
    }
19020
 
19021
    // isset id assignments
19022
    private static final int __POID_ISSET_ID = 0;
19023
    private BitSet __isset_bit_vector = new BitSet(1);
19024
 
19025
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19026
    static {
19027
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19028
      tmpMap.put(_Fields.PO_ID, new org.apache.thrift.meta_data.FieldMetaData("poId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19029
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19030
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19031
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePO_args.class, metaDataMap);
19032
    }
19033
 
19034
    public closePO_args() {
19035
    }
19036
 
19037
    public closePO_args(
19038
      long poId)
19039
    {
19040
      this();
19041
      this.poId = poId;
19042
      setPoIdIsSet(true);
19043
    }
19044
 
19045
    /**
19046
     * Performs a deep copy on <i>other</i>.
19047
     */
19048
    public closePO_args(closePO_args other) {
19049
      __isset_bit_vector.clear();
19050
      __isset_bit_vector.or(other.__isset_bit_vector);
19051
      this.poId = other.poId;
19052
    }
19053
 
19054
    public closePO_args deepCopy() {
19055
      return new closePO_args(this);
19056
    }
19057
 
19058
    @Override
19059
    public void clear() {
19060
      setPoIdIsSet(false);
19061
      this.poId = 0;
19062
    }
19063
 
19064
    public long getPoId() {
19065
      return this.poId;
19066
    }
19067
 
19068
    public void setPoId(long poId) {
19069
      this.poId = poId;
19070
      setPoIdIsSet(true);
19071
    }
19072
 
19073
    public void unsetPoId() {
19074
      __isset_bit_vector.clear(__POID_ISSET_ID);
19075
    }
19076
 
19077
    /** Returns true if field poId is set (has been assigned a value) and false otherwise */
19078
    public boolean isSetPoId() {
19079
      return __isset_bit_vector.get(__POID_ISSET_ID);
19080
    }
19081
 
19082
    public void setPoIdIsSet(boolean value) {
19083
      __isset_bit_vector.set(__POID_ISSET_ID, value);
19084
    }
19085
 
19086
    public void setFieldValue(_Fields field, Object value) {
19087
      switch (field) {
19088
      case PO_ID:
19089
        if (value == null) {
19090
          unsetPoId();
19091
        } else {
19092
          setPoId((Long)value);
19093
        }
19094
        break;
19095
 
19096
      }
19097
    }
19098
 
19099
    public Object getFieldValue(_Fields field) {
19100
      switch (field) {
19101
      case PO_ID:
19102
        return Long.valueOf(getPoId());
19103
 
19104
      }
19105
      throw new IllegalStateException();
19106
    }
19107
 
19108
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19109
    public boolean isSet(_Fields field) {
19110
      if (field == null) {
19111
        throw new IllegalArgumentException();
19112
      }
19113
 
19114
      switch (field) {
19115
      case PO_ID:
19116
        return isSetPoId();
19117
      }
19118
      throw new IllegalStateException();
19119
    }
19120
 
19121
    @Override
19122
    public boolean equals(Object that) {
19123
      if (that == null)
19124
        return false;
19125
      if (that instanceof closePO_args)
19126
        return this.equals((closePO_args)that);
19127
      return false;
19128
    }
19129
 
19130
    public boolean equals(closePO_args that) {
19131
      if (that == null)
19132
        return false;
19133
 
19134
      boolean this_present_poId = true;
19135
      boolean that_present_poId = true;
19136
      if (this_present_poId || that_present_poId) {
19137
        if (!(this_present_poId && that_present_poId))
19138
          return false;
19139
        if (this.poId != that.poId)
19140
          return false;
19141
      }
19142
 
19143
      return true;
19144
    }
19145
 
19146
    @Override
19147
    public int hashCode() {
19148
      return 0;
19149
    }
19150
 
19151
    public int compareTo(closePO_args other) {
19152
      if (!getClass().equals(other.getClass())) {
19153
        return getClass().getName().compareTo(other.getClass().getName());
19154
      }
19155
 
19156
      int lastComparison = 0;
19157
      closePO_args typedOther = (closePO_args)other;
19158
 
19159
      lastComparison = Boolean.valueOf(isSetPoId()).compareTo(typedOther.isSetPoId());
19160
      if (lastComparison != 0) {
19161
        return lastComparison;
19162
      }
19163
      if (isSetPoId()) {
19164
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.poId, typedOther.poId);
19165
        if (lastComparison != 0) {
19166
          return lastComparison;
19167
        }
19168
      }
19169
      return 0;
19170
    }
19171
 
19172
    public _Fields fieldForId(int fieldId) {
19173
      return _Fields.findByThriftId(fieldId);
19174
    }
19175
 
19176
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19177
      org.apache.thrift.protocol.TField field;
19178
      iprot.readStructBegin();
19179
      while (true)
19180
      {
19181
        field = iprot.readFieldBegin();
19182
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19183
          break;
19184
        }
19185
        switch (field.id) {
19186
          case 1: // PO_ID
19187
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19188
              this.poId = iprot.readI64();
19189
              setPoIdIsSet(true);
19190
            } else { 
19191
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19192
            }
19193
            break;
19194
          default:
19195
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19196
        }
19197
        iprot.readFieldEnd();
19198
      }
19199
      iprot.readStructEnd();
19200
      validate();
19201
    }
19202
 
19203
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19204
      validate();
19205
 
19206
      oprot.writeStructBegin(STRUCT_DESC);
19207
      oprot.writeFieldBegin(PO_ID_FIELD_DESC);
19208
      oprot.writeI64(this.poId);
19209
      oprot.writeFieldEnd();
19210
      oprot.writeFieldStop();
19211
      oprot.writeStructEnd();
19212
    }
19213
 
19214
    @Override
19215
    public String toString() {
19216
      StringBuilder sb = new StringBuilder("closePO_args(");
19217
      boolean first = true;
19218
 
19219
      sb.append("poId:");
19220
      sb.append(this.poId);
19221
      first = false;
19222
      sb.append(")");
19223
      return sb.toString();
19224
    }
19225
 
19226
    public void validate() throws org.apache.thrift.TException {
19227
      // check for required fields
19228
    }
19229
 
19230
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19231
      try {
19232
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19233
      } catch (org.apache.thrift.TException te) {
19234
        throw new java.io.IOException(te);
19235
      }
19236
    }
19237
 
19238
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19239
      try {
19240
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19241
      } catch (org.apache.thrift.TException te) {
19242
        throw new java.io.IOException(te);
19243
      }
19244
    }
19245
 
19246
  }
19247
 
19248
  public static class closePO_result implements org.apache.thrift.TBase<closePO_result, closePO_result._Fields>, java.io.Serializable, Cloneable   {
19249
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePO_result");
19250
 
19251
    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);
19252
 
19253
    private PurchaseServiceException e; // required
19254
 
19255
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19256
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19257
      E((short)1, "e");
19258
 
19259
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19260
 
19261
      static {
19262
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19263
          byName.put(field.getFieldName(), field);
19264
        }
19265
      }
19266
 
19267
      /**
19268
       * Find the _Fields constant that matches fieldId, or null if its not found.
19269
       */
19270
      public static _Fields findByThriftId(int fieldId) {
19271
        switch(fieldId) {
19272
          case 1: // E
19273
            return E;
19274
          default:
19275
            return null;
19276
        }
19277
      }
19278
 
19279
      /**
19280
       * Find the _Fields constant that matches fieldId, throwing an exception
19281
       * if it is not found.
19282
       */
19283
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19284
        _Fields fields = findByThriftId(fieldId);
19285
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19286
        return fields;
19287
      }
19288
 
19289
      /**
19290
       * Find the _Fields constant that matches name, or null if its not found.
19291
       */
19292
      public static _Fields findByName(String name) {
19293
        return byName.get(name);
19294
      }
19295
 
19296
      private final short _thriftId;
19297
      private final String _fieldName;
19298
 
19299
      _Fields(short thriftId, String fieldName) {
19300
        _thriftId = thriftId;
19301
        _fieldName = fieldName;
19302
      }
19303
 
19304
      public short getThriftFieldId() {
19305
        return _thriftId;
19306
      }
19307
 
19308
      public String getFieldName() {
19309
        return _fieldName;
19310
      }
19311
    }
19312
 
19313
    // isset id assignments
19314
 
19315
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19316
    static {
19317
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19318
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19319
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
19320
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19321
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePO_result.class, metaDataMap);
19322
    }
19323
 
19324
    public closePO_result() {
19325
    }
19326
 
19327
    public closePO_result(
19328
      PurchaseServiceException e)
19329
    {
19330
      this();
19331
      this.e = e;
19332
    }
19333
 
19334
    /**
19335
     * Performs a deep copy on <i>other</i>.
19336
     */
19337
    public closePO_result(closePO_result other) {
19338
      if (other.isSetE()) {
19339
        this.e = new PurchaseServiceException(other.e);
19340
      }
19341
    }
19342
 
19343
    public closePO_result deepCopy() {
19344
      return new closePO_result(this);
19345
    }
19346
 
19347
    @Override
19348
    public void clear() {
19349
      this.e = null;
19350
    }
19351
 
19352
    public PurchaseServiceException getE() {
19353
      return this.e;
19354
    }
19355
 
19356
    public void setE(PurchaseServiceException e) {
19357
      this.e = e;
19358
    }
19359
 
19360
    public void unsetE() {
19361
      this.e = null;
19362
    }
19363
 
19364
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
19365
    public boolean isSetE() {
19366
      return this.e != null;
19367
    }
19368
 
19369
    public void setEIsSet(boolean value) {
19370
      if (!value) {
19371
        this.e = null;
19372
      }
19373
    }
19374
 
19375
    public void setFieldValue(_Fields field, Object value) {
19376
      switch (field) {
19377
      case E:
19378
        if (value == null) {
19379
          unsetE();
19380
        } else {
19381
          setE((PurchaseServiceException)value);
19382
        }
19383
        break;
19384
 
19385
      }
19386
    }
19387
 
19388
    public Object getFieldValue(_Fields field) {
19389
      switch (field) {
19390
      case E:
19391
        return getE();
19392
 
19393
      }
19394
      throw new IllegalStateException();
19395
    }
19396
 
19397
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19398
    public boolean isSet(_Fields field) {
19399
      if (field == null) {
19400
        throw new IllegalArgumentException();
19401
      }
19402
 
19403
      switch (field) {
19404
      case E:
19405
        return isSetE();
19406
      }
19407
      throw new IllegalStateException();
19408
    }
19409
 
19410
    @Override
19411
    public boolean equals(Object that) {
19412
      if (that == null)
19413
        return false;
19414
      if (that instanceof closePO_result)
19415
        return this.equals((closePO_result)that);
19416
      return false;
19417
    }
19418
 
19419
    public boolean equals(closePO_result that) {
19420
      if (that == null)
19421
        return false;
19422
 
19423
      boolean this_present_e = true && this.isSetE();
19424
      boolean that_present_e = true && that.isSetE();
19425
      if (this_present_e || that_present_e) {
19426
        if (!(this_present_e && that_present_e))
19427
          return false;
19428
        if (!this.e.equals(that.e))
19429
          return false;
19430
      }
19431
 
19432
      return true;
19433
    }
19434
 
19435
    @Override
19436
    public int hashCode() {
19437
      return 0;
19438
    }
19439
 
19440
    public int compareTo(closePO_result other) {
19441
      if (!getClass().equals(other.getClass())) {
19442
        return getClass().getName().compareTo(other.getClass().getName());
19443
      }
19444
 
19445
      int lastComparison = 0;
19446
      closePO_result typedOther = (closePO_result)other;
19447
 
19448
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
19449
      if (lastComparison != 0) {
19450
        return lastComparison;
19451
      }
19452
      if (isSetE()) {
19453
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
19454
        if (lastComparison != 0) {
19455
          return lastComparison;
19456
        }
19457
      }
19458
      return 0;
19459
    }
19460
 
19461
    public _Fields fieldForId(int fieldId) {
19462
      return _Fields.findByThriftId(fieldId);
19463
    }
19464
 
19465
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19466
      org.apache.thrift.protocol.TField field;
19467
      iprot.readStructBegin();
19468
      while (true)
19469
      {
19470
        field = iprot.readFieldBegin();
19471
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19472
          break;
19473
        }
19474
        switch (field.id) {
19475
          case 1: // E
19476
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
19477
              this.e = new PurchaseServiceException();
19478
              this.e.read(iprot);
19479
            } else { 
19480
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19481
            }
19482
            break;
19483
          default:
19484
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19485
        }
19486
        iprot.readFieldEnd();
19487
      }
19488
      iprot.readStructEnd();
19489
      validate();
19490
    }
19491
 
19492
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19493
      oprot.writeStructBegin(STRUCT_DESC);
19494
 
19495
      if (this.isSetE()) {
19496
        oprot.writeFieldBegin(E_FIELD_DESC);
19497
        this.e.write(oprot);
19498
        oprot.writeFieldEnd();
19499
      }
19500
      oprot.writeFieldStop();
19501
      oprot.writeStructEnd();
19502
    }
19503
 
19504
    @Override
19505
    public String toString() {
19506
      StringBuilder sb = new StringBuilder("closePO_result(");
19507
      boolean first = true;
19508
 
19509
      sb.append("e:");
19510
      if (this.e == null) {
19511
        sb.append("null");
19512
      } else {
19513
        sb.append(this.e);
19514
      }
19515
      first = false;
19516
      sb.append(")");
19517
      return sb.toString();
19518
    }
19519
 
19520
    public void validate() throws org.apache.thrift.TException {
19521
      // check for required fields
19522
    }
19523
 
19524
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19525
      try {
19526
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19527
      } catch (org.apache.thrift.TException te) {
19528
        throw new java.io.IOException(te);
19529
      }
19530
    }
19531
 
19532
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19533
      try {
19534
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19535
      } catch (org.apache.thrift.TException te) {
19536
        throw new java.io.IOException(te);
19537
      }
19538
    }
19539
 
19540
  }
19541
 
19542
  public static class isInvoiceReceived_args implements org.apache.thrift.TBase<isInvoiceReceived_args, isInvoiceReceived_args._Fields>, java.io.Serializable, Cloneable   {
19543
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isInvoiceReceived_args");
19544
 
19545
    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);
19546
    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);
19547
 
19548
    private String invoiceNumber; // required
19549
    private long supplierId; // required
19550
 
19551
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19552
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19553
      INVOICE_NUMBER((short)1, "invoiceNumber"),
19554
      SUPPLIER_ID((short)2, "supplierId");
19555
 
19556
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19557
 
19558
      static {
19559
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19560
          byName.put(field.getFieldName(), field);
19561
        }
19562
      }
19563
 
19564
      /**
19565
       * Find the _Fields constant that matches fieldId, or null if its not found.
19566
       */
19567
      public static _Fields findByThriftId(int fieldId) {
19568
        switch(fieldId) {
19569
          case 1: // INVOICE_NUMBER
19570
            return INVOICE_NUMBER;
19571
          case 2: // SUPPLIER_ID
19572
            return SUPPLIER_ID;
19573
          default:
19574
            return null;
19575
        }
19576
      }
19577
 
19578
      /**
19579
       * Find the _Fields constant that matches fieldId, throwing an exception
19580
       * if it is not found.
19581
       */
19582
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19583
        _Fields fields = findByThriftId(fieldId);
19584
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19585
        return fields;
19586
      }
19587
 
19588
      /**
19589
       * Find the _Fields constant that matches name, or null if its not found.
19590
       */
19591
      public static _Fields findByName(String name) {
19592
        return byName.get(name);
19593
      }
19594
 
19595
      private final short _thriftId;
19596
      private final String _fieldName;
19597
 
19598
      _Fields(short thriftId, String fieldName) {
19599
        _thriftId = thriftId;
19600
        _fieldName = fieldName;
19601
      }
19602
 
19603
      public short getThriftFieldId() {
19604
        return _thriftId;
19605
      }
19606
 
19607
      public String getFieldName() {
19608
        return _fieldName;
19609
      }
19610
    }
19611
 
19612
    // isset id assignments
19613
    private static final int __SUPPLIERID_ISSET_ID = 0;
19614
    private BitSet __isset_bit_vector = new BitSet(1);
19615
 
19616
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19617
    static {
19618
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19619
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19620
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
19621
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19622
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19623
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19624
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isInvoiceReceived_args.class, metaDataMap);
19625
    }
19626
 
19627
    public isInvoiceReceived_args() {
19628
    }
19629
 
19630
    public isInvoiceReceived_args(
19631
      String invoiceNumber,
19632
      long supplierId)
19633
    {
19634
      this();
19635
      this.invoiceNumber = invoiceNumber;
19636
      this.supplierId = supplierId;
19637
      setSupplierIdIsSet(true);
19638
    }
19639
 
19640
    /**
19641
     * Performs a deep copy on <i>other</i>.
19642
     */
19643
    public isInvoiceReceived_args(isInvoiceReceived_args other) {
19644
      __isset_bit_vector.clear();
19645
      __isset_bit_vector.or(other.__isset_bit_vector);
19646
      if (other.isSetInvoiceNumber()) {
19647
        this.invoiceNumber = other.invoiceNumber;
19648
      }
19649
      this.supplierId = other.supplierId;
19650
    }
19651
 
19652
    public isInvoiceReceived_args deepCopy() {
19653
      return new isInvoiceReceived_args(this);
19654
    }
19655
 
19656
    @Override
19657
    public void clear() {
19658
      this.invoiceNumber = null;
19659
      setSupplierIdIsSet(false);
19660
      this.supplierId = 0;
19661
    }
19662
 
19663
    public String getInvoiceNumber() {
19664
      return this.invoiceNumber;
19665
    }
19666
 
19667
    public void setInvoiceNumber(String invoiceNumber) {
19668
      this.invoiceNumber = invoiceNumber;
19669
    }
19670
 
19671
    public void unsetInvoiceNumber() {
19672
      this.invoiceNumber = null;
19673
    }
19674
 
19675
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
19676
    public boolean isSetInvoiceNumber() {
19677
      return this.invoiceNumber != null;
19678
    }
19679
 
19680
    public void setInvoiceNumberIsSet(boolean value) {
19681
      if (!value) {
19682
        this.invoiceNumber = null;
19683
      }
19684
    }
19685
 
19686
    public long getSupplierId() {
19687
      return this.supplierId;
19688
    }
19689
 
19690
    public void setSupplierId(long supplierId) {
19691
      this.supplierId = supplierId;
19692
      setSupplierIdIsSet(true);
19693
    }
19694
 
19695
    public void unsetSupplierId() {
19696
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
19697
    }
19698
 
19699
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
19700
    public boolean isSetSupplierId() {
19701
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
19702
    }
19703
 
19704
    public void setSupplierIdIsSet(boolean value) {
19705
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
19706
    }
19707
 
19708
    public void setFieldValue(_Fields field, Object value) {
19709
      switch (field) {
19710
      case INVOICE_NUMBER:
19711
        if (value == null) {
19712
          unsetInvoiceNumber();
19713
        } else {
19714
          setInvoiceNumber((String)value);
19715
        }
19716
        break;
19717
 
19718
      case SUPPLIER_ID:
19719
        if (value == null) {
19720
          unsetSupplierId();
19721
        } else {
19722
          setSupplierId((Long)value);
19723
        }
19724
        break;
19725
 
19726
      }
19727
    }
19728
 
19729
    public Object getFieldValue(_Fields field) {
19730
      switch (field) {
19731
      case INVOICE_NUMBER:
19732
        return getInvoiceNumber();
19733
 
19734
      case SUPPLIER_ID:
19735
        return Long.valueOf(getSupplierId());
19736
 
19737
      }
19738
      throw new IllegalStateException();
19739
    }
19740
 
19741
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19742
    public boolean isSet(_Fields field) {
19743
      if (field == null) {
19744
        throw new IllegalArgumentException();
19745
      }
19746
 
19747
      switch (field) {
19748
      case INVOICE_NUMBER:
19749
        return isSetInvoiceNumber();
19750
      case SUPPLIER_ID:
19751
        return isSetSupplierId();
19752
      }
19753
      throw new IllegalStateException();
19754
    }
19755
 
19756
    @Override
19757
    public boolean equals(Object that) {
19758
      if (that == null)
19759
        return false;
19760
      if (that instanceof isInvoiceReceived_args)
19761
        return this.equals((isInvoiceReceived_args)that);
19762
      return false;
19763
    }
19764
 
19765
    public boolean equals(isInvoiceReceived_args that) {
19766
      if (that == null)
19767
        return false;
19768
 
19769
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
19770
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
19771
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
19772
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
19773
          return false;
19774
        if (!this.invoiceNumber.equals(that.invoiceNumber))
19775
          return false;
19776
      }
19777
 
19778
      boolean this_present_supplierId = true;
19779
      boolean that_present_supplierId = true;
19780
      if (this_present_supplierId || that_present_supplierId) {
19781
        if (!(this_present_supplierId && that_present_supplierId))
19782
          return false;
19783
        if (this.supplierId != that.supplierId)
19784
          return false;
19785
      }
19786
 
19787
      return true;
19788
    }
19789
 
19790
    @Override
19791
    public int hashCode() {
19792
      return 0;
19793
    }
19794
 
19795
    public int compareTo(isInvoiceReceived_args other) {
19796
      if (!getClass().equals(other.getClass())) {
19797
        return getClass().getName().compareTo(other.getClass().getName());
19798
      }
19799
 
19800
      int lastComparison = 0;
19801
      isInvoiceReceived_args typedOther = (isInvoiceReceived_args)other;
19802
 
19803
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
19804
      if (lastComparison != 0) {
19805
        return lastComparison;
19806
      }
19807
      if (isSetInvoiceNumber()) {
19808
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
19809
        if (lastComparison != 0) {
19810
          return lastComparison;
19811
        }
19812
      }
19813
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
19814
      if (lastComparison != 0) {
19815
        return lastComparison;
19816
      }
19817
      if (isSetSupplierId()) {
19818
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
19819
        if (lastComparison != 0) {
19820
          return lastComparison;
19821
        }
19822
      }
19823
      return 0;
19824
    }
19825
 
19826
    public _Fields fieldForId(int fieldId) {
19827
      return _Fields.findByThriftId(fieldId);
19828
    }
19829
 
19830
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19831
      org.apache.thrift.protocol.TField field;
19832
      iprot.readStructBegin();
19833
      while (true)
19834
      {
19835
        field = iprot.readFieldBegin();
19836
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19837
          break;
19838
        }
19839
        switch (field.id) {
19840
          case 1: // INVOICE_NUMBER
19841
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
19842
              this.invoiceNumber = iprot.readString();
19843
            } else { 
19844
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19845
            }
19846
            break;
19847
          case 2: // SUPPLIER_ID
19848
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19849
              this.supplierId = iprot.readI64();
19850
              setSupplierIdIsSet(true);
19851
            } else { 
19852
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19853
            }
19854
            break;
19855
          default:
19856
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19857
        }
19858
        iprot.readFieldEnd();
19859
      }
19860
      iprot.readStructEnd();
19861
      validate();
19862
    }
19863
 
19864
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19865
      validate();
19866
 
19867
      oprot.writeStructBegin(STRUCT_DESC);
19868
      if (this.invoiceNumber != null) {
19869
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
19870
        oprot.writeString(this.invoiceNumber);
19871
        oprot.writeFieldEnd();
19872
      }
19873
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
19874
      oprot.writeI64(this.supplierId);
19875
      oprot.writeFieldEnd();
19876
      oprot.writeFieldStop();
19877
      oprot.writeStructEnd();
19878
    }
19879
 
19880
    @Override
19881
    public String toString() {
19882
      StringBuilder sb = new StringBuilder("isInvoiceReceived_args(");
19883
      boolean first = true;
19884
 
19885
      sb.append("invoiceNumber:");
19886
      if (this.invoiceNumber == null) {
19887
        sb.append("null");
19888
      } else {
19889
        sb.append(this.invoiceNumber);
19890
      }
19891
      first = false;
19892
      if (!first) sb.append(", ");
19893
      sb.append("supplierId:");
19894
      sb.append(this.supplierId);
19895
      first = false;
19896
      sb.append(")");
19897
      return sb.toString();
19898
    }
19899
 
19900
    public void validate() throws org.apache.thrift.TException {
19901
      // check for required fields
19902
    }
19903
 
19904
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19905
      try {
19906
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19907
      } catch (org.apache.thrift.TException te) {
19908
        throw new java.io.IOException(te);
19909
      }
19910
    }
19911
 
19912
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19913
      try {
19914
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19915
      } catch (org.apache.thrift.TException te) {
19916
        throw new java.io.IOException(te);
19917
      }
19918
    }
19919
 
19920
  }
19921
 
19922
  public static class isInvoiceReceived_result implements org.apache.thrift.TBase<isInvoiceReceived_result, isInvoiceReceived_result._Fields>, java.io.Serializable, Cloneable   {
19923
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isInvoiceReceived_result");
19924
 
19925
    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);
19926
 
19927
    private boolean success; // required
19928
 
19929
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19930
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19931
      SUCCESS((short)0, "success");
19932
 
19933
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19934
 
19935
      static {
19936
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19937
          byName.put(field.getFieldName(), field);
19938
        }
19939
      }
19940
 
19941
      /**
19942
       * Find the _Fields constant that matches fieldId, or null if its not found.
19943
       */
19944
      public static _Fields findByThriftId(int fieldId) {
19945
        switch(fieldId) {
19946
          case 0: // SUCCESS
19947
            return SUCCESS;
19948
          default:
19949
            return null;
19950
        }
19951
      }
19952
 
19953
      /**
19954
       * Find the _Fields constant that matches fieldId, throwing an exception
19955
       * if it is not found.
19956
       */
19957
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19958
        _Fields fields = findByThriftId(fieldId);
19959
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19960
        return fields;
19961
      }
19962
 
19963
      /**
19964
       * Find the _Fields constant that matches name, or null if its not found.
19965
       */
19966
      public static _Fields findByName(String name) {
19967
        return byName.get(name);
19968
      }
19969
 
19970
      private final short _thriftId;
19971
      private final String _fieldName;
19972
 
19973
      _Fields(short thriftId, String fieldName) {
19974
        _thriftId = thriftId;
19975
        _fieldName = fieldName;
19976
      }
19977
 
19978
      public short getThriftFieldId() {
19979
        return _thriftId;
19980
      }
19981
 
19982
      public String getFieldName() {
19983
        return _fieldName;
19984
      }
19985
    }
19986
 
19987
    // isset id assignments
19988
    private static final int __SUCCESS_ISSET_ID = 0;
19989
    private BitSet __isset_bit_vector = new BitSet(1);
19990
 
19991
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19992
    static {
19993
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19994
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19995
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
19996
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19997
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isInvoiceReceived_result.class, metaDataMap);
19998
    }
19999
 
20000
    public isInvoiceReceived_result() {
20001
    }
20002
 
20003
    public isInvoiceReceived_result(
20004
      boolean success)
20005
    {
20006
      this();
20007
      this.success = success;
20008
      setSuccessIsSet(true);
20009
    }
20010
 
20011
    /**
20012
     * Performs a deep copy on <i>other</i>.
20013
     */
20014
    public isInvoiceReceived_result(isInvoiceReceived_result other) {
20015
      __isset_bit_vector.clear();
20016
      __isset_bit_vector.or(other.__isset_bit_vector);
20017
      this.success = other.success;
20018
    }
20019
 
20020
    public isInvoiceReceived_result deepCopy() {
20021
      return new isInvoiceReceived_result(this);
20022
    }
20023
 
20024
    @Override
20025
    public void clear() {
20026
      setSuccessIsSet(false);
20027
      this.success = false;
20028
    }
20029
 
20030
    public boolean isSuccess() {
20031
      return this.success;
20032
    }
20033
 
20034
    public void setSuccess(boolean success) {
20035
      this.success = success;
20036
      setSuccessIsSet(true);
20037
    }
20038
 
20039
    public void unsetSuccess() {
20040
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
20041
    }
20042
 
20043
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
20044
    public boolean isSetSuccess() {
20045
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
20046
    }
20047
 
20048
    public void setSuccessIsSet(boolean value) {
20049
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
20050
    }
20051
 
20052
    public void setFieldValue(_Fields field, Object value) {
20053
      switch (field) {
20054
      case SUCCESS:
20055
        if (value == null) {
20056
          unsetSuccess();
20057
        } else {
20058
          setSuccess((Boolean)value);
20059
        }
20060
        break;
20061
 
20062
      }
20063
    }
20064
 
20065
    public Object getFieldValue(_Fields field) {
20066
      switch (field) {
20067
      case SUCCESS:
20068
        return Boolean.valueOf(isSuccess());
20069
 
20070
      }
20071
      throw new IllegalStateException();
20072
    }
20073
 
20074
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20075
    public boolean isSet(_Fields field) {
20076
      if (field == null) {
20077
        throw new IllegalArgumentException();
20078
      }
20079
 
20080
      switch (field) {
20081
      case SUCCESS:
20082
        return isSetSuccess();
20083
      }
20084
      throw new IllegalStateException();
20085
    }
20086
 
20087
    @Override
20088
    public boolean equals(Object that) {
20089
      if (that == null)
20090
        return false;
20091
      if (that instanceof isInvoiceReceived_result)
20092
        return this.equals((isInvoiceReceived_result)that);
20093
      return false;
20094
    }
20095
 
20096
    public boolean equals(isInvoiceReceived_result that) {
20097
      if (that == null)
20098
        return false;
20099
 
20100
      boolean this_present_success = true;
20101
      boolean that_present_success = true;
20102
      if (this_present_success || that_present_success) {
20103
        if (!(this_present_success && that_present_success))
20104
          return false;
20105
        if (this.success != that.success)
20106
          return false;
20107
      }
20108
 
20109
      return true;
20110
    }
20111
 
20112
    @Override
20113
    public int hashCode() {
20114
      return 0;
20115
    }
20116
 
20117
    public int compareTo(isInvoiceReceived_result other) {
20118
      if (!getClass().equals(other.getClass())) {
20119
        return getClass().getName().compareTo(other.getClass().getName());
20120
      }
20121
 
20122
      int lastComparison = 0;
20123
      isInvoiceReceived_result typedOther = (isInvoiceReceived_result)other;
20124
 
20125
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
20126
      if (lastComparison != 0) {
20127
        return lastComparison;
20128
      }
20129
      if (isSetSuccess()) {
20130
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
20131
        if (lastComparison != 0) {
20132
          return lastComparison;
20133
        }
20134
      }
20135
      return 0;
20136
    }
20137
 
20138
    public _Fields fieldForId(int fieldId) {
20139
      return _Fields.findByThriftId(fieldId);
20140
    }
20141
 
20142
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20143
      org.apache.thrift.protocol.TField field;
20144
      iprot.readStructBegin();
20145
      while (true)
20146
      {
20147
        field = iprot.readFieldBegin();
20148
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20149
          break;
20150
        }
20151
        switch (field.id) {
20152
          case 0: // SUCCESS
20153
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
20154
              this.success = iprot.readBool();
20155
              setSuccessIsSet(true);
20156
            } else { 
20157
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20158
            }
20159
            break;
20160
          default:
20161
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20162
        }
20163
        iprot.readFieldEnd();
20164
      }
20165
      iprot.readStructEnd();
20166
      validate();
20167
    }
20168
 
20169
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20170
      oprot.writeStructBegin(STRUCT_DESC);
20171
 
20172
      if (this.isSetSuccess()) {
20173
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20174
        oprot.writeBool(this.success);
20175
        oprot.writeFieldEnd();
20176
      }
20177
      oprot.writeFieldStop();
20178
      oprot.writeStructEnd();
20179
    }
20180
 
20181
    @Override
20182
    public String toString() {
20183
      StringBuilder sb = new StringBuilder("isInvoiceReceived_result(");
20184
      boolean first = true;
20185
 
20186
      sb.append("success:");
20187
      sb.append(this.success);
20188
      first = false;
20189
      sb.append(")");
20190
      return sb.toString();
20191
    }
20192
 
20193
    public void validate() throws org.apache.thrift.TException {
20194
      // check for required fields
20195
    }
20196
 
20197
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20198
      try {
20199
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20200
      } catch (org.apache.thrift.TException te) {
20201
        throw new java.io.IOException(te);
20202
      }
20203
    }
20204
 
20205
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20206
      try {
20207
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20208
      } catch (org.apache.thrift.TException te) {
20209
        throw new java.io.IOException(te);
20210
      }
20211
    }
20212
 
20213
  }
20214
 
4496 mandeep.dh 20215
}